Correct own error using u32 for back-buffer select

This commit is contained in:
2017-05-18 22:33:34 +10:00
parent dad10ab118
commit 00164f3c70
2 changed files with 16 additions and 16 deletions

View File

@@ -3,7 +3,7 @@ uniform mat4 ModelViewProjectionMatrix;
in vec3 pos;
#if defined(USE_COLOR_U32)
in int color;
in uint color;
#else
in vec4 color;
#endif
@@ -16,10 +16,10 @@ void main()
#if defined(USE_COLOR_U32)
finalColor = vec4(
((color ) & 0xFF) * (1.0f / 255.0f),
((color >> 8) & 0xFF) * (1.0f / 255.0f),
((color >> 16) & 0xFF) * (1.0f / 255.0f),
((color >> 24) ) * (1.0f / 255.0f));
((color ) & uint(0xFF)) * (1.0f / 255.0f),
((color >> 8) & uint(0xFF)) * (1.0f / 255.0f),
((color >> 16) & uint(0xFF)) * (1.0f / 255.0f),
((color >> 24) ) * (1.0f / 255.0f));
#else
finalColor = color;
#endif