Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #pragma once
  2.  
  3. half heightBlend(half h1, half h2, half slope, half contrast)
  4. {
  5. h2 = 1 - h2;
  6. return saturate((saturate((slope - min(h1, h2)) / max(abs(h1 - h2), 0.1)) - contrast) / max(1.0 - contrast, 0.1));
  7. //half tween = saturate((slope - min(h1, h2)) / max(abs(h1 - h2), 0.1));
  8. //half threshold = contrast;
  9. //half width = 1.0 - contrast;
  10. //return saturate((tween - threshold) / max(width, 0.1));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement