- Add EnvTemplate to generate various combinaison of cube texarray and
simple cube for evaluteBSDF_env
- Rename class/file
- Introduce concept of FragInput
- Rename All ForwardDisplayDebug to ForwardDebugDisplay
- Clean/factor code for distortion and SetEnablePass
- Add support for a RenderTransparentDepthPrepass (can be use for hair)
- Distortion pass is now consider as always a separate pass (no MRT
during particles rendering)
- Create clearColorAllBlack to have color with alpha channel with 0 for
clear.
- Add shadowmask and occlusion probe sampling functions
- Add various debug feature for shadow mask
- Refactor GBuffer manager
- Add SHADOWS_SHADOWMASK keyword to our various lit and debug shader
- In deferred, SHADOWS_SHADOWMASK add an extra GBuffer
- Create a BakeLightingData that contain bakeDiffuseLighting +
bakeShadowMask
- Update all lightLoop call with this new BakeLightingData struct, pass
it to EvaluateBSDF_XXX function
- Move #pragma multi_compile from .shader to pass that require it
(unsure if this save variant)
Improved the visualisation of mip ratio to handle mip reduction.
Improved the mip level count visualisation now mip streaming shown more clearly in other mip debug mode
Moved common shader functions to HLSL file
* HDRP: Add support of light layering for forward (first draft)
TODO:
- Test instancing
- Check perf
- add an option to disable light layer support + in frameSettings
- add deferred rendering support (mean add an optional extra GBuffer)
* Add LightLinking support (version 1 - compile)
This PR add support of LightLayers feature.
To use it, setup mask renderingLayers on renderers and LightLayers on a lights. If a logical and of both give a non 0 value, the light is apply, otherwise it isn't.
This mean that by default LightLayers is 1 and RenderingLayers is 1. Then user can say LightLayers is only 2 and it will only affect renderingLayers with 2 or 3 mask value.
LightLayers require an extra GBuffer in deferred, mean it have extra bandwidth and memory cost.
LightLayers once enabled in HDRPAsset with SupportLightLayers can be control by FrameSettings. Mean a camera can enable extra RT only for an in game cinematic.
This PR refactor...
- Shader code change: Rename GetBakedDiffuseLighting to ModifyBakedDiffuseLighting. This function now handle lighting model for transmission too. Lux meter debug mode is factor outisde.
- Shader code change: GetBakedDiffuseLighting is not call anymore in GBuffer or forward pass, including the ConvertSurfaceDataToBSDFData and GetPreLightData, this is done in ModifyBakedDiffuseLighting now
- Shader code change: Added a backBakeDiffuseLighting to BuiltinData to handle lighting for transmission
- Shader code change: Material must now call InitBuiltinData (Init all to zero + init bakeDiffuseLighting and backBakeDiffuseLighting ) and PostInitBuiltinData
- Update shader graph associate code