[PR #7058] Implemented support for user provided pixel shaders #26835

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

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

State: closed
Merged: No


Summary of the Pull Request

Allows users to provide pixel shader effects or pick one from a few presets such as the "retroII" preset.

image

Preliminary blog post on how to enable pixel shaders (private GIST): https://gist.github.com/mrange/1fdcfb7293f0299ecf994928f84d30b9

This built upon the existing experimental retro effect feature which lacked tests which means no tests were changed but none have been added (yet).

Testing was done exploratively with the different terminal settings.

References

https://github.com/microsoft/terminal/issues/7013

https://github.com/microsoft/terminal/issues/6191

PR Checklist

(These are not completed yet, will do obviously if the PR seems interesting)

  • Closes: https://github.com/microsoft/terminal/issues/7013
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema 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

Detailed Description of the Pull Request / Additional comments

Awesome things can be done with pixel shaders that can spice up
the terminal such as retro looks, fractals, raytracers or star
scroller backgrounds.

This feature deprecates the old retro effect config option but
supports the retro effect through the new config option:

"experimental.pixelShaderEffect": "RETRO"

A new retro effect has been added as well:

"experimental.pixelShaderEffect": "RETROII"

It's also possible for users to implement their own pixel shader
and load them like so:

"experimental.pixelShaderEffect" : "C:\temp\RetroIII.hlsl"

Note: The escaping of paths is needed to construct a valid JSON string.

Error handling is changed so that if the shader fails to load for any
reason the exception is logged normally and it defaults to an error
shader showing the user a pattern that indicates that a pixel shader
effect was attempted but didn't work out.

Some simple example shaders are provided under: samples/PixelShaders/

Validation Steps Performed

Manual steps:

  1. Enabling retro effect "experimental.pixelShaderEffect": "RETROII"
  2. Checking the retro effects looks as expected.
  3. Checking that settings is reloaded live
  4. Enabling broken retro effect "experimental.pixelShaderEffect": "BROKEN"
  5. Checking the terminal loads but display error pattern
**Original Pull Request:** https://github.com/microsoft/terminal/pull/7058 **State:** closed **Merged:** No --- ## Summary of the Pull Request Allows users to provide pixel shader effects or pick one from a few presets such as the "retroII" preset. ![image](https://user-images.githubusercontent.com/2491891/88453750-39374480-ce6a-11ea-904f-e771d08920e8.png) Preliminary blog post on how to enable pixel shaders (private GIST): https://gist.github.com/mrange/1fdcfb7293f0299ecf994928f84d30b9 This built upon the existing experimental retro effect feature which lacked tests which means no tests were changed but none have been added (yet). Testing was done exploratively with the different terminal settings. ## References https://github.com/microsoft/terminal/issues/7013 https://github.com/microsoft/terminal/issues/6191 ## PR Checklist (These are not completed yet, will do obviously if the PR seems interesting) * [x] Closes: https://github.com/microsoft/terminal/issues/7013 * [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [x] Schema updated. * [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: #xxx ## Detailed Description of the Pull Request / Additional comments Awesome things can be done with pixel shaders that can spice up the terminal such as retro looks, fractals, raytracers or star scroller backgrounds. This feature deprecates the old retro effect config option but supports the retro effect through the new config option: "experimental.pixelShaderEffect": "RETRO" A new retro effect has been added as well: "experimental.pixelShaderEffect": "RETROII" It's also possible for users to implement their own pixel shader and load them like so: "experimental.pixelShaderEffect" : "C:\\temp\\RetroIII.hlsl" Note: The escaping of paths is needed to construct a valid JSON string. Error handling is changed so that if the shader fails to load for any reason the exception is logged normally and it defaults to an error shader showing the user a pattern that indicates that a pixel shader effect was attempted but didn't work out. Some simple example shaders are provided under: samples/PixelShaders/ ## Validation Steps Performed Manual steps: 1. Enabling retro effect "experimental.pixelShaderEffect": "RETROII" 2. Checking the retro effects looks as expected. 3. Checking that settings is reloaded live 4. Enabling broken retro effect "experimental.pixelShaderEffect": "BROKEN" 5. Checking the terminal loads but display error pattern
claunia added the pull-request label 2026-01-31 09:18:25 +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#26835