-
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
Use texelFetch to handle ABSDIFF mode #6064
Conversation
This is missing the changes to Statemapping and ShaderManager, right? |
I think I'll just have a go at a more complete version and see how it works. Definitely can't sample -[Unknown] |
@hrydgard , yep becasue i sample tex only instead of fbotex that shown in @unknownbrackets example. @unknownbrackets , i tried your example on Dragon Ball Z and the outline is working fine however when i tested in another games which also require ABSDIFF blending but it is not working (just like it didn't apply anything i.e. no effect at all) .I did try to approximate it as max(destcolor - v) that we are currently using in our blend equation for ABSDIFF but the result is also different .Therefore i'm wondering this destcolor is the previous color ? |
Well, I'll try to look for other examples, but I'm still quite worried this will be slow, probably want an option (maybe even for the clut stuff... ugh, hate options.) Some things it could potentially fix if fast enough are:
But probably incr/decr would be too slow, and maybe/probably not very worth it. And, texelFetch is supported on OpenGL 3.0+ / ES 3.0. Could use texture, but blitting is only supported in ES 3.0 (although I suppose we could blit "manually".) So doing min/max is not very useful it would seem like. However all these states would add a lot more shader permutations and potential uniform changes... -[Unknown] |
I did check the speed and it is very fast .almost no difference. |
In Dragon Ball Z, it is doing a single render with absdiff. I'm not (very) concerned about that, although not certain about mobile. Wipeout Pure does a bunch of individual draws for incr/decr stencil, each would do a blit, and that's where I'm more concerned (or with games that do a lot of draws with unsupported blend modes.) -[Unknown] |
I see. Then i close this pull and wait for your new complete one. |
@unknownbrackets , we don't seem to be missing any more effects in Wipeout Pure, the game looks 100% correct to me. But yeah, it indeed incrs and decrs the stencil channel to do stencil shadows, but only uses the result of that the "normal" way, so it works. |
Probably Alpha doubling blend modes would be a good candidate and we are not still emulating it correctly |
Meanwhile , getting rid of usage of NV_shader_framebuffer_fetch .Tested on Nvidia only with OpengGL 4.4
Courtesy of @unknownbrackets to get this fixed.
Fixes #3001