浏览代码

Merge branch 'master' of https://github.com/Unity-Technologies/ScriptableRenderLoop into UpdateAreaLightImpl

/main
Evgenii Golubev 8 年前
当前提交
290723c7
共有 44 个文件被更改,包括 1829 次插入1231 次删除
  1. 6
      Assets/ScriptableRenderLoop/HDRenderLoop/Debug/Resources/DebugViewMaterialGBuffer.shader
  2. 60
      Assets/ScriptableRenderLoop/HDRenderLoop/Editor/HDRenderLoopInspector.cs
  3. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset.meta
  4. 181
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
  5. 116
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/LayeredLit/Editor/LayeredLitUI.cs
  6. 97
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/LayeredLit/LayeredLit.shader
  7. 29
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/Lit.shader
  8. 128
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitData.hlsl
  9. 16
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitSharePass.hlsl
  10. 16
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/Unlit.shader
  11. 11
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/UnlitData.hlsl
  12. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/ShaderPass/ShaderPassDebugViewMaterial.hlsl
  13. 2
      Assets/ScriptableRenderLoop/ShaderLibrary/API/D3D11.hlsl
  14. 21
      Assets/ScriptableRenderLoop/ShaderLibrary/CommonLighting.hlsl
  15. 22
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/Layered.mat
  16. 31
      Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs
  17. 27
      Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.hlsl
  18. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.hlsl.meta
  19. 12
      Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.meta
  20. 60
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Attributes.hlsl
  21. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Attributes.hlsl.meta
  22. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky.meta
  23. 1001
      Assets/TestScenes/HDTest/LayeredLitTest.unity
  24. 8
      Assets/TestScenes/HDTest/LayeredLitTest.unity.meta
  25. 9
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered.meta
  26. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/Resources.meta
  27. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/Resources/SkyHDRI.shader.meta
  28. 72
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/Resources/SkyHDRI.shader
  29. 8
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/Layered.mat.meta
  30. 15
      Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.hlsl
  31. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.hlsl.meta
  32. 28
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitDebugPass.hlsl
  33. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitDebugPass.hlsl.meta
  34. 8
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered.mat.meta
  35. 8
      Assets/TestScenes/HDTest/JulienTest.unity.meta
  36. 1001
      Assets/TestScenes/HDTest/JulienTest.unity
  37. 0
      /Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/UnlitSharePass.hlsl.meta
  38. 0
      /Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/UnlitSharePass.hlsl
  39. 0
      /Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/LayerMask.tga
  40. 0
      /Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/LayerMask.tga.meta
  41. 0
      /Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/Layered.mat

6
Assets/ScriptableRenderLoop/HDRenderLoop/Debug/Resources/DebugViewMaterialGBuffer.shader


#define UNITY_MATERIAL_LIT // Need to be define before including Material.hlsl
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderConfig.cs.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderVariables.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Material/Material.hlsl"

float3 result = float3(-666.0, 0.0, 0.0);
bool needLinearToSRGB = false;
if (_DebugViewMaterial == DEBUGVIEW_GBUFFER_DEPTH)
if (_DebugViewMaterial == DEBUGVIEWGBUFFER_DEPTH)
else if (_DebugViewMaterial == DEBUGVIEW_GBUFFER_BAKEDIFFUSELIGHTING)
else if (_DebugViewMaterial == DEBUGVIEWGBUFFER_BAKE_DIFFUSE_LIGHTING)
{
result = bakeDiffuseLighting;
}

60
Assets/ScriptableRenderLoop/HDRenderLoop/Editor/HDRenderLoopInspector.cs


public readonly GUIContent exposure = new GUIContent("Exposure");
public readonly GUIContent useForwardRenderingOnly = new GUIContent("Use Forward Rendering Only");
public readonly GUIContent useDepthPrepass = new GUIContent("Use Depth Prepass");
public readonly GUIContent skyParameters = new GUIContent("Sky Parameters");
public readonly GUIContent skyExposure = new GUIContent("Sky Exposure");
public readonly GUIContent skyRotation = new GUIContent("Sky Rotation");
public readonly GUIContent skyMultiplier = new GUIContent("Sky Multiplier");
}
private static Styles s_Styles = null;

