浏览代码

HDRenderPipeline: Fix various warning + Add versionning to HDAdditionalData

/main
Sebastien Lagarde 7 年前
当前提交
bb966f19
共有 4 个文件被更改,包括 12 次插入7 次删除
  1. 4
      ScriptableRenderPipeline/HDRenderPipeline/Editor/HDEditorCLI.cs
  2. 6
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/HDAdditionalLightData.cs
  3. 1
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
  4. 8
      ScriptableRenderPipeline/HDRenderPipeline/Sky/ComputeGgxIblSampleData.compute

4
ScriptableRenderPipeline/HDRenderPipeline/Editor/HDEditorCLI.cs


using System;
using System;
using UnityEngine;
namespace UnityEditor.Experimental.Rendering.HDPipeline

{
action.operation = (CommandLineOperation)Enum.Parse(typeof(CommandLineOperation), args[i]);
}
catch (Exception e) { }
catch (Exception e) { Debug.Log(e.ToString()); }
}
break;
}

6
ScriptableRenderPipeline/HDRenderPipeline/Lighting/HDAdditionalLightData.cs


[RequireComponent(typeof(Light))]
public class HDAdditionalLightData : MonoBehaviour
{
#pragma warning disable 414 // CS0414 The private field '...' is assigned but its value is never used
// We can't rely on Unity for our additional data, we need to version it ourself.
[SerializeField]
float m_Version = 1.0f;
#pragma warning restore 414
[Range(0.0f, 100.0f)]
[FormerlySerializedAs("m_innerSpotPercent")]
public float m_InnerSpotPercent = 0.0f; // To display this field in the UI this need to be public

1
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


#else
float3 unL = lightData.positionWS - positionWS;
[branch]
if (dot(lightData.forward, unL) >= 0.0001)
{
// The light is back-facing.

8
ScriptableRenderPipeline/HDRenderPipeline/Sky/ComputeGgxIblSampleData.compute


float3 localL;
float NdotL, NdotH, LdotH;
const int validSampleCount = sampleCount;
const uint validSampleCount = sampleCount;
int acceptedSampleCount = 0;
int shiftedSampleIndex = 0;
uint acceptedSampleCount = 0;
uint shiftedSampleIndex = 0;
for (int i = 0; i < sampleCount; i++)
for (uint i = 0; i < sampleCount; i++)
{
// We switch to the Golden sequence instead of the Fibonacci sequence
// since the sample count is not guaranteed to be a Fibonacci number.

正在加载...
取消
保存