コード例 #1
0
 public void Apply(int pass)
 {
     shaderParams.Set(dilateKey, 0.5f - Dilate * 0.01f);
     shaderParams.Set(softnessKey, Mathf.Max(Softness * 0.01f, 0.001f));
     shaderParams.Set(colorKey, Color.ToVector4());
     PlatformRenderer.SetBlendState(Blending.GetBlendState());
     PlatformRenderer.SetShaderProgram(SDFShadowShaderProgram.GetInstance());
     PlatformRenderer.SetShaderParams(shaderParamsArray);
 }
コード例 #2
0
 public static SDFShadowShaderProgram GetInstance() => instance ?? (instance = new SDFShadowShaderProgram());