Fix T98163: Cycles OSL rendering normal maps differently

Match SVM and ensure valid reflection when setting up BSDFs.
This commit is contained in:
Brecht Van Lommel
2022-05-17 16:27:37 +02:00
parent 0609b4bb49
commit 8fdd3aad9b
5 changed files with 32 additions and 0 deletions

View File

@@ -44,6 +44,8 @@ class CBSSRDFClosure : public CClosurePrimitive {
void setup(ShaderData *sd, uint32_t path_flag, float3 weight)
{
params.N = ensure_valid_reflection(sd->Ng, sd->I, params.N);
if (method == u_burley) {
alloc(sd, path_flag, weight, CLOSURE_BSSRDF_BURLEY_ID);
}