Corgi God Rays - Volumetric Lighting for URP [RELEASED!]

Link!
Asset store url: Corgi God Rays - URP Volumetric Lighting | Fullscreen & Camera Effects | Unity Asset Store
Demo: GodRaysDemo.zip - Google Drive

What’s this?!
A simple and fast volumetric lighting solution for URP!

Features!!
Quickly and easily add in volumetric lighting for URP.

Features

  • Very simple drop in. Add RenderFeature and add Post Process Volume Component and BAM, immediately have God Rays that you can edit in real time.
  • Highly optimized volumetric lighting system, with some options for making it even faster if necessary.
  • Works with VR and even Single Pass Instanced rendering (SPI)
  • MSAA compatible

Documentation here: https://docs.google.com/document/d/1eOMmk70YQnLXw6-K4MffmFDoWbW-PXgIY3vk8eeRMPs

Pics:

Need help?
Just email me: coty@wanderingcorgi.com

1 Like

The first release is now live! If you run into any problems, please email or DM me! coty@wanderingcorgi.com

Please include your Unity version and URP version.

Just pushed the first update!

edit: also, I’ve added a demo to the original post

Hi, I’m considering purchasing this.
Does it only work with the scene’s directional light? Or will it allow for volumetric spotlight beams and point lights as well?
Thanks!

It supports all of the light types URP supports. So it should work with Directional, Spot, and Point Light modes. That being said, it is also limited by URP to only 8 lights at a time, until I can find a work around.

Thats amazing! Would you be able to provide more screenshots or examples of it working for Spot light beams and Point lights?
I’m trying to weigh my options for volumetric effects because there are so many on the market, lol. Is this screen space only? Any performance issues?
Thanks!

The second screenshot in the OP is a point light, for reference. Yes, things are done in screen space. It just samples the shadow maps generated by unity. There are a bunch of performance sliders/toggles in the RenderFeature settings.

The additional light stuff is handled in the same shader as the directional light, so its still just 1 draw call to compute the volumetric texture. The only cost is sampling the shadowmap on the gpu. If your target platform is mobile, I’d still recommend disabling additional light support (which is just a single toggle in the settings).

Super cool, I’m glad someone has finally created an all-in-one solution that doesn’t require additional meshes on lights.
I’ll be giving it a try as soon as I can! Thanks for the info!

Yeah I’ve used other solutions in the past, I was always annoyed by the complicated setups and general unnecessary slowness on the cpu side. I tried to keep things as simple as possible while still doing what you really want it to do.

If you find any issues, please reach out either here, dm me, or email me at coty@wanderingcorgi.com so I can help resolve anything that pops up. It’s an early release so there’s bound to be some quirks.

2 Likes

Cool, I look forward to giving it a try!

Just pushed a small update. Backported the plugin to also work on URP 11.

Hi, loving this volumetric solution! It is just what we need in our project! :slight_smile:

Asset works great in Unity editor but I have an issue building the project with this asset. I am using Unity 2022.1.0.b6 with URP version 13.1.5 and there is a problem compiling the shader with this URP version:


Shader error in 'Hidden/CorgiGodRays/ScreenSpaceGodRays': undeclared identifier 'unity_StereoEyeIndex' at Games/the-game/Library/PackageCache/com.unity.render-pipelines.core@13.1.5/ShaderLibrary/SpaceTransforms.hlsl(33) (on d3d11)

Thanks for any advice or an update.

Domen

Are you building for a VR title? That error is saying the SPI stuff isnt available. As a work around until I can figure out why it is being stripped, you can open the data file in your project and uncheck “shader stripping” in the godrays data file settings.

Just pushed an update!

The shader stripping was unchecked by default with the same result. The latest update fixed all build errors. Thanks for your quick response!

Domen

1 Like

Ah yeah sorry, I forgot to mention that somebody emailed me with more info on the same error you were getting. I managed to replicate it and thus fix it, so it should be good to go in the latest version. It was just a problem with relying on something that was only in a particular URP version. It’s more version agnostic now!

Another small update!

Update incoming! This one has a lot of stuff requested by a few users recently.

Hi, I’m thinking of buying your asset. Does it work with URP deferred renderer and if so, does the 8 lights limit still apply?