Looooong / Unity-SRP-VXGI

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

Switch to built-in G-Buffer generator #24

Closed Looooong closed 5 years ago

Looooong commented 5 years ago

Fixes

Change

Deprecate

Details

Change from custom G-Buffer generator to Unity builtin G-Buffer generator

At the time of implementing deferred rendering path, I didn't take account of energy conservation of light transport over metallic surface and other properties. This results in custom shader lighting properties not matching Unity counterparts. Hence, the custom material converted from the one using Standard Shader or the one from Unity Asset Store doesn't look identical and often look unrealistic. This change uses Unity builtin shader pass to generate G-Buffers.

Side effects:

Rename G-Buffer textures to match Unity counterparts

This allow other image effect libraries, such as Post Processing, to make use of G-Buffer textures.

Support depth texture generation for Camera.depthTextureMode

Also supports image effect libraries. Currently supports DepthTextureMode.Depth (_CameraDepthTexture - always generated) and DepthTextureMode.DepthNormals (_CameraDepthNormalsTexture)

Add VXGI/Standard and VXGI/Standard (Specular setup) that mimics Unity counterparts

With the use of builtin Unity shader for G-Buffer generation, VXGI/Standard and VXGI/Standard (Specular setup) shader are introduced to mimics Unity counterparts. This deprecates Voxel-based Shader/Basic shader.

Support PostProcessing.PostProcessDebug script to render debug overlay

As the title says.

Add options to VXGIRenderPipelineAsset to enable/disable environment lighting and environment reflection

It is recommended to disable environment lighting as it is replaced by voxel-based global illumination. On the other hand, environment reflection can be enabled to reflect skybox on reflective surface.

Change light intensity value from gamma to linear

To ensure physically correct output (reference).

Change all render texture read/write mode to linear

Technical stuffs.