Xiexe / XSVolumetrics

World of Warcraft inspired Volumetrics that hold up well in VR with small cost to performance. (You have to not be dumb when placing it though :P)
MIT License
82 stars 4 forks source link

Unity version? #2

Open andybak opened 5 years ago

andybak commented 5 years ago

It's usually easier to include an entire Unity project in a repo as that ensures packages.json and projectversion.txt are present.

If you'd prefer not to do that, could you make it clear in the readme which Unity version was used and whether there are any other specific Package Manager dependencies? (I'm guessing this needs Post Processing stack. v1 or v2?)

Xiexe commented 5 years ago

Hi! Currently it should work on all Unity versions so long as you're not using HDRP or LWRP.

It doesn't actually require post processing - all it requires is that the depthtexture be available. (The readme makes this clear, but since I primarily made this for maps in VRChat, you have to jump through hoops to enable the depth texture, I.E. a Directional Light with Shadows, or a post processing effect which both force the depth texture to be accessible.)

If there were any other dependencies I would have listed them! It's a pretty simple shader.

andybak commented 5 years ago

OK. I'll give it a go.

Any idea how much effort it would take to get it working under URP/HDRP?

They've finally released support for custom post-processing and depth textures are available.

I might have a play myself.

Xiexe commented 5 years ago

I currently have very little to no experience with the new rendering pipelines, so I'm really not sure how much work it would take to port over.

I imagine that since the effect is very simple it would be pretty easy to recreate it in shader graph.

The basis of the effect is just a mix of depth based fading, distance fading, and fading the edges of rounded meshes with the dot product of ViewDir and the world normal.