File tree Expand file tree Collapse file tree
src/nbl/ext/MitsubaLoader Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -743,6 +743,15 @@ class CFrontendIR final : public CNodePool
743743 // To quickly make a matching backface material from a frontface or vice versa
744744 NBL_API2 typed_pointer_type<IExprNode> reciprocate (const typed_pointer_type<const IExprNode> other);
745745 NBL_API2 typed_pointer_type<CFresnel> createNamedFresnel (const std::string_view name);
746+ inline typed_pointer_type<CFresnel> createConstantMonochromeRealFresnel (const hlsl::float32_t orientedRealEta)
747+ {
748+ const auto fresnelH = getObjectPool ().emplace <CFresnel>();
749+ CSpectralVariable::SCreationParams<1 > params = {};
750+ params.knots .params [0 ].scale = orientedRealEta;
751+ if (auto * const fresnel=getObjectPool ().deref (fresnelH); fresnel)
752+ fresnel->orientedRealEta = getObjectPool ().emplace <CSpectralVariable>(std::move (params));
753+ return fresnelH;
754+ }
746755
747756 // IMPORTANT: Two BxDFs are not allowed to be multiplied together.
748757 // NOTE: Right now all Spectral Variables are required to be Monochrome or 3 bucket fixed semantics, all the same wavelength.
Original file line number Diff line number Diff line change @@ -132,16 +132,8 @@ class CElementBSDF : public IElement
132132 inline RoughSpecularBase& operator =(const RoughSpecularBase& other)
133133 {
134134 distribution = other.distribution ;
135- switch (distribution)
136- {
137- case ASHIKHMIN_SHIRLEY:
138- alphaU = other.alphaU ;
139- alphaV = other.alphaV ;
140- break ;
141- default :
142- alpha = other.alpha ;
143- break ;
144- }
135+ alphaU = other.alphaU ;
136+ alphaV = other.alphaV ;
145137 specularReflectance = other.specularReflectance ;
146138 return *this ;
147139 }
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ struct SContext final
8787#endif
8888 core::smart_refctd_ptr<frontend_ir_t > frontIR;
8989 // common frontend nodes
90+ frontend_ir_t ::typed_pointer_type<const frontend_ir_t ::IExprNode> errorBRDF;
91+ frontend_ir_t ::typed_pointer_type<const frontend_ir_t ::CLayer> unsupportedPhong, unsupportedWard;
9092 frontend_ir_t ::typed_pointer_type<const frontend_ir_t ::CDeltaTransmission> deltaTransmission;
9193 // Common Debug Names
9294 enum class ECommonDebug : uint16_t
You can’t perform that action at this time.
0 commit comments