Arnaud Carre
8 年前
当前提交
e9b3071e
共有 68 个文件被更改,包括 1742 次插入 和 2531 次删除
-
4Assets/Editor/Tests/RenderloopTests/CullResultsTest.cs
-
5Assets/Editor/Tests/RenderloopTests/RenderPipelineTestFixture.cs
-
14Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/MultiplePointLights.unity
-
180Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Shaders/LDPipe_LitShaderMaps.unity
-
15Assets/ScriptableRenderPipeline/BasicRenderPipeline/BasicRenderPipeline.cs
-
3Assets/ScriptableRenderPipeline/BasicRenderPipeline/BasicRenderPipelineShader.shader
-
41Assets/ScriptableRenderPipeline/Core/Shadow/Shadow.cs
-
11Assets/ScriptableRenderPipeline/Core/TextureCache.cs
-
70Assets/ScriptableRenderPipeline/Fptl/FptlLighting.cs
-
4Assets/ScriptableRenderPipeline/Fptl/SkyboxHelper.cs
-
39Assets/ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/Editor/UpgradeStandardShaderMaterials.cs
-
298Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
-
17Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/ScreenSpaceAmbientOcclusion.cs
-
64Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
-
10Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.hlsl
-
20Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/lightlistbuild-clustered.compute
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/materialflags.compute
-
5Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/shadeopaque.compute
-
3Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLit.shader
-
3Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLitTessellation.shader
-
5Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
-
3Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.shader
-
149Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitProperties.hlsl
-
3Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitTessellation.shader
-
151Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CombineSubsurfaceScattering.shader
-
14Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/SubsurfaceScatteringProfile.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/MaterialUtilities.hlsl
-
3Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/Unlit.shader
-
1Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/HDRenderPipelineResources.asset
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/HDRenderPipelineResources.asset.meta
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/RenderPipelineResources.cs
-
8Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderConfig.cs
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassVelocity.hlsl
-
14Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderVariables.hlsl
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/HDRISky/HDRISkyRenderer.cs
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/ProceduralSky/ProceduralSkyRenderer.cs
-
12Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/RuntimeFilterIBL.cs
-
9Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyManager.cs
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/SkySettingsSingleton.cs
-
100Assets/ScriptableRenderPipeline/HDRenderPipeline/Utilities.cs
-
2Assets/ScriptableRenderPipeline/LightweightPipeline.meta
-
5Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetInspector.cs
-
189Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs
-
2Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset
-
18Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.cs
-
37Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader
-
38Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineCore.cginc
-
27Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineShadows.cginc
-
3Assets/ScriptableRenderPipeline/ShaderLibrary/Common.hlsl
-
427Assets/ScriptableRenderPipeline/ShaderLibrary/Fibonacci.hlsl
-
999ImageTemplates/LightweightPipeline/Scenes/MultiplePointLights.unity.png
-
999ImageTemplates/LightweightPipeline/Scenes/Shaders/LDPipe_LitShaderMaps.unity.png
-
2ProjectSettings/ProjectVersion.txt
-
10Assets/ScriptableRenderPipeline/HDRenderPipeline/AdditionalData.meta
-
54Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/CameraMotionVectors.shader
-
9Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/CameraMotionVectors.shader.meta
-
10Assets/TestScenes/HDTest/HDRenderLoopTest.meta
-
12Assets/ScriptableRenderPipeline/HDRenderPipeline/AdditionalData/HDAdditionalCameraData.cs
-
13Assets/ScriptableRenderPipeline/HDRenderPipeline/AdditionalData/HDAdditionalCameraData.cs.meta
-
12Assets/ScriptableRenderPipeline/core/CommandBufferPool.cs.meta
-
72Assets/ScriptableRenderPipeline/core/CommandBufferPool.cs
-
9Assets/LegacyLayered.meta
999
ImageTemplates/LightweightPipeline/Scenes/MultiplePointLights.unity.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
999
ImageTemplates/LightweightPipeline/Scenes/Shaders/LDPipe_LitShaderMaps.unity.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
m_EditorVersion: 2017.2.0a4 |
|||
m_EditorVersion: 2017.2.0b1 |
|
|||
fileFormatVersion: 2 |
|||
guid: 969f45cd0fa680646a77e82d620ba21d |
|||
folderAsset: yes |
|||
timeCreated: 1498051186 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Hidden/HDRenderPipeline/CameraMotionVectors" |
|||
{ |
|||
HLSLINCLUDE |
|||
|
|||
#pragma target 4.5 |
|||
|
|||
#include "../../ShaderLibrary/Common.hlsl" |
|||
#include "../ShaderVariables.hlsl" |
|||
#include "../ShaderPass/FragInputs.hlsl" |
|||
#include "../ShaderPass/VaryingMesh.hlsl" |
|||
#include "../ShaderPass/VertMesh.hlsl" |
|||
|
|||
PackedVaryingsType Vert(AttributesMesh inputMesh) |
|||
{ |
|||
VaryingsType varyingsType; |
|||
varyingsType.vmesh = VertMesh(inputMesh); |
|||
return PackVaryingsType(varyingsType); |
|||
} |
|||
|
|||
float4 Frag(PackedVaryingsToPS packedInput) : SV_Target |
|||
{ |
|||
PositionInputs posInput = GetPositionInput(packedInput.vmesh.positionCS.xy, _ScreenSize.zw); |
|||
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.unPositionSS).x; |
|||
float3 vPos = ComputeViewSpacePosition(posInput.positionSS, depth, _InvProjMatrix); |
|||
float4 worldPos = mul(unity_CameraToWorld, float4(vPos, 1.0)); |
|||
|
|||
float4 prevClipPos = mul(_PrevViewProjMatrix, worldPos); |
|||
float4 curClipPos = mul(_ViewProjMatrix, worldPos); |
|||
float2 prevHPos = prevClipPos.xy / prevClipPos.w; |
|||
float2 curHPos = curClipPos.xy / curClipPos.w; |
|||
|
|||
float2 previousPositionCS = (prevHPos + 1.0) / 2.0; |
|||
float2 positionCS = (curHPos + 1.0) / 2.0; |
|||
|
|||
return float4(positionCS - previousPositionCS, 0.0, 1.0); |
|||
} |
|||
|
|||
ENDHLSL |
|||
|
|||
SubShader |
|||
{ |
|||
Cull Off ZWrite Off ZTest Always |
|||
|
|||
Pass |
|||
{ |
|||
HLSLPROGRAM |
|||
|
|||
#pragma vertex Vert |
|||
#pragma fragment Frag |
|||
|
|||
ENDHLSL |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 035941b63024d1943af48811c1db20d9 |
|||
timeCreated: 1497432609 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: c2d16fcd50b9fda4b908060b0afcd890 |
|||
folderAsset: yes |
|||
timeCreated: 1497448738 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
// This struct allow to add specialized path in HDRenderPipeline (can be use to render mini map or planar reflection etc...)
|
|||
public enum RenderingPathHDRP { Default, Unlit }; |
|||
|
|||
[DisallowMultipleComponent, ExecuteInEditMode] |
|||
[RequireComponent(typeof(Camera))] |
|||
public class HDAdditionalCameraData : MonoBehaviour |
|||
{ |
|||
public RenderingPathHDRP renderingPath; |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 23c1ce4fb46143f46bc5cb5224c934f6 |
|||
timeCreated: 1498052298 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: bc85748f0cef607499e03b46e3846ebd |
|||
timeCreated: 1497364325 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using UnityEngine.Events; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
internal class ObjectPool<T> where T : new() |
|||
{ |
|||
private readonly Stack<T> m_Stack = new Stack<T>(); |
|||
private readonly UnityAction<T> m_ActionOnGet; |
|||
private readonly UnityAction<T> m_ActionOnRelease; |
|||
|
|||
public int countAll { get; private set; } |
|||
public int countActive { get { return countAll - countInactive; } } |
|||
public int countInactive { get { return m_Stack.Count; } } |
|||
|
|||
public ObjectPool(UnityAction<T> actionOnGet, UnityAction<T> actionOnRelease) |
|||
{ |
|||
m_ActionOnGet = actionOnGet; |
|||
m_ActionOnRelease = actionOnRelease; |
|||
} |
|||
|
|||
public T Get() |
|||
{ |
|||
T element; |
|||
if (m_Stack.Count == 0) |
|||
{ |
|||
element = new T(); |
|||
countAll++; |
|||
} |
|||
else |
|||
{ |
|||
element = m_Stack.Pop(); |
|||
} |
|||
if (m_ActionOnGet != null) |
|||
m_ActionOnGet(element); |
|||
return element; |
|||
} |
|||
|
|||
public void Release(T element) |
|||
{ |
|||
if (m_Stack.Count > 0 && ReferenceEquals(m_Stack.Peek(), element)) |
|||
Debug.LogError("Internal error. Trying to destroy object that is already released to pool."); |
|||
if (m_ActionOnRelease != null) |
|||
m_ActionOnRelease(element); |
|||
m_Stack.Push(element); |
|||
} |
|||
} |
|||
|
|||
public static class CommandBufferPool |
|||
{ |
|||
private static ObjectPool<CommandBuffer> m_BufferPool = new ObjectPool<CommandBuffer>(null, x => x.Clear()); |
|||
|
|||
public static CommandBuffer Get() |
|||
{ |
|||
var cmd = m_BufferPool.Get(); |
|||
cmd.name = "Unnamed Command Buffer"; |
|||
return cmd; |
|||
} |
|||
public static CommandBuffer Get(string name) |
|||
{ |
|||
var cmd = m_BufferPool.Get(); |
|||
cmd.name = name; |
|||
return cmd; |
|||
} |
|||
|
|||
public static void Release(CommandBuffer buffer) |
|||
{ |
|||
m_BufferPool.Release(buffer); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 78d15b13b40de7a4891eb491afc04d28 |
|||
folderAsset: yes |
|||
timeCreated: 1497255974 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue