
Only this
http://developer.download.nvidia.com...ples.html#rain
http://developer.download.nvidia.com...WhitePaper.pdf
with old .fx shaders inside.
closure color specular_component = Spec_amount * SpecColor * vray_blinn (bumped_normal, Glossiness, Anisotropy, Aniso_rotation, "subdivs", Subdivs, "trace_reflections", Trace_reflections); Ci = diffuse_component + specular_component + sheen_component;
normal getBumpedBump(color centerColor, color uColor, color vColor, float inverseBumpAmount) { vector worldTangent = normalize(dPdu); vector worldBitangent = normalize(dPdv); vector worldNormal = normalize(N); vector average = vector(0.3333333); float center = dot(average, vector(centerColor)); float ddu = center - dot(average, vector(uColor)); float ddv = center - dot(average, vector(vColor)); return normalize(ddu * worldTangent + ddv * worldBitangent + inverseBumpAmount * worldNormal); } surface bump_mat ( /* Diffuse section */ color Diffuse_color = 0.5, float Diffuse_weight = 0.8, float Roughness = 0.0, /* Bump section */ string Bump_texture = "bump.png", float Bump_amount = 1.0, float delta = 0.004, output color result = 1 ) { /* Define Bump */ normal bumped_normal = N; if (Bump_amount > 0.0) { color center = texture(Bump_texture, u, v); color uColor = texture(Bump_texture, u + delta, v); color vColor = texture(Bump_texture, u, v + delta); bumped_normal = getBumpedBump(center, uColor, vColor, 1.0 / Bump_amount); } closure color diffuse_component = Diffuse_color * Diffuse_weight * diffuse(bumped_normal, "roughness", Roughness); Ci = diffuse_component; }
Leave a comment: