diff --git a/src/glsl/general.vert b/src/glsl/general.vert index 144d4530f..b18a08302 100644 --- a/src/glsl/general.vert +++ b/src/glsl/general.vert @@ -1422,24 +1422,26 @@ void main() { endSize = u_background_size; endColor = u_background_rgba; endColor.a *= fill.a; - // endColor.rgb = vec3(0., 0., 1.); } } gl_PointSize *= mix(startSize, endSize, ease); - fill = mix(startColor, endColor, ease); - - // Very light alphas must be quantized. Only show an appropriate sample. - if (fill.a < 1./255.) { - float seed = ix_to_random(ix, 38.6); - if (fill.a * 255. < seed) { - gl_Position = discard_me; - return; - } else { - fill.a = 1. / 255.; - } + if (u_color_picker_mode < 1.) { + fill = mix(startColor, endColor, ease); + // Very light alphas must be quantized. Only show an appropriate sample. + // Note -- this adjustment will not happen in color picking modes, + // which may occasionally result in one tiny point highlighted + // in favor of another point in the exact same place. + if (fill.a < 1./255.) { + float seed = ix_to_random(ix, 38.6); + if (fill.a * 255. < seed) { + gl_Position = discard_me; + return; + } else { + fill.a = 1. / 255.; + } + } } - } point_size = gl_PointSize; /* if (u_use_glyphset > 0. && point_size > 5.0) { diff --git a/src/regl_rendering.ts b/src/regl_rendering.ts index 96fca7164..a7ac445f5 100644 --- a/src/regl_rendering.ts +++ b/src/regl_rendering.ts @@ -803,8 +803,9 @@ export class ReglRenderer extends Renderer { // } // return this.textures.empty_texture; // }, - //@ts-expect-error Don't know about regl preps. - u_color_picker_mode: regl.prop('color_picker_mode'), + + u_color_picker_mode: (_: Color, { color_picker_mode }: P) => + color_picker_mode, u_position_interpolation_mode(_, props: P) { // 1 indicates that there should be a continuous loop between the two points. if (props.position_interpolation) {