Original Post
Hi everyone
I'm writing a deferred renderer using DX9.
I ran to a problem with specular reflections produced by directional lights. when the ray of light is parallel to the lit surface, specular reflection produced by the light starts flickering as I move the camera.
[attachment=11458:flicker_1.png]
[attachment=11459:flicker_2.png]
I made sure that all normals were normalized after they came through the rasterizer. I'm even renormalizing them once they've been sampled from the normals texture.
I think it's got something to do with the precision loss as the normals go through the rasterizer, but the weird thing is that if I decrease the light angle even by a fraction,the artifact disappears altogether and the reflection becomes stable ( which would suggest that it's not a precision issue after all ).
I'm storing my normals uncompressed in a DXT5 texture, but I tried different formats as well, including a 32bit color texture. I'm sampling it using a POINT filter ( tried linear, but nothing changes as well ).
I'd be grateful for all suggestions.
Cheers,
Paksas
I'm writing a deferred renderer using DX9.
I ran to a problem with specular reflections produced by directional lights. when the ray of light is parallel to the lit surface, specular reflection produced by the light starts flickering as I move the camera.
[attachment=11458:flicker_1.png]
[attachment=11459:flicker_2.png]
I made sure that all normals were normalized after they came through the rasterizer. I'm even renormalizing them once they've been sampled from the normals texture.
I think it's got something to do with the precision loss as the normals go through the rasterizer, but the weird thing is that if I decrease the light angle even by a fraction,the artifact disappears altogether and the reflection becomes stable ( which would suggest that it's not a precision issue after all ).
I'm storing my normals uncompressed in a DXT5 texture, but I tried different formats as well, including a 32bit color texture. I'm sampling it using a POINT filter ( tried linear, but nothing changes as well ).
I'd be grateful for all suggestions.
Cheers,
Paksas