浏览代码
Add finer grained callbacks to LW render pipeline to allow effects to be added (#1863)
Add finer grained callbacks to LW render pipeline to allow effects to be added (#1863)
*Add callbacks to LWRP that can be attached to a camera. **IBeforeCameraRender **IAfterDepthPrePass **IAfterOpaquePass **IAfterOpaquePostProcess **IAfterSkyboxPass **IAfterTransparentPass **IAfterRender *Add test for callbacks *Clean up LWRP creation of render textures. If we are not going straight to screen ensure that we create both depth and color targets. https://katana.bf.unity3d.com/projects/com.unity.render-pipelines/builders?automation-tools_branch=add-platform-filter&ScriptableRenderLoop_branch=tim%2Flwrefactor&unity_branch=trunk/main
GitHub
6 年前
当前提交
3c5ef0eb
共有 37 个文件被更改,包括 2268 次插入 和 145 次删除
-
3TestProjects/LWGraphicsTest/ProjectSettings/EditorBuildSettings.asset
-
6com.unity.render-pipelines.lightweight/CHANGELOG.md
-
81com.unity.render-pipelines.lightweight/LWRP/DefaultRendererSetup.cs
-
2com.unity.render-pipelines.lightweight/LWRP/IRendererSetup.cs
-
1com.unity.render-pipelines.lightweight/LWRP/LightweightAdditionalCameraData.cs
-
229com.unity.render-pipelines.lightweight/LWRP/LightweightPipeline.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/BeginXRRenderingPass.cs
-
4com.unity.render-pipelines.lightweight/LWRP/Passes/CopyDepthPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/CreateLightweightRenderTexturesPass.cs
-
4com.unity.render-pipelines.lightweight/LWRP/Passes/DepthOnlyPass.cs
-
21com.unity.render-pipelines.lightweight/LWRP/Passes/DrawSkyboxPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/EndXRRenderingPass.cs
-
12com.unity.render-pipelines.lightweight/LWRP/Passes/LightweightForwardPass.cs
-
8com.unity.render-pipelines.lightweight/LWRP/Passes/TransparentPostProcessPass.cs
-
11com.unity.render-pipelines.lightweight/LWRP/ScriptableRenderer.cs
-
2com.unity.render-pipelines.lightweight/LWRP/ScriptableRenderer.cs.meta
-
26com.unity.testing.srp.lightweight/Tests/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.cs
-
7com.unity.render-pipelines.lightweight/LWRP/IAfterDepthPrePass.cs
-
11com.unity.render-pipelines.lightweight/LWRP/IAfterDepthPrePass.cs.meta
-
10com.unity.render-pipelines.lightweight/LWRP/IAfterOpaquePass.cs
-
11com.unity.render-pipelines.lightweight/LWRP/IAfterOpaquePass.cs.meta
-
8com.unity.render-pipelines.lightweight/LWRP/IAfterOpaquePostProcess.cs
-
11com.unity.render-pipelines.lightweight/LWRP/IAfterOpaquePostProcess.cs.meta
-
7com.unity.render-pipelines.lightweight/LWRP/IAfterRender.cs
-
11com.unity.render-pipelines.lightweight/LWRP/IAfterRender.cs.meta
-
7com.unity.render-pipelines.lightweight/LWRP/IAfterSkyboxPass.cs
-
11com.unity.render-pipelines.lightweight/LWRP/IAfterSkyboxPass.cs.meta
-
7com.unity.render-pipelines.lightweight/LWRP/IAfterTransparentPass.cs
-
11com.unity.render-pipelines.lightweight/LWRP/IAfterTransparentPass.cs.meta
-
8com.unity.testing.srp.lightweight/Tests/Scenes/052_LWCallbacks.meta
-
681com.unity.testing.srp.lightweight/Tests/Scenes/052_LWCallbacks.unity
-
7com.unity.testing.srp.lightweight/Tests/Scenes/052_LWCallbacks.unity.meta
-
169com.unity.testing.srp.lightweight/Tests/Scenes/052_LWCallbacks/CameraCallbackTests.cs
-
11com.unity.testing.srp.lightweight/Tests/Scenes/052_LWCallbacks/CameraCallbackTests.cs.meta
-
1001com.unity.testing.srp.lightweight/Tests/Scenes/052_LWCallbacks/testPost.asset
-
8com.unity.testing.srp.lightweight/Tests/Scenes/052_LWCallbacks/testPost.asset.meta
|
|||
using UnityEngine.Rendering; |
|||
|
|||
|
|||
private RenderTargetHandle colorAttachmentHandle { get; set; } |
|||
private RenderTargetHandle depthAttachmentHandle { get; set; } |
|||
|
|||
public void Setup(RenderTargetHandle colorHandle, RenderTargetHandle depthHandle) |
|||
{ |
|||
this.colorAttachmentHandle = colorHandle; |
|||
this.depthAttachmentHandle = depthHandle; |
|||
} |
|||
|
|||
|
|||
CommandBuffer cmd = CommandBufferPool.Get("Draw Skybox (Set RT's)"); |
|||
cmd.SetRenderTarget(colorAttachmentHandle.Identifier(), depthAttachmentHandle.Identifier()); |
|||
context.ExecuteCommandBuffer(cmd); |
|||
CommandBufferPool.Release(cmd); |
|||
|
|||
|
|||
} |
|||
} |
|
|||
namespace UnityEngine.Experimental.Rendering.LightweightPipeline |
|||
{ |
|||
public interface IAfterDepthPrePass |
|||
{ |
|||
ScriptableRenderPass GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle depthAttachmentHandle); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 9f5c6a69a4dcf2c449b7a61c2dd56cf1 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering.LightweightPipeline |
|||
{ |
|||
public interface IAfterOpaquePass |
|||
{ |
|||
ScriptableRenderPass GetPassToEnqueue( |
|||
RenderTextureDescriptor baseDescriptor, |
|||
RenderTargetHandle colorAttachmentHandle, |
|||
RenderTargetHandle depthAttachmentHandle); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 29d9a4da99a61ee46b3460ded642e269 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering.LightweightPipeline |
|||
{ |
|||
public interface IAfterOpaquePostProcess |
|||
{ |
|||
ScriptableRenderPass GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle colorHandle, |
|||
RenderTargetHandle depthHandle); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 69367e423e833c046925cf2dc276bc55 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering.LightweightPipeline |
|||
{ |
|||
public interface IAfterRender |
|||
{ |
|||
ScriptableRenderPass GetPassToEnqueue(); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 586693508a009794c88f4760b7a0ba65 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering.LightweightPipeline |
|||
{ |
|||
public interface IAfterSkyboxPass |
|||
{ |
|||
ScriptableRenderPass GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle colorHandle, RenderTargetHandle depthHandle); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: e8dc2e3f9b175f745915598d3139fa2e |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering.LightweightPipeline |
|||
{ |
|||
public interface IAfterTransparentPass |
|||
{ |
|||
ScriptableRenderPass GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle colorHandle, RenderTargetHandle depthHandle); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 9c8bdf65e5b238b499ede67d890d95eb |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: a46d38292e14a884488084ddc4d73184 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!29 &1 |
|||
OcclusionCullingSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_OcclusionBakeSettings: |
|||
smallestOccluder: 5 |
|||
smallestHole: 0.25 |
|||
backfaceThreshold: 100 |
|||
m_SceneGUID: 00000000000000000000000000000000 |
|||
m_OcclusionCullingData: {fileID: 0} |
|||
--- !u!104 &2 |
|||
RenderSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 9 |
|||
m_Fog: 0 |
|||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} |
|||
m_FogMode: 3 |
|||
m_FogDensity: 0.01 |
|||
m_LinearFogStart: 0 |
|||
m_LinearFogEnd: 300 |
|||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} |
|||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} |
|||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} |
|||
m_AmbientIntensity: 1 |
|||
m_AmbientMode: 0 |
|||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} |
|||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_HaloStrength: 0.5 |
|||
m_FlareStrength: 1 |
|||
m_FlareFadeSpeed: 3 |
|||
m_HaloTexture: {fileID: 0} |
|||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} |
|||
m_DefaultReflectionMode: 0 |
|||
m_DefaultReflectionResolution: 128 |
|||
m_ReflectionBounces: 1 |
|||
m_ReflectionIntensity: 1 |
|||
m_CustomReflection: {fileID: 0} |
|||
m_Sun: {fileID: 0} |
|||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1} |
|||
m_UseRadianceAmbientProbe: 0 |
|||
--- !u!157 &3 |
|||
LightmapSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 11 |
|||
m_GIWorkflowMode: 0 |
|||
m_GISettings: |
|||
serializedVersion: 2 |
|||
m_BounceScale: 1 |
|||
m_IndirectOutputScale: 1 |
|||
m_AlbedoBoost: 1 |
|||
m_TemporalCoherenceThreshold: 1 |
|||
m_EnvironmentLightingMode: 0 |
|||
m_EnableBakedLightmaps: 1 |
|||
m_EnableRealtimeLightmaps: 1 |
|||
m_LightmapEditorSettings: |
|||
serializedVersion: 10 |
|||
m_Resolution: 2 |
|||
m_BakeResolution: 40 |
|||
m_AtlasSize: 1024 |
|||
m_AO: 0 |
|||
m_AOMaxDistance: 1 |
|||
m_CompAOExponent: 1 |
|||
m_CompAOExponentDirect: 0 |
|||
m_Padding: 2 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_LightmapsBakeMode: 1 |
|||
m_TextureCompression: 1 |
|||
m_FinalGather: 0 |
|||
m_FinalGatherFiltering: 1 |
|||
m_FinalGatherRayCount: 256 |
|||
m_ReflectionCompression: 2 |
|||
m_MixedBakeMode: 2 |
|||
m_BakeBackend: 1 |
|||
m_PVRSampling: 1 |
|||
m_PVRDirectSampleCount: 32 |
|||
m_PVRSampleCount: 500 |
|||
m_PVRBounces: 2 |
|||
m_PVRFilterTypeDirect: 0 |
|||
m_PVRFilterTypeIndirect: 0 |
|||
m_PVRFilterTypeAO: 0 |
|||
m_PVRFilteringMode: 1 |
|||
m_PVRCulling: 1 |
|||
m_PVRFilteringGaussRadiusDirect: 1 |
|||
m_PVRFilteringGaussRadiusIndirect: 5 |
|||
m_PVRFilteringGaussRadiusAO: 2 |
|||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 |
|||
m_PVRFilteringAtrousPositionSigmaIndirect: 2 |
|||
m_PVRFilteringAtrousPositionSigmaAO: 1 |
|||
m_ShowResolutionOverlay: 1 |
|||
m_LightingDataAsset: {fileID: 0} |
|||
m_UseShadowmask: 0 |
|||
--- !u!196 &4 |
|||
NavMeshSettings: |
|||
serializedVersion: 2 |
|||
m_ObjectHideFlags: 0 |
|||
m_BuildSettings: |
|||
serializedVersion: 2 |
|||
agentTypeID: 0 |
|||
agentRadius: 0.5 |
|||
agentHeight: 2 |
|||
agentSlope: 45 |
|||
agentClimb: 0.4 |
|||
ledgeDropHeight: 0 |
|||
maxJumpAcrossDistance: 0 |
|||
minRegionArea: 2 |
|||
manualCellSize: 0 |
|||
cellSize: 0.16666667 |
|||
manualTileSize: 0 |
|||
tileSize: 256 |
|||
accuratePlacement: 0 |
|||
debug: |
|||
m_Flags: 0 |
|||
m_NavMeshData: {fileID: 0} |
|||
--- !u!1 &613864840 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 613864844} |
|||
- component: {fileID: 613864843} |
|||
- component: {fileID: 613864842} |
|||
- component: {fileID: 613864841} |
|||
m_Layer: 0 |
|||
m_Name: Cube |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!65 &613864841 |
|||
BoxCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 613864840} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Size: {x: 1, y: 1, z: 1} |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!23 &613864842 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 613864840} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 1 |
|||
m_RendererPriority: 0 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 6602e4dc96b9e49e4b91b974a55eaaf0, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!33 &613864843 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 613864840} |
|||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} |
|||
--- !u!4 &613864844 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 613864840} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 2 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &802440984 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 802440988} |
|||
- component: {fileID: 802440987} |
|||
- component: {fileID: 802440986} |
|||
- component: {fileID: 802440985} |
|||
m_Layer: 0 |
|||
m_Name: Sphere |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!135 &802440985 |
|||
SphereCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 802440984} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Radius: 0.5 |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!23 &802440986 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 802440984} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 1 |
|||
m_RendererPriority: 0 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: de0f448b225d240a7807e23dbddc52b6, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!33 &802440987 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 802440984} |
|||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} |
|||
--- !u!4 &802440988 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 802440984} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: -0.431, y: 0.618, z: 1.66} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 3 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &870485155 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 870485159} |
|||
- component: {fileID: 870485158} |
|||
- component: {fileID: 870485157} |
|||
- component: {fileID: 870485156} |
|||
- component: {fileID: 870485160} |
|||
- component: {fileID: 870485161} |
|||
m_Layer: 0 |
|||
m_Name: Main Camera |
|||
m_TagString: MainCamera |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &870485156 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 870485155} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
volumeTrigger: {fileID: 870485159} |
|||
volumeLayer: |
|||
serializedVersion: 2 |
|||
m_Bits: 1 |
|||
stopNaNPropagation: 1 |
|||
antialiasingMode: 0 |
|||
temporalAntialiasing: |
|||
jitterSpread: 0.75 |
|||
sharpness: 0.25 |
|||
stationaryBlending: 0.95 |
|||
motionBlending: 0.85 |
|||
subpixelMorphologicalAntialiasing: |
|||
quality: 2 |
|||
fastApproximateAntialiasing: |
|||
fastMode: 0 |
|||
keepAlpha: 0 |
|||
fog: |
|||
enabled: 1 |
|||
excludeSkybox: 1 |
|||
debugLayer: |
|||
lightMeter: |
|||
width: 512 |
|||
height: 256 |
|||
showCurves: 1 |
|||
histogram: |
|||
width: 512 |
|||
height: 256 |
|||
channel: 3 |
|||
waveform: |
|||
exposure: 0.12 |
|||
height: 256 |
|||
vectorscope: |
|||
size: 256 |
|||
exposure: 0.12 |
|||
overlaySettings: |
|||
linearDepth: 0 |
|||
motionColorIntensity: 4 |
|||
motionGridSize: 64 |
|||
colorBlindnessType: 0 |
|||
colorBlindnessStrength: 1 |
|||
m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} |
|||
m_ShowToolkit: 0 |
|||
m_ShowCustomSorter: 1 |
|||
breakBeforeColorGrading: 0 |
|||
m_BeforeTransparentBundles: |
|||
- assemblyQualifiedName: InvertOpaque, LWGraphicsTests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null |
|||
m_BeforeStackBundles: |
|||
- assemblyQualifiedName: HalfToneOpaque, LWGraphicsTests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null |
|||
m_AfterStackBundles: [] |
|||
--- !u!81 &870485157 |
|||
AudioListener: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 870485155} |
|||
m_Enabled: 1 |
|||
--- !u!20 &870485158 |
|||
Camera: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 870485155} |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_ClearFlags: 1 |
|||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} |
|||
m_projectionMatrixMode: 1 |
|||
m_SensorSize: {x: 36, y: 24} |
|||
m_LensShift: {x: 0, y: 0} |
|||
m_GateFitMode: 2 |
|||
m_FocalLength: 50 |
|||
m_NormalizedViewPortRect: |
|||
serializedVersion: 2 |
|||
x: 0 |
|||
y: 0 |
|||
width: 1 |
|||
height: 1 |
|||
near clip plane: 0.3 |
|||
far clip plane: 1000 |
|||
field of view: 60 |
|||
orthographic: 0 |
|||
orthographic size: 5 |
|||
m_Depth: -1 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_RenderingPath: -1 |
|||
m_TargetTexture: {fileID: 0} |
|||
m_TargetDisplay: 0 |
|||
m_TargetEye: 3 |
|||
m_HDR: 1 |
|||
m_AllowMSAA: 0 |
|||
m_AllowDynamicResolution: 0 |
|||
m_ForceIntoRT: 0 |
|||
m_OcclusionCulling: 1 |
|||
m_StereoConvergence: 10 |
|||
m_StereoSeparation: 0.022 |
|||
--- !u!4 &870485159 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 870485155} |
|||
m_LocalRotation: {x: -0.06049507, y: 0.86407423, z: -0.10709299, w: -0.48810577} |
|||
m_LocalPosition: {x: 2.344281, y: 1.1885588, z: 2.7055173} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!114 &870485160 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 870485155} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 1922bf90be6ebc54da38e96e30f9339a, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!114 &870485161 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 870485155} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 73231aa468d81ea49bc3d914080de185, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
ImageComparisonSettings: |
|||
TargetWidth: 1280 |
|||
TargetHeight: 720 |
|||
PerPixelCorrectnessThreshold: 0.005 |
|||
AverageCorrectnessThreshold: 0.005 |
|||
WaitFrames: 2 |
|||
--- !u!1 &1018272651 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 1018272655} |
|||
- component: {fileID: 1018272654} |
|||
- component: {fileID: 1018272653} |
|||
- component: {fileID: 1018272652} |
|||
m_Layer: 0 |
|||
m_Name: Cube (1) |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!65 &1018272652 |
|||
BoxCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1018272651} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Size: {x: 1, y: 1, z: 1} |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!23 &1018272653 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1018272651} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 1 |
|||
m_RendererPriority: 0 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 6602e4dc96b9e49e4b91b974a55eaaf0, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!33 &1018272654 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1018272651} |
|||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} |
|||
--- !u!4 &1018272655 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1018272651} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0.583, y: 0.441, z: 2.681} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 5 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &1027099700 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 1027099702} |
|||
- component: {fileID: 1027099701} |
|||
m_Layer: 0 |
|||
m_Name: GameObject |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &1027099701 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1027099700} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
sharedProfile: {fileID: 11400000, guid: 69722286846b6f04c9ec57b0c5bc9773, type: 2} |
|||
isGlobal: 1 |
|||
blendDistance: 0 |
|||
weight: 1 |
|||
priority: 0 |
|||
--- !u!4 &1027099702 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1027099700} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: -5.961341, y: -1.2527268, z: -2.3001592} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 4 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &2046495445 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 2046495447} |
|||
- component: {fileID: 2046495446} |
|||
m_Layer: 0 |
|||
m_Name: Directional Light |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!108 &2046495446 |
|||
Light: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 2046495445} |
|||
m_Enabled: 1 |
|||
serializedVersion: 8 |
|||
m_Type: 1 |
|||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} |
|||
m_Intensity: 1 |
|||
m_Range: 10 |
|||
m_SpotAngle: 30 |
|||
m_CookieSize: 10 |
|||
m_Shadows: |
|||
m_Type: 2 |
|||
m_Resolution: -1 |
|||
m_CustomResolution: -1 |
|||
m_Strength: 1 |
|||
m_Bias: 0.05 |
|||
m_NormalBias: 0.4 |
|||
m_NearPlane: 0.2 |
|||
m_Cookie: {fileID: 0} |
|||
m_DrawHalo: 0 |
|||
m_Flare: {fileID: 0} |
|||
m_RenderMode: 0 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_Lightmapping: 4 |
|||
m_LightShadowCasterMode: 0 |
|||
m_AreaSize: {x: 1, y: 1} |
|||
m_BounceIntensity: 1 |
|||
m_ColorTemperature: 6570 |
|||
m_UseColorTemperature: 0 |
|||
m_ShadowRadius: 0 |
|||
m_ShadowAngle: 0 |
|||
--- !u!4 &2046495447 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 2046495445} |
|||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} |
|||
m_LocalPosition: {x: 0, y: 3, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 1 |
|||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: 58d22e8497ba91141b3ae7abd7b0bb41 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.Rendering; |
|||
using UnityEngine.Experimental.Rendering.LightweightPipeline; |
|||
using UnityEngine.Rendering; |
|||
|
|||
public class CameraCallbackTests : MonoBehaviour |
|||
, IAfterDepthPrePass |
|||
, IAfterOpaquePass |
|||
, IAfterOpaquePostProcess |
|||
, IAfterSkyboxPass |
|||
, IAfterTransparentPass |
|||
, IAfterRender |
|||
{ |
|||
|
|||
static RenderTargetHandle afterDepth; |
|||
static RenderTargetHandle afterOpaque; |
|||
static RenderTargetHandle afterOpaquePost; |
|||
static RenderTargetHandle afterSkybox; |
|||
static RenderTargetHandle afterTransparent; |
|||
static RenderTargetHandle afterAll; |
|||
|
|||
public CameraCallbackTests() |
|||
{ |
|||
afterDepth.Init("_AfterDepth"); |
|||
afterOpaque.Init("_AfterOpaque"); |
|||
afterOpaquePost.Init("_AfterOpaquePost"); |
|||
afterSkybox.Init("_AfterSkybox"); |
|||
afterTransparent.Init("_AfterTransparent"); |
|||
afterAll.Init("_AfterAll"); |
|||
} |
|||
|
|||
|
|||
ScriptableRenderPass IAfterDepthPrePass.GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle depthAttachmentHandle) |
|||
{ |
|||
var pass = new CopyDepthPass(); |
|||
pass.Setup(depthAttachmentHandle, afterDepth); |
|||
return pass; |
|||
} |
|||
|
|||
ScriptableRenderPass IAfterOpaquePass.GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle colorAttachmentHandle, |
|||
RenderTargetHandle depthAttachmentHandle) |
|||
{ |
|||
var pass = new CopyColorPass(); |
|||
pass.Setup(colorAttachmentHandle, afterOpaque); |
|||
return pass; |
|||
} |
|||
|
|||
ScriptableRenderPass IAfterOpaquePostProcess.GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle colorHandle, |
|||
RenderTargetHandle depthHandle) |
|||
{ |
|||
var pass = new CopyColorPass();; |
|||
pass.Setup(colorHandle, afterOpaquePost); |
|||
return pass; |
|||
} |
|||
|
|||
ScriptableRenderPass IAfterSkyboxPass.GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle colorHandle, |
|||
RenderTargetHandle depthHandle) |
|||
{ |
|||
var pass = new CopyColorPass(); |
|||
pass.Setup(colorHandle, afterSkybox); |
|||
return pass; |
|||
} |
|||
|
|||
ScriptableRenderPass IAfterTransparentPass.GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle colorHandle, |
|||
RenderTargetHandle depthHandle) |
|||
{ |
|||
var pass = new CopyColorPass(); |
|||
pass.Setup(colorHandle, afterTransparent); |
|||
return pass; |
|||
} |
|||
|
|||
private class CapturePass : ScriptableRenderPass |
|||
{ |
|||
private RenderTargetHandle m_Source; |
|||
private RenderTargetHandle m_Target; |
|||
|
|||
public void Setup(RenderTargetHandle source, RenderTargetHandle target) |
|||
{ |
|||
m_Source = source; |
|||
m_Target = target; |
|||
} |
|||
|
|||
public override void Execute(ScriptableRenderer renderer, ref ScriptableRenderContext context, |
|||
ref CullResults cullResults, |
|||
ref RenderingData renderingData) |
|||
{ |
|||
RenderTextureDescriptor opaqueDesc = ScriptableRenderer.CreateRTDesc(ref renderingData.cameraData); |
|||
|
|||
var cmd = CommandBufferPool.Get("Capture Pass"); |
|||
cmd.GetTemporaryRT(m_Target.id, opaqueDesc); |
|||
cmd.Blit(m_Source.Identifier(), m_Target.Identifier()); |
|||
context.ExecuteCommandBuffer(cmd); |
|||
CommandBufferPool.Release(cmd); |
|||
} |
|||
|
|||
public override void FrameCleanup(CommandBuffer cmd) |
|||
{ |
|||
if (m_Target != RenderTargetHandle.CameraTarget) |
|||
{ |
|||
cmd.ReleaseTemporaryRT(m_Target.id); |
|||
m_Target = RenderTargetHandle.CameraTarget; |
|||
} |
|||
} |
|||
} |
|||
|
|||
class BlitPass : ScriptableRenderPass |
|||
{ |
|||
CapturePass m_CopyResult = new CapturePass(); |
|||
|
|||
public override void Execute(ScriptableRenderer renderer, ref ScriptableRenderContext context, ref CullResults cullResults, |
|||
ref RenderingData renderingData) |
|||
{ |
|||
m_CopyResult.Setup(RenderTargetHandle.CameraTarget, afterAll); |
|||
m_CopyResult.Execute(renderer, ref context, ref cullResults, ref renderingData); |
|||
|
|||
Material material = renderer.GetMaterial(MaterialHandles.Blit); |
|||
|
|||
CommandBuffer cmd = CommandBufferPool.Get("Blit Pass"); |
|||
cmd.SetRenderTarget(BuiltinRenderTextureType.CameraTarget); |
|||
cmd.SetViewProjectionMatrices(Matrix4x4.identity, Matrix4x4.identity); |
|||
|
|||
cmd.SetViewport(new Rect(0, renderingData.cameraData.camera.pixelRect.height / 2.0f, renderingData.cameraData.camera.pixelRect.width / 3.0f, renderingData.cameraData.camera.pixelRect.height / 2.0f)); |
|||
cmd.SetGlobalTexture("_BlitTex", afterDepth.Identifier()); |
|||
LightweightPipeline.DrawFullScreen(cmd, material); |
|||
|
|||
cmd.SetViewport(new Rect(renderingData.cameraData.camera.pixelRect.width / 3.0f, renderingData.cameraData.camera.pixelRect.height / 2.0f, renderingData.cameraData.camera.pixelRect.width / 3.0f, renderingData.cameraData.camera.pixelRect.height / 2.0f)); |
|||
cmd.SetGlobalTexture("_BlitTex", afterOpaque.Identifier()); |
|||
LightweightPipeline.DrawFullScreen(cmd, material); |
|||
|
|||
cmd.SetViewport(new Rect(renderingData.cameraData.camera.pixelRect.width / 3.0f * 2.0f, renderingData.cameraData.camera.pixelRect.height / 2.0f, renderingData.cameraData.camera.pixelRect.width / 3.0f, renderingData.cameraData.camera.pixelRect.height / 2.0f)); |
|||
cmd.SetGlobalTexture("_BlitTex", afterOpaquePost.Identifier()); |
|||
LightweightPipeline.DrawFullScreen(cmd, material); |
|||
|
|||
cmd.SetViewport(new Rect(0f, 0f, renderingData.cameraData.camera.pixelRect.width / 3.0f, renderingData.cameraData.camera.pixelRect.height / 2.0f)); |
|||
cmd.SetGlobalTexture("_BlitTex", afterSkybox.Identifier()); |
|||
LightweightPipeline.DrawFullScreen(cmd, material); |
|||
|
|||
cmd.SetViewport(new Rect(renderingData.cameraData.camera.pixelRect.width / 3.0f, 0f, renderingData.cameraData.camera.pixelRect.width / 3.0f, renderingData.cameraData.camera.pixelRect.height / 2.0f)); |
|||
cmd.SetGlobalTexture("_BlitTex", afterTransparent.Identifier()); |
|||
LightweightPipeline.DrawFullScreen(cmd, material); |
|||
|
|||
|
|||
//TODO: Upsidown UV trash, ignore this for now
|
|||
// Need to flip UV as we come from a framebuffer.
|
|||
/*cmd.SetViewport(new Rect(renderingData.cameraData.camera.pixelRect.width / 3.0f * 2.0f, 0f, renderingData.cameraData.camera.pixelRect.width / 3.0f, renderingData.cameraData.camera.pixelRect.height / 2.0f)); |
|||
cmd.SetGlobalTexture("_BlitTex", afterAll.Identifier()); |
|||
cmd.EnableShaderKeyword("FLIP_VERTICAL_UV"); |
|||
LightweightPipeline.DrawFullScreen(cmd, material); |
|||
cmd.DisableShaderKeyword("FLIP_VERTICAL_UV");*/ |
|||
|
|||
context.ExecuteCommandBuffer(cmd); |
|||
CommandBufferPool.Release(cmd); |
|||
} |
|||
|
|||
public override void FrameCleanup(CommandBuffer cmd) |
|||
{ |
|||
base.FrameCleanup(cmd); |
|||
m_CopyResult.FrameCleanup(cmd); |
|||
|
|||
} |
|||
} |
|||
|
|||
ScriptableRenderPass IAfterRender.GetPassToEnqueue() |
|||
{ |
|||
|
|||
|
|||
return new BlitPass(); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1922bf90be6ebc54da38e96e30f9339a |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
com.unity.testing.srp.lightweight/Tests/Scenes/052_LWCallbacks/testPost.asset
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 69722286846b6f04c9ec57b0c5bc9773 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 11400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue