You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Compute Inifinite Scatter and extinction between two parallel infinite planes
504
-
// Reflective Component is: R, T E R E T, T E (R E)^3 T, T E (R E)^5 T, ...
505
-
// Transmissive Component is: T E T, T E (R E)^2 T, T E (R E)^4 T, ...
506
-
// Note: This node can be also used to model non-linear color shifts of Diffuse BRDF multiple scattering if one plugs in the albedo as the reflectance.
507
-
classCThinInfiniteScatterCorrectionfinal : public IExprNode
// Beer's Law Node, behaves differently depending on where it is:
569
540
// - to get an extinction medium, multiply it with CDeltaTransmission BTDF placed between two BRDFs in the same medium
570
541
// - to get a scattering medium between two Layers, create a layer with just a BTDF set up like above
571
542
// - to apply the beer's law on a single microfacet or a BRDF or BTDF multiply it with a BxDF
572
543
// Note: Even it makes little sense, Beer can be applied to the most outermost BRDF to simulate a correllated "foggy" coating without an extra BRDF layer.
// Note the transformation at the end just makes the prevention of 0/0 or 0*INF same as for a non-extinctive equation, just check `R_u*R_b < Threshold`
604
+
//
605
+
// Note: This node can be also used to model non-linear color shifts of Diffuse BRDF multiple scattering if one plugs in the albedo as the extinction.
606
+
classCThinInfiniteScatterCorrectionfinal : public IExprNode
args.logger.log("Oriented Real Eta node of correct type must be attached, but is %u of type %s",ELL_ERROR,orientedRealEta,args.pool->getTypeName(orientedRealEta).data());
43
43
returntrue;
44
44
}
45
-
if (constauto imagEta = args.pool->deref(orientedImagEta); imagEta)
45
+
if (constauto imagEta=args.pool->deref(orientedImagEta); imagEta)
args.logger.log("Oriented Imaginary Eta node of correct type must be attached, but is %u of type %s",ELL_ERROR,orientedImagEta,args.pool->getTypeName(orientedImagEta).data());
62
+
args.logger.log("Oriented Imaginary Eta node of incorrect type attached, but is %u of type %s",ELL_ERROR,orientedImagEta,args.pool->getTypeName(orientedImagEta).data());
args.logger.log("Reflectance node of correct type must be attached, but is %u of type %s",ELL_ERROR,reflectance,args.pool->getTypeName(reflectance).data());
72
+
args.logger.log("Top reflectance node of correct type must be attached, but is %u of type %s",ELL_ERROR,reflectanceTop,args.pool->getTypeName(reflectanceTop).data());
73
73
returntrue;
74
74
}
75
-
if (!args.pool->deref(transmittance))
75
+
if (extinction && !args.pool->deref(extinction))
76
76
{
77
-
args.logger.log("Reflectance node of correct type must be attached, but is %u of type %s",ELL_ERROR,transmittance,args.pool->getTypeName(transmittance).data());
77
+
args.logger.log("Extinction node of incorrect type attached, but is %u of type %s",ELL_ERROR,extinction,args.pool->getTypeName(extinction).data());
78
+
returntrue;
79
+
}
80
+
if (!args.pool->deref(reflectanceBottom))
81
+
{
82
+
args.logger.log("Top reflectance node of correct type must be attached, but is %u of type %s",ELL_ERROR,reflectanceBottom,args.pool->getTypeName(reflectanceBottom).data());
0 commit comments