const float k_MaxExposure = 32.0f;
void FillWithProperties(Type type, GUIContent[] debugViewMaterialStrings, int[] debugViewMaterialValues, bool isBSDFData, ref int index)
string GetSubNameSpaceName(Type type)
{
return type.Namespace.Substring(type.Namespace.LastIndexOf((".")) + 1) + "/";
}
void FillWithProperties(Type type, GUIContent[] debugViewMaterialStrings, int[] debugViewMaterialValues, bool isBSDFData, string strSubNameSpace, ref int index)
{
var attributes = type.GetCustomAttributes(true);
// Get attribute to get the start number of the value for the enum

}
var fields = type.GetFields();
var subNamespace = type.Namespace.Substring(type.Namespace.LastIndexOf((".")) + 1);
var localIndex = 0;
foreach (var field in fields)

}
}
fieldName = (isBSDFData ? "Engine/" : "") + subNamespace + "/" + fieldName;
fieldName = (isBSDFData ? "Engine/" : "") + strSubNameSpace + fieldName;
debugViewMaterialStrings[index] = new GUIContent(fieldName);
debugViewMaterialValues[index] = attr.paramDefinesStart + (int)localIndex;

}
void FillWithPropertiesEnum(Type type, GUIContent[] debugViewMaterialStrings, int[] debugViewMaterialValues, bool isBSDFData, ref int index)
void FillWithPropertiesEnum(Type type, GUIContent[] debugViewMaterialStrings, int[] debugViewMaterialValues, string prefix, bool isBSDFData, ref int index)
{
var names = Enum.GetNames(type);

var valueName = (isBSDFData ? "Engine/" : "") + names[localIndex];
var valueName = (isBSDFData ? "Engine/" : "" + prefix) + names[localIndex];
debugViewMaterialStrings[index] = new GUIContent(valueName);
debugViewMaterialValues[index] = (int)value;

if (!styles.isDebugViewMaterialInit)
{
var varyingNames = Enum.GetNames(typeof(HDRenderLoop.DebugViewVaryingMode));
var gbufferNames = Enum.GetNames(typeof(HDRenderLoop.DebugViewGbufferMode));
var varyingNames = Enum.GetNames(typeof(Attributes.DebugViewVarying));
var gbufferNames = Enum.GetNames(typeof(Attributes.DebugViewGbuffer));
+ typeof(Builtin.BuiltinData).GetFields().Length
+ typeof(Builtin.BuiltinData).GetFields().Length * 2 // BuildtinData are duplicated for each material
+ typeof(Lit.SurfaceData).GetFields().Length
+ typeof(Lit.BSDFData).GetFields().Length
+ typeof(Unlit.SurfaceData).GetFields().Length

styles.debugViewMaterialValues[0] = 0;
index++;
FillWithPropertiesEnum(typeof(HDRenderLoop.DebugViewVaryingMode), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, false, ref index);
FillWithProperties(typeof(Builtin.BuiltinData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, false, ref index);
FillWithProperties(typeof(Lit.SurfaceData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, false, ref index);
FillWithProperties(typeof(Unlit.SurfaceData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, false, ref index);
FillWithPropertiesEnum(typeof(Attributes.DebugViewVarying), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, GetSubNameSpaceName(typeof(Attributes.DebugViewVarying)), false, ref index);
FillWithProperties(typeof(Builtin.BuiltinData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, false, GetSubNameSpaceName(typeof(Lit.SurfaceData)), ref index);
FillWithProperties(typeof(Lit.SurfaceData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, false, GetSubNameSpaceName(typeof(Lit.SurfaceData)), ref index);
FillWithProperties(typeof(Builtin.BuiltinData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, false, GetSubNameSpaceName(typeof(Unlit.SurfaceData)), ref index);
FillWithProperties(typeof(Unlit.SurfaceData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, false, GetSubNameSpaceName(typeof(Unlit.SurfaceData)), ref index);
FillWithPropertiesEnum(typeof(HDRenderLoop.DebugViewGbufferMode), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, true, ref index);
FillWithProperties(typeof(Lit.BSDFData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, true, ref index);
FillWithProperties(typeof(Unlit.BSDFData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, true, ref index);
FillWithPropertiesEnum(typeof(Attributes.DebugViewGbuffer), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, "", true, ref index);
FillWithProperties(typeof(Lit.BSDFData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, true, "", ref index);
FillWithProperties(typeof(Unlit.BSDFData), styles.debugViewMaterialStrings, styles.debugViewMaterialValues, true, "", ref index);
styles.isDebugViewMaterialInit = true;
}

debugParameters.displayOpaqueObjects = EditorGUILayout.Toggle(styles.displayOpaqueObjects, debugParameters.displayOpaqueObjects);
debugParameters.displayTransparentObjects = EditorGUILayout.Toggle(styles.displayTransparentObjects, debugParameters.displayTransparentObjects);
debugParameters.useForwardRenderingOnly = EditorGUILayout.Toggle(styles.useForwardRenderingOnly, debugParameters.useForwardRenderingOnly);
debugParameters.useDepthPrepass = EditorGUILayout.Toggle(styles.useDepthPrepass, debugParameters.useDepthPrepass);
if (EditorGUI.EndChangeCheck())
{
EditorUtility.SetDirty(renderLoop); // Repaint
}
EditorGUI.indentLevel--;
var skyParameters = renderLoop.skyParameters;
EditorGUILayout.LabelField(styles.skyParameters);
EditorGUI.indentLevel++;
EditorGUI.BeginChangeCheck();
skyParameters.skyHDRI = (Cubemap)EditorGUILayout.ObjectField("Cubemap", skyParameters.skyHDRI, typeof(Cubemap), false);
skyParameters.exposure = Mathf.Max(Mathf.Min(EditorGUILayout.FloatField(styles.skyExposure, skyParameters.exposure), 32), -32);
skyParameters.multiplier = Mathf.Max(EditorGUILayout.FloatField(styles.skyMultiplier, skyParameters.multiplier), 0);
skyParameters.rotation = Mathf.Max(Mathf.Min(EditorGUILayout.FloatField(styles.skyRotation, skyParameters.rotation), 360), 0);
if (EditorGUI.EndChangeCheck())
{
EditorUtility.SetDirty(renderLoop); // Repaint

2
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset.meta


fileFormatVersion: 2
guid: 2400b74f5ce370c4481e5dc417d03703
timeCreated: 1478912125
timeCreated: 1479240578
licenseType: Pro
NativeFormatImporter:
userData:

181
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs


{
private const string k_HDRenderLoopPath = "Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset";
// Must be in sync with DebugViewMaterial.hlsl
public enum DebugViewVaryingMode
public class SkyParameters
TexCoord0 = 1,
TexCoord1 = 2,
TexCoord2 = 3,
VertexTangentWS = 4,
VertexBitangentWS = 5,
VertexNormalWS = 6,
VertexColor = 7,
public Cubemap skyHDRI;
public float rotation;
public float exposure;
public float multiplier;
// Must be in sync with DebugViewMaterial.hlsl
public enum DebugViewGbufferMode
[SerializeField]
private SkyParameters m_SkyParameters = new SkyParameters();
public SkyParameters skyParameters
Depth = 10,
BakeDiffuseLighting = 11,
get { return m_SkyParameters; }
}
public class DebugParameters

public bool displayTransparentObjects = true;
public bool useForwardRenderingOnly = false; // TODO: Currently there is no way to strip the extra forward shaders generated by the shaders compiler, so we can switch dynamically.
public bool useDepthPrepass = false;
public bool enableTonemap = true;
public float exposure = 0;

[SerializeField]
TextureSettings m_TextureSettings = TextureSettings.Default;
Material m_SkyboxMaterial;
Material m_SkyHDRIMaterial;
Material m_DeferredMaterial;
Material m_FinalPassMaterial;

s_envLightList = new ComputeBuffer(MaxLights, System.Runtime.InteropServices.Marshal.SizeOf(typeof(EnvLightData)));
s_punctualShadowList = new ComputeBuffer(MaxShadows, System.Runtime.InteropServices.Marshal.SizeOf(typeof(PunctualShadowData)));
// TODO: We need to have an API to send our sky information to Enlighten. For now use a workaround through skybox/cubemap material...
m_SkyboxMaterial = CreateEngineMaterial("Skybox/Cubemap");
RenderSettings.skybox = m_SkyboxMaterial; // Setup this material as the default to be use in RenderSettings
RenderSettings.ambientIntensity = 1.0f; // fix this to 1, this parameter should not exist!
RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Skybox; // Force skybox for our HDRI
RenderSettings.reflectionIntensity = 1.0f;
m_SkyHDRIMaterial = CreateEngineMaterial("Hidden/HDRenderLoop/SkyHDRI");
m_DeferredMaterial = CreateEngineMaterial("Hidden/HDRenderLoop/Deferred");
m_FinalPassMaterial = CreateEngineMaterial("Hidden/HDRenderLoop/FinalPass");

s_areaLightList.Release();
s_envLightList.Release();
s_punctualShadowList.Release();
if (m_SkyboxMaterial) DestroyImmediate(m_SkyboxMaterial);
if (m_SkyHDRIMaterial) DestroyImmediate(m_SkyHDRIMaterial);
if (m_DeferredMaterial) DestroyImmediate(m_DeferredMaterial);
if (m_FinalPassMaterial) DestroyImmediate(m_FinalPassMaterial);

// END TEMP
}
// TODO: Create an opaque and transparent list!
void RenderOpaqueNoLightingRenderList(CullResults cull, Camera camera, RenderLoop renderLoop, string passName)
{
if (!debugParameters.displayOpaqueObjects)
return;
var settings = new DrawRendererSettings(cull, camera, new ShaderPassName(passName))
{
rendererConfiguration = 0,
sorting = { sortOptions = SortOptions.SortByMaterialThenMesh }
};
settings.inputFilter.SetQueuesOpaque();
renderLoop.DrawRenderers(ref settings);
}
DrawRendererSettings settings = new DrawRendererSettings(cull, camera, new ShaderPassName(passName));
settings.sorting.sortOptions = SortOptions.SortByMaterialThenMesh;
var settings = new DrawRendererSettings(cull, camera, new ShaderPassName(passName))
{
rendererConfiguration = RendererConfiguration.PerObjectLightProbe | RendererConfiguration.PerObjectReflectionProbes | RendererConfiguration.PerObjectLightmaps | RendererConfiguration.PerObjectLightProbeProxyVolume,
sorting = { sortOptions = SortOptions.SortByMaterialThenMesh }
};
settings.rendererConfiguration = RendererConfiguration.PerObjectLightProbe | RendererConfiguration.PerObjectReflectionProbes | RendererConfiguration.PerObjectLightmaps | RendererConfiguration.PerObjectLightProbeProxyVolume;
renderLoop.DrawRenderers(ref settings);
}
void RenderTransparentNoLightingRenderList(CullResults cull, Camera camera, RenderLoop renderLoop, string passName)
{
if (!debugParameters.displayTransparentObjects)
return;
var settings = new DrawRendererSettings(cull, camera, new ShaderPassName(passName))
{
rendererConfiguration = 0,
sorting = { sortOptions = SortOptions.BackToFront }
};
settings.inputFilter.SetQueuesTransparent();
void RenderTransparentRenderList(CullResults cull, Camera camera, RenderLoop renderLoop, string passName)
void RenderTransparentRenderList(CullResults cull, Camera camera, RenderLoop renderLoop, string passName)
{
if (!debugParameters.displayTransparentObjects)
return;

renderLoop.DrawRenderers(ref settings);
}
void RenderDepthPrepass(CullResults cull, Camera camera, RenderLoop renderLoop)
{
// If we are forward only we will do a depth prepass
// TODO: Depth prepass should be enabled based on light loop settings. LightLoop define if they need a depth prepass + forward only...
if (!debugParameters.useDepthPrepass)
return;
// TODO: Must do opaque then alpha masked for performance!
// TODO: front to back for opaque and by materal for opaque tested when we split in two
var cmd = new CommandBuffer { name = "Depth Prepass" };
cmd.SetRenderTarget(new RenderTargetIdentifier(s_CameraDepthBuffer));
renderLoop.ExecuteCommandBuffer(cmd);
cmd.Dispose();
RenderOpaqueNoLightingRenderList(cull, camera, renderLoop, "DepthOnly");
}
void RenderGBuffer(CullResults cull, Camera camera, RenderLoop renderLoop)
{
if (debugParameters.useForwardRenderingOnly)

// render opaque objects into GBuffer
RenderOpaqueRenderList(cull, camera, renderLoop, "GBuffer");
}
// This pass is use in case of forward opaque and deferred rendering. We need to render forward objects before tile lighting pass
void RenderForwardOpaqueDepth(CullResults cull, Camera camera, RenderLoop renderLoop)
{
// If we have render a depth prepass, no need for this pass
if (debugParameters.useDepthPrepass)
return;
// TODO: Use the render queue index to only send the forward opaque!
var cmd = new CommandBuffer { name = "Depth Prepass" };
cmd.SetRenderTarget(new RenderTargetIdentifier(s_CameraDepthBuffer));
renderLoop.ExecuteCommandBuffer(cmd);
cmd.Dispose();
RenderOpaqueNoLightingRenderList(cull, camera, renderLoop, "DepthOnly");
}
void RenderDebugViewMaterial(CullResults cull, Camera camera, RenderLoop renderLoop)

cmd.Dispose();
}
void RenderSky(Camera camera, RenderLoop renderLoop)
{
/*
// Render sky into a cubemap - doesn't happen every frame, can be control
// TODO: do a render to texture here
// Downsample the cubemap and provide it to Enlighten
// TODO: currently workaround is to set the cubemap in a Skybox/cubemap material
//m_SkyboxMaterial.SetTexture(cubemap);
// Render the sky itself
Vector3[] vertData = new Vector3[4];
vertData[0] = new Vector3(-1.0f, -1.0f, 0.0f);
vertData[1] = new Vector3(1.0f, -1.0f, 0.0f);
vertData[2] = new Vector3(1.0f, 1.0f, 0.0f);
vertData[3] = new Vector3(-1.0f, 1.0f, 0.0f);
Vector3[] eyeVectorData = new Vector3[4];
// camera.worldToCameraMatrix, camera.projectionMatrix
// Get view vector vased on the frustrum, i.e (invert transform frustrum get position etc...)
eyeVectorData[0] =
eyeVectorData[1] =
eyeVectorData[2] =
eyeVectorData[3] =
// Write out the mesh
var triangles = new int[4];
for (int i = 0; i < 4; i++)
{
triangles[i] = i;
}
Mesh mesh = new Mesh
{
vertices = vertData,
normals = eyeVectorData,
triangles = triangles
};
m_SkyHDRIMaterial.SetTexture("_Cubemap", skyParameters.skyHDRI);
m_SkyHDRIMaterial.SetVector("_SkyParam", new Vector4(skyParameters.exposure, skyParameters.multiplier, skyParameters.rotation, 0.0f));
var cmd = new CommandBuffer { name = "Skybox" };
cmd.DrawMesh(mesh, Matrix4x4.identity, m_SkyHDRIMaterial);
renderloop.ExecuteCommandBuffer(cmd);
cmd.Dispose();
*/
}
void RenderForward(CullResults cullResults, Camera camera, RenderLoop renderLoop)
{
// Bind material data

renderLoop.ExecuteCommandBuffer(cmd);
cmd.Dispose();
RenderOpaqueRenderList(cullResults, camera, renderLoop, "ForwardUnlit");
RenderTransparentRenderList(cullResults, camera, renderLoop, "ForwardUnlit");
RenderOpaqueNoLightingRenderList(cullResults, camera, renderLoop, "ForwardUnlit");
RenderTransparentNoLightingRenderList(cullResults, camera, renderLoop, "ForwardUnlit");
}
void RenderVelocity(CullResults cullResults, Camera camera, RenderLoop renderLoop)

renderLoop.ExecuteCommandBuffer(cmd);
cmd.Dispose();
RenderOpaqueRenderList(cullResults, camera, renderLoop, "MotionVectors");
RenderOpaqueNoLightingRenderList(cullResults, camera, renderLoop, "MotionVectors");
#pragma warning restore 162, 429
}

cmd.Dispose();
// Only transparent object can render distortion vectors
RenderTransparentRenderList(cullResults, camera, renderLoop, "DistortionVectors");
RenderTransparentNoLightingRenderList(cullResults, camera, renderLoop, "DistortionVectors");
}

InitAndClearBuffer(camera, renderLoop);
RenderDepthPrepass(cullResults, camera, renderLoop);
// For tile lighting with forward opaque
//RenderForwardOpaqueDepth(cullResults, camera, renderLoop);
if (debugParameters.debugViewMaterial != 0)
{

RenderDeferredLighting(camera, renderLoop);
RenderForward(cullResults, camera, renderLoop);
RenderSky(camera, renderLoop);
RenderForward(cullResults, camera, renderLoop); // Note: We want to render forward opaque before RenderSky, then RenderTransparent - can only do that once we have material.SetPass feature...
RenderVelocity(cullResults, camera, renderLoop);
RenderVelocity(cullResults, camera, renderLoop); // Note we may have to render velocity earlier if we do temporalAO, temporal volumetric etc... Mean we will not take into account forward opaque in case of deferred rendering ?
// TODO: Check with VFX team.
// Rendering distortion here have off course lot of artifact.

116
Assets/ScriptableRenderLoop/HDRenderLoop/Material/LayeredLit/Editor/LayeredLitUI.cs


{
internal class LayeredLitGUI : LitGUI
{
public enum LayerMapping
{
UV0,
UV1,
Planar,
Triplanar,
}
private class Styles
{
public readonly GUIContent[] materialLayerLabels =

public readonly GUIContent syncButton = new GUIContent("Re-Synchronize Layers", "Re-synchronize all layers's properties with the referenced Material");
public readonly GUIContent layers = new GUIContent("Layers");
public readonly GUIContent emission = new GUIContent("Emissive");
public readonly GUIContent layerMapMask = new GUIContent("Layer Mask", "Layer mask (multiplied by vertex color)");
public readonly GUIContent layerMapMask = new GUIContent("Layer Mask", "Layer mask (multiplied by vertex color if enabled)");
public readonly GUIContent layerMapVertexColor = new GUIContent("Use Vertex Color", "Layer mask (multiplied by layer mask if enabled)");
public readonly GUIContent layerSize = new GUIContent("Size", "Size of the layer mapping in world units.");
public readonly GUIContent layerMapping = new GUIContent("Mapping", "Mapping mode of the layer.");
}
static Styles s_Styles = null;

private const int kMaxLayerCount = 4;
private const int kSyncButtonWidth = 58;
private string kLayerMaskMap = "_LayerMaskMap";
private string kLayerCount = "_LayerCount";
private const string kLayerMaskMap = "_LayerMaskMap";
private const string kLayerMaskVertexColor = "_LayerMaskVertexColor";
private const string kLayerCount = "_LayerCount";
private const string kLayerMapping = "_LayerMapping";
private const string kLayerSize = "_LayerSize";
MaterialProperty layerMaskVertexColorProperty = null;
MaterialProperty[] layerMappingProperty = new MaterialProperty[kMaxLayerCount];
MaterialProperty[] layerSizeProperty = new MaterialProperty[kMaxLayerCount];
int layerCount
{

}
}
bool LayersGUI(AssetImporter materialImporter)
bool DoLayerGUI(AssetImporter materialImporter, int layerIndex)
{
bool result = false;
EditorGUI.BeginChangeCheck();
m_MaterialLayers[layerIndex] = EditorGUILayout.ObjectField(styles.materialLayerLabels[layerIndex], m_MaterialLayers[layerIndex], typeof(Material), true) as Material;
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(materialImporter, "Change layer material");
SynchronizeLayerProperties(layerIndex);
result = true;
}
EditorGUI.BeginChangeCheck();
m_MaterialEditor.ShaderProperty(layerMappingProperty[layerIndex], styles.layerMapping);
if (EditorGUI.EndChangeCheck())
{
result = true;
}
m_MaterialEditor.ShaderProperty(layerSizeProperty[layerIndex], styles.layerSize);
return result;
}
bool DoLayersGUI(AssetImporter materialImporter)
GUI.changed = false;
EditorGUI.indentLevel++;
GUILayout.Label(styles.layers, EditorStyles.boldLabel);

layerChanged = true;
}
m_MaterialEditor.ShaderProperty(layerMaskVertexColorProperty, styles.layerMapVertexColor);
EditorGUI.BeginChangeCheck();
m_MaterialLayers[i] = EditorGUILayout.ObjectField(styles.materialLayerLabels[i], m_MaterialLayers[i], typeof(Material), true) as Material;
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(materialImporter, "Change layer material");
SynchronizeLayerProperties(i);
layerChanged = true;
}
layerChanged |= DoLayerGUI(materialImporter, i);
}
EditorGUILayout.Space();

EditorGUI.indentLevel--;
layerChanged |= GUI.changed;
GUI.changed = false;
return layerChanged;
}

SetKeyword(material, "_HEIGHTMAP", material.GetTexture(kHeightMap + i));
}
SetKeyword(material, "_LAYERMASKMAP", material.GetTexture(kLayerMaskMap));
SetKeyword(material, "_LAYER_MASK_MAP", material.GetTexture(kLayerMaskMap));
SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR", material.GetFloat(kLayerMaskVertexColor) != 0.0f);
}
protected override void SetupEmissionGIFlags(Material material)

SetKeyword(material, "_LAYEREDLIT_4_LAYERS", false);
SetKeyword(material, "_LAYEREDLIT_3_LAYERS", false);
}
const string kLayerMappingUV1 = "_LAYER_MAPPING_UV1_";
const string kLayerMappingPlanar = "_LAYER_MAPPING_PLANAR_";
const string kLayerMappingTriplanar = "_LAYER_MAPPING_TRIPLANAR_";
for (int i = 0 ; i <layerCount ; ++i)
{
string layerMappingParam = string.Format("{0}{1}", kLayerMapping, i);
LayerMapping layerMapping = (LayerMapping)material.GetFloat(layerMappingParam);
string currentLayerMappingUV1 = string.Format("{0}{1}", kLayerMappingUV1, i);
string currentLayerMappingPlanar = string.Format("{0}{1}", kLayerMappingPlanar, i);
string currentLayerMappingTriplanar = string.Format("{0}{1}", kLayerMappingTriplanar, i);
if(layerMapping == LayerMapping.UV1)
{
SetKeyword(material, currentLayerMappingUV1, true);
SetKeyword(material, currentLayerMappingPlanar, false);
SetKeyword(material, currentLayerMappingTriplanar, false);
}
else if(layerMapping == LayerMapping.Planar)
{
SetKeyword(material, currentLayerMappingUV1, false);
SetKeyword(material, currentLayerMappingPlanar, true);
SetKeyword(material, currentLayerMappingTriplanar, false);
}
else if(layerMapping == LayerMapping.Triplanar)
{
SetKeyword(material, currentLayerMappingUV1, false);
SetKeyword(material, currentLayerMappingPlanar, false);
SetKeyword(material, currentLayerMappingTriplanar, true);
}
}
}
private void FindLayerProperties(MaterialProperty[] props)
{
layerMaskMapProperty = FindProperty(kLayerMaskMap, props);
layerMaskVertexColorProperty = FindProperty(kLayerMaskVertexColor, props);
layerCountProperty = FindProperty(kLayerCount, props);
for (int i = 0; i < layerCount; ++i)
{
layerMappingProperty[i] = FindProperty(string.Format("{0}{1}", kLayerMapping, i), props);
layerSizeProperty[i] = FindProperty(string.Format("{0}{1}", kLayerSize, i), props);
}
layerMaskMapProperty = FindProperty(kLayerMaskMap, props);
layerCountProperty = FindProperty(kLayerCount, props);
FindLayerProperties(props);
m_MaterialEditor = materialEditor;

optionsChanged = true;
}
bool layerChanged = LayersGUI(materialImporter);
bool layerChanged = DoLayersGUI(materialImporter);
CheckLayerConsistency();

97
Assets/ScriptableRenderLoop/HDRenderLoop/Material/LayeredLit/LayeredLit.shader


_EmissiveIntensity2("EmissiveIntensity2", Float) = 0
_EmissiveIntensity3("EmissiveIntensity3", Float) = 0
_LayerSize0("LayerSize0", Float) = 1.0
_LayerSize1("LayerSize1", Float) = 1.0
_LayerSize2("LayerSize2", Float) = 1.0
_LayerSize3("LayerSize3", Float) = 1.0
[ToggleOff] _LayerMaskVertexColor("Use Vertex Color Mask", Float) = 0.0
[ToggleOff] _DistortionOnly("Distortion Only", Float) = 0.0
[ToggleOff] _DistortionDepthTest("Distortion Only", Float) = 0.0

[Enum(Mask Alpha, 0, BaseColor Alpha, 1)] _SmoothnessTextureChannel("Smoothness texture channel", Float) = 1
[Enum(Use Emissive Color, 0, Use Emissive Mask, 1)] _EmissiveColorMode("Emissive color mode", Float) = 1
[Enum(None, 0, DoubleSided, 1, DoubleSidedLigthingFlip, 2, DoubleSidedLigthingMirror, 3)] _DoubleSidedMode("Double sided mode", Float) = 0
[Enum(UV0, 0, UV1, 1, Planar, 2, Triplanar, 3)] _LayerMapping0("Layer 0 Mapping", Float) = 0
[Enum(UV0, 0, UV1, 1, Planar, 2, Triplanar, 3)] _LayerMapping1("Layer 1 Mapping", Float) = 0
[Enum(UV0, 0, UV1, 1, Planar, 2, Triplanar, 3)] _LayerMapping2("Layer 2 Mapping", Float) = 0
[Enum(UV0, 0, UV1, 1, Planar, 2, Triplanar, 3)] _LayerMapping3("Layer 3 Mapping", Float) = 0
}
HLSLINCLUDE

