Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

Visualizing normal vectors #1

Open
nicolacapece opened this issue Jun 30, 2016 · 0 comments
Open

Visualizing normal vectors #1

nicolacapece opened this issue Jun 30, 2016 · 0 comments

Comments

@nicolacapece
Copy link

nicolacapece commented Jun 30, 2016

cattura
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 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant