[Shader] normal vector and model matrix inverse
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 !!
Answer by Andrew-Le · Apr 12, 2017 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
Your answer
Follow this Question
Related Questions
Turn off vertex normals for surface shader using normal map. 0 Answers
Inside of a shader how can I convert a world direction relevant to a vertex's local position 1 Answer
How to rotate quad towards light in shader? 0 Answers
Normal mapping distance of view? 0 Answers
Should I use a shader or conventional code for displacement? 1 Answer