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
Hdr colclip #688
Hdr colclip #688
Conversation
The idea is to use a floating texture to accumulate the data and then do a final postprocessing pass to apply the modulo v2: * use bounding box to * fix vertex corruption issue * use negative number in shader which allow to use half float (+12 fps@4x)
Use countof macro (avoid to duplicate the size) Fix the size of array Remove useless alpha_stencil case
Until we drop the old method
It is cumbersome to move code
To avoid code duplication
Actually it can partially be done with GL_ARB_shader_image_load_store extension. However all drivers that support shader_image have texture barrier too.
Just clear bsel.abe to disable blending
Similar speed but more accurate Allow to clean the code
Remove old shader define Prefix macro with BLEND_ Add some notes to explain the special symbol
Avoid to hack it in the creation Allow in the future to reuse the table directly instead of converting in a blend object
The purpose is to emulate correctly destination alpha factor An alpha channel of 128 is 1.0 in the GS but only ~0.5 in the GPU I think few draw call use destination alpha so impact on perf must remains small.
|
@prafullpcsx2 Seriously, I remember that FIFA used to need ultra accurate blend for the lighting effect on the ground. Could you try to play with the new blending level and check the speed impact? |
|
I'm guessing the windows dialog will need updating? |
|
No, I don't think so. It must be automatic based on the vector content. |
|
Cool, that's good to know :) |
|
I think you once explained what were the differences between all different blending units. Can you paste that post here also? I want to know whether Ultra means Full + FBMask or there are other differences too? I am asking this because Main FIFA games now give correct lighting effect (only on top half of the screen) with Full but they also require FBMask so I have to select Ultra as the option. |
|
Hum, maybe if we remove the linux define, it will show a tooltip ;) none => easy ;) Medium: do it for all sprites rendering (because they're often use in post processing effect, note most of them are already covered in previous level. It just a small addition) High: do the destination alpha blending too. Typically the game that could render better in DX9. This level also add the few remaining case of accurate color clipping (not sure one remains actually). Full: run nearly everything on the shader (except some small corner case). It is the old ultra_accurate blend. High is the latest playable level from my point of view and it must emulate 95% of the effect correctly. |
|
@gregory38 : FBMask isn't working with medium, Full & Ultimate. Is it the expected behaviour? |
|
no |
|
Working only with basic, high and ultra. But this was the first build that I compiled. So may be I messed up something on my side. Will reconfirm after testing with another build. |
|
usual small regression :p nothing to see ;) |
|
Compiled latest version and it's working fine now. Here are some performance results:- FIFA 2010 (to get correct field) - 61 fps then 66 fps now |
|
OoO, if you're asthmatic (no offense) PC can handle blending at high level, I may need to remove the "high-end" part in the tool tip |
avoid rendering corruption with SW blending
Fix issue in socom2
|
@prafullpcsx2 I pushed the 2 fixes of socom2 here. This way you have only a single build to test. I deeply hope it will work nicely. |
|
I found no regressions so far. Socom 2 text is also fixed. Performance is on par with builds before Socom 2 fix. Incase anyone else wants to test this here is Windows sse2 version:- |
|
@prafullpcsx2 could you check the shadows of hulk too? @aphirst could you check this branch (you just need to compile GSdx) on your Intel driver. I want to be sure there is no massive regression due to the lack of texture barrier. |
|
Hulk shadows are fine. |
|
I did a build from this branch just now, and things seem to work just like before. I can provide some more specific detail if you need? |
|
This might be a dumb question but are any of these changes going to affect the way color shows up in games? Are you making adjustments to the colors? Before I didn't think that but now you're even mentioning HDR so I'm wondering if colors will be less console-accurate now? |
This branch replaces the standard inaccurate colclip algo with a new version based on HDR rendering. I expect speed to be comparable however it reduces the likelihood to have an overflow of the color. This new algo also provides a good speed up of the high level of blending. Therefore I extend it to support properly destination alpha testing (fog effect) :)
Code really needs a good testing and also some performances measurement between the basic/medium/high level of blending accuracy. Maybe medium and high could be merged together.