Skip to content
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

Add gizmo-crt shader #413

Merged
merged 3 commits into from
Apr 30, 2023
Merged

Add gizmo-crt shader #413

merged 3 commits into from
Apr 30, 2023

Conversation

gizmo98
Copy link

@gizmo98 gizmo98 commented Apr 30, 2023

This shader tries to reproduce a CRT-like output without replicating mask or RGB patterns.

It has the following features:

  • allows fractional scaling
  • uses texture AA shader and subpixel scaling for evenly placed sharp pixels
  • has a horizontal blur function which mimics bad signal quality of some systems (megadrive, psx)
  • has a vertical blur function which mimics n64 vertical software blur
  • adds some noise to mimic restless CRT colors
  • has a curvator function
  • looks good with resolutions <= 1080p
  • has modest system requierements

https://forums.libretro.com/t/gizmo-crt-shader/41409

https://github.com/gizmo98/gizmo-crt-shader

This shader tries to reproduce a CRT-like output without replicating mask or RGB patterns.

It has the following features:
- allows fractional scaling
- uses texture AA shader and subpixel scaling for evenly placed sharp pixels
- has a horizontal blur function which mimics bad signal quality of some systems (megadrive, psx)
- has a vertical blur function which mimics n64 vertical software blur
- adds some noise to mimic restless CRT colors
- has a curvator function
- looks good with resolutions <= 1080p
- has modest system requierements

https://forums.libretro.com/t/gizmo-crt-shader/41409
https://github.com/gizmo98/gizmo-crt-shader
Increase brightness / scanline intensity because resident evil and silent hillare to dark
@hizzlekizzle
Copy link
Collaborator

That's an awful lot of presets. Can we pare it down to just one preset in the main CRT directory? try to do one preset per shader to avoid flooding the tree with parameter variations.

An alternative could be to go to the 'shaders' subdirectory and create a 'gizmo' sub-subdirectory where the additional presets could live.

@nfp0
Copy link

nfp0 commented Apr 30, 2023

An alternative could be to go to the 'shaders' subdirectory and create a 'gizmo' sub-subdirectory where the additional presets could live.

Is being done currently? I don't see preset files in the 'shaders' subdirectory.

Alternatively, what about having one preset per shader, as how we do currently, but then have something like an 'extra-presets' subdir inside 'crt' where we could go a bit wilder with shader preset variations?

@gizmo98
Copy link
Author

gizmo98 commented Apr 30, 2023

That's an awful lot of presets. Can we pare it down to just one preset in the main CRT directory? try to do one preset per shader to avoid flooding the tree with parameter variations.

Problem is, some console behaves a little bit differently and if user does not now what psx, megadrive or n64 do, it will be hard to setup the shader.

An alternative could be to go to the 'shaders' subdirectory and create a 'gizmo' sub-subdirectory where the additional presets could live.

No problem. Just tell me where i can put them. I can create a gizmo dir.

@hizzlekizzle
Copy link
Collaborator

There are some subdirs with presets in them, specifically the 'old' scalefx presets and some in the xbr directory, but it's not super-common, no.

as for the 'extra presets' directory, that's pretty much the intention of the top-level 'presets' directory, though it's historically been used for combinations of multiple shaders, so the hypothetical 'gizmo' directory could go there, instead. We already have precedent for the tvout/interlacing presets being there.

@nfp0
Copy link

nfp0 commented Apr 30, 2023

as for the 'extra presets' directory, that's pretty much the intention of the top-level 'presets' directory

Ah, yes. That makes sense as well.
I was suggesting having an 'extra-presets' subdir because a user looking for CRT shaders is much more likely to find the extra presets in a subdir inside the 'crt' dir than on a top-level dir. Ditto for other categories of shaders in their respective directories (handheld, bezel, pal, etc).
I did not know the presets top-level folder had any CRT presets until very recently.

But this is just a suggestion. The current organizational method works as well. I just find it less discoverable.

@gizmo98
Copy link
Author

gizmo98 commented Apr 30, 2023

There are some subdirs with presets in them, specifically the 'old' scalefx presets and some in the xbr directory, but it's not super-common, no.

as for the 'extra presets' directory, that's pretty much the intention of the top-level 'presets' directory, though it's historically been used for combinations of multiple shaders, so the hypothetical 'gizmo' directory could go there, instead. We already have precedent for the tvout/interlacing presets being there.

Do you think a extra directory under /presets is necessary? If i had added a blur shader instead of doing it „optional“ right in the first pass, preset would go in /preset. Parts of the shader are disabled or enabled for console presets.

@hizzlekizzle
Copy link
Collaborator

No, it's not a necessity, I just thought you might prefer it.

@hizzlekizzle
Copy link
Collaborator

looks good to me :)

ready for merge?

@gizmo98
Copy link
Author

gizmo98 commented Apr 30, 2023

looks good to me :)

ready for merge?

I have checked all presets and they a running fine. Finally i wanted to squash all commits if there is nothing else open.

@hizzlekizzle
Copy link
Collaborator

seems fine to me. You can squash or I can squash-and-merge here. either is fine by me.

@gizmo98
Copy link
Author

gizmo98 commented Apr 30, 2023

It would be fine if you could squash and merge them and remove the last two commit messages.

Thanks!

@hizzlekizzle hizzlekizzle merged commit b14a5b6 into libretro:master Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants