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); } }
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()); }
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()) { }
private DistortionShaderProgram(bool opaque) : base(CreateShaders(opaque), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers()) { }
public ColorfulTextShaderProgram() : base(GetShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers()) { }
private AlphaIntensityShaderProgram() : base(CreateShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers()) { }
private DissolveMaterialShaderProgram() : base(CreateShaders(), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers()) { }
private BlurShaderProgram(BlurShaderId blurShaderId, bool opaque) : base(CreateShaders(blurShaderId, opaque), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers()) { }
private WaveShaderProgram(WaveType type, bool clamping) : base(CreateShaders(type, clamping), ShaderPrograms.Attributes.GetLocations(), ShaderPrograms.GetSamplers()) { }