pull/9386/merge
Tim Culverhouse 2025-12-17 17:50:35 +00:00 committed by GitHub
commit 21efb8b353
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 0 deletions

View File

@ -2687,6 +2687,9 @@ keybind: Keybinds = .{},
/// the same time as the `iTime` uniform, allowing you to compute the
/// time since the change by subtracting this from `iTime`.
///
/// * `float iPreviousTimeCursorChange` - Timestamp of the previous terminal
/// cursor change.
///
/// If the shader fails to compile, the shader will be ignored. Any errors
/// related to shader compilation will not show up as configuration errors
/// and only show up in the log, since shader compilation happens after

View File

@ -746,6 +746,7 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
.current_cursor_color = @splat(0),
.previous_cursor_color = @splat(0),
.cursor_change_time = 0,
.previous_cursor_change_time = 0,
},
.bg_image_buffer = undefined,
@ -2356,6 +2357,7 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
uniforms.previous_cursor_color = uniforms.current_cursor_color;
uniforms.current_cursor = new_cursor;
uniforms.current_cursor_color = cursor_color;
uniforms.previous_cursor_change_time = uniforms.cursor_change_time;
uniforms.cursor_change_time = uniforms.time;
}
}

View File

@ -16,6 +16,7 @@ layout(binding = 1, std140) uniform Globals {
uniform vec4 iCurrentCursorColor;
uniform vec4 iPreviousCursorColor;
uniform float iTimeCursorChange;
uniform float iPreviousTimeCursorChange;
};
layout(binding = 0) uniform sampler2D iChannel0;

View File

@ -25,6 +25,7 @@ pub const Uniforms = extern struct {
current_cursor_color: [4]f32 align(16),
previous_cursor_color: [4]f32 align(16),
cursor_change_time: f32 align(4),
previous_cursor_change_time: f32 align(4),
};
/// The target to load shaders for.