// In forward everything is statically know and we could theorically cumulate all the material features. So the code reflect it.
// However in practice we keep parity between deferred and forward, so we should constrain the various features.
// The UI is in charge of setuping the constrain, not the code. So if users is forward only and want unlish power, it is easy to unleash by some UI change
// The UI is in charge of setuping the constrain, not the code. So if users is forward only and want unleash power, it is easy to unleash by some UI change
if (HasFeatureFlag(surfaceData.materialFeatures, MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING))
else if (HasFeatureFlag(surfaceData.materialFeatures, MATERIALFEATUREFLAGS_LIT_IRIDESCENCE))
{
PackFloatUInt8bit(surfaceData.metallic, 0, 8));
PackFloatInt8bit(surfaceData.metallic, 0, 8));
// In the case of standard or specular color we always uncompress before encoding, so decoding is more efficient (it allow better optimization for the compiler and save VGPR)
// In the case of standard or specular color we always convert to specular color parametrization before encoding,
// so decoding is more efficient (it allow better optimization for the compiler and save VGPR)
// This mean that on the decode side, MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR doesn't exist anymore
materialFeatureId = GBUFFER_LIT_STANDARD;
// Ensure that surfaceData.coatMask is 0 if the feature is not enabled