09-29-2021, 05:36 PM
Hi,
recently I've changed lighting in my scene from LightingVisual3D to single ambient light and headlight. Now I see a weirdness in textured objects. It seems like the UVs are somehow messed up. I've played with different light setups and this is what I found out.
When using an ambient light and one directional (up to 3 directional lights), the scene looks like this:
[Image: https://ibb.co/gd9rpRY]
Now when I add a point light, or a spot light, or 4 directional lights the texture and the normal map is correctly used:
[Image: https://ibb.co/GnQLNzb]
From the DXEngine deep dive, I've found out that there might be an optimization in shaders:
I've observed this with single viewport and also with multiple viewports on version 4.4.7874 and 4.2.7655. However I did not manage to reproduce it on the samples.
I've attached a full scene dump from version 4.2.7655 with ambient and directional light (the first image). Would you happen to know what might cause this?
Best regards,
Janovsky Roman
recently I've changed lighting in my scene from LightingVisual3D to single ambient light and headlight. Now I see a weirdness in textured objects. It seems like the UVs are somehow messed up. I've played with different light setups and this is what I found out.
When using an ambient light and one directional (up to 3 directional lights), the scene looks like this:
[Image: https://ibb.co/gd9rpRY]
Now when I add a point light, or a spot light, or 4 directional lights the texture and the normal map is correctly used:
[Image: https://ibb.co/GnQLNzb]
From the DXEngine deep dive, I've found out that there might be an optimization in shaders:
Quote:What is more, when a simple 3D object is rendered (with standard material and no instancing or any other advanced effect) and when there are only three or less directional lights, then DXEngine can use a higher performance directional light shader. When more directional lights, a point light or a spot light are used, then a more complex shader needs to be used. All the created lights are added to the DXScene.Lights list.
I've observed this with single viewport and also with multiple viewports on version 4.4.7874 and 4.2.7655. However I did not manage to reproduce it on the samples.
I've attached a full scene dump from version 4.2.7655 with ambient and directional light (the first image). Would you happen to know what might cause this?
Best regards,
Janovsky Roman