-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Shader depal slightly offset (bilinear filtering) #11008
Comments
Right, I think with manual bilinear we need indeed offset by 0.5. Not sure why there would be a remaining horizontal-only offset though, unless the 0.5 offset got unevenly scaled by texture size somehow... |
I was just using: WRITE(p, " vec2 fraction = fract(%s.xy * vec2(textureSize(tex, 0).xy) - vec2(0.49, 0.49));\n", texcoord); (0.49 to avoid rounding to frac=0.99...) It does move horizontally with that change, so I'm not sure why it'd need more than that... -[Unknown] |
No we need to offset the UV not just for the filtering but also the actual texture lookups. I'll try to put it together soon.. Also we can use direct loads instead of a sampler, not sure about any perf win from that though. EDIT: Actually probably don't want to use direct loads as we'll lose automatic wrapping, which we still use if framebuffers are pow2, I think. |
…ing, fixing #11008 Also skip three texture samples if all indices are equal.
Shader depal (Vulkan): Apply a half-texel offset when bilinear filtering, fixing #11008
In Dragon Ball Z Tag Team, outlines are drawn around characters using a depal effect. This is probably most apparent at 1x.
Before / without shader depal:
With it (#10911):
I tried adjusting the fraction to account for pixel centers (since 0.5,0.5 should really have no linear filtering...)
That helped, but they still seem to pull left...
Technically a 1.6.0 regression but not very major.
-[Unknown]
The text was updated successfully, but these errors were encountered: