[PR #8994] [MERGED] Fix shader time input #27364

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/8994
Author: @Nacimota
Created: 2/1/2021
Status: Merged
Merged: 2/2/2021
Merged by: @undefined

Base: mainHead: 8935-fix-shader-time


📝 Commits (1)

📊 Changes

2 files changed (+6 additions, -3 deletions)

View changed files

📝 src/renderer/dx/DxRenderer.cpp (+4 -3)
📝 src/renderer/dx/DxRenderer.hpp (+2 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/8994 **Author:** [@Nacimota](https://github.com/Nacimota) **Created:** 2/1/2021 **Status:** ✅ Merged **Merged:** 2/2/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `8935-fix-shader-time` --- ### 📝 Commits (1) - [`da5a5af`](https://github.com/microsoft/terminal/commit/da5a5af8d4de487d9b2db82fd49e96b194ed59ea) Fix shader time input #8935 ### 📊 Changes **2 files changed** (+6 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/dx/DxRenderer.cpp` (+4 -3) 📝 `src/renderer/dx/DxRenderer.hpp` (+2 -0) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:21:33 +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#27364