From 29ded51ea437fe0639fd3b6408066ed3a5b931e6 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 29 Mar 2026 00:43:50 +0100 Subject: [PATCH] Update rlgl.h --- src/rlgl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/rlgl.h b/src/rlgl.h index 21899e6f6..e97bad36a 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -1614,8 +1614,11 @@ void rlNormal3f(float x, float y, float z) normalz = RLGL.State.transform.m2*x + RLGL.State.transform.m6*y + RLGL.State.transform.m10*z; } -/* Normalize the vector if required. Default behavior assumes the normal vector is in the correct space for what the shader expects. - float length = sqrtf(normalx * normalx + normaly * normaly + normalz * normalz); + // NOTE: Default behavior assumes the normal vector is in the correct space for what the shader expects, + // it could be not normalized to 0.0f..1.0f, magnitud can be useed for some effects + /* + // WARNING: Vector normalization if required + float length = sqrtf(normalx*normalx + normaly*normaly + normalz*normalz); if (length != 0.0f) { float ilength = 1.0f/length; @@ -1623,7 +1626,7 @@ void rlNormal3f(float x, float y, float z) normaly *= ilength; normalz *= ilength; } -*/ + */ RLGL.State.normalx = normalx; RLGL.State.normaly = normaly; RLGL.State.normalz = normalz;