Colors are now always Vec4, ARGB ints are only wrappers

This commit is contained in:
2021-01-05 18:51:44 +03:00
parent a6c1b914c1
commit d197c0a73e
19 changed files with 232 additions and 139 deletions

View File

@@ -1,6 +1,6 @@
#version 120
varying vec3 varyingColorMultiplier;
varying vec4 varyingColorMultiplier;
varying vec2 varyingTextureCoords;
uniform sampler2D textureSlot;
@@ -16,11 +16,11 @@ void applyTexture() {
}
void applyColorMultiplier() {
gl_FragColor *= vec4(varyingColorMultiplier, 1.0);
gl_FragColor *= varyingColorMultiplier;
}
void applyAlpha() {
if (gl_FragColor.w < 0.01) {
if (gl_FragColor.w < (1 / 256.0)) {
discard;
}
}

View File

@@ -2,8 +2,8 @@
attribute vec3 inputPositions;
attribute vec3 inputColorMultiplier;
varying vec3 varyingColorMultiplier;
attribute vec4 inputColorMultiplier;
varying vec4 varyingColorMultiplier;
attribute vec2 inputTextureCoords;
varying vec2 varyingTextureCoords;