-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Particle bounding box too small #2492
Comments
Not committed, but here's a workaround you can use meanwhile \stk\stk-code\src\graphics\gpu_particles.cpp, method scene::IParticleSystemSceneNode *ParticleSystemProxy::addParticleNode
A more permanent solution needs to be investigated, considering performance considerations |
Only possible with cpu particle for 3 |
https://github.com/supertuxkart/stk-code/tree/cpu_particle_v2 This fixes the above bug with alpha test particle possible, devee this one good for you? |
...although I have to remove the uniform if flips, otherwise my android crash when XXXParticleRenderer::getInstance()->use();, not sure if true too for you |
Now it works great for me! Now I get 35-45fps in Hacienda on a tablet, previously it was something around 29-35. Other tracks work faster too. And now the difference between enabled/disabled particles is much smaller (2-3 fps caused by exhaust emitter). You mean a crash caused by flip particles? I'm not sure where I can test it, but I didn't have any crash after playing few tracks. Btw it looks that depth test is now disabled, because I see the waterfall in zen garden when I start a race. |
If it crashes just because of uniform int, then you can try uniform float and "if (flips > 0.0)"... Or sin/cos angle may be too big, so you can try Atm. I don't have better idea, particle manager seems to be ok. Or in worst case we can disable it for GLES. The difference is imo barely visible, at least for snow. |
Now all bugs / crashes in my end are fixed and this branch is merged. And I have made the STKParticle working in legacy pipeline without too much work, do you want to keep the Affector in particle emitter? now it's always m_is_glsl = true; |
There is a recurrent problem with particles. Their bounding box is limited to the emitter. However they can be outside of the emitter (imagine a fire, with the emitter being on the center and smoke going up).
The issue is, with frustum culling you can end up having particles popping in and out of the screen (as soon as the emitter is outside the camera's view, all particles associated with it will disappear).
#1 Easy solution:
Add an option to force the visibility of a particle system to be always visible (not optimal but it will work)
#2 A bit more complex:
Add an option to increase the bounding box of the particle system by a certain factor
#3 The optimal solution:
Compute a bounding box depending on the option in the particle system
(I know it's a rather "trivial" bug, however it prevents me to create the upcoming trailer, since there will be a huge cloud of steam)
The text was updated successfully, but these errors were encountered: