Skip to content

Commit

Permalink
Fully ignore transparency for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeltumn committed Nov 12, 2024
1 parent a9d0bf2 commit a9fc0e5
Showing 1 changed file with 43 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,62 +16,62 @@ out vec4 fragColor;

void main() {
if (SamplerCount == 1) {
fragColor = texture(Sampler0, texCoord);
fragColor.rgb = texture(Sampler0, texCoord).rgb;
} else if (SamplerCount == 2) {
fragColor = (1.0/2.0) * (
texture(Sampler0, texCoord) +
texture(Sampler1, texCoord)
fragColor.rgb = (1.0/2.0) * (
texture(Sampler0, texCoord).rgb +
texture(Sampler1, texCoord).rgb
);
} else if (SamplerCount == 3) {
fragColor = (1.0/3.0) * (
texture(Sampler0, texCoord) +
texture(Sampler1, texCoord) +
texture(Sampler2, texCoord)
fragColor.rgb = (1.0/3.0) * (
texture(Sampler0, texCoord).rgb +
texture(Sampler1, texCoord).rgb +
texture(Sampler2, texCoord).rgb
);
} else if (SamplerCount == 4) {
fragColor = (1.0/4.0) * (
texture(Sampler0, texCoord) +
texture(Sampler1, texCoord) +
texture(Sampler2, texCoord) +
texture(Sampler3, texCoord)
fragColor.rgb = (1.0/4.0) * (
texture(Sampler0, texCoord).rgb +
texture(Sampler1, texCoord).rgb +
texture(Sampler2, texCoord).rgb +
texture(Sampler3, texCoord).rgb
);
} else if (SamplerCount == 5) {
fragColor = (1.0/5.0) * (
texture(Sampler0, texCoord) +
texture(Sampler1, texCoord) +
texture(Sampler2, texCoord) +
texture(Sampler3, texCoord) +
texture(Sampler4, texCoord)
fragColor.rgb = (1.0/5.0) * (
texture(Sampler0, texCoord).rgb +
texture(Sampler1, texCoord).rgb +
texture(Sampler2, texCoord).rgb +
texture(Sampler3, texCoord).rgb +
texture(Sampler4, texCoord).rgb
);
} else if (SamplerCount == 6) {
fragColor = (1.0/6.0) * (
texture(Sampler0, texCoord) +
texture(Sampler1, texCoord) +
texture(Sampler2, texCoord) +
texture(Sampler3, texCoord) +
texture(Sampler4, texCoord) +
texture(Sampler5, texCoord)
fragColor.rgb = (1.0/6.0) * (
texture(Sampler0, texCoord).rgb +
texture(Sampler1, texCoord).rgb +
texture(Sampler2, texCoord).rgb +
texture(Sampler3, texCoord).rgb +
texture(Sampler4, texCoord).rgb +
texture(Sampler5, texCoord).rgb
);
} else if (SamplerCount == 7) {
fragColor = (1.0/7.0) * (
texture(Sampler0, texCoord) +
texture(Sampler1, texCoord) +
texture(Sampler2, texCoord) +
texture(Sampler3, texCoord) +
texture(Sampler4, texCoord) +
texture(Sampler5, texCoord) +
texture(Sampler6, texCoord)
fragColor.rgb = (1.0/7.0) * (
texture(Sampler0, texCoord).rgb +
texture(Sampler1, texCoord).rgb +
texture(Sampler2, texCoord).rgb +
texture(Sampler3, texCoord).rgb +
texture(Sampler4, texCoord).rgb +
texture(Sampler5, texCoord).rgb +
texture(Sampler6, texCoord).rgb
);
} else if (SamplerCount == 8) {
fragColor = (1.0/8.0) * (
texture(Sampler0, texCoord) +
texture(Sampler1, texCoord) +
texture(Sampler2, texCoord) +
texture(Sampler3, texCoord) +
texture(Sampler4, texCoord) +
texture(Sampler4, texCoord) +
texture(Sampler6, texCoord) +
texture(Sampler7, texCoord)
fragColor.rgb = (1.0/8.0) * (
texture(Sampler0, texCoord).rgb +
texture(Sampler1, texCoord).rgb +
texture(Sampler2, texCoord).rgb +
texture(Sampler3, texCoord).rgb +
texture(Sampler4, texCoord).rgb +
texture(Sampler4, texCoord).rgb +
texture(Sampler6, texCoord).rgb +
texture(Sampler7, texCoord).rgb
);
}
}

0 comments on commit a9fc0e5

Please sign in to comment.