1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 12:23:53 +00:00

Correct alpha testing functions

This commit is contained in:
AnyOldName3 2021-01-02 18:27:25 +00:00
parent c75d7ceada
commit 69386df036

View file

@ -40,22 +40,22 @@ void alphaTest()
#if @alphaFunc == FUNC_NEVER #if @alphaFunc == FUNC_NEVER
discard; discard;
#elif @alphaFunc == FUNC_LESS #elif @alphaFunc == FUNC_LESS
if (gl_FragData[0].a > alphaRef) if (gl_FragData[0].a >= alphaRef)
discard; discard;
#elif @alphaFunc == FUNC_EQUAL #elif @alphaFunc == FUNC_EQUAL
if (gl_FragData[0].a != alphaRef) if (gl_FragData[0].a != alphaRef)
discard; discard;
#elif @alphaFunc == FUNC_LEQUAL #elif @alphaFunc == FUNC_LEQUAL
if (gl_FragData[0].a >= alphaRef) if (gl_FragData[0].a > alphaRef)
discard; discard;
#elif @alphaFunc == FUNC_GREATER #elif @alphaFunc == FUNC_GREATER
if (gl_FragData[0].a < alphaRef) if (gl_FragData[0].a <= alphaRef)
discard; discard;
#elif @alphaFunc == FUNC_NOTEQUAL #elif @alphaFunc == FUNC_NOTEQUAL
if (gl_FragData[0].a == alphaRef) if (gl_FragData[0].a == alphaRef)
discard; discard;
#elif @alphaFunc == FUNC_GEQUAL #elif @alphaFunc == FUNC_GEQUAL
if (gl_FragData[0].a <= alphaRef) if (gl_FragData[0].a < alphaRef)
discard; discard;
#endif #endif
#endif #endif