made gl3 UBOs optional; also tried other snake oil

This commit is contained in:
aap
2020-05-14 11:54:20 +02:00
parent 57634dc46d
commit 2d6ca32102
27 changed files with 374 additions and 583 deletions

View File

@@ -0,0 +1,28 @@
#ifdef USE_UBOS
layout(std140) uniform State
{
vec2 u_alphaRef;
float u_fogStart;
float u_fogEnd;
float u_fogRange;
float u_fogDisable;
vec4 u_fogColor;
};
#else
//uniform int u_alphaTest;
//uniform float u_alphaRef;
uniform vec2 u_alphaRef;
uniform float u_fogStart;
uniform float u_fogEnd;
uniform float u_fogRange;
uniform float u_fogDisable;
uniform vec4 u_fogColor;
#endif
void DoAlphaTest(float a)
{
if(a < u_alphaRef.x || a >= u_alphaRef.y)
discard;
}