Skip to content

Commit

Permalink
feat(model): add opaque + opaque combiner to fragment shader
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Jan 22, 2024
1 parent 244ac8c commit cbe64db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/model/shader/fragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ void combineMod2x(inout vec4 color, in vec4 tex0) {
color.a = color.a * tex0.a * 2.0;
}
void combineOpaqueOpaque(inout vec4 color, in vec4 tex0, in vec4 tex1) {
color.rgb = (color.rgb * tex0.rgb) * tex1.rgb;
}
void combineOpaqueAdd(inout vec4 color, in vec4 tex0, in vec4 tex1) {
color.rgb = (color.rgb * tex0.rgb) + tex1.rgb;
color.a = color.a + tex1.a;
Expand Down

0 comments on commit cbe64db

Please sign in to comment.