-
-
Notifications
You must be signed in to change notification settings - Fork 802
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 configurable custom LCD shader #2386
base: master
Are you sure you want to change the base?
Conversation
Is there a way to know the window's current scaling and use it as a parameter in the shaders? With that value I could make the best filter for other integer scalings without going crazy with math. |
[pass.2] | ||
fragmentShader=customLCD-pixelBounds.fs | ||
blend=1 | ||
width=-6 | ||
height=-6 | ||
|
||
[pass.2.uniform.boundBrightness] | ||
type=float | ||
default=0.9 | ||
readableName=Pixel bound brightness | ||
|
||
[pass.3] | ||
fragmentShader=ags001-light.fs | ||
blend=1 | ||
width=-6 | ||
height=-6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these two passes operate at the same size, I might recommend merging them into a single pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason it's separated is because I wanted to keep the settings in two different tabs.
Tell me if you agree or if I should merge them anyway.
There is a problem when using higher OpenGL resolutions: the texSize.x and texSize.y (240 and 160) gets multiplied too resulting in wrong coordinates in those higher resolutions.
this will only be useful for future widescreen hacks which I don't even know if are possible on the gba. (EDIT: since OGL res breaks practically every shader maybe a fix should be implemented globally before applying shaders) |
Yesterday I got carried over and learned a bit of glsl shaders in order to create my own personal shader, and since I made it totally customizable through the UI I might as well share it.
End result (default):
Click to expand
It is designed to work best at x6 integer resolution or higher (1080p or higher). Now I'll go into details.
Feedback is welcome!
Since we are going to remove some colors in order to simulate subpixels I added a brightness boost before anything else
Brightness is a parameter passed through the UI, the default is 1.1.
Then I basically
stolecopied endrift's code from the ags001 shader and reworked it to make it configurable through the UI.Here I implemented Dominus Iniquitatis' LCD shader code, but insted of working with a 3x3 grid for each pixel it's a 6x6, so the borders are thinner. Also the darkened pixels are the top and right instead of bottom and left.
And again, the borders brightness is configurable in the UI.
Yep copy-pasted (since I don't have time to dive in), but I added a flag to enable or disable it in the UI, so it's disabled by default.
The text now says "Enable AGS-001's pristine light and reflections"