Hot answers tagged


To do this, you must sample your alpha texture in the depth buffer creation fragment shader, which is ShadowCasterFP in your code. When you sampled the texture, you should discard pixels below a certain alpha level, or do a clip: if( color.a<0.1 ) discard; clip( color.a<0.1?-1:1 ); //where color is your sampled texture at the current fragment ...

Only top voted, non community-wiki answers of a minimum length are eligible