- Home /
Shader: distort light direction besed on mesh
Hi how can i distort light direction besed on mesh? The light is coming from objects in the scene, so how can i distort them but all based on mesh shape? I have made an image to explain what i mean:
UPDATE: Solution found!!! I'll post here soon...
Answer by Dolkar · Jun 22, 2013 at 01:50 PM
Use one of Unity's glass refraction shaders (pro only). You will probably need a bigger detail on this, so prepare yourself a bump map.
And if i don't want to use a bump map to refract light i thought to generate a map based on viewDir (view direction) that allow me to make the same effect...
Well sure.. you don't have to use a bump map... Simply using the object's normals ins$$anonymous$$d should do.
Your answer
Follow this Question
Related Questions
How could I access light direction in a surface shader? 1 Answer
Directional Light Sun Sprite Reflecting Incorrectly in Translucent Shader (Shader Forge) 1 Answer
Block/Obscure light without shadows 0 Answers
bumped diffuse Shader not behaving as expected (reversed) 0 Answers
How to make projector/light shader "alpha enabled"? 2 Answers