Fix a regression in the previous release that caused the cursor trail to not be hidden properly

In refactoring the trail shader, I guess I forgot to premultiply the
output color.

Fixes #9039
This commit is contained in:
Kovid Goyal
2025-09-29 20:35:12 +05:30
parent 13e3ecad5c
commit b92246448d
3 changed files with 5 additions and 2 deletions

View File

@@ -155,6 +155,9 @@ Detailed list of changes
picker list the sessions in a fixed order rather than by most recent
(:disc:`9033`)
- Fix a regression in the previous release that caused the cursor trail to not
be hidden properly (:iss:`9039`)
- Session files: Fix a regression in the previous release that broke matching on
windows in the current tab (:iss:`9037`)

View File

@@ -1231,7 +1231,7 @@ draw_cursor_trail(CursorTrail *trail, Window *active_window) {
}
color_vec3(trail_program_layout.uniforms.trail_color, trail_color);
glUniform1fv(trail_program_layout.uniforms.trail_opacity, 1, &trail->opacity);
glUniform1f(trail_program_layout.uniforms.trail_opacity, trail->opacity);
draw_quad(true, 0);
unbind_program();

View File

@@ -12,5 +12,5 @@ void main() {
float in_x = step(cursor_edge_x[0], frag_pos.x) * step(frag_pos.x, cursor_edge_x[1]);
float in_y = step(cursor_edge_y[1], frag_pos.y) * step(frag_pos.y, cursor_edge_y[0]);
opacity *= 1.0f - in_x * in_y;
final_color = vec4(trail_color, opacity);
final_color = vec4(trail_color * opacity, opacity);
}