-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Scenario] Retro Terminal Effect Improvements #6191
Comments
I mean, we're happy to accept more contributions in this area 😉 The retro effect was wholly a community contribution. At some point in the future, we'll probably move it to being an extension (#4000), but for now, it lives in this codebase, and we'd be happy to accept more improvements to it. This is now the "retro terminal effects improvements" megathread. Additional settings
Bugs
|
Thank you for considering! |
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.
Co-authored-by: mrange <marten_range@hotmail.com> I loved the pixel shaders in microsoft#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 microsoft#7058: It does _not_ add any built-in shaders. - CHANGED FROM microsoft#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 microsoft#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 microsoft#7058: Originally, microsoft#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 microsoft#6191 References microsoft#7058 Closes microsoft#7013 Closes microsoft#3930 "Add setting to retro terminal shader to control blur radius, color" Closes microsoft#3929 "Add setting to retro terminal shader to enable drawing scanlines" - At this point, just roll your own version of the shader.
For folks following this thread: In Terminal 1.6 we've added support for "custom pixel shaders". This will let you do way more than just what the basic retro terminal effect does. I'm not a shader expert, so I don't know how to make something that looks like OP, but I'm sure it's possible somehow. The original PR had something that looked similar to OP in the "Retro II" shader. Feel free to play around with that to see if you can't find something good, and share the results! |
Hey I'm gonna close this out now that #8565 and #8935 have landed. The custom pixel shaders will let you do this (and more), so I'm not sure there's a reason to leave this issue open any longer. Thanks! P.S. If someone manages to whip up a shader that looks like OP (and you have the rights to contribute it), I'd love to throw it in the shader samples! |
So, the glow effect is neat, but that is not what a CRT looks like. CRTs were not blurry. It looks more like a composite TV effect, and it's hard to use.
Check out this terminal and the effects it has - they are clearly a labor of love. Can we do something like that?
https://github.com/Swordfish90/cool-retro-term
Thanks!
The text was updated successfully, but these errors were encountered: