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 static VignetteShaderProgram GetInstance() => instance ?? (instance = new VignetteShaderProgram());