Announcement

Collapse
No announcement yet.

Rotate a texture depending on depthFade gradient direction?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Rotate a texture depending on depthFade gradient direction?

    I render a texture on the depthFade gradient and would like to rotate it corresponding to the gradient's direction (see image)

    My idea was to calculate a 2D Vector (XY) representing the depthFade direction from top view.
    Then get the angle between that one and the x-axis and rotate my texture by that.

    Sadly i have no clue how to get the 2D Vector respresenting the gradient's direction, but maybe someone of you got a tip for me OR has a different solution

Working...
X