Improve normal packing and unpacking

This commit is contained in:
2025-11-11 21:47:39 +00:00
parent 4121bfb468
commit ce1937c78e
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ out vec4 vNorm;
void main() {
vPos = data[indices[gl_VertexID]].pos;
vCol = unpackUnorm4x8(data[indices[gl_VertexID]].col);
vec4 n = unpackUnorm4x8(data[indices[gl_VertexID]].norm);
vNorm = n *2 - vec4(1,1,1,1);
vNorm = unpackSnorm4x8(data[indices[gl_VertexID]].norm);
//vNorm = n *2 - vec4(1,1,1,1);
gl_Position = theMat * vec4(vPos.xyz,1);
}
//layout (location = 0) in vec4 pos;