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:
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl b/source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl
index a38113fad87..45ba6cf4d08 100644
--- a/source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl
@@ -2,20 +2,12 @@
#ifdef UNIFORM_ID
uniform uint id;
#else
-flat in vec4 id;
+flat in uint id;
#endif
-out vec4 fragColor;
+out uint fragColor;
void main()
{
-#ifdef UNIFORM_ID
- fragColor = vec4(
- ((id ) & 0xFFu) * (1.0f / 255.0f),
- ((id >> 8u) & 0xFFu) * (1.0f / 255.0f),
- ((id >> 16u) & 0xFFu) * (1.0f / 255.0f),
- ((id >> 24u) ) * (1.0f / 255.0f));
-#else
fragColor = id;
-#endif
}