float xll_saturate_f( float x) { return clamp( x, 0.0, 1.0); } vec2 xll_saturate_vf2( vec2 x) { return clamp( x, 0.0, 1.0); } vec3 xll_saturate_vf3( vec3 x) { return clamp( x, 0.0, 1.0); } vec4 xll_saturate_vf4( vec4 x) { return clamp( x, 0.0, 1.0); } mat2 xll_saturate_mf2x2(mat2 m) { return mat2( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0)); } mat3 xll_saturate_mf3x3(mat3 m) { return mat3( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0), clamp(m[2], 0.0, 1.0)); } mat4 xll_saturate_mf4x4(mat4 m) { return mat4( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0), clamp(m[2], 0.0, 1.0), clamp(m[3], 0.0, 1.0)); } #line 11 struct v2f_withBlurCoords { highp vec4 pos; mediump vec4 uv; mediump vec2 offs; }; #line 6 uniform sampler2D _MainTex; uniform sampler2D _SssStretch; uniform highp vec4 _SssStretch_AddMul; #line 17 #line 17 highp vec4 xlat_main( in v2f_withBlurCoords i ) { highp vec2 uv = i.uv.xy; #line 21 const highp float[7] curve = float[7]( 0.006, 0.061, 0.242, 0.383, 0.242, 0.061, 0.006); highp vec2 stretch = ((texture( _SssStretch, uv).xy * _SssStretch_AddMul.yy) + _SssStretch_AddMul.xx); highp vec2 netFilterWidth = (stretch * i.offs); highp vec2 coords = (uv - (netFilterWidth * 3.0)); #line 25 highp vec4 sum = vec4( 0.0); highp float weightSum = 0.0; highp int l = 0; for ( ; (l < 7); (l++)) { #line 30 highp vec4 tap = texture( _MainTex, coords); highp float weight = ((2.0 * xll_saturate_f((tap.w - 0.5))) * curve[l]); sum += (tap * weight); weightSum += weight; #line 34 coords += netFilterWidth; } sum = clamp( (sum / (weightSum + 0.0001)), vec4( 0.0), vec4( 10.0)); #line 38 mediump vec4 center = texture( _MainTex, i.uv.xy); sum.w = center.w; return mix( center, sum, vec4( center.w)); } in mediump vec4 xlv_TEXCOORD0; in mediump vec2 xlv_TEXCOORD1; void main() { highp vec4 xl_retval; v2f_withBlurCoords xlt_i; xlt_i.pos = vec4(0.0); xlt_i.uv = vec4(xlv_TEXCOORD0); xlt_i.offs = vec2(xlv_TEXCOORD1); xl_retval = xlat_main( xlt_i); gl_FragData[0] = vec4(xl_retval); } // uniforms: // _MainTex: type 25 arrsize 0 // _SssStretch: type 25 arrsize 0 // _SssStretch_AddMul: type 12 arrsize 0