mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Cleanup.
This commit is contained in:
@@ -7,12 +7,12 @@ $input v_texcoord0
|
||||
|
||||
#include "../common/common.sh"
|
||||
|
||||
SAMPLER2D(u_texColor0, 0);
|
||||
SAMPLER2D(u_texColor1, 1);
|
||||
SAMPLER2D(s_texColor0, 0);
|
||||
SAMPLER2D(s_texColor1, 1);
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 accum = texture2D(u_texColor0, v_texcoord0);
|
||||
float opacity = texture2D(u_texColor1, v_texcoord0).x;
|
||||
vec4 accum = texture2D(s_texColor0, v_texcoord0);
|
||||
float opacity = texture2D(s_texColor1, v_texcoord0).x;
|
||||
gl_FragColor = vec4(accum.xyz / clamp(accum.w, 1e-4, 5e4), opacity);
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ $input v_texcoord0
|
||||
|
||||
#include "../common/common.sh"
|
||||
|
||||
SAMPLER2D(u_texColor0, 0);
|
||||
SAMPLER2D(u_texColor1, 1);
|
||||
SAMPLER2D(s_texColor0, 0);
|
||||
SAMPLER2D(s_texColor1, 1);
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 accum = texture2D(u_texColor0, v_texcoord0);
|
||||
vec4 accum = texture2D(s_texColor0, v_texcoord0);
|
||||
float opacity = accum.w;
|
||||
float weight = texture2D(u_texColor1, v_texcoord0).x;
|
||||
float weight = texture2D(s_texColor1, v_texcoord0).x;
|
||||
gl_FragColor = vec4(accum.xyz / clamp(weight, 1e-4, 5e4), opacity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user