#pragma shader_feature _EMISSIVE_COLOR_MAP
#pragma shader_feature _HEIGHTMAP
#pragma shader_feature _HEIGHTMAP_AS_DISPLACEMENT
#pragma shader_feature _LAYERMASKMAP
#pragma shader_feature _LAYER_MASK_MAP
#pragma shader_feature _LAYER_MASK_VERTEX_COLOR
//#pragma shader_feature _ _LAYER_MAPPING_UV1_0 _LAYER_MAPPING_PLANAR_0 _LAYER_MAPPING_TRIPLANAR_0
//#pragma shader_feature _ _LAYER_MAPPING_UV1_1 _LAYER_MAPPING_PLANAR_1 _LAYER_MAPPING_TRIPLANAR_1
//#pragma shader_feature _ _LAYER_MAPPING_UV1_2 _LAYER_MAPPING_PLANAR_2 _LAYER_MAPPING_TRIPLANAR_2
//#pragma shader_feature _ _LAYER_MAPPING_UV1_3 _LAYER_MAPPING_PLANAR_3 _LAYER_MAPPING_TRIPLANAR_3
//-------------------------------------------------------------------------------------
// Define

#include "common.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderConfig.cs.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderVariables.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Material/Attributes.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.hlsl"
#define _MAX_LAYER 4
#if defined(_LAYEREDLIT_4_LAYERS)
# define _LAYER_COUNT 4
#elif defined(_LAYEREDLIT_3_LAYERS)
# define _LAYER_COUNT 3
#else
# define _LAYER_COUNT 2
#endif
struct LayerCoordinates
{
float2 texcoord[_MAX_LAYER];
bool isTriplanar[_MAX_LAYER];
};
float4 SampleLayer(TEXTURE2D_ARGS(layerTex, layerSampler), LayerCoordinates layerCoord, int layerIndex)
{
if (layerCoord.isTriplanar[layerIndex])
{
// TODO
return SAMPLE_TEXTURE2D(layerTex, layerSampler, layerCoord.texcoord[layerIndex]);
}
else
{
return SAMPLE_TEXTURE2D(layerTex, layerSampler, layerCoord.texcoord[layerIndex]);
}
}
// Set of users variables
#define PROP_DECL(type, name) type name, name##0, name##1, name##2, name##3;
#define PROP_DECL_TEX2D(name)\

TEXTURE2D(name##2); \
TEXTURE2D(name##3);
#define PROP_SAMPLE(name, textureName, texcoord, swizzle)\
name##0 = SAMPLE_TEXTURE2D(textureName##0, sampler##textureName##0, texcoord).##swizzle; \
name##1 = SAMPLE_TEXTURE2D(textureName##1, sampler##textureName##0, texcoord).##swizzle; \
name##2 = SAMPLE_TEXTURE2D(textureName##2, sampler##textureName##0, texcoord).##swizzle; \
name##3 = SAMPLE_TEXTURE2D(textureName##3, sampler##textureName##0, texcoord).##swizzle;
#define PROP_SAMPLE(name, textureName, layerCoord, swizzle)\
name##0 = SampleLayer(TEXTURE2D_PARAM(textureName##0, sampler##textureName##0), layerCoord, 0).##swizzle; \
name##1 = SampleLayer(TEXTURE2D_PARAM(textureName##1, sampler##textureName##0), layerCoord, 1).##swizzle; \
name##2 = SampleLayer(TEXTURE2D_PARAM(textureName##2, sampler##textureName##0), layerCoord, 2).##swizzle; \
name##3 = SampleLayer(TEXTURE2D_PARAM(textureName##3, sampler##textureName##0), layerCoord, 3).##swizzle;
#define PROP_MUL(name, multiplier, swizzle)\
name##0 *= multiplier##0.##swizzle; \
name##1 *= multiplier##1.##swizzle; \

#define PROP_BLEND_COLOR(name, mask) name = BlendLayeredColor(name##0, name##1, name##2, name##3, mask);
#define PROP_BLEND_SCALAR(name, mask) name = BlendLayeredScalar(name##0, name##1, name##2, name##3, mask);
#define _MAX_LAYER 4
#if defined(_LAYEREDLIT_4_LAYERS)
# define _LAYER_COUNT 4
#elif defined(_LAYEREDLIT_3_LAYERS)
# define _LAYER_COUNT 3
#else
# define _LAYER_COUNT 2
#endif
//-------------------------------------------------------------------------------------
// variable declaration
//-------------------------------------------------------------------------------------

PROP_DECL(float, _HeightBias);
PROP_DECL(float3, _EmissiveColor);
PROP_DECL(float, _EmissiveIntensity);
PROP_DECL(float, _LayerSize);
float _AlphaCutoff;
TEXTURE2D(_LayerMaskMap);

#include "../../Material/Material.hlsl"
#include "../Lit/LitData.hlsl"
#include "../Lit/LitSharePass.hlsl"
#include "../Lit/LitDebugPass.hlsl"
#include "../../ShaderPass/ShaderPassDebugViewMaterial.hlsl"

{
Name "ShadowCaster"
Tags{ "LightMode" = "ShadowCaster" }
Cull[_CullMode]
ZWrite On ZTest LEqual
HLSLPROGRAM
#pragma vertex Vert
#pragma fragment Frag
#define SHADERPASS SHADERPASS_DEPTH_ONLY
#define LAYERED_LIT_SHADER
#include "../../Material/Material.hlsl"
#include "../Lit/LitData.hlsl"
#include "../Lit/LitDepthPass.hlsl"
#include "../../ShaderPass/ShaderPassDepthOnly.hlsl"
ENDHLSL
}
Pass
{
Name "DepthOnly"
Tags{ "LightMode" = "DepthOnly" }
Cull[_CullMode]

29
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/Lit.shader


#include "common.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderConfig.cs.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderVariables.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderPass/ShaderPass.cs.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Material/Attributes.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderPass/ShaderPass.cs.hlsl"
//-------------------------------------------------------------------------------------
// variable declaration

#include "../../Material/Material.hlsl"
#include "LitData.hlsl"
#include "LitSharePass.hlsl"
#include "LitDebugPass.hlsl"
#include "../../ShaderPass/ShaderPassDebugViewMaterial.hlsl"

{
Name "ShadowCaster"
Tags{ "LightMode" = "ShadowCaster" }
Cull[_CullMode]
ZWrite On ZTest LEqual
HLSLPROGRAM
#pragma vertex Vert
#pragma fragment Frag
#define SHADERPASS SHADERPASS_DEPTH_ONLY
#include "../../Material/Material.hlsl"
#include "LitData.hlsl"
#include "LitDepthPass.hlsl"
#include "../../ShaderPass/ShaderPassDepthOnly.hlsl"
ENDHLSL
}
Pass
{
Name "DepthOnly"
Tags{ "LightMode" = "DepthOnly" }
Cull[_CullMode]

128
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitData.hlsl


//-------------------------------------------------------------------------------------
// FragInput
// This structure gather all possible varying/interpolator for this shader.
//-------------------------------------------------------------------------------------
struct FragInput
{
float4 unPositionSS; // This is the position return by VPOS (That is name positionCS in PackedVarying), only xy is use
float3 positionWS;
float2 texCoord0;
float2 texCoord1;
float2 texCoord2;
float3 tangentToWorld[3];
// For velocity
// Note: Z component is not use
float4 positionCS; // This is the clip spae position. Warning, do not confuse with the value of positionCS in PackedVarying which is VPOS and store in unPositionSS
float4 previousPositionCS;
// For two sided lighting
bool isFrontFace;
};
//-------------------------------------------------------------------------------------
// Fill SurfaceData/Builtin data function

#if !defined(LAYERED_LIT_SHADER)
void GetSurfaceAndBuiltinData(FragInput input, out SurfaceData surfaceData, out BuiltinData builtinData)
{
{
#ifdef _HEIGHTMAP
// TODO: in case of shader graph, a node like parallax must be nullify if use to generate code for Meta pass
#ifndef _HEIGHTMAP_AS_DISPLACEMENT

outWeights[0] = left;
}
float2 ComputePlanarXZCoord(float3 worldPos, float layerSize)
{
return frac(worldPos.xz / layerSize);
}
void ComputeLayerCoordinates(out LayerCoordinates outCoord, FragInput input)
{
#if defined(_LAYER_MAPPING_UV1_0)
outCoord.texcoord[0] = input.texCoord1;
outCoord.isTriplanar[0] = false;
#elif defined(_LAYER_MAPPING_PLANAR_0)
outCoord.texcoord[0] = ComputePlanarXZCoord(input.positionWS, _LayerSize0);
outCoord.isTriplanar[0] = false;
#elif defined(_LAYER_MAPPING_TRIPLANAR_0)
outCoord.texcoord[0] = input.texCoord0;
outCoord.isTriplanar[0] = true;
#else
outCoord.texcoord[0] = input.texCoord0;
outCoord.isTriplanar[0] = false;
#endif
#if defined(_LAYER_MAPPING_UV1_1)
outCoord.texcoord[1] = input.texCoord1;
outCoord.isTriplanar[1] = false;
#elif defined(_LAYER_MAPPING_PLANAR_1)
outCoord.texcoord[1] = ComputePlanarXZCoord(input.positionWS, _LayerSize1);
outCoord.isTriplanar[1] = false;
#elif defined(_LAYER_MAPPING_TRIPLANAR_1)
outCoord.texcoord[1] = input.texCoord0;
outCoord.isTriplanar[1] = true;
#else
outCoord.texcoord[1] = input.texCoord0;
outCoord.isTriplanar[1] = false;
#endif
#if defined(_LAYER_MAPPING_UV1_2)
outCoord.texcoord[2] = input.texCoord1;
outCoord.isTriplanar[2] = false;
#elif defined(_LAYER_MAPPING_PLANAR_2)
outCoord.texcoord[2] = ComputePlanarXZCoord(input.positionWS, _LayerSize2);
outCoord.isTriplanar[2] = false;
#elif defined(_LAYER_MAPPING_TRIPLANAR_2)
outCoord.texcoord[2] = input.texCoord0;
outCoord.isTriplanar[2] = true;
#else
outCoord.texcoord[2] = input.texCoord0;
outCoord.isTriplanar[2] = false;
#endif
#if defined(_LAYER_MAPPING_UV1_3)
outCoord.texcoord[3] = input.texCoord1;
outCoord.isTriplanar[3] = false;
#elif defined(_LAYER_MAPPING_PLANAR_3)
outCoord.texcoord[3] = ComputePlanarXZCoord(input.positionWS, _LayerSize3);
outCoord.isTriplanar[3] = false;
#elif defined(_LAYER_MAPPING_TRIPLANAR_3)
outCoord.texcoord[3] = input.texCoord0;
outCoord.isTriplanar[3] = true;
#else
outCoord.texcoord[3] = input.texCoord0;
outCoord.isTriplanar[3] = false;
#endif
}
LayerCoordinates layerCoord;
ComputeLayerCoordinates(layerCoord, input);
float3 maskValues = float3(0.0, 0.0, 0.0);// input.vertexColor;
float3 maskValues = float3(0.0, 0.0, 0.0);
#ifdef _LAYERMASKMAP
#if defined(_LAYER_MASK_MAP)
#if defined(_LAYER_MASK_VERTEX_COLOR)
maskValues = input.vertexColor.rgb;
#endif
#if defined(_LAYER_MASK_MAP) && defined(_LAYER_MASK_VERTEX_COLOR)
maskValues = input.vertexColor.rgb * SAMPLE_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, input.texCoord0).rgb;
#endif
PROP_SAMPLE(baseColor, _BaseColorMap, input.texCoord0, rgb);
PROP_SAMPLE(baseColor, _BaseColorMap, layerCoord, rgb);
PROP_MUL(baseColor, _BaseColor, rgb);
PROP_BLEND_COLOR(baseColor, weights);

#ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
PROP_ASSIGN(alpha, _BaseColor, a);
#else
PROP_SAMPLE(alpha, _BaseColorMap, input.texCoord0, a);
PROP_SAMPLE(alpha, _BaseColorMap, layerCoord, a);
PROP_MUL(alpha, _BaseColor, a);
#endif
PROP_BLEND_SCALAR(alpha, weights);

PROP_DECL(float, specularOcclusion);
#ifdef _SPECULAROCCLUSIONMAP
// TODO: Do something. For now just take alpha channel
PROP_SAMPLE(specularOcclusion, _SpecularOcclusionMap, input.texCoord0, a);
PROP_SAMPLE(specularOcclusion, _SpecularOcclusionMap, layerCoord, a);
#else
// Horizon Occlusion for Normal Mapped Reflections: http://marmosetco.tumblr.com/post/81245981087
//surfaceData.specularOcclusion = saturate(1.0 + horizonFade * dot(r, input.tangentToWorld[2].xyz);

#ifdef _NORMALMAP
#ifdef _NORMALMAP_TANGENT_SPACE
float3 normalTS0 = UnpackNormalAG(SAMPLE_TEXTURE2D(_NormalMap0, sampler_NormalMap0, input.texCoord0));
float3 normalTS1 = UnpackNormalAG(SAMPLE_TEXTURE2D(_NormalMap1, sampler_NormalMap0, input.texCoord0));
float3 normalTS2 = UnpackNormalAG(SAMPLE_TEXTURE2D(_NormalMap2, sampler_NormalMap0, input.texCoord0));
float3 normalTS3 = UnpackNormalAG(SAMPLE_TEXTURE2D(_NormalMap3, sampler_NormalMap0, input.texCoord0));
float3 normalTS0 = UnpackNormalAG(SampleLayer(TEXTURE2D_PARAM(_NormalMap0, sampler_NormalMap0), layerCoord, 0));
float3 normalTS1 = UnpackNormalAG(SampleLayer(TEXTURE2D_PARAM(_NormalMap1, sampler_NormalMap0), layerCoord, 1));
float3 normalTS2 = UnpackNormalAG(SampleLayer(TEXTURE2D_PARAM(_NormalMap2, sampler_NormalMap0), layerCoord, 2));
float3 normalTS3 = UnpackNormalAG(SampleLayer(TEXTURE2D_PARAM(_NormalMap3, sampler_NormalMap0), layerCoord, 3));
float3 normalTS = BlendLayeredNormal(normalTS0, normalTS1, normalTS2, normalTS3, weights);

PROP_DECL(float, perceptualSmoothness);
#ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
PROP_SAMPLE(perceptualSmoothness, _BaseColorMap, input.texCoord0, a);
PROP_SAMPLE(perceptualSmoothness, _BaseColorMap, layerCoord, a);
PROP_SAMPLE(perceptualSmoothness, _MaskMap, input.texCoord0, a);
PROP_SAMPLE(perceptualSmoothness, _MaskMap, layerCoord, a);
#else
PROP_ASSIGN_VALUE(perceptualSmoothness, 1.0);
#endif

PROP_DECL(float, metallic);
PROP_DECL(float, ambientOcclusion);
#ifdef _MASKMAP
PROP_SAMPLE(metallic, _MaskMap, input.texCoord0, a);
PROP_SAMPLE(ambientOcclusion, _MaskMap, input.texCoord0, g);
PROP_SAMPLE(metallic, _MaskMap, layerCoord, a);
PROP_SAMPLE(ambientOcclusion, _MaskMap, layerCoord, g);
#else
PROP_ASSIGN_VALUE(metallic, 1.0);
PROP_ASSIGN_VALUE(ambientOcclusion, 1.0);

PROP_DECL(float3, emissiveColor);
#ifdef _EMISSIVE_COLOR
#ifdef _EMISSIVE_COLOR_MAP
PROP_SAMPLE(emissiveColor, _EmissiveColorMap, input.texCoord0, rgb);
PROP_SAMPLE(emissiveColor, _EmissiveColorMap, layerCoord, rgb);
PROP_SAMPLE(emissiveColor, _MaskMap, input.texCoord0, bbb);
PROP_SAMPLE(emissiveColor, _MaskMap, layerCoord, bbb);
PROP_MUL(emissiveColor, baseColor, rgb);
#else
PROP_ASSIGN_VALUE(emissiveColor, float3(0.0, 0.0, 0.0));

16
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitSharePass.hlsl


float2 uv2 : TEXCOORD2;
#endif
float4 tangentOS : TANGENT; // Always present as we require it also in case of anisotropic lighting
float4 color : COLOR;
// UNITY_INSTANCE_ID
};

float2 texCoord2;
#endif
float3 tangentToWorld[3];
float4 color;
};
struct PackedVaryings

float4 interpolators[5] : TEXCOORD0;
float4 interpolators[6] : TEXCOORD0;
float4 interpolators[4] : TEXCOORD0;
float4 interpolators[5] : TEXCOORD0;
#endif
#if SHADER_STAGE_FRAGMENT

output.interpolators[1].w = input.texCoord0.y;
output.interpolators[2].w = input.texCoord1.x;
output.interpolators[3].w = input.texCoord1.y;
output.interpolators[4] = input.color;
output.interpolators[4] = float4(input.texCoord2.xy, 0.0, 0.0);
output.interpolators[5] = float4(input.texCoord2.xy, 0.0, 0.0);
#endif
return output;

output.texCoord0.xy = float2(input.interpolators[0].w, input.interpolators[1].w);
output.texCoord1.xy = float2(input.interpolators[2].w, input.interpolators[3].w);
output.vertexColor = input.interpolators[4];
output.texCoord2 = input.interpolators[4].xy;
output.texCoord2 = input.interpolators[5].xy;
#endif
#if SHADER_STAGE_FRAGMENT

output.tangentToWorld[0] = tangentToWorld[0];
output.tangentToWorld[1] = tangentToWorld[1];
output.tangentToWorld[2] = tangentToWorld[2];
output.color = input.color;
return PackVaryings(output);
}

16
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/Unlit.shader


#include "common.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderConfig.cs.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/ShaderVariables.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Material/Attributes.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.hlsl"
//-------------------------------------------------------------------------------------
// variable declaration

#define SHADERPASS SHADERPASS_DEBUG_VIEW_MATERIAL
#include "../../Material/Material.hlsl"
#include "UnlitData.hlsl"
#include "UnlitShare.hlsl"
void GetVaryingsDataDebug(uint paramId, FragInput input, inout float3 result, inout bool needLinearToSRGB)
{
switch (paramId)
{
case DEBUGVIEW_VARYING_TEXCOORD0:
result = float3(input.texCoord0 * 0.5 + 0.5, 0.0);
break;
}
}
#include "UnlitSharePass.hlsl"
#include "../../ShaderPass/ShaderPassDebugViewMaterial.hlsl"

#define SHADERPASS SHADERPASS_FORWARD_UNLIT
#include "../../Material/Material.hlsl"
#include "UnlitData.hlsl"
#include "UnlitShare.hlsl"
#include "UnlitSharePass.hlsl"
#include "../../ShaderPass/ShaderPassForwardUnlit.hlsl"

11
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/UnlitData.hlsl


//-------------------------------------------------------------------------------------
// FragInput
// This structure gather all possible varying/interpolator for this shader.
//-------------------------------------------------------------------------------------
struct FragInput
{
float4 unPositionSS;
float2 texCoord0;
float2 texCoord1;
};
//-------------------------------------------------------------------------------------
// Fill SurfaceData/Builtin data function

2
Assets/ScriptableRenderLoop/HDRenderLoop/ShaderPass/ShaderPassDebugViewMaterial.hlsl


BSDFData bsdfData = ConvertSurfaceDataToBSDFData(surfaceData);
float3 result = float3(1.0, 1.0, 0.0);
float3 result = float3(1.0, 0.0, 1.0);
bool needLinearToSRGB = false;
GetVaryingsDataDebug(_DebugViewMaterial, input, result, needLinearToSRGB);

2
Assets/ScriptableRenderLoop/ShaderLibrary/API/D3D11.hlsl


#define UNITY_UV_STARTS_AT_TOP 1
#define UNITY_REVERSED_Z 1
#define UNITY_NEAR_CLIP_VALUE (1.0)
// This value will not go through any matrix projection convertion
#define UNITY_RAW_FAR_CLIP_VALUE (0.0)
#define FRONT_FACE_SEMATIC SV_IsFrontFace
#define FRONT_FACE_TYPE bool
#define IS_FRONT_VFACE(VAL, FRONT, BACK) ((VAL) ? (FRONT) : (BACK))

21
Assets/ScriptableRenderLoop/ShaderLibrary/CommonLighting.hlsl


#ifndef UNITY_COMMON_LIGHTING_INCLUDED
#define UNITY_COMMON_LIGHTING_INCLUDED
// These clamping function to max of floating point 16 bit are use to prevent INF in code in case of extreme value
float ClampToFloat16Max(float value)
{
return min(value, 65504.0);
}
float2 ClampToFloat16Max(float2 value)
{
return min(value, 65504.0);
}
float3 ClampToFloat16Max(float3 value)
{
return min(value, 65504.0);
}
float4 ClampToFloat16Max(float4 value)
{
return min(value, 65504.0);
}
// Ligthing convention
// Light direction is oriented backward (-Z). i.e in shader code, light direction is -lightData.forward

22
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/Layered.mat


m_Name: Layered
m_Shader: {fileID: 4800000, guid: 81d02e8644315b742b154842a3a2f98c, type: 3}
m_ShaderKeywords: _ALPHACUTOFFENABLE_OFF _DISTORTIONDEPTHTEST_OFF _DISTORTIONONLY_OFF
_EMISSION _LAYEREDLIT_4_LAYER _LAYEREDLIT_4_LAYERS _LAYERMASKMAP _MASKMAP _NORMALMAP
_NORMALMAP_TANGENT_SPACE
_EMISSION _LAYEREDLIT_4_LAYER _LAYEREDLIT_4_LAYERS _LAYERMASKMAP _LAYER_MAPPING_PLANAR0
_LAYER_MAPPING_PLANAR_0 _LAYER_MAPPING_PLANAR_1 _LAYER_MAPPING_UV1_2 _LAYER_MASK_VERTEX_COLOR
_MASKMAP _NORMALMAP _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}

m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _LayerMaskMap:
m_Texture: {fileID: 2800000, guid: 6b43fa9736beb354dba359b5d2ec3699, type: 3}
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:

- _HeightScale2: 1
- _HeightScale3: 1
- _LayerCount: 4
- _LayerMapping0: 2
- _LayerMapping1: 2
- _LayerMapping2: 1
- _LayerMapping3: 0
- _LayerMaskVertexColor: 1
- _LayerSize0: 4
- _LayerSize1: 4
- _LayerSize2: 1
- _LayerSize3: 1
- _LayerTiling0: 10
- _LayerTiling1: 10
- _LayerTiling2: 1
- _LayerTiling3: 1
- _MaterialId: 0
- _Metalic: 0
- _Metalic0: 0

- _BaseColor0: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor1: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor2: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor3: {r: 0, g: 0, b: 0, a: 1}
- _BaseColor3: {r: 1, g: 0, b: 0, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}

31
Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs


using UnityEngine;
namespace UnityEngine.Experimental.ScriptableRenderLoop
{
namespace Attributes
{
// 0 is reserved!
[GenerateHLSL]
public enum DebugViewVarying
{
Texcoord0 = 1,
Texcoord1,
Texcoord2,
Texcoord3,
VertexTangentWS,
VertexBitangentWS,
VertexNormalWS,
VertexColor,
VertexColorAlpha,
};
// Number must be contiguous
[GenerateHLSL]
public enum DebugViewGbuffer
{
Depth = DebugViewVarying.VertexColor + 1,
BakeDiffuseLighting,
}
}
} // namespace UnityEngine.Experimental.ScriptableRenderLoop

27
Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.hlsl


//
// This file was automatically generated from Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs. Please don't edit by hand.
//
#ifndef DEBUGVIEWMATERIAL_CS_HLSL
#define DEBUGVIEWMATERIAL_CS_HLSL
//
// UnityEngine.Experimental.ScriptableRenderLoop.Attributes.DebugViewVarying: static fields
//
#define DEBUGVIEWVARYING_TEXCOORD0 (1)
#define DEBUGVIEWVARYING_TEXCOORD1 (2)
#define DEBUGVIEWVARYING_TEXCOORD2 (3)
#define DEBUGVIEWVARYING_TEXCOORD3 (4)
#define DEBUGVIEWVARYING_VERTEX_TANGENT_WS (5)
#define DEBUGVIEWVARYING_VERTEX_BITANGENT_WS (6)
#define DEBUGVIEWVARYING_VERTEX_NORMAL_WS (7)
#define DEBUGVIEWVARYING_VERTEX_COLOR (8)
#define DEBUGVIEWVARYING_VERTEX_COLOR_ALPHA (9)
//
// UnityEngine.Experimental.ScriptableRenderLoop.Attributes.DebugViewGbuffer: static fields
//
#define DEBUGVIEWGBUFFER_DEPTH (9)
#define DEBUGVIEWGBUFFER_BAKE_DIFFUSE_LIGHTING (10)
#endif

9
Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.hlsl.meta


fileFormatVersion: 2
guid: 972a0c56f0332c84f95914786d1f2f4b
timeCreated: 1479292942
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

12
Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.meta


fileFormatVersion: 2
guid: 4a6949840f48a7948a9610d89e539bf9
timeCreated: 1479292895
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

60
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Attributes.hlsl


//-------------------------------------------------------------------------------------
// FragInput
// This structure gather all possible varying/interpolator for this shader.
//-------------------------------------------------------------------------------------
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.hlsl"
struct FragInput
{
float4 unPositionSS; // This is the position return by VPOS (That is name positionCS in PackedVarying), only xy is use
float3 positionWS;
float2 texCoord0;
float2 texCoord1;
float2 texCoord2;
float2 texCoord3;
float3 tangentToWorld[3];
float4 vertexColor;
// For velocity
// Note: Z component is not use
float4 positionCS; // This is the clip spae position. Warning, do not confuse with the value of positionCS in PackedVarying which is VPOS and store in unPositionSS
float4 previousPositionCS;
// For two sided lighting
bool isFrontFace;
};
void GetVaryingsDataDebug(uint paramId, FragInput input, inout float3 result, inout bool needLinearToSRGB)
{
switch (paramId)
{
case DEBUGVIEWVARYING_TEXCOORD0:
result = float3(input.texCoord0 * 0.5 + 0.5, 0.0);
break;
case DEBUGVIEWVARYING_TEXCOORD1:
result = float3(input.texCoord1 * 0.5 + 0.5, 0.0);
break;
case DEBUGVIEWVARYING_TEXCOORD2:
result = float3(input.texCoord2 * 0.5 + 0.5, 0.0);
break;
case DEBUGVIEWVARYING_TEXCOORD3:
result = float3(input.texCoord3 * 0.5 + 0.5, 0.0);
break;
case DEBUGVIEWVARYING_VERTEX_TANGENT_WS:
result = input.tangentToWorld[0].xyz * 0.5 + 0.5;
break;
case DEBUGVIEWVARYING_VERTEX_BITANGENT_WS:
result = input.tangentToWorld[1].xyz * 0.5 + 0.5;
break;
case DEBUGVIEWVARYING_VERTEX_NORMAL_WS:
result = input.tangentToWorld[2].xyz * 0.5 + 0.5;
break;
case DEBUGVIEWVARYING_VERTEX_COLOR:
result = input.vertexColor.rgb; needLinearToSRGB = true;
break;
case DEBUGVIEWVARYING_VERTEX_COLOR_ALPHA:
result = input.vertexColor.aaa;
break;
}
}

9
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Attributes.hlsl.meta


fileFormatVersion: 2
guid: 6d56e29698894b440905cc5d63814ef9
timeCreated: 1479292899
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

9
Assets/ScriptableRenderLoop/HDRenderLoop/Sky.meta


fileFormatVersion: 2
guid: d7469c05ebee66f4886264af0ab8bf2a
folderAsset: yes
timeCreated: 1479239906
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

1001
Assets/TestScenes/HDTest/LayeredLitTest.unity
文件差异内容过多而无法显示
查看文件

8
Assets/TestScenes/HDTest/LayeredLitTest.unity.meta


fileFormatVersion: 2
guid: 24eac3913fb63b147a2e2e6649ab56aa
timeCreated: 1479291192
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered.meta


fileFormatVersion: 2
guid: cabfe187baa4b2a448047e9ccb6bab31
folderAsset: yes
timeCreated: 1479292304
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/Resources.meta


fileFormatVersion: 2
guid: 4cdc45a9a65126a42aca158413a5b089
folderAsset: yes
timeCreated: 1479239906
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/Resources/SkyHDRI.shader.meta


fileFormatVersion: 2
guid: 0e7a148852dbc8f47a32e829517574ff
timeCreated: 1479239909
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

72
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/Resources/SkyHDRI.shader


Shader "Hidden/HDRenderLoop/SkyHDRI"
{
SubShader
{
Pass
{
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha // We will lerp only the values that are valid
HLSLPROGRAM
#pragma target 5.0
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev
#pragma vertex Vert
#pragma fragment Frag
#include "Common.hlsl"
#include "CommonLighting.hlsl"
TEXTURECUBE(_Cubemap);
SAMPLERCUBE(sampler_Cubemap);
float4 _SkyParam; // x exposure, y multiplier, z rotation
struct Attributes
{
float3 positionCS : POSITION;
float3 eyeVector : NORMAL;
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float3 eyeVector : TEXCOORD0;
};
Varyings Vert(Attributes input)
{
// TODO: implement SV_vertexID full screen quad
Varyings output;
output.positionCS = float4(input.positionCS.xy, UNITY_RAW_FAR_CLIP_VALUE
#if UNITY_REVERSED_Z
+ 0.000001
#else
- 0.000001
#endif
, 1.0);
output.eyeVector = input.eyeVector;
return output;
}
float4 Frag(Varyings input) : SV_Target
{
float3 dir = normalize(input.eyeVector);
// Rotate direction
float phi = _SkyParam.z * PI / 180.0; // Convert to radiant
float cosPhi, sinPhi;
sincos(phi, cosPhi, sinPhi);
float3 rotDirX = float3(cosPhi, 0, sinPhi);
float3 rotDirY = float3(sinPhi, 0, -cosPhi);
dir = float3(dot(rotDirX, dir), dir.y, dot(rotDirY, dir));
return ClampToFloat16Max(SAMPLE_TEXTURECUBE_LOD(_Cubemap, sampler_Cubemap, dir, 0) * exp2(_SkyParam.x) * _SkyParam.y);
}
ENDHLSL
}
}
Fallback Off
}

8
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/Layered.mat.meta


fileFormatVersion: 2
guid: 6e7fa39a7d1b15c4184c9f51d86eba22
timeCreated: 1479298680
licenseType: Pro
NativeFormatImporter:
userData: '{"GUIDArray":["01fa3be727161d249a81ad7065c15459","3acf8f156d29e494e8cd196462d1a17c","62b3c923bc540b94a803550e9927936a","c569253e641dc934db7c3595b31890da"]}'
assetBundleName:
assetBundleVariant:

15
Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.hlsl


// CAUTION: 0 is a reserved numbers meaning there is no debug view mode
// All number below folow each others!
// Must be in sync with DebugViewVaryingMode
#define DEBUGVIEW_VARYING_TEXCOORD0 1
#define DEBUGVIEW_VARYING_TEXCOORD1 2
#define DEBUGVIEW_VARYING_TEXCOORD2 3
#define DEBUGVIEW_VARYING_VERTEXTANGENTWS 4
#define DEBUGVIEW_VARYING_VERTEXBITANGENTWS 5
#define DEBUGVIEW_VARYING_VERTEXNORMALWS 6
#define DEBUGVIEW_VARYING_VERTEXCOLOR 7
// These define are sepcific to GBuffer
#define DEBUGVIEW_GBUFFER_DEPTH 10
#define DEBUGVIEW_GBUFFER_BAKEDIFFUSELIGHTING 11

9
Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.hlsl.meta


fileFormatVersion: 2
guid: 9048292f91ac48d479ce668c5aabf122
timeCreated: 1476053153
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

28
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitDebugPass.hlsl


#ifndef SHADERPASS
#error Undefine_SHADERPASS
#endif
void GetVaryingsDataDebug(uint paramId, FragInput input, inout float3 result, inout bool needLinearToSRGB)
{
switch (paramId)
{
case DEBUGVIEW_VARYING_TEXCOORD0:
result = float3(input.texCoord0 * 0.5 + 0.5, 0.0);
break;
case DEBUGVIEW_VARYING_TEXCOORD1:
result = float3(input.texCoord1 * 0.5 + 0.5, 0.0);
break;
case DEBUGVIEW_VARYING_TEXCOORD2:
result = float3(input.texCoord2 * 0.5 + 0.5, 0.0);
break;
case DEBUGVIEW_VARYING_VERTEXTANGENTWS:
result = input.tangentToWorld[0].xyz * 0.5 + 0.5;
break;
case DEBUGVIEW_VARYING_VERTEXBITANGENTWS:
result = input.tangentToWorld[1].xyz * 0.5 + 0.5;
break;
case DEBUGVIEW_VARYING_VERTEXNORMALWS:
result = input.tangentToWorld[2].xyz * 0.5 + 0.5;
break;
}
}

9
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitDebugPass.hlsl.meta


fileFormatVersion: 2
guid: afea19c25b5e93847af6262c2c00401f
timeCreated: 1478601047
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

8
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered.mat.meta


fileFormatVersion: 2
guid: 6e7fa39a7d1b15c4184c9f51d86eba22
timeCreated: 1478788268
licenseType: Pro
NativeFormatImporter:
userData: '{"GUIDArray":["01fa3be727161d249a81ad7065c15459","3acf8f156d29e494e8cd196462d1a17c","62b3c923bc540b94a803550e9927936a","c569253e641dc934db7c3595b31890da"]}'
assetBundleName:
assetBundleVariant:

8
Assets/TestScenes/HDTest/JulienTest.unity.meta


fileFormatVersion: 2
guid: 2f8109075b126c745a0b6a02aa1b07d6
timeCreated: 1475571359
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

1001
Assets/TestScenes/HDTest/JulienTest.unity
文件差异内容过多而无法显示
查看文件

/Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/UnlitShare.hlsl.meta → /Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/UnlitSharePass.hlsl.meta

/Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/UnlitShare.hlsl → /Assets/ScriptableRenderLoop/HDRenderLoop/Material/Unlit/UnlitSharePass.hlsl

/Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/LayerMask.tga → /Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/LayerMask.tga

/Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/LayerMask.tga.meta → /Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/LayerMask.tga.meta

/Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered.mat → /Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Layered/Layered.mat

正在加载...
取消
保存