shaders: add iPreviousTimeCursorChange uniform #9386
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a new shader uniform that tracks the timestamp of the previous cursor change. This complements the existing iTimeCursorChange uniform and allows shader authors to calculate the time between cursor changes.
The uniform is automatically updated whenever the cursor position or color changes, storing the previous value of iTimeCursorChange before it gets updated to the current time.
This is useful for creating animations that depend on the duration between cursor movements or for implementing effects that need to track cursor change history.
Amp-Thread-ID: https://ampcode.com/threads/T-78e0a91a-5303-40b4-ae6c-1bb5f1efabdf
Co-authored-by: Amp amp@ampcode.com