Exemplo n.º 1
0
 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);
        }
Exemplo n.º 3
0
        public override void MultipassGeneration(MaterialGeneratorContext context)
        {
            const int passCount = 2;

            context.SetMultiplePasses("ClearCoat", passCount);
        }