-
Notifications
You must be signed in to change notification settings - Fork 96
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
More gameboy shader presets and modifications #567
Conversation
This variable determines how pixels are blended and affects the appearance of the pixel grid. The original Cg gameboy shader defaulted to Blending Mode 0. While a matter of preference, I find Blending Mode 0 looks better across a wider range of resolutions (especially handheld, lower resolution devices) and doesn't wash out the image like Blending Mode 1.
This is an alternative to my previous gameboy-color preset. It features a white background as opposed to the traditional sepia tone used to mimic the original Game Boy panels. This results in truer, brighter colors but a bit harder on the eyes and less nostalgic.
Color palette taken from Tatsuya79's Handheld Border Shader project. A great color scheme for Game Boy games that falls in-between gameboy-pocket and gameboy-light-mode.
Created a preset for the gameboy shader optimized for Game Boy Advance games. This preset creates a cool LCD effect where pixels really pop.
To give some more insight into why both modes exists, the GameBoy (I measured on a GB Pocket but I think the original DMG is very similar) actual pixel to white-space ratio is about 7:1, give or take. This means up to x7 resolutions, it makes sense to fill the white space with a bit of the adjacent pixel's "color" to get a more accurate look of a real GameBoy screen. For this, we use Blend Mode 0. But from x8 and above, you're already above the 7 GB pixel to 1 white-space ratio, so the space should not be filled any more. In this case, to get rid of the harshness of the transition, it's best to blend them with Blend Mode 1. Also, keep in mind I'm working on seeing if it's feasible to make both blend modes independent parameters so that we can mix and match any amount we want. This might mess with your presets, so maybe it's best to wait a bit before merging this. |
just give me a ping when it's ready to merge. |
@nfp0 Thanks for the update! I know on the previous PR we had some discussion around the square pipeline (used for the console-border shaders) vs original pipeline (used for presets n the handheld directory). Is your intent to still go to one unified shader pipeline? I don't think this is a good idea as it compromises the look of Game Boy Color games. I've done a lot of testing of the square pipeline vs the original pipeline, mixing and matching the passes. A few things stand out, namely the gridline and background appearance. All the following screenshots use the following parameters to match the original pipeline:
Square pipeline with color
Square pipeline with color and original pipeline gb-pass4 for background handling
Original pipeline with color
Square pipeline with original pipeline gb-pass4 background zoomOriginal pipeline zoomShifting it all over to the new pipeline would compromise a lot of the charm the original gameboy shader has going for it. |
Naming of presetsI follow your logic on the naming conventions, but I want to push back a bit because I think renaming these new presets is trying to solve a problem that doesn't actually exist for the end user. A new user is probably looking for a shader that will look good with whatever game they are playing at the time. So if they are playing a Game Boy Color game and see the gameboy-color preset, they will load it up and likely be happy with the result since it looks good. I don't think the user will mind that it is not a faithful recreation of the original display. If they are that type of user, they will be happy to dive into the other existing presets. I named mine gameboy-color and gameboy-advance because they are variants of the gameboy shader and intuitive names. Convoluting the name may negatively impact the user experience due to discoverability. I don't think there is a current de facto shader for replicating the GBC or GBA display, so this means there is nothing to confuse the new presets with. The closet I found is the lcd-grid-v2 presets. Shader pipeline duplicationThe only part of the gameboy shader pipeline that I modified is gb-pass0 by adding the color toggle and logic which is just a few lines of code. The rest of the pipeline remains unchanged and likely will remain unchanged (except maybe changing the default x y screen offset values to -1 as per #96). I think the only scenario that would make sense to create separate shader files for the color presets is if you were to replace the original pipeline with the square pipeline. Otherwise it would just be more duplication. Scaling issuesI am interested to see how this downscaling approach works! I agree that these shaders fall apart at higher resolutions and right now I just use them on handheld devices. Great point about how presets really don't apply across a range of resolutions. Also here's another issue that seems related to scaling issues. The original pipeline has issues with garbage around the output image when using it in windowed mode on desktop (metal on Mac). It looks like you greatly reduced the garbage with the new square pipeline to just some edge flickering. There's an issue for this (#70) but it seems there was never a clear resolution. I would love to help bring the garbage fixes into the original pipeline. |
Naming of presets
I don't really agree with this. I think the user will, at first, try to find the shader that best replicates his memories of playing on the real console, with correct colors and all. And then yes, he would try variations if he was not happy with the original screen.
Yes, the lcd-grid-v2 presets with GBC and GBA color correction (with colorimeter readings) are indeed the state-of-the-art shaders for simulating those consoles. And the ones for the original GB and GB Pocket are called So now we would have a sequence of shaders named like this:
It feels inconsistent. It gives the feeling that the Now that I checked the content of the @hizzlekizzle What's your take on this? Shader pipeline duplicationSure, agree! We can see how to proceed further down the line if the supersampled version I'm testing turns out as an improvement or not. As things stand now, I see no problem with having things as they are. Scaling issuesInteresting 🤔 |
Yeah, it's a tough call. We don't really have any hard-and-fast policies about naming things, but if it's really just the gameboy shader (which it is), I think "colorized" or "colorhack" gives users more information about what's going on. |
Thanks for your input @nfp0 and @hizzlekizzle! I can see the point here. How do we all feel about naming the presets in question as follows?
These names are more descriptive and I think they meet everyone's goals. |
Just updated the names accordingly. I think we're ready to merge since we determined the original shader pipeline will remain unchanged for now. |
@mattakins Yes, those names sound good to me! Thank you for your comprehension 🙂 On an unrelated note, I've noticed you're using the |
Excellent, and you're welcome! :)
Yes, this was a deliberate choice. The gbp-palette creates a nice warm background. In this PR, I have also added an alternative white background version (using the 'b-w-palette.png') which offers truer colors but a harsher image. You can see the first post in this thread for a comparison. |
@hizzlekizzle Good to merge whenever you're ready. Thanks! |
Here are images of the changes and presets. Please zoom in on screenshots to see the pixel scale properly.
1. Blending Mode default to 0
This variable determines how pixels are blended and affects the appearance of the pixel grid. The original Cg gameboy shader defaulted to Blending Mode 0. While a matter of preference, I find Blending Mode 0 looks better across a wider range of resolutions (especially handheld, lower resolution devices) in both color and grayscale mode. It doesn't wash out the image like Blending Mode 1. Check out the visual difference.
Blending Mode 0
Blending Mode 1
Notice that Blending Mode 0 creates a darker image
2. gameboy-color-white-bg preset
This is an alternative to my previous gameboy-color preset. It features a white background as opposed to the traditional sepia tone used to mimic the original Game Boy panels. This results in truer, brighter colors but a bit harder on the eyes and less nostalgic. Here are both for comparison.
gameboy-color-white-bg.slangp
gameboy-color.slangp
3. gameboy-pocket-high-contrast
Color palette taken from Tatsuya79's Handheld Border Shader project. A great color scheme for Game Boy games that falls in-between gameboy-pocket and gameboy-light-mode. Here are all 3 for comparison.
gameboy-pocket.slangp
gameboy-pocket-high-contrast.slangp (new preset)
gameboy-light-mode.slangp
4. gameboy-advance
Created a preset for the gameboy shader optimized for Game Boy Advance games. This preset creates a cool LCD effect where pixels really pop.
gameboy-advance.slangp