added Normal.glsl BlinnPhongPureColor.mtl

This commit is contained in:
2023-10-10 19:14:10 +08:00
parent 8a5711154f
commit 737438aaed
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
mat3 GetNormalMatrix()
{
return mat3(camera.view*GetLocalToWorld());
}
vec3 GetNormal(mat3 normal_matrix,vec3 normal)
{
return normalize(normal_matrix*normal);
}