YouGroove Posted September 10, 2014 Share Posted September 10, 2014 I tested Nobiax plant , and the alpha of plants seems like jagged edges or not smooth compared to anti aliasing on rocks for example. But the original diffuse is pretty soft without edges jaggies. It is some way to have alphas for plants better like below? Or it is only a shader solution with some softening or cut out functionnality ? Some example of clean alpha rendering : Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Guppy Posted September 10, 2014 Share Posted September 10, 2014 Looks like 1 bit alpha testing - but that's a thing from dem olden days if I were to guess I'd say the shader looked at the alpha value and did something like if alpha > X then 1 else 0. What shader are you using? Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
YouGroove Posted September 10, 2014 Author Share Posted September 10, 2014 I use the standard diffuse+normal+alpha provided in LE3 , not modified. I were to guess I'd say the shader looked at the alpha value and did something like if alpha > X then 1 else 0 I read a solution to that problem long time ago also. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rastar Posted September 10, 2014 Share Posted September 10, 2014 The shader has a cutoff value of 0.5 hard-coded in the fragment shader. I don't have Leadwerks access right now, but it should read something like if (color.a < 0.5) discard; You could lower that value to see if it gives better results (maybe first saving a copy of the shader). Also, do the leaf textures use color bleed, meaning the leaf edges are smeared or surrounded by some green color? That helps with some artifacts you might get with alpha testing and mipmapping. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted September 10, 2014 Share Posted September 10, 2014 I'd take a look at this in your case: http://www.leadwerks.com/werkspace/topic/8999-fence-shadowing/ It may not help but it looks related. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted September 10, 2014 Author Share Posted September 10, 2014 Yes we have that : //Modulate blend with diffuse map outcolor *= texture(texture0,ex_texcoords0); if (outcolor.a<0.5) discard; Changing to 1 or 0.01 it changes thge amount of border , the outlines have always some jaggy effect; i just thaught it was other techniques. @Gamecreator: I have same settings. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted September 10, 2014 Share Posted September 10, 2014 Alpha discard is typically used today in games for vegetation. Alpha blending used to look better on the low-res textures back in the day, but today alpha discard is faster and doesn't suffer from z-fighting. You can enable multisample antialias to prevent jagged edges, and make sure your textures are high-resolution enough that they don't look odd. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
YouGroove Posted September 10, 2014 Author Share Posted September 10, 2014 The source image is very clean : Alpha blending used to look better on the low-res textures back in the day This is what i seen , some people using custom shaders with alpha mask distance filling to avoid pixels look. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted September 10, 2014 Share Posted September 10, 2014 In that case, I think what you're seeing is just normal screen aliasing. Turning MSAA on will eliminate this but retain crisp sharp edges. At higher levels, it will look identical to the cg renders you posted above. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.