Add built-in D2d effects #10267

Closed
opened 2026-01-31 02:16:49 +00:00 by claunia · 7 comments
Owner

Originally created by @WSLUser on GitHub (Aug 24, 2020).

Description of the new feature/enhancement

Now that we've got a bunch of perf optimizations in DxRenderer, we should add the built-in effects from https://docs.microsoft.com/en-us/windows/win32/direct2d/built-in-effects.
While custom effects like retro should eventually be moved to exist as an extension, the built-in effects should be included by default with WT.

Proposed technical implementation details (optional)

Example C++ code is provided for each of the effects and can be added one by one and use this issue as a master tracker for each effect. https://docs.microsoft.com/en-us/windows/win32/direct2d/effects-overview provides some helpful pre-steps for both built-in and custom effects.

https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/D2DAdvancedColorImages/cpp/D2DAdvancedColorImages provides example code for a sample app.

Originally created by @WSLUser on GitHub (Aug 24, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> Now that we've got a bunch of perf optimizations in DxRenderer, we should add the built-in effects from https://docs.microsoft.com/en-us/windows/win32/direct2d/built-in-effects. While custom effects like retro should eventually be moved to exist as an extension, the built-in effects should be included by default with WT. # Proposed technical implementation details (optional) Example C++ code is provided for each of the effects and can be added one by one and use this issue as a master tracker for each effect. https://docs.microsoft.com/en-us/windows/win32/direct2d/effects-overview provides some helpful pre-steps for both built-in and custom effects. https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/D2DAdvancedColorImages/cpp/D2DAdvancedColorImages provides example code for a sample app. <!-- A clear and concise description of what you want to happen. -->
Author
Owner

@WSLUser commented on GitHub (Aug 24, 2020):

This would probably be of interest to @simonbuchan and @mrange.

@WSLUser commented on GitHub (Aug 24, 2020): This would probably be of interest to @simonbuchan and @mrange.
Author
Owner

@zadjii-msft commented on GitHub (Aug 24, 2020):

I dunno, this sounds like a lot of potential configuration. How would we go about exposing all of these as settings to the user?

I'm totally fine with this being an extension point, allowing a third party to expose all these knobs, but it seems unwieldy to include by default.

@zadjii-msft commented on GitHub (Aug 24, 2020): I dunno, this sounds like a _lot_ of potential configuration. How would we go about exposing all of these as settings to the user? I'm totally fine with this being an extension point, allowing a third party to expose all these knobs, but it seems unwieldy to include by default.
Author
Owner

@WSLUser commented on GitHub (Aug 24, 2020):

We could create a separate header/file that DxRenderer includes to avoid bloating the file. But I think that anything Windows Terminal wants to do that is already provided by the OS should be included by default. As far as configuration/settings go, we could probably evolve https://github.com/microsoft/terminal/pull/7329 for graphic effects in addition to colors as well as the Settings UI. We could extend the json for nested configuration but I think it would be better to just allow the Settings UI to take care of the configuration instead, especially if we can preview an image before applying it to a profile.

@WSLUser commented on GitHub (Aug 24, 2020): We could create a separate header/file that DxRenderer includes to avoid bloating the file. But I think that anything Windows Terminal wants to do that is already provided by the OS should be included by default. As far as configuration/settings go, we could probably evolve https://github.com/microsoft/terminal/pull/7329 for graphic effects in addition to colors as well as the Settings UI. We could extend the json for nested configuration but I think it would be better to just allow the Settings UI to take care of the configuration instead, especially if we can preview an image before applying it to a profile.
Author
Owner

@zadjii-msft commented on GitHub (Aug 24, 2020):

Okay sure, but I still don't see the need to include this with the Terminal by default. This would probably create a decent amount of maintenance burden on the Terminal team that I'm not really sure we want to or need to have as part of the Terminal package itself.

#7329 is a totally unrelated PR, adding support for actions iterable on color schemes. That doesn't have anything to do with DX rendering.

Even when we do have a Settings UI, fundamentally, these rendering effects would have to be expressed in JSON somehow. What would that look like? How would the user compose multiple effects? And in what order?

It's a neat idea, but unless there's an enormous push for this by the community, I really doubt that this would be a feature that the Terminal team would have the bandwith to be able to design and support (from a project management standpoint).

@zadjii-msft commented on GitHub (Aug 24, 2020): Okay sure, but I still don't see the need to include this with the Terminal by default. This would probably create a decent amount of maintenance burden on the Terminal team that I'm not really sure we want to or need to have as part of the Terminal package itself. #7329 is a totally unrelated PR, adding support for actions iterable on color schemes. That doesn't have anything to do with DX rendering. Even when we do have a Settings UI, fundamentally, these rendering effects would have to be expressed in JSON somehow. What would that look like? How would the user compose multiple effects? And in what order? It's a neat idea, but unless there's an enormous push for this by the community, I really doubt that this would be a feature that the Terminal team would have the bandwith to be able to design and support (from a project management standpoint).
Author
Owner

@DHowett commented on GitHub (Aug 24, 2020):

Okay, here's the deal.

D2D Effects are building blocks for a multi-stage rendering pipeline that take an image or command list in and produce an image or command list output.

They are not suitable for direct use by users. I'd prefer that we prioritize renderer extensions that let third-party extension authors make changes to our rendering pipeline before we offer robust configuration of what amounts to primitive stepwise operations directly to Terminal.

@DHowett commented on GitHub (Aug 24, 2020): Okay, here's the deal. D2D Effects are building blocks for a multi-stage rendering pipeline that take an _image_ or _command list_ in and produce an image or command list output. They are not suitable for direct use by users. I'd prefer that we prioritize _renderer extensions_ that let third-party extension authors make changes to our rendering pipeline before we offer robust configuration of what amounts to primitive stepwise operations directly to Terminal.
Author
Owner

@WSLUser commented on GitHub (Aug 24, 2020):

This has been added to the extension list. So shouldn't this stay open knowing a third party extension author is likely to implement this ?

@WSLUser commented on GitHub (Aug 24, 2020): This has been added to the extension list. So shouldn't this stay open knowing a third party extension author is likely to implement this ?
Author
Owner

@DHowett commented on GitHub (Aug 24, 2020):

It's been added to the extension list -- it doesn't really need to stay open so long as it's listed in #4000.

@DHowett commented on GitHub (Aug 24, 2020): It's been added to the extension list -- it doesn't really need to stay open so long as it's listed in #4000.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10267