Exemplo n.º 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);
     }
 }
Exemplo n.º 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());
            }
Exemplo n.º 3
0
 private BloomShaderProgram() : base(CreateShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Exemplo n.º 4
0
 private ColorCorrectionShaderProgram(bool requiredBrightnessContrast, bool requiredHSL, bool opaque) :
     base(CreateShaders(requiredBrightnessContrast, requiredHSL, opaque), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Exemplo n.º 5
0
 private DistortionShaderProgram(bool opaque) : base(CreateShaders(opaque), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Exemplo n.º 6
0
 public ColorfulTextShaderProgram()
     : base(GetShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Exemplo n.º 7
0
 private AlphaIntensityShaderProgram() : base(CreateShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Exemplo n.º 8
0
 private DissolveMaterialShaderProgram() : base(CreateShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Exemplo n.º 9
0
 private BlurShaderProgram(BlurShaderId blurShaderId, bool opaque) : base(CreateShaders(blurShaderId, opaque), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }
Exemplo n.º 10
0
 private WaveShaderProgram(WaveType type, bool clamping)
     : base(CreateShaders(type, clamping), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers())
 {
 }