MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / PostMaterialLoad

Method PostMaterialLoad

Rtxpt/SampleCommon/LocalConfig.cpp:140–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void LocalConfig::PostMaterialLoad(donut::engine::Material& mat)
141{
142#if 0 // convert transmissive to white opaque
143 if (mat.domain == MaterialDomain::Transmissive || mat.domain == MaterialDomain::TransmissiveAlphaBlended || mat.domain == MaterialDomain::TransmissiveAlphaTested)
144 {
145 mat.baseOrDiffuseColor = float3(1, 1, 1);
146 mat.enableBaseOrDiffuseTexture = false;
147 }
148 if (mat.domain == MaterialDomain::Transmissive) mat.domain = MaterialDomain::Opaque;
149 if (mat.domain == MaterialDomain::TransmissiveAlphaBlended) mat.domain = MaterialDomain::AlphaBlended;
150 if (mat.domain == MaterialDomain::TransmissiveAlphaTested) mat.domain = MaterialDomain::AlphaTested;
151#endif
152#if 1 // disable emissive lights - this doesn't work if there's any animation changing brightness
153 if (RTXPT_LOCAL_CONFIG_ID_STRING == "ENVMAP_ONLY_TESTING" /*|| RTXPT_LOCAL_CONFIG_ID_STRING == "GENERIC_STABLE_LIGHTS"*/ )
154 mat.emissiveIntensity = 0.0f;
155#endif
156}
157

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected