So all the particle emitters are now of the same size and all correspond to their sizes of 30f or 40f (start and end size) in pixels.
Obviously with original shader they depend on the distance to the 0,0 coordinate (closer to it, the bigger the particles)?
So the removed part in shader causes a problem for 2D, not sure about what happens in 3D.
Also after some more playing around, I found out that particle emitters that have setFacingVelocity(true) won’t work in GUI node, but they work without problem in 3D. That leads me to believe that even the code that prepares particle emitter mesh does not work correctly?
Does anyone have any experience with this? Also there was some talk a lot of time ago about some other particle system, any news about that?
I disagree, I think that setFacingVelocity(true) makes sense also in 2D - the texture of the particle would turn in the direction it is traveling, the same as in 3D, except now it is only traveling on a 2D plane. I think that particle engine should take this into account when this is provided:
Also how do other engines usually have the partical effects? Do they have different shaders and systems for 2D and 3D or can everything be solved with one?
Not sure. I looked into the Ogre3D manual once and they have a very cool particle subsystem. But about their 2D particles I don’t know.
I think we could modify the shader so that it will not use the 3D size calculations when in 2D mode. We could detect that the camera matrix makes an ortho cam (or use a Boolean or ask OpenGL if the cam is ortho or perspective) and then if it’s an ortho cam use your code instead of the 3D code…
Not sure that I am happy with [solved] state.
I think that maybe the particle system should be enhanced to work also in GUI node without any additional shader hacks.
Also the issue of setFacingVelocity() is there.