Skip to content

Commit d2b9eb5

Browse files
authored
Rename std var (#9088)
1 parent 44e32a7 commit d2b9eb5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

filament/src/materials/sgsr/sgsr1_shader_mobile.fs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ vec2 weightY(float dx, float dy, float c, float data)
2525
#endif
2626
{
2727
#if defined(UseEdgeDirection)
28-
float std = data.x;
28+
float stdDeviation = data.x;
2929
vec2 dir = data.yz;
3030

3131
float edgeDis = ((dx*dir.y)+(dy*dir.x));
32-
float x = (((dx*dx)+(dy*dy))+((edgeDis*edgeDis)*((clamp(((c*c)*std),0.0,1.0)*0.7)+-1.0)));
32+
float x = (((dx*dx)+(dy*dy))+((edgeDis*edgeDis)*((clamp(((c*c)*stdDeviation),0.0,1.0)*0.7)+-1.0)));
3333
#else
34-
float std = data;
35-
float x = ((dx*dx)+(dy*dy))* 0.55 + clamp(abs(c)*std, 0.0, 1.0);
34+
float stdDeviation = data;
35+
float x = ((dx*dx)+(dy*dy))* 0.55 + clamp(abs(c)*stdDeviation, 0.0, 1.0);
3636
#endif
3737

3838
float w = fastLanczos2(x);
@@ -92,8 +92,8 @@ vec4 sgsr(mediump sampler2D ps0, highp vec2 in_TEXCOORD0, highp vec4 ViewportInf
9292

9393
#if defined(UseEdgeDirection)
9494
float sumMean = 1.014185e+01 / sum;
95-
float std = (sumMean * sumMean);
96-
vec3 data = vec3(std, edgeDirection(left, right));
95+
float stdDeviation = (sumMean * sumMean);
96+
vec3 data = vec3(stdDeviation, edgeDirection(left, right));
9797
#else
9898
// taken from sgsr sample
9999
float data = 2.181818 / sum;

0 commit comments

Comments
 (0)