- Home /
get UV coordinates on world position in fragment shader
in my project i want to simulate 2D bevel in shader so i need UV coordinates of texture on another world position (the imaginary light source)
i need to convert this vector:
float2 offset = float2(_FakeLightPosition.x-IN.posWorld.x, _FakeLightPosition.y-IN.posWorld.y);
to difference is between UV at _FakeLightPosition and IN.posWorld on the same sprite (texture)
Comment
Your answer
Follow this Question
Related Questions
2d lighting effect 1 Answer
one shader for multiple sprites 0 Answers
Prevent light combining with other lights 0 Answers
Outline set of tiled sprites 0 Answers
Using a mask shader for creating pop/explosion effect? 1 Answer