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

Gameboy Shaders Screen Offset Issues #96

Open
Awakened0 opened this issue Mar 20, 2019 · 3 comments
Open

Gameboy Shaders Screen Offset Issues #96

Awakened0 opened this issue Mar 20, 2019 · 3 comments

Comments

@Awakened0
Copy link

Awakened0 commented Mar 20, 2019

I thought this was related to #70 , but this might be it's own thing. Comparing the GLSL version of the gameboy-pocket preset (or the DMG one) to the slang version, there is a small white line to the top and left which offsets the image: http://screenshotcomparison.com/comparison/132457

I tried messing with the x and y screen offset parameters and discovered another difference. When you use values with .5 in them, the grid gets uneven in the slang version, but stays even in the glsl one. So maybe there's some issue with half pixels in the slang conversion? Setting the x and y offsets to -1 in the slang version does center the image the same as the glsl version. But, for some reason there are lines on the bottom and right.

I noticed this line in gb-pass0 when comparing versions. I wondered if the half pixel part wasn't supposed to be commented out and I tried removing the ";//". It seemed to center the black pixels, but the grid overlaying them was no longer aligned and the top half of the horizontal grid lines disappeared.

@nfp0
Copy link

nfp0 commented Mar 21, 2019

Are you using the gameboy-pocket preset at it's default parameters? I was testing and mine looks a bit different than yours. Looks smoother. This is on Vulkan.

vulkan

@Awakened0
Copy link
Author

I use blending mode 0, which is the default in glsl. Gives it a cleaner, darker look. But even with the default, loading the preset from a fresh download of slang-shaders-master, I get the offset. I didn't change the slang default blending mode in the second comparison, so you can see the difference there.

@Awakened0
Copy link
Author

Talking to hunterk on Discord, it seems like this is probably a side effect of changes he made to the slang version to prevent rounding issues. The grid becomes uneven with some of the fixes he had me try.

I think setting the screen offset x and y to -1 looks better than the default 0 when I look closely. The lines on the bottom and right look the same size as the rest of the grid. The lines that show up with defaults are probably twice as thick.

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

No branches or pull requests

2 participants