diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-08-24 15:17:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-24 15:17:38 +0200 |
commit | 1ae7a78d8b7566c8421dda4a061e10c8278f7760 (patch) | |
tree | b3c660b904a634244f4b8f1a981b5cd0837307b3 /drivers/gles2/shaders/canvas_shadow.glsl | |
parent | cf217627c7b31dfce5b142351dbd93184a96db5c (diff) | |
parent | e68b96928bbc9814519534acd89003db33279858 (diff) |
Merge pull request #21364 from akien-mga/shaders-style
Style: Fix code formatting in GLSL shaders
Diffstat (limited to 'drivers/gles2/shaders/canvas_shadow.glsl')
-rw-r--r-- | drivers/gles2/shaders/canvas_shadow.glsl | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/gles2/shaders/canvas_shadow.glsl b/drivers/gles2/shaders/canvas_shadow.glsl index c757990de0..81af486101 100644 --- a/drivers/gles2/shaders/canvas_shadow.glsl +++ b/drivers/gles2/shaders/canvas_shadow.glsl @@ -1,20 +1,18 @@ [vertex] - - uniform highp mat4 projection_matrix; uniform highp mat4 light_matrix; uniform highp mat4 world_matrix; uniform highp float distance_norm; -layout(location=0) in highp vec3 vertex; +layout(location = 0) in highp vec3 vertex; out highp vec4 position_interp; void main() { - gl_Position = projection_matrix * (light_matrix * (world_matrix * vec4(vertex,1.0))); - position_interp=gl_Position; + gl_Position = projection_matrix * (light_matrix * (world_matrix * vec4(vertex, 1.0))); + position_interp = gl_Position; } [fragment] @@ -23,27 +21,26 @@ in highp vec4 position_interp; #ifdef USE_RGBA_SHADOWS -layout(location=0) out lowp vec4 distance_buf; +layout(location = 0) out lowp vec4 distance_buf; #else -layout(location=0) out highp float distance_buf; +layout(location = 0) out highp float distance_buf; #endif void main() { - highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0;//bias; + highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0; //bias; #ifdef USE_RGBA_SHADOWS highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0)); comp -= comp.xxyz * vec4(0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0); - distance_buf=comp; + distance_buf = comp; #else - distance_buf=depth; + distance_buf = depth; #endif } - |