[PR #8994] Fix shader time input #27369

Closed
opened 2026-01-31 09:21:34 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8994

State: closed
Merged: Yes


Correctly sets the time input on the pixelShaderSettings struct, which was previously hard-coded to 0.0f.

PR Checklist

  • Closes Graphics Improvement: Update to DXGI 1.6 (#8935)
  • CLA signed. If not, go over here and sign the CLA
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #8935

Detailed Description of the Pull Request / Additional comments

I added a private field to DxEngine to store the timestamp for when a custom shader is first loaded. The field is initialized in _SetupTerminalEffects(), and the calculated time value (seconds since the timestamp) passed to the actual shader is set in _ComputePixelShaderSettings().

There remains an issue with with jerky animation due to the renderer not repainting when the window contents are not updated (see discussion in the original issue). - Fixed in #9091

This is basically my first time writing C++; constructive review is enthusiastically welcomed 🙂

Validation Steps Performed

I manually tested using a variety of simple shaders that rely on time input for animation.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/8994 **State:** closed **Merged:** Yes --- Correctly sets the time input on the pixelShaderSettings struct, which was previously hard-coded to `0.0f`. ## PR Checklist * [x] Closes #8935 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #8935 ## Detailed Description of the Pull Request / Additional comments I added a private field to `DxEngine` to store the timestamp for when a custom shader is first loaded. The field is initialized in `_SetupTerminalEffects()`, and the calculated time value (seconds since the timestamp) passed to the actual shader is set in `_ComputePixelShaderSettings()`. ~~There remains an issue with with jerky animation due to the renderer not repainting when the window contents are not updated (see discussion in the original issue).~~ - *Fixed in #9091* This is basically my first time writing C++; constructive review is enthusiastically welcomed 🙂 ## Validation Steps Performed I manually tested using a variety of simple shaders that rely on time input for animation.
claunia added the pull-request label 2026-01-31 09:21:34 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27369