浏览代码

Merge remote-tracking branch 'remotes/origin/master' into StackLit2

/main
Oliver Schnabel 6 年前
当前提交
c493d0fb
共有 19 个文件被更改,包括 32 次插入24 次删除
  1. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRPass.template
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/Decal/ShaderPass/DecalSharePass.hlsl
  3. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/ShaderPass/LitDepthPass.hlsl
  4. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/ShaderPass/LitDistortionPass.hlsl
  5. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/ShaderPass/LitSharePass.hlsl
  6. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/ShaderPass/LitVelocityPass.hlsl
  7. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/ShaderPass/StackLitDepthPass.hlsl
  8. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/ShaderPass/StackLitDistortionPass.hlsl
  9. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/ShaderPass/StackLitSharePass.hlsl
  10. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/Unlit/ShaderPass/UnlitDepthPass.hlsl
  11. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/Unlit/ShaderPass/UnlitDistortionPass.hlsl
  12. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/Unlit/ShaderPass/UnlitSharePass.hlsl
  13. 10
      com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/CameraMotionVectors.shader
  14. 5
      com.unity.render-pipelines.lightweight/CHANGELOG.md
  15. 2
      com.unity.render-pipelines.lightweight/LWRP/Data/LightweightPipelineAsset.cs
  16. 2
      com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs
  17. 2
      com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Input.hlsl
  18. 5
      com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/InputSurfacePBR.hlsl
  19. 6
      com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Lighting.hlsl

2
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRPass.template


// It is safe to call this function here as surfaceData have been filled
// We want to know if we must enable transmission on GI for SSS material, if the material have no SSS, this code will be remove by the compiler.
BSDFData bsdfData = ConvertSurfaceDataToBSDFData(surfaceData);
BSDFData bsdfData = ConvertSurfaceDataToBSDFData(posInput.positionSS.xy, surfaceData);
if (HasFeatureFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_LIT_TRANSMISSION))
{
// For now simply recall the function with inverted normal, the compiler should be able to optimize the lightmap case to not resample the directional lightmap

2
com.unity.render-pipelines.high-definition/HDRP/Material/Decal/ShaderPass/DecalSharePass.hlsl


#endif
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/ShaderPass/LitDepthPass.hlsl


#endif
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/ShaderPass/LitDistortionPass.hlsl


#endif
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/ShaderPass/LitSharePass.hlsl


#endif
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/ShaderPass/LitVelocityPass.hlsl


#endif
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/ShaderPass/StackLitDepthPass.hlsl


#endif //..._ALPHATEST_ON
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/ShaderPass/StackLitDistortionPass.hlsl


#define VARYINGS_NEED_TEXCOORD0
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/ShaderPass/StackLitSharePass.hlsl


#endif
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/Unlit/ShaderPass/UnlitDepthPass.hlsl


#endif
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/Unlit/ShaderPass/UnlitDistortionPass.hlsl


#define VARYINGS_NEED_TEXCOORD0
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

2
com.unity.render-pipelines.high-definition/HDRP/Material/Unlit/ShaderPass/UnlitSharePass.hlsl


#define VARYINGS_NEED_TEXCOORD0
// This include will define the various Attributes/Varyings structure
#include "../../ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"

10
com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/CameraMotionVectors.shader


#pragma target 4.5
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "../ShaderVariables.hlsl"
#include "../ShaderPass/FragInputs.hlsl"
#include "../ShaderPass/VaryingMesh.hlsl"
#include "../ShaderPass/VertMesh.hlsl"
#include "../Material/Builtin/BuiltinData.hlsl"
#include "HDRP/ShaderVariables.hlsl"
#include "HDRP/ShaderPass/FragInputs.hlsl"
#include "HDRP/ShaderPass/VaryingMesh.hlsl"
#include "HDRP/ShaderPass/VertMesh.hlsl"
#include "HDRP/Material/Builtin/BuiltinData.hlsl"
struct Attributes
{

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


and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Occlusion strength not being applied on LW standard shaders
- CopyDepth pass is being called even when a depth from prepass is available
- GLES2 shader compiler error in IntegrationTests
- Can't set RenderScale and ShadowDistance by script
## [2.0.1-preview]

2
com.unity.render-pipelines.lightweight/LWRP/Data/LightweightPipelineAsset.cs


public float renderScale
{
get { return m_RenderScale; }
set { m_RenderScale = value; }
}
public bool supportsDynamicBatching

public float shadowDistance
{
get { return m_ShadowDistance; }
set { m_ShadowDistance = value; }
}
public int cascadeCount

2
com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs


bool requiresDepthAttachment = requiresCameraDepth && !requiresDepthPrepass;
bool requiresColorAttachment = RequiresIntermediateColorTexture(ref renderingData.cameraData, baseDescriptor, requiresDepthAttachment);
int[] colorHandles = (requiresColorAttachment) ? new[] {RenderTargetHandles.Color} : null;
int depthHandle = (requiresColorAttachment) ? RenderTargetHandles.DepthAttachment : -1;
int depthHandle = (requiresDepthAttachment) ? RenderTargetHandles.DepthAttachment : -1;
EnqueuePass(cmd, RenderPassHandles.ForwardLit, baseDescriptor, colorHandles, depthHandle, renderingData.cameraData.msaaSamples);
context.ExecuteCommandBuffer(cmd);

2
com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Input.hlsl


float4 _ScaledScreenParams;
CBUFFER_END
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA
#endif
#define UNITY_MATRIX_M unity_ObjectToWorld
#define UNITY_MATRIX_I_M unity_WorldToObject

5
com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/InputSurfacePBR.hlsl


half SampleOcclusion(float2 uv)
{
#ifdef _OCCLUSIONMAP
#if (SHADER_TARGET < 30)
// SM20: instruction count limitation
// SM20: simpler occlusion
// TODO: Controls things like these by exposing SHADER_QUALITY levels (low, medium, high)
#if defined(SHADER_API_GLES)
return SAMPLE_TEXTURE2D(_OcclusionMap, sampler_OcclusionMap, uv).g;
#else
half occ = SAMPLE_TEXTURE2D(_OcclusionMap, sampler_OcclusionMap, uv).g;

6
com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Lighting.hlsl


// If lightmap is not defined than we evaluate GI (ambient + probes) from SH
// We might do it fully or partially in vertex to save shader ALU
#if !defined(LIGHTMAP_ON)
#if defined(SHADER_API_GLES) || (SHADER_TARGET < 30) || !defined(_NORMALMAP)
// TODO: Controls things like these by exposing SHADER_QUALITY levels (low, medium, high)
#if defined(SHADER_API_GLES) || !defined(_NORMALMAP)
// Evaluates SH fully in vertex
#define EVALUATE_SH_VERTEX
#elif !SHADER_HINT_NICE_QUALITY

half ReflectivitySpecular(half3 specular)
{
#if (SHADER_TARGET < 30)
// SM2.0: instruction count limitation
#if defined(SHADER_API_GLES)
return specular.r; // Red channel - because most metals are either monocrhome or with redish/yellowish tint
#else
return max(max(specular.r, specular.g), specular.b);

正在加载...
取消
保存