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:
authorMike Erwin <significant.bit@gmail.com>2017-02-28 09:21:27 +0300
committerMike Erwin <significant.bit@gmail.com>2017-02-28 09:21:27 +0300
commite7d57628c955c1843c70c8fc5023f5d8954847bd (patch)
treeebd1a94dba38fd2d958850f60a48263aae7ead63 /source/blender/gpu
parent5138fe3c0a24d5890438eed90a70401d90423356 (diff)
OpenGL: keyframe shape fixes
- Size parameter is total size of the shape, not its radius (half size). Updated hard-coded sizes to match this. - Shader expands size to include outline. - Fixed fringe between outline color and transparent background.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl2
-rw-r--r--source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl b/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl
index 43a7e42153a..ebda79558c7 100644
--- a/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl
@@ -29,7 +29,7 @@ void main() {
float mid_stroke = 0.5 * (radii[1] + radii[2]);
- vec4 backgroundColor = vec4(finalColor.rgb, 0.0);
+ vec4 backgroundColor = vec4(finalOutlineColor.rgb, 0.0);
if (dist > mid_stroke)
fragColor = mix(finalOutlineColor, backgroundColor, smoothstep(radii[1], radii[0], dist));
diff --git a/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl b/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl
index 69afefa685f..6f33491af55 100644
--- a/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl
@@ -26,7 +26,7 @@ void main() {
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
// pass through unchanged
- gl_PointSize = size;
+ gl_PointSize = size + pixel_fudge; // 0.5 pixel_fudge on either side
finalColor = color;
finalOutlineColor = outlineColor;