- Home /
Surface shader ParallaxOffset issue
Hi there,
I am trying to use the ParallaxOffset function to calculate parallax but it gives strange results. Any special thing to do to make parallax working with surface shaders ?
The issue appears when I rotate my object, which destroys the parallax offset effect.
half h = tex2D (_ParallaxMap, IN.uv_BumpMap).w;
float2 offset = ParallaxOffset (h, _Parallax, IN.viewDir);
Thanks a lot
Answer by ilya_ca · Jan 17, 2017 at 04:40 PM
This is a simple and a cheap implementation of the parallax effect. It will look good only at straight-on angles. If you're looking at the object at a steep angle then the effect will get destroyed. You may look into something like parallax-occlusion mapping shaders.
Your answer
Follow this Question
Related Questions
How to Modify Standard Surface Shader's SpecCube? 1 Answer
Surface Shader Layer only visible in Sprite Mask view 0 Answers
Get local position in surface shader 2 Answers
Z value shader 1 Answer
Vertex program max instructions limit 2 Answers