mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[unity] Fixed incorrect rendering of OutlineOnly shader in URP with HDR option enabled. Closes #2001.
This commit is contained in:
parent
3025b370f5
commit
4b42f23fc4
@ -35,7 +35,7 @@ float4 computeOutlinePixel(sampler2D mainTexture, float2 mainTextureTexelSize,
|
||||
float average = (pixelTop + pixelBottom + pixelLeft + pixelRight) * vertexColorAlpha / numSamples;
|
||||
#endif
|
||||
float thresholdStart = ThresholdEnd * (1.0 - OutlineSmoothness);
|
||||
float outlineAlpha = saturate((average - thresholdStart) / (ThresholdEnd - thresholdStart)) - pixelCenter;
|
||||
float outlineAlpha = saturate(saturate((average - thresholdStart) / (ThresholdEnd - thresholdStart)) - pixelCenter);
|
||||
return lerp(texColor, OutlineColor, outlineAlpha);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user