raylib-3D icon indicating copy to clipboard operation
raylib-3D copied to clipboard

shader recalculating normal matrix for each vertex

Open chriscamacho opened this issue 4 years ago • 0 comments

mat3 normalMatrix = transpose(inverse(mat3(modelMatrix)));

if normalMatrix was a uniform calculated once per frame(!) by the cpu, instead of each vertex, should probably speed things up

chriscamacho avatar Dec 10 '20 11:12 chriscamacho