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

Screen Tone causes an huge framedrop #11

Open
Rinnegatamante opened this issue Mar 25, 2016 · 5 comments
Open

Screen Tone causes an huge framedrop #11

Rinnegatamante opened this issue Mar 25, 2016 · 5 comments

Comments

@Rinnegatamante
Copy link
Owner

Screen Tone feature causes a drastic framedrop (32 -> 9 fps on O3DS).

@Ghabry
Copy link

Ghabry commented Mar 25, 2016

A frame drop was expected because operation HARD_LIGHT is much more complex then SRC or OVER.

But I'm surprised that it is below 16 FPS.
See also: http://cairographics.org/operators/

@Rinnegatamante
Copy link
Owner Author

To everyone who wants to try to solve this:
A possible solution is to swap from sf2dlib to citro3D and then using a vertex shader to perform HARD_LIGHT operation on the 2D texture rendered in the same method as sf2dlib currently does.

@Ghabry
Copy link

Ghabry commented Mar 31, 2016

I tried to write a GLSL shader for Hard light based on the Cairo formula last weekend but I couldn't get the correct result.
When that shader works will try porting it to PICA.

@masterfeizz
Copy link

There is no programmable pixel shader support on the PICA200, so using a shader to fix this is out of the question. Have you tested other operations that could achieve somewhat similar results with better performance?

@Ghabry
Copy link

Ghabry commented Apr 1, 2016

I don't think we can get a similiar result because HARD_LIGHT result depends on if the color value is below or above 128... I will try to use a precalculated lookup table which gives a not-perfect result but should be much faster.

But all other operations should be replacable, which will only give a minor boost but summed up should give a nice FPS boost: OP_OVER which is just a blend of SRC on DEST and OP_SRC which is just SRC overwriting DEST. Also zoom, rotate & co. can be easily hardware accelerated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants