From 29e8d0bf50ed9824f1f0a0feaf4c59b8467974ac Mon Sep 17 00:00:00 2001 From: Adrien Herubel Date: Sun, 24 Jul 2022 19:29:40 +0100 Subject: [PATCH] Missing documentation for the exponent parameter in the generalized_schlick_bsdf, and missing storage for the parameter (#1539) Signed-off-by: Adrien Herubel --- src/shaders/stdosl.h | 1 + src/testrender/shading.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/shaders/stdosl.h b/src/shaders/stdosl.h index 4e92c0121..f1a4d5ec9 100644 --- a/src/shaders/stdosl.h +++ b/src/shaders/stdosl.h @@ -558,6 +558,7 @@ closure color conductor_bsdf(normal N, vector U, float roughness_x, float roughn // \param roughness_y Surface roughness in the V direction with a perceptually linear response over its range. // \param f0 Reflectivity per color channel at facing angles. // \param f90 Reflectivity per color channel at grazing angles. +// \param exponent Variable exponent for the Schlick Fresnel curve, the default value should be 5 // \param distribution Microfacet distribution. An implementation is expected to support the following distributions: { "ggx" } // \param thinfilm_thickness Optional float parameter for thickness of an iridescent thin film layer on top of this BSDF. Given in nanometers. // \param thinfilm_ior Optional float parameter for refraction index of the thin film layer. diff --git a/src/testrender/shading.cpp b/src/testrender/shading.cpp index 3cca0f3d5..1e75d0650 100644 --- a/src/testrender/shading.cpp +++ b/src/testrender/shading.cpp @@ -128,6 +128,7 @@ struct MxGeneralizedSchlickParams { float roughness_y; Color3 f0; Color3 f90; + float exponent; ustring distribution; // optional float thinfilm_thickness; @@ -292,6 +293,7 @@ register_closures(OSL::ShadingSystem* shadingsys) CLOSURE_FLOAT_PARAM(MxGeneralizedSchlickParams, roughness_y), CLOSURE_COLOR_PARAM(MxGeneralizedSchlickParams, f0), CLOSURE_COLOR_PARAM(MxGeneralizedSchlickParams, f90), + CLOSURE_COLOR_PARAM(MxGeneralizedSchlickParams, exponent), CLOSURE_STRING_PARAM(MxGeneralizedSchlickParams, distribution), CLOSURE_FLOAT_KEYPARAM(MxGeneralizedSchlickParams, thinfilm_thickness, "thinfilm_thickness"), CLOSURE_FLOAT_KEYPARAM(MxGeneralizedSchlickParams, thinfilm_ior, "thinfilm_ior"),