Guest User

Untitled

a guest
May 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. shader ShapedScatter(color Color = 0.0, float Density = 1.0, float Anisotropy = 0.0, float Fac = 0.5, float Lower = 0.0, float Upper = 1.0, output closure color Volume = holdout(), output color Complement = 0.0, output float Threshold = 0.0) {
  2. Complement = transformc("rgb", "hsv", Color);
  3. Complement[0] = mod(Complement[0] + 0.5, 1.0);
  4. Complement = transformc("hsv", "rgb", Complement);
  5. Threshold = threshold(Fac, Lower, Upper);
  6. Volume = mix(holdout(), Complement * Density * henyey_greenstein(Anisotropy), Threshold);
  7. Complement = mix(0.0, Complement, Threshold);
  8. }
Add Comment
Please, Sign In to add comment