-
Notifications
You must be signed in to change notification settings - Fork 4
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
GPU Particles #11
Comments
…y, the scheme will be that the renderers will render an "effect" to the particles. For example, the stub one will be used for debugging purposes and will render red transparent squares. TBD: An higher driver-like class or "effect" as fenbf did might be needed to compose many types of renderers (e.g. explosions have many textures applied to particles)
Copy from the commit comment : Added a really early version of the renderers. Basically, the scheme will be that the renderers will render an "effect" to the particles. For example, the stub one will be used for debugging purposes and will render red transparent squares. TBD: An higher driver-like class or "effect" as fenbf did might be needed to compose many types of renderers (e.g. explosions have many textures applied to particles) |
…ems. It solves the issue of rendering multiple texture particles. Still need to find an efficient way to link with the renderers
…ystem->particlesystemComponent. Replaced the map<string,system> by vector<pair<particlecomponent,renderer> > in the module/system so that the renderer is bound to the particlecomponent not only by a string. Still have an implementation issue in the new system .cc file and didn<t update the renderer according to those changes yet. Draft of the rendering process in the stub_renderer class.
I need to finish the task for the camera in order to complete this one. I need to send the matrices to the shaders as well. |
…class. Reworked the whole renderer architecture to another layers for "opengl_renderers". Completed the link with the particles and the renderer. Still need to finish the stub_renderer rendering and to provide a link with the camera's matrices.
…O for the color as fenbf does...Solved a linker error by adding Opengl32.lib to the project and I fixed an error at runtime by changing the m_position to m_position[0] for the first call to glbufferdata, needs to be investigated. Also need to link somewhere the camera and put the layout 1 in the shaders
Finall found out that the model matrix doesn't matter in our system because we update the vertices position directly. With a model loaded, it basically comes like a big array in which we don't want to modify the vertices individually and we give it a model matrix and forward that model matrix to the shaders. |
…LOT of temporary things in order to get things working. Seems like there's an issue with particles dynamics, they all have the same positions and velocity... Also, forwarding the color from CPU to GPU doesn't seem to work, might have to try reguler vectors from glm as a test.
Just noticed that the issue I was attacking was because the MVP wasnt defined and it defaulted to 0 everywhere and when I multiplied it with the positions, it puts all the particles at 0,0,0.... |
…not defined so it was a null matrix and it was multiplied by the position in input in the shader, so the output was always at the origin. SO THIS IS THE NEXT PRIORITY. Also, added/Instrumented some debugging tools suck as 3d axis. Fixed the GL_FLOAT to GL_UNSIGNED_BYTE for the uvec4 types.
NEXT STEP : FIX MVP MATRIX |
…app.cc temporarily in order to concentrate on the camera. Added an union of projection parameters and the view parameters as well. Re-added the MVP matrix in the shader.
NOTE: As seen here https://github.com/amulware/genericgamedev-gpu-particles/tree/cpu-gpu-comparison/GenericGamedev.Pixelation |
UPDATE:
|
NOTE: As seen here https://github.com/amulware/genericgamedev-gpu-particles/tree/cpu-gpu-comparison/GenericGamedev.Pixelation
The CPUSimpleParticles.cs, AlmostGPUParticles.cs and GPUParticles.cs demonstrate how you can completely render/update on the GPU.
List of things to do for this:
SEE THIIIS
http://stackoverflow.com/questions/8608844/resizing-point-sprites-based-on-distance-from-the-camera he uses a sampler2darray as a uniform, would it be possible that way?
COMPUTE SHADERS
The text was updated successfully, but these errors were encountered: