21 const float do_multiscatter,
28 ior =
max(ior, 1e-5f);
34 float2 bsdf =
bsdf_lut(kg, NV, roughness, ior, do_multiscatter != 0.0f);
36 ClosureReflection reflection_data;
37 reflection_data.color = color.rgb * (bsdf.
x * weight);
38 reflection_data.N =
N;
39 reflection_data.roughness = roughness;
41 ClosureRefraction refraction_data;
42 refraction_data.color = color.rgb * (bsdf.
y * weight);
43 refraction_data.N =
N;
44 refraction_data.roughness = roughness;
45 refraction_data.ior = ior;
47 result =
closure_eval(kg, sd, reflection_data, refraction_data);
void bsdf_lut(KernelGlobals &kg, float3 F0, float3 F90, float3 transmission_tint, float cos_theta, float roughness, float ior, bool do_multiscatter, float3 &reflectance, float3 &transmittance)
Coordinates coordinate_impl(KernelGlobals &kg, const ShadingData &sd, float3 P, float3 N)
Closure closure_eval(KernelGlobals &kg, ShadingData &sd, ClosureDiffuse diffuse)
float dot(VecOp< float, D >, VecOp< float, D >) RET
void node_bsdf_glass(float4 color, float roughness, float, float, float ior, float3 N, float3, float weight, float, float, const float do_multiscatter, KernelGlobals &kg, ShadingData &sd, Closure &result)
VecT safe_normalize(VecT vector)
CCL_NAMESPACE_BEGIN struct Window V