Merge 015be3eb5a into c84113d199
commit
21efb8b353
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue