Page 1 of 1

ACS SpawnParticle() size is different in Software and OpenGL

Posted: Thu Aug 18, 2016 14:02
by ZZYZX
subj.

This probably wasn't very noticeable while it was used solely in DECORATE, but now in use cases like this it's very apparent that the same particle size given to SpawnParticle() results in twice as larger particle in OpenGL than it is in Software.

While this can be circumvented by GetCVar("vid_renderer"), this check is VERY unreliable since vid_renderer can be set before restarting, and isn't even a valid CVar in ZDoom and as such you can set it to anything and get the most random results in mods that rely on it.
Would be nice to have some consistency in SpawnParticle implementation instead.

Still happens as of current git build gzdoom-x64-g2.2pre-2024-g0e2d9af.

Re: ACS SpawnParticle() size is different in Software and OpenGL

Posted: Thu Aug 18, 2016 18:16
by Graf Zahl
I don't really understand how this can be, considering that the particle code is shared between renderers. This should happen with regular particles, too, then.

Re: ACS SpawnParticle() size is different in Software and OpenGL

Posted: Thu Aug 18, 2016 18:30
by ZZYZX
Test map: http://www.mediafire.com/download/2o18k ... xample.wad
This should display a rotating white line in the middle using particles.
In OpenGL the line will be almost continuous, while in Software it's made of dots.

Also, it's probably the same with particles in general as well, it's just that it becomes most apparent when you try to use it for drawing lines or other geometric shapes.

Re: ACS SpawnParticle() size is different in Software and OpenGL

Posted: Sat Aug 20, 2016 11:46
by Graf Zahl
No idea right now. But I rather suspect a problem in the software renderer due to the floating point changes. Particles were among the affected things and it may just be that the scaling still isn't right. The particle size code in GZDoom hasn't changed for a long time.

Re: ACS SpawnParticle() size is different in Software and OpenGL

Posted: Thu Nov 17, 2016 0:53
by dpJudas
On the subject of this, it seems that ZDoom uses a particle scale of 1/8 while GZDoom uses a scale of 1/4.

I'm not sure which one is the correct one, but that's why the sizes don't match.