浏览代码
Merge remote-tracking branch 'refs/remotes/origin/master' into Update-POM-+-Heightmap-behavior
/Branch_Batching2
Merge remote-tracking branch 'refs/remotes/origin/master' into Update-POM-+-Heightmap-behavior
/Branch_Batching2
sebastienlagarde
8 年前
当前提交
264abb2c
共有 17 个文件被更改,包括 1634 次插入 和 96 次删除
-
106Assets/ScriptableRenderLoop/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs
-
8Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.asset
-
177Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.cs
-
38Assets/ScriptableRenderLoop/HDRenderPipeline/Utilities.cs
-
26Assets/ScriptableRenderLoop/RenderPasses/ShadowRenderPass.cs
-
26ProjectSettings/ProjectSettings.asset
-
50Assets/ScriptableRenderLoop/HDRenderPipeline/Debug/HDRenderPipelineDebug.cs
-
12Assets/ScriptableRenderLoop/HDRenderPipeline/Debug/HDRenderPipelineDebug.cs.meta
-
82Assets/ScriptableRenderLoop/HDRenderPipeline/Debug/Resources/DebugDisplayShadowMap.shader
-
9Assets/ScriptableRenderLoop/HDRenderPipeline/Debug/Resources/DebugDisplayShadowMap.shader.meta
-
9Assets/TestScenes/HDTest/CascadedShadowsTest.meta
-
1001Assets/TestScenes/HDTest/CascadedShadowsTest.unity
-
8Assets/TestScenes/HDTest/CascadedShadowsTest.unity.meta
-
160Assets/TestScenes/HDTest/CascadedShadowsTest/Lit_Gray.mat
-
9Assets/TestScenes/HDTest/CascadedShadowsTest/Lit_Gray.mat.meta
-
9Assets/TestScenes/HDTest/HDRenderLoopTest.meta
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using System; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
[Serializable] |
|||
public class GlobalDebugParameters |
|||
{ |
|||
public float debugOverlayRatio = 0.33f; |
|||
public bool displayDebug = false; |
|||
public bool displayShadowDebug = false; |
|||
|
|||
public ShadowDebugParameters shadowDebugParameters = new ShadowDebugParameters(); |
|||
} |
|||
|
|||
public class DebugParameters |
|||
{ |
|||
// Material Debugging
|
|||
public int debugViewMaterial = 0; |
|||
|
|||
// Rendering debugging
|
|||
public bool displayOpaqueObjects = true; |
|||
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 useDistortion = true; |
|||
|
|||
// we have to fallback to forward-only rendering when scene view is using wireframe rendering mode --
|
|||
// as rendering everything in wireframe + deferred do not play well together
|
|||
public bool ShouldUseForwardRenderingOnly() { return useForwardRenderingOnly || GL.wireframe; } |
|||
} |
|||
|
|||
public enum ShadowDebugMode |
|||
{ |
|||
None, |
|||
VisualizeAtlas, |
|||
VisualizeShadowMap |
|||
} |
|||
|
|||
[Serializable] |
|||
public class ShadowDebugParameters |
|||
{ |
|||
public bool enableShadows = true; |
|||
public ShadowDebugMode visualizationMode = ShadowDebugMode.None; |
|||
public uint visualizeShadowMapIndex = 0; |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: ae82efafe32ed1042a9360276bee62e6 |
|||
timeCreated: 1485277036 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Hidden/HDRenderPipeline/DebugDisplayShadowMap" |
|||
{ |
|||
SubShader |
|||
{ |
|||
Pass |
|||
{ |
|||
ZWrite Off |
|||
ZTest Off |
|||
Blend One Zero |
|||
Cull Off |
|||
|
|||
HLSLPROGRAM |
|||
#pragma target 4.5 |
|||
#pragma only_renderers d3d11 ps4 metal // TEMP: unitl we go futher in dev |
|||
|
|||
#pragma vertex Vert |
|||
#pragma fragment Frag |
|||
|
|||
#include "Common.hlsl" |
|||
|
|||
TEXTURE2D(g_tShadowBuffer); |
|||
|
|||
TEXTURE2D(_DummyTexture); |
|||
SAMPLER2D(sampler_DummyTexture); |
|||
|
|||
float4 _TextureScaleBias; |
|||
|
|||
struct Attributes |
|||
{ |
|||
uint vertexID : SV_VertexID; |
|||
}; |
|||
|
|||
struct Varyings |
|||
{ |
|||
float4 positionCS : SV_POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
|
|||
Varyings Vert(Attributes input) |
|||
{ |
|||
float4 positions[] = |
|||
{ |
|||
float4(-1.0, -1.0, 0.0f, 1.0), |
|||
float4( 1.0, -1.0, 0.0f, 1.0), |
|||
float4( 1.0, 1.0, 0.0f, 1.0), |
|||
|
|||
float4( 1.0, 1.0, 0.0f, 1.0), |
|||
float4(-1.0, 1.0, 0.0f, 1.0), |
|||
float4(-1.0, -1.0, 0.0f, 1.0) |
|||
}; |
|||
|
|||
float2 texcoords[] = |
|||
{ |
|||
float2(0.0, 1.0), |
|||
float2(1.0, 1.0), |
|||
float2(1.0, 0.0), |
|||
|
|||
float2(1.0, 0.0), |
|||
float2(0.0, 0.0), |
|||
float2(0.0, 1.0), |
|||
}; |
|||
|
|||
Varyings output; |
|||
output.positionCS = positions[input.vertexID]; |
|||
output.texcoord = texcoords[input.vertexID] * _TextureScaleBias.xy + _TextureScaleBias.zw; |
|||
|
|||
return output; |
|||
} |
|||
|
|||
float4 Frag(Varyings input) : SV_Target |
|||
{ |
|||
// We need the dummy texture for the sampler, but we also need to sample it in order not to get a compile error. |
|||
float4 dummy = SAMPLE_TEXTURE2D(_DummyTexture, sampler_DummyTexture, input.texcoord) * 0.00001; |
|||
return SAMPLE_TEXTURE2D(g_tShadowBuffer, sampler_DummyTexture, input.texcoord).xxxx + dummy; |
|||
} |
|||
|
|||
ENDHLSL |
|||
} |
|||
|
|||
} |
|||
Fallback Off |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: ee25e539f5594f44085e0a9000c15d9b |
|||
timeCreated: 1476053153 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: ab939294412b89e49b889738eeeb844a |
|||
folderAsset: yes |
|||
timeCreated: 1485274537 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/TestScenes/HDTest/CascadedShadowsTest.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: e30864c7c4266b24cb1c708c206200a6 |
|||
timeCreated: 1483527925 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: Lit_Gray |
|||
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} |
|||
m_ShaderKeywords: _ALPHACUTOFFENABLE_OFF _DEPTHOFFSETENABLE_OFF _DETAIL_MAP_WITH_NORMAL |
|||
_DISTORTIONDEPTHTEST_OFF _DISTORTIONENABLE_OFF _DISTORTIONONLY_OFF _ENABLEPERPIXELDISPLACEMENT_OFF |
|||
_NORMALMAP_TANGENT_SPACE |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: |
|||
- DistortionVectors |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _AnisotropyMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _BaseColorMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _DetailAlbedoMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _DetailMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _DetailMask: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _DetailNormalMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _DistortionVectorMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _EmissionMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _EmissiveColorMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _HeightMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MainTex: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MaskMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MetallicGlossMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _NormalMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _OcclusionMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _ParallaxMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _SpecularOcclusionMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _SubSurfaceRadiusMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _TangentMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
m_Floats: |
|||
- _AlphaCutoff: 0.5 |
|||
- _AlphaCutoffEnable: 0 |
|||
- _Anisotropy: 0 |
|||
- _BlendMode: 0 |
|||
- _BumpScale: 1 |
|||
- _CullMode: 2 |
|||
- _Cutoff: 0.5 |
|||
- _DepthOffsetEnable: 0 |
|||
- _DetailAOScale: 1 |
|||
- _DetailAlbedoScale: 1 |
|||
- _DetailHeightScale: 1 |
|||
- _DetailMapMode: 0 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DetailNormalScale: 1 |
|||
- _DetailSmoothnessScale: 1 |
|||
- _DistortionDepthTest: 0 |
|||
- _DistortionEnable: 0 |
|||
- _DistortionOnly: 0 |
|||
- _DoubleSidedMode: 0 |
|||
- _DstBlend: 0 |
|||
- _EmissiveColorMode: 1 |
|||
- _EmissiveIntensity: 0 |
|||
- _EnablePerPixelDisplacement: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _HeightAmplitude: 0.01 |
|||
- _HeightCenter: 0.5 |
|||
- _MaterialId: 0 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _NormalMapSpace: 0 |
|||
- _NormalScale: 1 |
|||
- _OcclusionStrength: 1 |
|||
- _PPDMaxSamples: 15 |
|||
- _PPDMinSamples: 5 |
|||
- _Parallax: 0.02 |
|||
- _Smoothness: 0.5 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _SubSurfaceRadius: 0 |
|||
- _SurfaceType: 0 |
|||
- _TexWorldScale: 1 |
|||
- _UVBase: 0 |
|||
- _UVDetail: 0 |
|||
- _UVMappingPlanar: 0 |
|||
- _UVSec: 0 |
|||
- _ZTestMode: 8 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _BaseColor: {r: 0.49803922, g: 0.49803922, b: 0.49803922, 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} |
|||
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} |
|||
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: 906f2e00230e2a34b832d52909cc5906 |
|||
timeCreated: 1485274548 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: bb067c1f82e9d8648b8909e905f6607b |
|||
folderAsset: yes |
|||
timeCreated: 1484331444 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue