浏览代码

compile fixes

/sample_game
Peter Andreasen 7 年前
当前提交
422f8443
共有 3 个文件被更改,包括 39 次插入31 次删除
  1. 52
      ScriptableRenderPipeline/HDRenderPipeline/Editor/Material/Lit/BaseLitUI.cs
  2. 16
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
  3. 2
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoop.cs

52
ScriptableRenderPipeline/HDRenderPipeline/Editor/Material/Lit/BaseLitUI.cs


protected MaterialProperty windShiverDrag = null;
protected const string kWindShiverDrag = "_ShiverDrag";
protected MaterialProperty windShiverDirectionality = null;
protected const string kWindShiverDirectionality = "_ShiverDirectionality";
// Fps mode
protected MaterialProperty fpsModeEnable = null;
protected const string kFpsModeEnabled = "_EnableFpsMode";
protected MaterialProperty fpsModeFov = null;
protected const string kWindShiverDirectionality = "_ShiverDirectionality";
// Fps mode
protected MaterialProperty fpsModeEnable = null;
protected const string kFpsModeEnabled = "_EnableFpsMode";
protected MaterialProperty fpsModeFov = null;
protected const string kFpsModeFov = "_FpsModeFov";
// tessellation params

windStiffness = FindProperty(kWindStiffness, props);
windDrag = FindProperty(kWindDrag, props);
windShiverDrag = FindProperty(kWindShiverDrag, props);
windShiverDirectionality = FindProperty(kWindShiverDirectionality, props);
fpsModeEnable = FindProperty(kFpsModeEnabled, props);
windShiverDirectionality = FindProperty(kWindShiverDirectionality, props);
fpsModeEnable = FindProperty(kFpsModeEnabled, props);
fpsModeFov = FindProperty(kFpsModeFov, props);
}

}
EditorGUI.indentLevel--;
}
protected override void FpsModePropertiesGUI()
{
GUILayout.Label(StylesBaseLit.fpsMode, EditorStyles.boldLabel);
EditorGUI.indentLevel++;
m_MaterialEditor.ShaderProperty(fpsModeEnable, StylesBaseLit.fpsModeText);
if (fpsModeEnable.floatValue > 0.0f)
{
EditorGUI.indentLevel++;
m_MaterialEditor.ShaderProperty(fpsModeFov, StylesBaseLit.fpsModeFovText);
EditorGUI.indentLevel--;
}
EditorGUI.indentLevel--;
}
protected override void FpsModePropertiesGUI()
{
GUILayout.Label(StylesBaseLit.fpsMode, EditorStyles.boldLabel);
EditorGUI.indentLevel++;
m_MaterialEditor.ShaderProperty(fpsModeEnable, StylesBaseLit.fpsModeText);
if (fpsModeEnable.floatValue > 0.0f)
{
EditorGUI.indentLevel++;
m_MaterialEditor.ShaderProperty(fpsModeFov, StylesBaseLit.fpsModeFovText);
EditorGUI.indentLevel--;
}
EditorGUI.indentLevel--;
}
// All Setup Keyword functions must be static. It allow to create script to automatically update the shaders with a script if code change

}
bool fpsModeEnabled = material.GetFloat(kFpsModeEnabled) > 0.0f;
SetKeyword(material, "_FPS_MODE", fpsModeEnabled);
CoreUtils.SetKeyword(material, "_FPS_MODE", fpsModeEnabled);
SetupMainTexForAlphaTestGI("_BaseColorMap", "_BaseColor", material);
}

16
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


public partial class HDRenderPipeline : RenderPipeline
{
// SampleGame Change BEGIN
public delegate void RenderCallback(HDCamera hdCamera, CommandBuffer cmd);
public RenderCallback DebugLayer2DCallback;
public RenderCallback DebugLayer3DCallback;
// SampleGame Change END
enum ForwardPass
{
Opaque,

RenderForwardError(m_CullResults, camera, renderContext, cmd, ForwardPass.PreRefraction);
// SampleGame Change BEGIN
DebugOverlay.Render3D(hdCamera, cmd);
if(DebugLayer3DCallback != null)
DebugLayer3DCallback(hdCamera, cmd);
// SampleGame Change END
RenderGaussianPyramidColor(camera, cmd, renderContext, FullScreenDebugMode.PreRefractionColorPyramid);

// Make sure to unbind every render texture here because in the next iteration of the loop we might have to reallocate render texture (if the camera size is different)
cmd.SetRenderTarget(new RenderTargetIdentifier(-1), new RenderTargetIdentifier(-1));
/// SampleGame Change BEGIN
DebugOverlay.Render(hdCamera, cmd);
/// SampleGame Change END
/// SampleGame Change BEGIN
if(DebugLayer2DCallback != null)
DebugLayer2DCallback(hdCamera, cmd);
/// SampleGame Change END
#if UNITY_EDITOR
// We still need to bind correctly default camera target with our depth buffer in case we are currently rendering scene view. It should be the last camera here

2
ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoop.cs


if (additionalData == null)
{
// SampleGame Change BEGIN
DebugOverlay.Write(0, 0, "^F00Missing HD light data for {0}", light.light.transform.FullHierarchyName());
//DebugOverlay.Write(0, 0, "^F00Missing HD light data for {0}", light.light.transform.FullHierarchyName());
// SampleGame Change END
return false;
}

正在加载...
取消
保存