Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-05-18 15:33:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-05-18 15:33:34 +0300
commit00164f3c70aceed2103adbce1c04164e2bc62f6c (patch)
treee70ab26c59c9ff8bf41e0776e5513cc11e5cdab4 /source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl
parentdad10ab11836a164b0c92f3252e1b60d206c2f13 (diff)
Correct own error using u32 for back-buffer select
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl
index 7dccddf8acf..7db7e28d8e6 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl
@@ -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