Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl
| Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | void main() | ||||
| } | } | ||||
| float alpha = 1 - smoothstep(thresholds[0], thresholds[1], abs(outline_dist)); | float alpha = 1 - smoothstep(thresholds[0], thresholds[1], abs(outline_dist)); | ||||
| /* Inside the outline. */ | /* Inside the outline. */ | ||||
| if (outline_dist < 0) { | if (outline_dist < 0) { | ||||
| /* Middle dot */ | /* Middle dot */ | ||||
| if (test(0x10)) { | if (test(0x10)) { | ||||
| alpha = max(alpha, 1 - smoothstep(thresholds[2], thresholds[3], radius)); | float radius_for_dot = length(absPos); | ||||
| alpha = max(alpha, 1 - smoothstep(thresholds[2], thresholds[3], radius_for_dot)); | |||||
| } | } | ||||
| /* Up and down arrow-like shading. */ | /* Up and down arrow-like shading. */ | ||||
| if (test(0x300)) { | if (test(0x300)) { | ||||
| float ypos = -1.0; | float ypos = -1.0; | ||||
| /* Up arrow (maximum) */ | /* Up arrow (maximum) */ | ||||
| if (test(0x100)) { | if (test(0x100)) { | ||||
| Show All 24 Lines | |||||