It isn’t radius, because it is actual on all sizes of model and all radiuses of light probe.
do you normalize your light direction?
Yes, I do
and it is actual for the point light
Well, I’ll test it… I can’t tell just like that. So any scale different than 1,1,1 has this issue?
No, only if scale is bigger then 1,1,1
… the buggy doesn’t use PBR lighting…
I changed its material
ok, well something must not be normalized properly in the shader. I’ll look into it
You don’t have this problem, if you transform the geometry, but you have this problem, if you transform node.
The normals and tangents aren’t normalized thats what is causing this.
I’ll make a pull request.
Don’t bother I got it.
Actually you were close, the normals and tangents have to be normalized in the vertex shader.
Let’s have the discussion here then instead of in the PR comments:
Not sure it’s a good idea tbh.
Normalizing in the vertex shader is always problematic as the interpolated value once in the frag shader will no longer be normalized, unless all normals of the triangle are pointing in the same direction. I know it’s slower to normalize in the frag shader on a pixel basis but it’s more accurate.
Yes thats true but the mikk tangent space normal maps are computed against unnormalized normals, normalizing in the fragment shader causes slightly off shading.
Mhh ok so that’s a feature ? I mean it’s done like this so that you can normalize in the vertex shader and gain some perf or that’s pure… luck?
Yes a feature.
Comment in the original mikktspace.h:
// where vNt is the tangent space normal. The normal map sampler must likewise use the
// interpolated and “unnormalized” tangent, bitangent and vertex normal to be compliant with the pixel shader.