From cbe64dbc390e165d505d4dfb881e5e4c0caebff9 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Mon, 22 Jan 2024 16:34:06 -0600 Subject: [PATCH] feat(model): add opaque + opaque combiner to fragment shader --- src/lib/model/shader/fragment.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/model/shader/fragment.ts b/src/lib/model/shader/fragment.ts index 67e33ae..05479a6 100644 --- a/src/lib/model/shader/fragment.ts +++ b/src/lib/model/shader/fragment.ts @@ -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;