windows-terminal-shaders icon indicating copy to clipboard operation
windows-terminal-shaders copied to clipboard

Crt.hlsl with retro.hlsl adjustments

Open rbeesley opened this issue 3 years ago • 3 comments

This has all the pieces.

rbeesley avatar Apr 07 '21 00:04 rbeesley

@Hammster, take a look at this. Preliminary documentation to get started and Windows Terminal shaders designed to work with SHADERed.

~~This is certainly POC now and as I'm thinking about it, a lot more can probably be pushed out to other #includes to make the shader file even smaller. I'll take a look at that over the next few days, but I really like how this is coming together like this. Seems significantly more approachable than trial and error with can't compile messages.~~

It seems very easy to reduce the complexity of the additional SHADERed boilerplate, and I got it down to two additional includes. While the shader will then work in both SHADERed and Windows Terminal, it breaks the debugger in SHADERed. The specific #includes used right now work, and trying to simplify them means that you can't step into the shader and inspect variables. I have a couple more adjustments to crt.hlsl coming, but at least for now some of the complexity must remain.

rbeesley avatar Apr 15 '21 04:04 rbeesley

I think the SHADERed integration is probably done at this point. There are issues with debugging if I make any further changes. As it stands I believe this is still pretty easy to use.

rbeesley avatar Apr 20 '21 00:04 rbeesley

image

Crt.hlsl looks great with these settings:

#define ENABLE_CURVE            1
#define ENABLE_OVERSCAN         1
#define ENABLE_BLOOM            0
#define ENABLE_BLUR             0
#define ENABLE_GRAYSCALE        0
#define ENABLE_BLACKLEVEL       1
#define ENABLE_REFRESHLINE      1
#define ENABLE_SCANLINES        0
#define ENABLE_TINT             1
#define ENABLE_GRAIN            1

#define TINT_COLOR              TINT_WARM

image

And all editable within SHADERed: image

rbeesley avatar Apr 20 '21 22:04 rbeesley