0
Completed

may i know the usage or reference of "UnityObjectToWorldNormal(v.normal)"??Thanks

Huang Cheng 9 years ago updated by Freya Holmér (Developer) 9 years ago 6
I've used shader forge for 5.0 version, it works well. Thanks for the effort. Since the instruction says that it leaves shader file only, so I tried to migrate(copy / paste) the shader file to my project who runs under 4.6.3. Here comes one error when compiling the shader that UnityObjectToWorldNormal is not supported. Would u plz kindly share where to get the definition of UnityObjectToWorldNormal?
Thanks a lot.

reffered shader"Shader Forge/Examples/Custom Lighting"

Answer

+1
Answer
Completed
You need to reopen it in Shader Forge to make it work, it's simply because Unity changed the way their internal functions worked :)
+1
Answer
Completed
You need to reopen it in Shader Forge to make it work, it's simply because Unity changed the way their internal functions worked :)
thanks for quick replying, dude. But may i know where u could find the definition of "UnityObjectToWorldNormal" IN " o.normalDir = UnityObjectToWorldNormal(v.normal);"? (LINE 90 of that shader file)? I am badly needing info to look into. thanks again.
I'm not really sure what you're asking I'm afraid. You shouldn't have to look at the code at all. Open it in Unity 5.0 with SF, and everything should be alright :)
+1
Oh, you want to open it in 4.x after compiling it in 5?
In that case you should remake it in 4.x instead
yes sir. I'd like to leverage the shader for my project under 4.x...may I know which version of SF supports 4.x? If none of them supports, I have to re-write shaders without SF... :(
1.06 I think. Download SF using Unity 4, and you will get the latest compatible version