0be6d925dc
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
43 lines
795 B
GLSL
43 lines
795 B
GLSL
/* clang-format off */
|
|
[vertex]
|
|
|
|
layout(location = 0) in highp vec4 vertex_attrib;
|
|
/* clang-format on */
|
|
layout(location = 4) in vec2 uv_in;
|
|
|
|
out vec2 uv_interp;
|
|
|
|
void main() {
|
|
uv_interp = uv_in;
|
|
gl_Position = vertex_attrib;
|
|
}
|
|
|
|
/* clang-format off */
|
|
[fragment]
|
|
|
|
#if !defined(GLES_OVER_GL)
|
|
precision mediump float;
|
|
#endif
|
|
|
|
in vec2 uv_interp;
|
|
/* clang-format on */
|
|
uniform sampler2D source_specular; //texunit:0
|
|
uniform sampler2D source_ssr; //texunit:1
|
|
|
|
uniform vec2 pixel_size;
|
|
|
|
in vec2 uv2_interp;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
|
|
void main() {
|
|
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);
|
|
#endif
|
|
|
|
frag_color = vec4(specular.rgb, 1.0);
|
|
}
|