浏览代码

Merge branch 'master' into normal-buffer-support

/main
sebastienlagarde 7 年前
当前提交
0e0c9931
共有 9 个文件被更改,包括 152 次插入64 次删除
  1. 1
      com.unity.render-pipelines.high-definition/CHANGELOG.md
  2. 1
      com.unity.render-pipelines.high-definition/HDRP/Debug/DebugViewMaterialGBuffer.shader
  3. 1
      com.unity.render-pipelines.high-definition/HDRP/Debug/DebugViewTiles.shader
  4. 1
      com.unity.render-pipelines.high-definition/HDRP/Debug/LightingDebug.cs
  5. 9
      com.unity.render-pipelines.high-definition/HDRP/Debug/LightingDebug.cs.hlsl
  6. 21
      com.unity.render-pipelines.high-definition/HDRP/HDRenderPipelineAsset.asset
  7. 11
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl
  8. 11
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.hlsl
  9. 160
      com.unity.render-pipelines.lightweight/CHANGELOG.md

1
com.unity.render-pipelines.high-definition/CHANGELOG.md


- Add support for mesh decals
- Add flag to disable projector decals on transparent geometry to save performance and decal texture atlas space
- Add ability to use decal diffuse map as mask only
- Add visualize all shadow masks in lighting debug
### Improvements

1
com.unity.render-pipelines.high-definition/HDRP/Debug/DebugViewMaterialGBuffer.shader


Pass
{
ZWrite Off
Cull Off
HLSLPROGRAM
#pragma target 4.5

1
com.unity.render-pipelines.high-definition/HDRP/Debug/DebugViewTiles.shader


Pass
{
ZWrite Off
Cull Off
ZTest Always
Blend SrcAlpha OneMinusSrcAlpha

1
com.unity.render-pipelines.high-definition/HDRP/Debug/LightingDebug.cs


SpecularLighting,
LuxMeter,
VisualizeCascade,
VisualizeShadowMasks,
IndirectDiffuseOcclusion,
IndirectSpecularOcclusion,
ScreenSpaceTracingRefraction,

9
com.unity.render-pipelines.high-definition/HDRP/Debug/LightingDebug.cs.hlsl


#define DEBUGLIGHTINGMODE_SPECULAR_LIGHTING (2)
#define DEBUGLIGHTINGMODE_LUX_METER (3)
#define DEBUGLIGHTINGMODE_VISUALIZE_CASCADE (4)
#define DEBUGLIGHTINGMODE_INDIRECT_DIFFUSE_OCCLUSION (5)
#define DEBUGLIGHTINGMODE_INDIRECT_SPECULAR_OCCLUSION (6)
#define DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFRACTION (7)
#define DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFLECTION (8)
#define DEBUGLIGHTINGMODE_VISUALIZE_SHADOW_MASKS (5)
#define DEBUGLIGHTINGMODE_INDIRECT_DIFFUSE_OCCLUSION (6)
#define DEBUGLIGHTINGMODE_INDIRECT_SPECULAR_OCCLUSION (7)
#define DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFRACTION (8)
#define DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFLECTION (9)
//
// UnityEngine.Experimental.Rendering.HDPipeline.DebugScreenSpaceTracing: static fields

21
com.unity.render-pipelines.high-definition/HDRP/HDRenderPipelineAsset.asset


--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1

m_EditorClassIdentifier:
version: 1
m_RenderPipelineResources: {fileID: 11400000, guid: 3ce144cff5783da45aa5d4fdc2da14b7,
type: 2}
m_FrameSettings:

enableSSAO: 1
enableSubsurfaceScattering: 1
enableTransmission: 1
enableAtmosphericScattering: 1
enableVolumetric: 1
diffuseGlobalDimmer: 1
specularGlobalDimmer: 1
enableForwardRenderingOnly: 0

enableObjectMotionVectors: 1
enableDBuffer: 1
enableAtmosphericScattering: 1
enableRoughRefraction: 1
enableTransparentPostpass: 1
enableDistortion: 1

enableOpaqueObjects: 1
enableTransparentObjects: 1
enableMSAA: 0
enableShadowMask: 0
enableShadowMask: 1
lightLoopSettings:
enableTileAndCluster: 1
enableComputeLightEvaluation: 1

supportSSR: 1
supportSSAO: 1
supportSubsurfaceScattering: 1
supportForwardOnly: 0
supportOnlyForward: 0
supportVolumetric: 1
supportRuntimeDebugDisplay: 1
supportDBuffer: 1
supportMSAA: 0
msaaSampleCount: 1

cookieTexArraySize: 16
pointCookieSize: 512
cubeCookieTexArraySize: 16
reflectionProbeCacheSize: 128
reflectionCubemapSize: 128
reflectionProbeCacheSize: 128
reflectionCubemapSize: 128
maxPlanarReflectionProbes: 128
skyReflectionSize: 256
skyLightingOverrideLayerMask:
serializedVersion: 2

shadowAtlasHeight: 4096
decalSettings:
drawDistance: 1000
atlasSize: 8192
atlasWidth: 4096
atlasHeight: 4096
allowShaderVariantStripping: 1
diffusionProfileSettings: {fileID: 11400000, guid: 404820c4cf36ad944862fa59c56064f0,
type: 2}

11
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl


if (_DebugLightingSubMode != DEBUGSCREENSPACETRACING_COLOR)
diffuseLighting = lighting.indirect.specularReflected;
break;
case DEBUGLIGHTINGMODE_VISUALIZE_SHADOW_MASKS:
#ifdef SHADOWS_SHADOWMASK
diffuseLighting = float3(
bakeLightingData.bakeShadowMask.r / 2 + bakeLightingData.bakeShadowMask.g / 2,
bakeLightingData.bakeShadowMask.g / 2 + bakeLightingData.bakeShadowMask.b / 2,
bakeLightingData.bakeShadowMask.b / 2 + bakeLightingData.bakeShadowMask.a / 2
);
specularLighting = float3(0, 0, 0);
#endif
break ;
}
}
else if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)

11
com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.hlsl


//if (_DebugLightingSubMode != DEBUGSCREENSPACETRACING_COLOR)
// diffuseLighting = lighting.indirect.specularReflected;
break;
case DEBUGLIGHTINGMODE_VISUALIZE_SHADOW_MASKS:
#ifdef SHADOWS_SHADOWMASK
diffuseLighting = float3(
bakeLightingData.bakeShadowMask.r / 2 + bakeLightingData.bakeShadowMask.g / 2,
bakeLightingData.bakeShadowMask.g / 2 + bakeLightingData.bakeShadowMask.b / 2,
bakeLightingData.bakeShadowMask.b / 2 + bakeLightingData.bakeShadowMask.a / 2
);
specularLighting = float3(0, 0, 0);
#endif
break ;
}
}
else if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)

160
com.unity.render-pipelines.lightweight/CHANGELOG.md


# Changelog
All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [2.0.1-preview]
### Fixed
- VR Single Pass Instancing shadows
## [2.0.0-preview]
### Added
- Explicit render target load/store actions were added to improve tile utilization
- Camera opaque color can be requested on the pipeline asset. It can be accessed in the shader by defining a _CameraOpaqueTexture. This can be used as an alternative to GrabPass.
- Dynamic Batching can be enabled in the pipeline asset
- Pipeline now strips unused or invalid variants and passes based on selected pipeline capabilities in the asset. This reduces build and memory consuption on target.
- Shader stripping settings were added to pipeline asset
### Changed
#### Pipeline
- Pipeline code is now more modular and extensible. A ForwardRenderer class is initialized by the pipeline with RenderingData and it's responsible for enqueueing and executing passes. In the future pluggable renderers will be supported.
- On mobile 1 directional light + up to 4 local lights (point or spot) are computed
- On other platforms 1 directional light + up to 8 local lights are computed
- Multiple shadow casting lights are supported. Currently only 1 directional + 4 spots light shadows.
#### Shading Framework
- Directional Lights are always considered a main light in shader. They have a fast shading path with no branching and no indexing.
- GetMainLight() is provided in shader to initialize Light struct with main light shading data.
- Directional lights have a dedicated shadowmap for performance reasons. Shadow coord always comes from interpolator.
- MainLigthRealtimeShadowAttenuation(float4 shadowCoord) is provided to compute main light realtime shadows.
- Spot and Point lights are always shaded in the light loop. Branching on uniform and indexing happens when shading them.
- GetLight(half index, float3 positionWS) is provided in shader to initialize Light struct for spot and point lights.
- Spot light shadows are baked into a single shadow atlas.
- Shadow coord for spot lights is always computed on fragment.
- Use LocalLightShadowAttenuation(int lightIndex, float3 positionWS) to comppute realtime shadows for spot lights.
### Fixed
- Issue that was causing VR on Android to render black
- Camera viewport issues
- UWP build issues
- Prevent nested camera rendering in the pipeline
### Improvements
### Added
### Bugfixes
- Fixed SRP Shader library issue that was causing all constants to be highp in mobile
- Fixed shader error that prevented LWRP to build to UWP
- Fixed shader compilation errors in Linux due to case sensitive includes
- Fixed Rendering Texture flipping issue
- Fixed Standard Particles shader cutout and blending modes
- Fixed crash caused by using projectors
- Fixed issue that was causing Shadow Strength to not be computed on mobile
- Fixed Material Upgrader issue that caused editor to SoftLocks
- Fixed GI in Unlit shader
- Fixed null reference in the Unlit material shader GUI
### Fixed
- SRP Shader library issue that was causing all constants to be highp in mobile
- shader error that prevented LWRP to build to UWP
- shader compilation errors in Linux due to case sensitive includes
- Rendering Texture flipping issue
- Standard Particles shader cutout and blending modes
- crash caused by using projectors
- issue that was causing Shadow Strength to not be computed on mobile
- Material Upgrader issue that caused editor to SoftLocks
- GI in Unlit shader
- Null reference in the Unlit material shader GUI
### Improvements
### Changed
### Bugfixes
- Fixed shadows on GLES 2.0
- Fixed CPU performance regression in shadow rendering
- Fixed alpha clip shadow issues
- Fixed unmatched command buffer error message
- Fixed null reference exception caused by missing resource in LWRP
- Fixed issue that was causing Camera clear flags was being ignored in mobile
### Fixed
- Shadows on GLES 2.0
- CPU performance regression in shadow rendering
- Alpha clip shadow issues
- Unmatched command buffer error message
- Null reference exception caused by missing resource in LWRP
- Issue that was causing Camera clear flags was being ignored in mobile
### Improvements
### Added
- Shadowmap uses 16bit format instead of 32bit.
### Changed
- Shadowmap uses 16bit format instead of 32bit.
### Bugfixes
- Fixed Subtractive Mode
### Fixed
- Subtractive Mode
### Improvements
- Refactored lightweight standard shaders and shader library to improve ease of use.
### Added
- HDR RT now uses what format is configured in Tier settings.
- Optimized tile LOAD op on mobile.
### Changed
- HDR RT now uses what format is configured in Tier settings.
- Refactored lightweight standard shaders and shader library to improve ease of use.
- Optimized tile LOAD op on mobile.
### Bugfixes
- Fixed realtime shadows on OpenGL
- Fixed shader compiler errors in GLES 2.0
- Fixed issue sorting issues when BeforeTransparent custom fx was enabled.
- Fixed VR single pass rendering.
- Fixed viewport rendering issues when rendering to backbuffer.
- Fixed viewport rendering issues when rendering to with MSAA turned off.
- Fixed multi-camera rendering.
### Fixed
- Realtime shadows on OpenGL
- Shader compiler errors in GLES 2.0
- Issue sorting issues when BeforeTransparent custom fx was enabled.
- VR single pass rendering.
- Viewport rendering issues when rendering to backbuffer.
- Viewport rendering issues when rendering to with MSAA turned off.
- Multi-camera rendering.
### Improvements
- Shaders ported to the new SRP shader library.
- Constant Buffer Refactor to use new Batcher
### Added
- UI Improvements (Rendering features not supported by LW are hidden)
### Changed
- Shaders were ported to the new SRP shader library.
- Constant Buffer refactor to use new Batcher
- UI Improvements (Rendering features not supported by LW are hidden)
### Bugfixes
### Fixed
### Improvements
- Realtime shadow filtering was improved.
### Added
### Bugfixes
### Changed
- Realtime shadow filtering was improved.
### Fixed
正在加载...
取消
保存