REVIEWED: shaders_multi_sample2d
This commit is contained in:
parent
aba69146f2
commit
ff6d5c8ddb
3 changed files with 22 additions and 6 deletions
|
@ -11,6 +11,8 @@ uniform sampler2D texture0;
|
|||
uniform sampler2D texture1;
|
||||
uniform vec4 colDiffuse;
|
||||
|
||||
uniform float divider;
|
||||
|
||||
void main()
|
||||
{
|
||||
// Texel color fetching from texture sampler
|
||||
|
@ -18,7 +20,7 @@ void main()
|
|||
vec4 texelColor1 = texture2D(texture1, fragTexCoord);
|
||||
|
||||
float x = fract(fragTexCoord.s);
|
||||
float out = smoothstep(0.4, 0.6, x);
|
||||
float final = smoothstep(divider - 0.1, divider + 0.1, x);
|
||||
|
||||
gl_FragColor = mix(texelColor0, texelColor1, out);
|
||||
}
|
||||
gl_FragColor = mix(texelColor0, texelColor1, final);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue