[PR #4716] [MERGED] Scale retro terminal scan lines #25895

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4716
Author: @dotpaul
Created: 2/25/2020
Status: ✅ Merged
Merged: 2/26/2020
Merged by: @undefined

Base: master ← Head: scaleScanLines


📝 Commits (9)

📊 Changes

12 files changed (+215 additions, -22 deletions)

View changed files

📝 doc/cascadia/SettingsSchema.md (+1 -0)
📝 doc/cascadia/profiles.schema.json (+10 -0)
📝 src/cascadia/TerminalApp/Profile.cpp (+64 -3)
📝 src/cascadia/TerminalApp/Profile.h (+5 -0)
📝 src/cascadia/TerminalApp/defaults.json (+4 -2)
📝 src/cascadia/TerminalControl/TermControl.cpp (+16 -0)
📝 src/cascadia/TerminalSettings/IControlSettings.idl (+9 -0)
📝 src/cascadia/TerminalSettings/TerminalSettings.cpp (+13 -1)
📝 src/cascadia/TerminalSettings/terminalsettings.h (+5 -0)
📝 src/renderer/dx/DxRenderer.cpp (+67 -12)
📝 src/renderer/dx/DxRenderer.hpp (+13 -0)
📝 src/renderer/dx/ScreenPixelShader.h (+8 -4)

📄 Description

Summary of the Pull Request

  • Scale the retro terminal effects (#3468) scan lines with the screen's DPI.
  • Remove artifacts from sampling wrap around.

Before & after, with my display scale set to 350%:
Scaling scan lines

Before & after showing artifact removal, with my display scale set to 100%, and image enlarged to 400%:
Sampling artifacts annotated

PR Checklist

Detailed Description of the Pull Request / Additional comments

Adds a constant buffer, which could be used for other settings for the retro terminal pixel shader.

I haven't touched C++ in over a decade before this change, and this is the first time I've played with DirectX, so please assume my code isn't exactly best practice. 🙂

Validation Steps Performed

  • Changed display scale with experimental.retroTerminalEffect enabled, enjoyed scan lines on high resolution monitors.
  • Enabled experimental.retroTerminalEffect, turned the setting off, changed display scale. Retro tabs still scale scan lines.

🔄 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/4716 **Author:** [@dotpaul](https://github.com/dotpaul) **Created:** 2/25/2020 **Status:** ✅ Merged **Merged:** 2/26/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `scaleScanLines` --- ### 📝 Commits (9) - [`7b604bd`](https://github.com/microsoft/terminal/commit/7b604bd3b0f8066950bab54dec8e98c83dcfde89) Scale retro scan lines initial - [`6708b77`](https://github.com/microsoft/terminal/commit/6708b77f1e6f8e9985b7dc87e648383314d1be4c) Just put the pixel shader settings into its own member struct - [`de21767`](https://github.com/microsoft/terminal/commit/de21767a8135d3ac3500fa6d2a836ddb3277bb70) Undo unintended formatting changes - [`2c66231`](https://github.com/microsoft/terminal/commit/2c66231e6cc0a04fce45efe5d71624ca52265f23) Trying to fix static analysis warnings - [`a887ca6`](https://github.com/microsoft/terminal/commit/a887ca67ad8f4b105b3420acf5c36d6451dc7f8f) Oops, indenting - [`21bc523`](https://github.com/microsoft/terminal/commit/21bc52360b80416e4199a156095b047f0a194883) Invoke-CodeFormat'd - [`d57ceab`](https://github.com/microsoft/terminal/commit/d57ceabb185532cf1436c6a998577e383cddd3bb) Pad _pixelShaderSettings - [`8a5407c`](https://github.com/microsoft/terminal/commit/8a5407c13af623549b0957ed73304dd76001aef1) Add support for cleartype text antialiasing (#4711) - [`494682c`](https://github.com/microsoft/terminal/commit/494682cb3e71fe7e0a4cd09bf0ee35f57711ec47) Merge branch 'scaleScanLines' of https://github.com/dotpaul/terminal into dotpaul-scaleScanLines ### 📊 Changes **12 files changed** (+215 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/SettingsSchema.md` (+1 -0) 📝 `doc/cascadia/profiles.schema.json` (+10 -0) 📝 `src/cascadia/TerminalApp/Profile.cpp` (+64 -3) 📝 `src/cascadia/TerminalApp/Profile.h` (+5 -0) 📝 `src/cascadia/TerminalApp/defaults.json` (+4 -2) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+16 -0) 📝 `src/cascadia/TerminalSettings/IControlSettings.idl` (+9 -0) 📝 `src/cascadia/TerminalSettings/TerminalSettings.cpp` (+13 -1) 📝 `src/cascadia/TerminalSettings/terminalsettings.h` (+5 -0) 📝 `src/renderer/dx/DxRenderer.cpp` (+67 -12) 📝 `src/renderer/dx/DxRenderer.hpp` (+13 -0) 📝 `src/renderer/dx/ScreenPixelShader.h` (+8 -4) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request - Scale the retro terminal effects (#3468) scan lines with the screen's DPI. - Remove artifacts from sampling wrap around. Before & after, with my display scale set to 350%: ![Scaling scan lines](https://user-images.githubusercontent.com/38924837/75214566-df0f4780-5742-11ea-9bdc-3430eb24ccca.png) Before & after showing artifact removal, with my display scale set to 100%, and image enlarged to 400%: ![Sampling artifacts annotated](https://user-images.githubusercontent.com/38924837/75214618-05cd7e00-5743-11ea-9060-f4eba257ea56.png) <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #4362 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] 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: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Adds a constant buffer, which could be used for other settings for the retro terminal pixel shader. I haven't touched C++ in over a decade before this change, and this is the first time I've played with DirectX, so please assume my code isn't exactly best practice. 🙂 <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Changed display scale with experimental.retroTerminalEffect enabled, enjoyed scan lines on high resolution monitors. - Enabled experimental.retroTerminalEffect, turned the setting off, changed display scale. Retro tabs still scale scan lines. --- <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:12:29 +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#25895