Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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) {
- Complement = transformc("rgb", "hsv", Color);
- Complement[0] = mod(Complement[0] + 0.5, 1.0);
- Complement = transformc("hsv", "rgb", Complement);
- Threshold = threshold(Fac, Lower, Upper);
- Volume = mix(holdout(), Complement * Density * henyey_greenstein(Anisotropy), Threshold);
- Complement = mix(0.0, Complement, Threshold);
- }
Add Comment
Please, Sign In to add comment