Looooong / Unity-SRP-VXGI

Voxel-based Global Illumination using Unity Scriptable Render Pipeline
MIT License
766 stars 62 forks source link

Particle system functionality #51

Closed daalta closed 4 years ago

daalta commented 4 years ago

I'm having some issues with particle systems. They either seem to not render at all, or render through all geometry.

Here's a video: PaleForcefulHind-size_restricted

Do yo have a guide on how to use particle systems? Or is this a bug?

I'd appreciate your help. 👋

Looooong commented 4 years ago

What shader does the particle material use? You should check that the particle material use VXGI/Particles/Standard Unlit shader. Then, make sure that the Albedo texture contains correct alpha value for transparency. You can also post an image so I can look for myself.

Looooong commented 4 years ago

So, I have recently added this standard particle shader with minimal support. For now, you can use Additive rendering mode for these particles. I will look into supporting other rendering mode as well in the future.

daalta commented 4 years ago

Thanks for the reply @Looooong !

What shader does the particle material use? You should check that the particle material use VXGI/Particles/Standard Unlit shader.

I've been using VXGI/Particles/Standard Unlit, you should be able to see it in the video.

Then, make sure that the Albedo texture contains correct alpha value for transparency.

I've been using the built-in Default-Particle, but I also tried opaque textures which don't need alpha. They have the same issues.

So, I have recently added this standard particle shader with minimal support. For now, you can use Additive rendering mode for these particles. I will look into supporting other rendering mode as well in the future.

That would be great. My particle systems always show up through walls - am I doing something wrong, or is this 'intended'? 😅

Looooong commented 4 years ago

That would be great. My particle systems always show up through walls - am I doing something wrong, or is this 'intended'?

Now that you say it, I realized that I forgot to set depth texture when rendering forward transparent pass (which includes particles). That's why the particles are always drawn on the screen. I'll fix it now.

Looooong commented 4 years ago

I have fixed the bug in #52. You can pull the newest code for the fix.

daalta commented 4 years ago

@Looooong Wow, thanks! That was quick. I'll try it as soon as I can.

daalta commented 4 years ago

Works like a charm now, good job!