public void Apply(int pass) { shaderParams.Set(amountKey, new Vector4(ChromaticAberration * Red, ChromaticAberration * Green, ChromaticAberration * Blue, BarrelPincushion)); PlatformRenderer.SetBlendState(!Opaque ? Blending.GetBlendState() : disabledBlendingState); PlatformRenderer.SetShaderProgram(DistortionShaderProgram.GetInstance(Opaque)); PlatformRenderer.SetShaderParams(shaderParamsArray); }
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); } }
public void Apply(int pass) { shaderParams.Set(stepKey, Step); shaderParams.Set(sharpnessKey, new Vector3(Strength, Strength * 0.25f, Limit)); PlatformRenderer.SetBlendState(!Opaque ? Blending.GetBlendState() : disabledBlendingState); PlatformRenderer.SetShaderProgram(SharpenShaderProgram.GetInstance(Opaque)); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(brightThresholdKey, BrightThreshold); shaderParams.Set(inversedGammaCorrectionKey, InversedGammaCorrection); PlatformRenderer.SetBlendState(disabledBlendingState); PlatformRenderer.SetShaderProgram(BloomShaderProgram.GetInstance()); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(texelStepKey, TexelStep); shaderParams.Set(amountKey, new Vector4(LumaTreshold, 0.25f / MulReduce, 1f / MinReduce, MaxSpan)); PlatformRenderer.SetBlendState(!Opaque ? Blending.GetBlendState() : disabledBlendingState); PlatformRenderer.SetShaderProgram(FXAAShaderProgram.GetInstance(Opaque)); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(stepKey, Dir * Radius * Step); shaderParams.Set(alphaCorrectionKey, 1f / AlphaCorrection); PlatformRenderer.SetBlendState(!Opaque ? Blending.GetBlendState() : disabledBlendingState); PlatformRenderer.SetShaderProgram(BlurShaderProgram.GetInstance(BlurShaderId, Opaque)); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(brightThresholdKey, BrightThreshold); shaderParams.Set(darkThresholdKey, DarkThreshold); shaderParams.Set(softLightKey, SoftLight); PlatformRenderer.SetBlendState(!Opaque ? Blending.Alpha.GetBlendState() : disabledBlendingState); PlatformRenderer.SetShaderProgram(NoiseShaderProgram.GetInstance(Opaque)); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(angleKey, Angle); shaderParams.Set(uv1Key, UV1); shaderParams.Set(uv0Key, UV0); PlatformRenderer.SetBlendState(Blending.GetBlendState()); PlatformRenderer.SetShaderProgram(TwistShaderProgram.Instance); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(hslKey, HSL); shaderParams.Set(brightnessKey, Brightness); shaderParams.Set(contrastKey, Contrast); PlatformRenderer.SetBlendState(!Opaque ? Blending.GetBlendState() : disabledBlendingState); PlatformRenderer.SetShaderProgram(ColorCorrectionShaderProgram.GetInstance(RequiredBrightnessContrastProcess, RequiredHSLProcess, Opaque)); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(brightnessKey, Brightness); shaderParams.Set(rangeKey, Range); shaderParams.Set(colorKey, Color); PlatformRenderer.SetTexture(1, MaskTexture); PlatformRenderer.SetBlendState(Blending.GetBlendState()); PlatformRenderer.SetShaderProgram(DissolveMaterialShaderProgram.Instance); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(radiusKey, Radius); shaderParams.Set(brightnessKey, Brightness); shaderParams.Set(colorKey, Color); PlatformRenderer.SetTexture(1, MaskTexture); PlatformRenderer.SetBlendState(Blending.GetBlendState()); PlatformRenderer.SetShaderProgram(AlphaIntensityShaderProgram.Instance); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(radiusKey, Radius); shaderParams.Set(softnessKey, Softness); shaderParams.Set(uv1Key, UV1); shaderParams.Set(uvOffsetKey, UVOffset); shaderParams.Set(colorKey, Color.ToVector4()); PlatformRenderer.SetBlendState(Blending.GetBlendState()); PlatformRenderer.SetShaderProgram(VignetteShaderProgram.GetInstance()); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(phaseKey, Phase * Mathf.TwoPi); shaderParams.Set(frequencyKey, Frequency); shaderParams.Set(pivotKey, Pivot); shaderParams.Set(amplitudeKey, Amplitude); shaderParams.Set(uv0Key, UV0); shaderParams.Set(uv1Key, UV1); PlatformRenderer.SetBlendState(Blending.GetBlendState()); PlatformRenderer.SetShaderProgram(WaveShaderProgram.GetInstance(Type, IsClamped)); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { shaderParams.Set(angleKey, Angle); shaderParams.Set(uv1Key, UV1); shaderParams.Set(uv0Key, UV0); shaderParams.Set(pivotKey, Pivot); // coefficient 1.11104f for backward compatibility shaderParams.Set(radiusFactorKey, RadiusFactor * 1.11104f); PlatformRenderer.SetBlendState(Blending.GetBlendState()); PlatformRenderer.SetShaderProgram(TwistShaderProgram.Instance); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { if (PassCount == 2 && pass == 0) { PlatformRenderer.SetBlendState(Blending.Alpha.GetBlendState(PremulAlpha)); } else { PlatformRenderer.SetBlendState(Blending.GetBlendState(PremulAlpha)); } PlatformRenderer.SetShaderParams(shaderParamsArray); PlatformRenderer.SetShaderProgram(ShaderProgram); }
public void Apply(int pass) { var texture = ShaderPrograms.ColorfulTextShaderProgram.GradientRampTexture; if (texture == null || texture.IsStubTexture) { var warningText = "GradientMap texture doesnt exist at './Data/Fonts/GradientMap.png' If you want to use it, create it and dont forget cooking rule file to disable texture atlas for it."; #if DEBUG throw new Lime.Exception(warningText); #else Console.WriteLine(warningText); #endif } PlatformRenderer.SetBlendState(blendState); PlatformRenderer.SetTextureLegacy(1, ShaderPrograms.ColorfulTextShaderProgram.GradientRampTexture); PlatformRenderer.SetShaderProgram(ShaderPrograms.ColorfulTextShaderProgram.GetInstance()); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { PrepareShaderProgram(); shaderParams.Set(shaderParamKeys.World, Renderer.World); shaderParams.Set(shaderParamKeys.WorldView, Renderer.WorldView); shaderParams.Set(shaderParamKeys.WorldViewProj, Renderer.WorldViewProjection); shaderParams.Set(shaderParamKeys.ColorFactor, Renderer.ColorFactor.ToVector4()); shaderParams.Set(shaderParamKeys.DiffuseColor, DiffuseColor.ToVector4()); shaderParams.Set(shaderParamKeys.FogColor, FogColor.ToVector4()); shaderParams.Set(shaderParamKeys.FogStart, FogStart); shaderParams.Set(shaderParamKeys.FogEnd, FogEnd); shaderParams.Set(shaderParamKeys.FogDensity, FogDensity); if (skinEnabled) { shaderParams.Set(shaderParamKeys.Bones, boneTransforms, boneCount); } PlatformRenderer.SetBlendState(Blending.GetBlendState()); PlatformRenderer.SetTextureLegacy(CommonMaterialProgram.DiffuseTextureStage, diffuseTexture); PlatformRenderer.SetShaderProgram(program); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { PlatformRenderer.SetBlendState(blendState); PlatformRenderer.SetShaderProgram(YUVtoRGBProgram.GetInstance()); PlatformRenderer.SetShaderParams(shaderParamsArray); }
public void Apply(int pass) { PlatformRenderer.SetBlendState(Blending.Alpha.GetBlendState()); PlatformRenderer.SetShaderParams(shaderParamsArray); PlatformRenderer.SetShaderProgram(ShaderPrograms.DashedLineShaderProgram.GetInstance()); }