Visualizing normal vectors
nicolacapece opened this issue · 0 comments
nicolacapece commented
Hi,
I would visualize the normal vectors using a vertex shader and geometry shader.
I'm using this code in the vertex shader:
"mat3 normalMatrix = mat3(transpose(inverse(view * model)));\n"
"vs_out.normal = vec3(projection * vec4(normalMatrix * normal, 1.0));\n"
but in the optix_baking_code there are world2space and object2space matrices.
I have split these matrices into projection, view and model matrices and I'm viewing the normal vectors, but they are all in the same direction.
How I can visualize the correct direction of normal vectors ?