Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- half heightBlend(half h1, half h2, half slope, half contrast)
- {
- h2 = 1 - h2;
- return saturate((saturate((slope - min(h1, h2)) / max(abs(h1 - h2), 0.1)) - contrast) / max(1.0 - contrast, 0.1));
- //half tween = saturate((slope - min(h1, h2)) / max(abs(h1 - h2), 0.1));
- //half threshold = contrast;
- //half width = 1.0 - contrast;
- //return saturate((tween - threshold) / max(width, 0.1));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement