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:
authorCharlie Jolly <charlie>2019-08-22 12:10:11 +0300
committerJacques Lucke <mail@jlucke.com>2019-08-22 12:10:11 +0300
commit2ba233a31fead52820763fb6637dcae20eeed574 (patch)
tree9775141864615386c1e2c3d8a9e4712896505cb7 /source/blender/gpu
parent0356c8f25b96bf9d8c677e51ad5106b5295cb37f (diff)
Nodes: Support for socket shapes other than circle
Previously there was already "draw_shape" property, but it was doing nothing. This commit renames the property to "display_shape". Furthermore, different shapes like SQUARE and DIAMOND are supported now. Currently, the shapes are drawn using the shader that also draws keyframes. In the future we might want to separate this. The new shapes are not used anywhere yet, but they can be used by addon developers and will probably be useful when we want to support different kinds node systems later. For example, different shapes can be used to distinguish between data and control flow. Differential Revision: https://developer.blender.org/D2829
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl4
1 files changed, 2 insertions, 2 deletions
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 8dc92a2b415..2ba89230d80 100644
--- a/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl
@@ -1,11 +1,11 @@
uniform mat4 ModelViewProjectionMatrix;
uniform vec2 ViewportSize = vec2(-1, -1);
+uniform float outline_scale = 1.0;
const float line_falloff = 1.0;
const float circle_scale = sqrt(2.0 / 3.1416);
const float square_scale = sqrt(0.5);
-
const float diagonal_scale = sqrt(0.5);
in vec2 pos;
@@ -58,7 +58,7 @@ void main()
float line_width = half_width + line_falloff;
/* Outline thresholds. */
- thresholds.xy = line_thresholds(line_width);
+ thresholds.xy = line_thresholds(line_width * outline_scale);
/* Inner dot thresholds. */
thresholds.zw = line_thresholds(line_width * 1.6);