opengl - PCF and grazing light aka projective aliasing -



opengl - PCF and grazing light aka projective aliasing -

i implementing , modifing alternative biasing solutions shadow mapping. , of course of study combining them different techniques soft shadows.

and having problems pcf. shadowing backfaces of surfaces via testing if dotproduct of lite direction , normal of fragment greater 0, hence can backside of whatever. works absolutly fine hard shadows.

so basicly line of code in fragment shader shades backfaces of object:

islit= dot(lsfragnormal.xyz, lightviewpos.xyz) > 0.0f ? 0.0 : islit;

and works mentioned fine hard shadows. when comes pcf, first intention utilize above, check if current texel in filter kernel in shadow or not. this statement shadow testing current texel of pcf filter kernel:

if((currentdepth < shadowmapdepth) && !(dot(lsfragnormal.xyz, lightviewpos.xyz) > 0.0f ))

but "shadow edge" front end of object of object still hard "shadow edge". of course of study makes sense, since texel of pcf filter kernel, normal of current fragment tested, , hence if fragment on backside of object fragment shadowed. when remove "dot product test", on fading front end backside of object have problems appearing artifacts, due grazing light.

with "dot product testing": can see, shadow casted looks good, shadow on backface of object hard shadow:

without "dot product testing": border of "backside shadow" starts soften towards lite front, still ends in hard edge. , can see artifacts, guess come undersampling in region:

what (or @ to the lowest degree better) soft shadow on edges of "backside shadows"? without introducting complex algorithms "queried virtual shadow maps", of course of study perfect solution case, interactive applications, not possible utilize procedure this.

or not have chance against aliasing interactive applications.

and interested if think hard border of "backside shadows" accepable?

opengl glsl shadow-mapping

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -