Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. dx = ddx(WorldPosition.x)
  2. dy = ddy(WorldPosition.y)
  3. dz/dx = ddx(height) / dx
  4. dz/dy = ddy(height) / dy
  5.  
  6. let Tan(theta) = dz / dx
  7. let Tan(phi) = dz / dy
  8.  
  9. sin(phi)
  10. -sin(theta)cos(phi)
  11. cos(theta)cos(phi)
  12.  
  13. TopLeft = Texture[uv + (-small, -small)]
  14. TopRight = Texture[uv + (small, -small)] + (2.0 * small * world unit converter, 0, 0)
  15. BottomLeft = Texture[uv + (-small, small)] + (0, 2.0 * small * world unit converter, 0)
  16.  
  17. v1 = TopRight - TopLeft
  18. v2 = BottomLeft - TopLeft
  19.  
  20. n = cross(v1, v2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement