0
Completed

World space vertex normal

Rubén Garcia 10 years ago updated by OPtoss 9 years ago 3
Hi,
Is there any way to get world space vertex normal in Shader Forge? Im trying to replicate a vegetation shader from UDK, but i tried with some "code" i found in this forums with no results. Someone knows how to get it?

Answer

+1
Answer
Completed
Make sure you don't check the perturbed checkbox, and it should work as expected:
http://acegikmo.com/shaderforge/nodes/?search=Norm...
+1
Answer
Completed
Make sure you don't check the perturbed checkbox, and it should work as expected:
http://acegikmo.com/shaderforge/nodes/?search=Norm...
Ok sry for that, i was thinking that Normal Direction node was in "local" space. Thanks for the fast response.
This answer is correct when doing pixel shaders, but if I use the Normal Direction node and plug it into the DX11 Displacement, it uses the local-space normal. I believe this to either be a bug, or an undocumented oddity of Shaderforge. If you need I can post pictures or a node-graph to prove it, but I'm quite certain this is true. I get correct world-space based coloring, but incorrect local-spaced based displacement.