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

Sudden increase in GPU load when using postprocessing #5493

Open
IntraNoctem opened this issue Mar 8, 2024 · 3 comments
Open

Sudden increase in GPU load when using postprocessing #5493

IntraNoctem opened this issue Mar 8, 2024 · 3 comments

Comments

@IntraNoctem
Copy link

Description:

When using postprocessing, high GPU load and thus FPS drops occur at intervals. Sometimes it occurs shortly after initializing the scene, sometimes it takes 1-2 minutes. This is apparently dependent on the effects used. (4 effects in the examples)

GPU

This behaviour does not occur in a performance test example with 16 effects.

Has anyone experienced the same and has an idea how to solve this?

Example causing FPS drops: https://jsfiddle.net/bz5cdhat/3/
Example without FPS drops: https://jsfiddle.net/9rv6nmLg/
Performance test: https://pmndrs.github.io/postprocessing/public/demo/#performance

A-Frame Version: 1.5.0
Postprocessing library: https://github.com/pmndrs/postprocessing

@dmarcos
Copy link
Member

dmarcos commented Mar 9, 2024

What's that graph you shared? How did you determine is the GPU? Postprocessing can be expensive. Depending on the effects you're using as you mentioned. Needs understanding on how the shader on each pass works.

This probably a general question you should ask on StackOverflow or Discord. Not sure if there's anything actionable on A-Frame core.

@IntraNoctem
Copy link
Author

The Graph is the GPU usage graph of the windows task manager. It's showing these waves when opening the given example.

Yes, you're right, the question is quite general. I was just wondering if I made a mistake or maybe there is a connection with A-Frame, since the behaviour does not occur in the pure THREEJS performance test example.

@dmarcos
Copy link
Member

dmarcos commented Mar 12, 2024

Would add complexity little by little and measure: First without post-processing and then add effects and see if there's any of them in particular that increases gpu load. Weird you see spikes. Loaded the examples and all run 60fps on my M1 Macbook Air + Chrome. If you don't see any perf issues without post that narrows down the root cause

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