terminal/src/cascadia/TerminalSettingsModel
Mike Griese b140299e50
Implement user-specified pixel shaders, redux (#8565)
Co-authored-by: mrange <marten_range@hotmail.com>

I loved the pixel shaders in #7058, but that PR needed a bit of polish
to be ready for ingestion. This PR is almost _exactly_ that PR, with
some small changes.

* It adds a new pre-profile setting `"experimental.pixelShaderPath"`,
  which lets the user set a pixel shader to use with the Terminal.
    - CHANGED FROM #7058: It does _not_ add any built-in shaders.
    - CHANGED FROM #7058: it will _override_
      `experimental.retroTerminalEffect`
* It adds a bunch of sample shaders in `samples/shaders`. Included: 
    - A NOP shader as a base to build from.
    - An "invert" shader that inverts the colors, as a simple example
    - An "grayscale" shader that converts all colors to grayscale, as a
      simple example
    - An "raster bars" shader that draws some colored bars on the screen
      with a drop shadow, as a more involved example
    - The original retro terminal effects, as a more involved example
    - It also includes a broken shader, as an example of what heppens
      when the shader fails to compile
    - CHANGED FROM #7058: It does _not_ add the "retroII" shader we were
      all worried about.
* When a shader fails to be found or fails to compile, we'll display an
  error dialog to the user with a relevant error message.
    - CHANGED FROM #7058: Originally, #7058 would display "error bars"
      on the screen. I've removed that, and had the Terminal disable the
      shader entirely then.
* Renames the `toggleRetroEffect` action to `toggleShaderEffect`.
  (`toggleRetroEffect` is now an alias to `toggleShaderEffect`). This
  action will turn the shader OR the retro effects on/off. 

`toggleShaderEffect` works the way you'd expect it to, but the mental
math on _how_ is a little weird. The logic is basically:

```
useShader = shaderEffectsEnabled ? 
                (pixelShaderProvided ? 
                    pixelShader : 
                    (retroEffectEnabled ? 
                        retroEffect : null
                    )
                ) : 
                null
```

and `toggleShaderEffect` toggles `shaderEffectsEnabled`.

* If you've got both a shader and retro enabled, `toggleShaderEffect`
  will toggle between the shader on/off.
* If you've got a shader and retro disabled, `toggleShaderEffect` will
  toggle between the shader on/off.

References #6191
References #7058

Closes #7013

Closes #3930 "Add setting to retro terminal shader to control blur
radius, color" 
Closes #3929 "Add setting to retro terminal shader to enable drawing
scanlines" 
     - At this point, just roll your own version of the shader.
2020-12-15 20:40:22 +00:00
..
dll Move IconSourceConverter from TerminalApp to TSM 2020-12-11 13:17:22 -08:00
Resources/en-US Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
ActionAndArgs.cpp Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
ActionAndArgs.h Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
ActionArgs.cpp Support for navigating panes by MRU (#8183) 2020-12-11 18:36:05 +00:00
ActionArgs.h Support for navigating panes by MRU (#8183) 2020-12-11 18:36:05 +00:00
ActionArgs.idl Add a keybinding option to Terminal to open the Settings UI (#8048) 2020-12-11 13:47:10 -08:00
AzureCloudShellGenerator.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
AzureCloudShellGenerator.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
CascadiaSettings.cpp Introduce ProfileDefaults, CreateNewProfile, default icon 2020-12-11 13:22:16 -08:00
CascadiaSettings.h Introduce ProfileDefaults, CreateNewProfile, default icon 2020-12-11 13:22:16 -08:00
CascadiaSettings.idl Introduce ProfileDefaults, CreateNewProfile, default icon 2020-12-11 13:22:16 -08:00
CascadiaSettingsSerialization.cpp Fix deserialization failure message of combined types (#8558) 2020-12-15 11:33:52 -08:00
ColorScheme.cpp Add Serializer to CascadiaSettings (#8018) 2020-11-17 00:37:19 +00:00
ColorScheme.h Add Serializer to CascadiaSettings (#8018) 2020-11-17 00:37:19 +00:00
ColorScheme.idl Introduce ProfileDefaults, CreateNewProfile, default icon 2020-12-11 13:22:16 -08:00
Command.cpp Implement CascadiaSettings::Copy() (#7877) 2020-10-16 15:14:11 -07:00
Command.h Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
Command.idl Introduce IconConverter (#7830) 2020-10-08 11:29:04 -07:00
DefaultProfileUtils.cpp Make Global and Profile settings inheritable (#7923) 2020-10-27 17:35:09 +00:00
DefaultProfileUtils.h Make Global and Profile settings inheritable (#7923) 2020-10-27 17:35:09 +00:00
defaults-universal.json Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
defaults.json Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
EnumMappings.cpp Introduce public enum name<->value mappings to TSM 2020-12-11 13:19:03 -08:00
EnumMappings.h Introduce public enum name<->value mappings to TSM 2020-12-11 13:19:03 -08:00
EnumMappings.idl Introduce public enum name<->value mappings to TSM 2020-12-11 13:19:03 -08:00
GlobalAppSettings.cpp Introduce ProfileDefaults, CreateNewProfile, default icon 2020-12-11 13:22:16 -08:00
GlobalAppSettings.h Change the default tab switch mode back to inOrder (#8326) 2020-11-19 15:57:35 -08:00
GlobalAppSettings.idl Allow the user to use the tab switcher with in-order tab switching (#8076) 2020-11-05 14:28:16 +00:00
IconPathConverter.cpp Move IconSourceConverter from TerminalApp to TSM 2020-12-11 13:17:22 -08:00
IconPathConverter.h Move IconSourceConverter from TerminalApp to TSM 2020-12-11 13:17:22 -08:00
IconPathConverter.idl Move IconSourceConverter from TerminalApp to TSM 2020-12-11 13:17:22 -08:00
IDynamicProfileGenerator.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
IInheritable.h Rework JsonUtils' optional handling to let Converters see null (#8175) 2020-11-09 15:13:02 -08:00
init.cpp Hook up the WIL fallback error tracer in Terminal (#7864) 2020-10-09 22:20:12 +00:00
JsonUtils.h Fix deserialization failure message of combined types (#8558) 2020-12-15 11:33:52 -08:00
KeyChordSerialization.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
KeyChordSerialization.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
KeyChordSerialization.idl Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
KeyMapping.cpp Implement CascadiaSettings::Copy() (#7877) 2020-10-16 15:14:11 -07:00
KeyMapping.h Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
KeyMapping.idl Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
KeyMappingSerialization.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
LegacyProfileGeneratorNamespaces.h From orbit, nuke the Telnet connection and all supporting infra. (#7840) 2020-10-09 18:59:58 +00:00
Microsoft.Terminal.Settings.ModelLib.vcxproj Introduce public enum name<->value mappings to TSM 2020-12-11 13:19:03 -08:00
Microsoft.Terminal.Settings.ModelLib.vcxproj.filters Introduce public enum name<->value mappings to TSM 2020-12-11 13:19:03 -08:00
packages.config Update C++/WinRT to 2.0.201017.1 (#8061) 2020-10-27 20:15:30 +00:00
pch.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
pch.h Move IconSourceConverter from TerminalApp to TSM 2020-12-11 13:17:22 -08:00
PowershellCoreProfileGenerator.cpp Introduce IconConverter (#7830) 2020-10-08 11:29:04 -07:00
PowershellCoreProfileGenerator.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
Profile.cpp Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
Profile.h Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
Profile.idl Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
SettingsTypes.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
TerminalSettingsSerializationHelpers.h Fix deserialization failure message of combined types (#8558) 2020-12-15 11:33:52 -08:00
TerminalWarnings.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
TerminalWarnings.idl Raise warning on invalid color scheme in commands (#8147) 2020-12-01 22:28:00 +00:00
userDefaults.json Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
WslDistroGenerator.cpp Introduce IconConverter (#7830) 2020-10-08 11:29:04 -07:00
WslDistroGenerator.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00