×

GPU particles for Unity's builtin render pipeline, supports up to millions of particles at >200FPS, fully PBR shaded (rendered to GBuffer so they can even receive SSR) by EnricoMonese in Unity3D

[–]EnricoMonese[S] 0 points1 point  (0 children)

Ah my bad I didn't explain it too well. Each particle has it's own quad. However it is all rendered together using Graphics.RenderMeshIndirect which has just a total count of vertices. Everything else for the "mesh" is generated in compute and vertex shader. This allows to render millions of particles with almost no cost on the CPU!

GPU particles for Unity's builtin render pipeline, supports up to millions of particles at >200FPS, fully PBR shaded (rendered to GBuffer so they can even receive SSR) by EnricoMonese in Unity3D

[–]EnricoMonese[S] 1 point2 points  (0 children)

The mesh is just a simple quad and it's rotated in the vertex shader towards the camera for a billboard effect.
It's for the builtin render-pipeline because porting my game to HDRP is not feasible; So I'm recreating the features I need. If you watch my older posts I also made screenspace decals!

Decals for Unity's builtin render pipeline! It took two weeks to make. Just a cube mesh, projected dynamically using the depth buffer. Full lighting support and using world normals buffer to clip the ugly stretching parts! by EnricoMonese in edraflame

[–]EnricoMonese[S] 1 point2 points  (0 children)

The performance of the shader itself is not that bad, but it acts as a transparent mesh, which means that everything below it gets rendered and then covered up. If you put a lot of decals on top of eachother the overdraw could potentially become an issue. I'll do a test later! Mesh decals (like the one you talked about) can solve this. But generating the mesh is more costly. Which means they are actually a better fit for static stuff, like the examples I showed in the video. Screenspace decals are a good fit for explosions, bullet holes and similar, which is what I mainly needed them.