diff options
Diffstat (limited to 'src/render/shaders/glsl/inner_glow.glsl')
| -rw-r--r-- | src/render/shaders/glsl/inner_glow.glsl | 55 |
1 files changed, 9 insertions, 46 deletions
diff --git a/src/render/shaders/glsl/inner_glow.glsl b/src/render/shaders/glsl/inner_glow.glsl index b0d55b19..307c3648 100644 --- a/src/render/shaders/glsl/inner_glow.glsl +++ b/src/render/shaders/glsl/inner_glow.glsl @@ -5,8 +5,6 @@ #ifndef INNER_GLOW_GLSL #define INNER_GLOW_GLSL -#include "cm_helpers.glsl" - float innerGlowAlpha(float distFromEdge, float range, float glowPower) { if (distFromEdge >= range) return 0.0; @@ -26,29 +24,7 @@ float innerGlowSmin(float a, float b, float k) { return min(a, b) - h * h * h * k * (1.0 / 6.0); } -vec4 getInnerGlow(vec4 pixColor, vec2 v_texcoord, float radius, float roundingPower, vec2 topLeft, vec2 fullSize, float range, float glowPower, vec2 bottomRight -#if USE_CM - , - int sourceTF, int targetTF, mat3 convertMatrix, vec2 srcTFRange, vec2 dstTFRange -#if USE_ICC - , - highp sampler3D iccLut3D, float iccLutSize -#else -#if USE_TONEMAP || USE_SDR_MOD - , - mat3 targetPrimariesXYZ -#endif -#if USE_TONEMAP - , - float maxLuminance, float dstMaxLuminance, float dstRefLuminance, float srcRefLuminance -#endif -#if USE_SDR_MOD - , - float sdrSaturation, float sdrBrightnessMultiplier -#endif -#endif -#endif -) { +vec4 getInnerGlow(vec4 pixColor, vec4 colorSRGB, vec2 v_texcoord, float radius, float roundingPower, vec2 topLeft, vec2 fullSize, float range, float glowPower, vec2 bottomRight) { vec2 pixCoord = fullSize * v_texcoord; // clip to the rounded rectangle shape using actual SDF @@ -79,28 +55,15 @@ vec4 getInnerGlow(vec4 pixColor, vec2 v_texcoord, float radius, float roundingPo // premultiply pixColor.rgb *= pixColor[3]; -#if USE_CM - pixColor = doColorManagement(pixColor, sourceTF, targetTF, convertMatrix, srcTFRange, dstTFRange -#if USE_ICC - , - iccLut3D, iccLutSize +#if USE_MIRROR + vec4[2] pixColors; + pixColors[0] = pixColor; + pixColors[1] = colorSRGB; + pixColors[1].a = pixColor.a; + pixColors[1].rgb *= pixColors[1].a; + return pixColors; #else -#if USE_TONEMAP || USE_SDR_MOD - , - targetPrimariesXYZ -#endif -#if USE_TONEMAP - , - maxLuminance, dstMaxLuminance, dstRefLuminance, srcRefLuminance -#endif -#if USE_SDR_MOD - , - sdrSaturation, sdrBrightnessMultiplier -#endif -#endif - ); -#endif - return pixColor; +#endif } #endif |
