Skip to content

Commit

Permalink
新增1bit图双色着色器
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Jan 1, 2024
1 parent ba353bf commit 3543983
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions assets/shader/dualColor.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
uniform float color1[3];
uniform float color2[3];

vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
vec4 texcolor=texture2D(tex,texCoord);
return vec4(
mix(color1[0],color2[0],texcolor.r),
mix(color1[1],color2[1],texcolor.g),
mix(color1[2],color2[2],texcolor.b),
texcolor.a
);
}

0 comments on commit 3543983

Please sign in to comment.