mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-31 23:45:22 +01:00
Fix wrong normal shading for objects (apply transform)
This commit is contained in:
@@ -104,9 +104,9 @@ void main(void)
|
|||||||
#else
|
#else
|
||||||
// This is intentional comparison with zero without any margin.
|
// This is intentional comparison with zero without any margin.
|
||||||
// If normal is not equal to zero exactly, then we assume it's a valid, just not normalized vector
|
// If normal is not equal to zero exactly, then we assume it's a valid, just not normalized vector
|
||||||
vIDiff = length(inVertexNormal) == 0.0
|
vIDiff = length(vNormal) == 0.0
|
||||||
? 1.0
|
? 1.0
|
||||||
: directional_ambient(normalize(inVertexNormal));
|
: directional_ambient(normalize(vNormal));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vec4 color = inVertexColor;
|
vec4 color = inVertexColor;
|
||||||
|
|||||||
Reference in New Issue
Block a user