public override void MultipassGeneration(MaterialGeneratorContext context) { // Glass rendering is done in 2 passes: // - Transmittance evaluation to darken background (with alpha blend) // - Reflectance evaluation (with additive blending) context.SetMultiplePasses("Glass", 2); }
public override void MultipassGeneration(MaterialGeneratorContext context) { // Glass rendering is done in 2 passes: // - Transmittance evaluation to darken background (with alpha blend) // - Reflectance evaluation (with additive blending) int passCount = 2; if (context.CurrentMaterialDescriptor.Attributes.CullMode == CullMode.None) { passCount *= 2; // This needs both front and back (in the following order: back[pass0,pass1], front[pass0,pass1]) } context.SetMultiplePasses("Glass", passCount); }
public override void MultipassGeneration(MaterialGeneratorContext context) { const int passCount = 2; context.SetMultiplePasses("ClearCoat", passCount); }