Open frtru opened 7 years ago
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)
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.
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.
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....
NEXT STEP : FIX MVP MATRIX
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. Also see how fenbf does it.
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