浏览代码

HDRenderPipeline: Fix various shader compiler warning

/main
Sebastien Lagarde 7 年前
当前提交
370d90c0
共有 5 个文件被更改,包括 13 次插入10 次删除
  1. 6
      ScriptableRenderPipeline/Core/ShaderLibrary/Tessellation.hlsl
  2. 3
      ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLit.shader
  3. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLitDataDisplacement.hlsl
  4. 6
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/SubsurfaceScatteringSettings.cs
  5. 6
      ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl

6
ScriptableRenderPipeline/Core/ShaderLibrary/Tessellation.hlsl


float3 GetScreenSpaceTessFactor(float3 p0, float3 p1, float3 p2, float4x4 viewProjectionMatrix, float4 screenSize, float triangleSize)
{
// Get screen space adaptive scale factor
float2 edgeScreenPosition0 = ComputeScreenSpacePosition(p0, viewProjectionMatrix) * screenSize;
float2 edgeScreenPosition1 = ComputeScreenSpacePosition(p1, viewProjectionMatrix) * screenSize;
float2 edgeScreenPosition2 = ComputeScreenSpacePosition(p2, viewProjectionMatrix) * screenSize;
float2 edgeScreenPosition0 = ComputeScreenSpacePosition(p0, viewProjectionMatrix) * screenSize.xy;
float2 edgeScreenPosition1 = ComputeScreenSpacePosition(p1, viewProjectionMatrix) * screenSize.xy;
float2 edgeScreenPosition2 = ComputeScreenSpacePosition(p2, viewProjectionMatrix) * screenSize.xy;
float EdgeScale = 1.0 / triangleSize; // Edge size in reality, but name is simpler
float3 tessFactor;

3
ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLit.shader


#include "../../ShaderVariables.hlsl"
#include "../../Debug/DebugDisplay.hlsl"
#include "../../Lighting/Forward.hlsl"
// TEMP until pragma work in include
#pragma multi_compile LIGHTLOOP_SINGLE_PASS LIGHTLOOP_TILE_PASS
#include "../../Lighting/Lighting.hlsl"
#include "../Lit/ShaderPass/LitSharePass.hlsl"
#include "LayeredLitData.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLitDataDisplacement.hlsl


height3 += height0 * _InheritBaseHeight3 * influenceMask;
#endif
float heightResult = BlendLayeredScalar(height0, height1, height2, height3, weights).xxx;
float heightResult = BlendLayeredScalar(height0, height1, height2, height3, weights);
// Applying scaling of the object if requested
#ifdef _VERTEX_DISPLACEMENT_LOCK_OBJECT_SCALE

6
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/SubsurfaceScatteringSettings.cs


public string name;
[ColorUsage(false, true, 0f, 8f, 0.125f, 3f)]
[ColorUsage(false, true)]
public Color scatteringDistance; // Per color channel (no meaningful units)
[ColorUsage(false)]
public Color transmissionTint; // Color, 0 to 1

public float worldScale; // Size of the world unit in meters
// Old SSS Model >>>
[ColorUsage(false, true, 0f, 8f, 0.125f, 3f)]
[ColorUsage(false, true)]
[ColorUsage(false, true, 0f, 8f, 0.125f, 3f)]
[ColorUsage(false, true)]
public Color scatterDistance2;
[Range(0f, 1f)]
public float lerpWeight;

6
ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl


output.vmesh.positionWS = positionWS;
#endif
// Not required for meta pass but to silent the shader compiler warning in case it is declare
#ifdef VARYINGS_NEED_TANGENT_TO_WORLD
output.vmesh.normalWS = float3(0.0, 0.0, 0.0);
output.vmesh.tangentWS = float4(0.0, 0.0, 0.0, 0.0);
#endif
#ifdef VARYINGS_NEED_TEXCOORD0
output.vmesh.texCoord0 = inputMesh.uv0;
#endif

正在加载...
取消
保存