Skip to content

Testing Post Processed Fog in Unity Universal Render Pipeline

Notifications You must be signed in to change notification settings

pakfront/URPFog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URPFog

Simple Post Processed Raymarched Fog in Unity's Universal Render Pipeline (URP)

  • Scene:
  • Assets/Scenes/ExampleScene.unity
  • Shaders:
  • Assets/URPFog/Shaders/Fog.hlsl
  • Assets/URPFog/Shaders/DistanceFog.shader
  • Render Setting and Material:
  • Assets/URPFog/DistanceFo

Note: The Render Pass Feature assignment seems to disappear occasionally. If you are not seeing fog, make sure Assets/URPFog/DistanceFog/URPVolumeFogRenderer RenderFeature has a feature created from 'VolumeFog`

It is not intended as a production-ready volume fog solution, but as straightforward example of:

  • Extending the ScriptableRendererFeature.
  • Accessing Lights, Depth and Shadow
  • Creating and Accessing 3D Textures

In the future I'd like to add:

  • Dynamic compute shader generation of the 3D Noise texture based on user settings (changes to noise params, texture dimensions, etc.)
  • Better (but still simple) fog implementation with artist friendly controls
  • Fade to Sky color
  • Optimization of the March loop, understanding how and when loops can be unrolled.

This project is based on work from these other GitHub projects:

IQ's Fog Article and Shader Toy shaders

Simple Mad's VolumetricLights

Unity's UniversalRenderingExamples

Volumetric Textures generated with TextureGenerator

About

Testing Post Processed Fog in Unity Universal Render Pipeline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published