Hi guys !! I am learning "Specular Reflection" shader I got confused about this problem
o.normalDir = normalize(mul(float4(i.normal, 0.0), unity_WorldToObject).xyz);
this is exactly what it have to be (theory)
but when i fixed it like this !!
o.normalDir = normalize(i.normal);
THERE ARE NOTHING CHANGE !!
The 2nd one has to be wrong !!
Any answers for this ??? Thank for reading my question !!
Full shader code
Answer by Andrew-Le
Apr 12 at 04:26 AM
answer.unity3d.com was really quiet as usual ... this is my answer - stackoverflow p/s: support Dan guys !! awesome channel youtube
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
3 People are following this question.
Turn off vertex normals for surface shader using normal map.
Camera dir in object space (vert programm)
Shadows in a shader with vertex modifier
how to get spot-/point-/..lights working with vertex displacement shader?
How to change the alpha value in the vertex color using a shader ?