Hi everyone, I need some help with my scene, I have thos weird white artefacts after baking my lights and i don't know how to get rid of it. I searched on google and found that it was due to DX11, but i couldn't find an answer on how to solve this problem.
As you can see they seems to appear where the textures is pitch black. Any help would be greatly appreciated.
Replies
or fix it in the material, why would the material be giving out negative values?
True, but if you have like 500+ materials (not material instances) it could take a while. Of course it would be better to do it that way, but clamping the values in a postprocess is a quick and dirty way of fixing it.
By the way, I've found that these artifacts happen mostly when using NormalmapUncompressed.
The only workaround I've found so far is to mask the red+green channel in the material and then append a scalar for the blue channel. Interestingly enough this does decrease the instruction count, shader compiler is obviously cutting off DeriveNormalZ.
Clamping the normalmap to min (-1, -1, 0) max (1, 1, 1) usually fixes it, although if you are getting negative values for the Z your normalmap might not be normalized.
Clamping values in the material does remove white pixels but not artifacts in general.
Anyway, the NormalmapUncompressed format is extremely buggy and it's better not to use it in DX11.
So I broke the links 1 by 1 until I noticed that the diffuse power was the cause of the white artefacts. I was using my original diffuse texture as a diffuse power and once removed from the diffuse power channel everything went back to normal.
Still I don't fully understand why it does that , should the texture in the diffuse be made with shades of grey and then apply the diffuse color in the diffuse power or something like that?
As far as I know, it's just (L.N)^DiffusePower.
You don't need to use DiffusePower 99.9% of the time.