Example #1
0
 public void Apply(int pass)
 {
     if (pass == 0)
     {
         if (shaderProgramPass1 == null)
         {
             shaderProgramPass1 = new ShaderProgram(
                 new Shader[] { new VertexShader(vs), new FragmentShader(fsPass1) },
                 ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers());
         }
         PlatformRenderer.SetBlendState(Blending.LcdTextFirstPass.GetBlendState());
         PlatformRenderer.SetShaderProgram(shaderProgramPass1);
     }
     else
     {
         if (shaderProgramPass2 == null)
         {
             shaderProgramPass2 = new ShaderProgram(
                 new Shader[] { new VertexShader(vs), new FragmentShader(fsPass2) },
                 ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers());
         }
         PlatformRenderer.SetBlendState(Blending.LcdTextSecondPass.GetBlendState());
         PlatformRenderer.SetShaderProgram(shaderProgramPass2);
     }
 }
Example #2
0
            static LcdFontMaterial()
            {
                shaderProgramPass1 = new ShaderProgram(
                    new Shader[] { new VertexShader(vs), new FragmentShader(fsPass1) },
                    ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers());

                shaderProgramPass2 = new ShaderProgram(
                    new Shader[] { new VertexShader(vs), new FragmentShader(fsPass2) },
                    ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers());
            }
Example #3
0
 private BloomShaderProgram() : base(CreateShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
 private ColorCorrectionShaderProgram(bool requiredBrightnessContrast, bool requiredHSL, bool opaque) :
     base(CreateShaders(requiredBrightnessContrast, requiredHSL, opaque), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Example #5
0
 private DistortionShaderProgram(bool opaque) : base(CreateShaders(opaque), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Example #6
0
 public ColorfulTextShaderProgram()
     : base(GetShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Example #7
0
 private AlphaIntensityShaderProgram() : base(CreateShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Example #8
0
 private DissolveMaterialShaderProgram() : base(CreateShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Example #9
0
 private BlurShaderProgram(BlurShaderId blurShaderId, bool opaque) : base(CreateShaders(blurShaderId, opaque), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Example #10
0
 private WaveShaderProgram(WaveType type, bool clamping)
     : base(CreateShaders(type, clamping), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }