for this example,I want to turn a simple diffuse+glossy shader with normal in to a OSL coding, but how can i turn Fresnel,bump etc node into OSL language? I need help
*/ // Material input
shader diffuse_material(
color Diffuse_Color = color(0.8,0.8,0.8),
color microfacet_color = color (0.8,0.8,0.8),
float Diffuse_Roughness = 0,
float microfacet_Roughness = 0.05,
float mix_factor = 0.05,
normal normal_input = normal(0,0,0),
// Material BSDF Output
output closure color BSDF = 0
)
{
BSDF = (1-mix_factor) * Diffuse_Color * oren_nayar(normal_input, Diffuse_Roughness) + mix_factor * microfacet_color * microfacet_ggx(normal_input, microfacet_Roughness);
}