Cleanup: Remove hardcoded values and rename keyframe shape shaders

No functional change.

The shader is complicated by itself, having hardcoded values makes it
even more cryptic.

I also renamed the shader because the shader is not for the keyfarme diamond only,
but for all the keyframe shapes.

Differential Revision: https://developer.blender.org/D12615
This commit is contained in:
2021-09-23 15:53:38 +02:00
parent f11bcb5a80
commit d0493796a6
12 changed files with 79 additions and 46 deletions

View File

@@ -309,7 +309,7 @@ static void vicon_keytype_draw_wrapper(
sh_bindings.flags_id = GPU_vertformat_attr_add(format, "flags", GPU_COMP_U32, 1, GPU_FETCH_INT);
GPU_program_point_size(true);
immBindBuiltinProgram(GPU_SHADER_KEYFRAME_DIAMOND);
immBindBuiltinProgram(GPU_SHADER_KEYFRAME_SHAPE);
immUniform1f("outline_scale", 1.0f);
immUniform2f("ViewportSize", -1.0f, -1.0f);
immBegin(GPU_PRIM_POINTS, 1);