mirror of https://github.com/bkaradzic/bgfx
Cleanup.
This commit is contained in:
parent
2066d36774
commit
fd65b5a36e
|
@ -7,7 +7,6 @@ $input v_wpos, v_view, v_normal, v_tangent, v_bitangent, v_texcoord0
|
|||
|
||||
#include "../common/common.sh"
|
||||
|
||||
|
||||
uniform vec4 u_color;
|
||||
|
||||
void main()
|
||||
|
@ -18,5 +17,4 @@ void main()
|
|||
// for convenience, we also output the same color, to the first texture of the texture chain used for bloom.
|
||||
// this color will now be bloomed, in the following passes.
|
||||
gl_FragData[1] = u_color;
|
||||
|
||||
}
|
||||
|
|
|
@ -23,20 +23,20 @@ void main()
|
|||
|
||||
sum += (4.0/32.0) * texture2D(s_tex, uv).rgba;
|
||||
|
||||
sum += (4.0/32.0) * texture2D(s_tex, uv + vec2(-halfpixel.x, -halfpixel.y));
|
||||
sum += (4.0/32.0) * texture2D(s_tex, uv + vec2(+halfpixel.x, +halfpixel.y));
|
||||
sum += (4.0/32.0) * texture2D(s_tex, uv + vec2(+halfpixel.x, -halfpixel.y));
|
||||
sum += (4.0/32.0) * texture2D(s_tex, uv + vec2(-halfpixel.x, -halfpixel.y) );
|
||||
sum += (4.0/32.0) * texture2D(s_tex, uv + vec2(+halfpixel.x, +halfpixel.y) );
|
||||
sum += (4.0/32.0) * texture2D(s_tex, uv + vec2(+halfpixel.x, -halfpixel.y) );
|
||||
sum += (4.0/32.0) * texture2D(s_tex, uv + vec2(-halfpixel.x, +halfpixel.y) );
|
||||
|
||||
sum += (2.0/32.0) * texture2D(s_tex, uv + vec2(+oneepixel.x, 0.0));
|
||||
sum += (2.0/32.0) * texture2D(s_tex, uv + vec2(-oneepixel.x, 0.0));
|
||||
sum += (2.0/32.0) * texture2D(s_tex, uv + vec2(0.0, +oneepixel.y));
|
||||
sum += (2.0/32.0) * texture2D(s_tex, uv + vec2(0.0, -oneepixel.y));
|
||||
sum += (2.0/32.0) * texture2D(s_tex, uv + vec2(+oneepixel.x, 0.0) );
|
||||
sum += (2.0/32.0) * texture2D(s_tex, uv + vec2(-oneepixel.x, 0.0) );
|
||||
sum += (2.0/32.0) * texture2D(s_tex, uv + vec2(0.0, +oneepixel.y) );
|
||||
sum += (2.0/32.0) * texture2D(s_tex, uv + vec2(0.0, -oneepixel.y) );
|
||||
|
||||
sum += (1.0/32.0) * texture2D(s_tex, uv + vec2(+oneepixel.x, +oneepixel.y));
|
||||
sum += (1.0/32.0) * texture2D(s_tex, uv + vec2(-oneepixel.x, +oneepixel.y));
|
||||
sum += (1.0/32.0) * texture2D(s_tex, uv + vec2(+oneepixel.x, -oneepixel.y));
|
||||
sum += (1.0/32.0) * texture2D(s_tex, uv + vec2(-oneepixel.x, -oneepixel.y));
|
||||
sum += (1.0/32.0) * texture2D(s_tex, uv + vec2(+oneepixel.x, +oneepixel.y) );
|
||||
sum += (1.0/32.0) * texture2D(s_tex, uv + vec2(-oneepixel.x, +oneepixel.y) );
|
||||
sum += (1.0/32.0) * texture2D(s_tex, uv + vec2(+oneepixel.x, -oneepixel.y) );
|
||||
sum += (1.0/32.0) * texture2D(s_tex, uv + vec2(-oneepixel.x, -oneepixel.y) );
|
||||
|
||||
gl_FragColor.xyzw = sum;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
$input v_texcoord0
|
||||
|
||||
/*
|
||||
* Copyright 2018 Eric Arnebäck. All rights reserved.
|
||||
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
||||
*/
|
||||
|
||||
#include "../common/common.sh"
|
||||
|
||||
SAMPLER2D(s_tex, 0);
|
||||
//SAMPLER2D(s_target_tex, 1);
|
||||
|
||||
uniform vec4 u_pixelSize;
|
||||
uniform vec4 u_intensity;
|
||||
|
|
|
@ -6,7 +6,6 @@ $output v_wpos, v_view, v_normal, v_tangent, v_bitangent, v_texcoord0
|
|||
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
||||
*/
|
||||
|
||||
|
||||
#include "../common/common.sh"
|
||||
|
||||
void main()
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
$input a_position, a_texcoord0
|
||||
$output v_texcoord0
|
||||
|
||||
/*
|
||||
* Copyright 2018 Eric Arnebäck. All rights reserved.
|
||||
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
||||
*/
|
||||
|
||||
#include "../common/common.sh"
|
||||
|
||||
|
|
Loading…
Reference in New Issue