summaryrefslogtreecommitdiff
path: root/drivers/gles3/shaders/resolve.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/shaders/resolve.glsl')
-rw-r--r--drivers/gles3/shaders/resolve.glsl20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/gles3/shaders/resolve.glsl b/drivers/gles3/shaders/resolve.glsl
index 0b50a9c57b..d860fa544f 100644
--- a/drivers/gles3/shaders/resolve.glsl
+++ b/drivers/gles3/shaders/resolve.glsl
@@ -1,12 +1,10 @@
[vertex]
-
-layout(location=0) in highp vec4 vertex_attrib;
-layout(location=4) in vec2 uv_in;
+layout(location = 0) in highp vec4 vertex_attrib;
+layout(location = 4) in vec2 uv_in;
out vec2 uv_interp;
-
void main() {
uv_interp = uv_in;
@@ -20,8 +18,8 @@ precision mediump float;
#endif
in vec2 uv_interp;
-uniform sampler2D source_specular; //texunit:0
-uniform sampler2D source_ssr; //texunit:1
+uniform sampler2D source_specular; // texunit:0
+uniform sampler2D source_ssr; // texunit:1
uniform vec2 pixel_size;
@@ -31,14 +29,12 @@ layout(location = 0) out vec4 frag_color;
void main() {
- vec4 specular = texture( source_specular, uv_interp );
+ vec4 specular = texture(source_specular, uv_interp);
#ifdef USE_SSR
-
- vec4 ssr = textureLod(source_ssr,uv_interp,0.0);
- specular.rgb = mix(specular.rgb,ssr.rgb*specular.a,ssr.a);
+ vec4 ssr = textureLod(source_ssr, uv_interp, 0.0);
+ specular.rgb = mix(specular.rgb, ssr.rgb * specular.a, ssr.a);
#endif
- frag_color = vec4(specular.rgb,1.0);
+ frag_color = vec4(specular.rgb, 1.0);
}
-