| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| using System; | ||
| using NUnit.Framework; | ||
| using UnityEngine; | ||
| using UnityEngine.TestTools; | ||
| using UnityEngine.Rendering; | ||
| using UnityEngine.Rendering.HighDefinition; | ||
| using System.Collections; | ||
| using System.Collections.Generic; | ||
| using System.IO; | ||
| using Object = UnityEngine.Object; | ||
| using System.Text.RegularExpressions; | ||
|
|
||
| // Unit tests to check parts of the RenderRequest API not generating any graphics output | ||
| // Rest of the API is tested in Scenes/9x_Other/9960-RPCRenderRequest integration test | ||
| class UserRenderRequestTests | ||
| { | ||
| GameObject m_Obj; | ||
| Camera m_Camera; | ||
|
|
||
| /// <summary> | ||
| /// Data structure describing the data for a NON supported render request | ||
| /// </summary> | ||
| public class NonSupportedRequest | ||
| { | ||
| public RenderTexture destination = null; | ||
| public int mipLevel = 0; | ||
| public CubemapFace face = CubemapFace.Unknown; | ||
| public int slice = 0; | ||
| } | ||
|
|
||
| [SetUp] | ||
| public void Setup() | ||
| { | ||
| m_Obj = new GameObject(); | ||
| m_Camera = m_Obj.AddComponent<Camera>(); | ||
| m_Obj.AddComponent<HDAdditionalCameraData>(); | ||
|
|
||
| // Create main render loop history | ||
| HDCamera.GetOrCreate(m_Camera); | ||
|
|
||
| // Creating all user history channels | ||
| for(HDCamera.HistoryChannel channel = HDCamera.HistoryChannel.CustomUserHistory0; channel <= HDCamera.HistoryChannel.CustomUserHistory7; ++channel) | ||
| { | ||
| HDCamera.HistoryChannel newGeneratedChannel = HDCamera.GetFreeUserHistoryChannel(m_Camera); | ||
| HDCamera.GetOrCreate(m_Camera, 0, newGeneratedChannel); | ||
| Assert.IsTrue(newGeneratedChannel == channel); | ||
| } | ||
| } | ||
|
|
||
| [TearDown] | ||
| public void Cleanup() | ||
| { | ||
| Object.DestroyImmediate(m_Obj); | ||
| m_Obj = null; | ||
| m_Camera = null; | ||
| } | ||
|
|
||
| [Test, Description("Given a HDRP render pipeline, when checking its render request support, then we see that only Standard Request is supported")] | ||
| public void CheckRenderRequestSupport() | ||
| { | ||
| RenderPipeline.StandardRequest request = new RenderPipeline.StandardRequest(); | ||
| Assert.IsTrue(RenderPipeline.SupportsRenderRequest(m_Camera, request)); | ||
|
|
||
| NonSupportedRequest nonSupportedRequest = new NonSupportedRequest(); | ||
| Assert.IsFalse(RenderPipeline.SupportsRenderRequest(m_Camera, nonSupportedRequest)); | ||
| } | ||
|
|
||
| // History Channel API is only for internal use for now, to be publicly available when implemented in SRP Core | ||
| [Test, Description("Given a camera with all history channels generated, when checking if they exist, then the channels are found")] | ||
| public void CheckExistingHistoryChannels() | ||
| { | ||
| // All history channels should have been created at Setup (user ones + main render loop) | ||
| for(HDCamera.HistoryChannel channel = HDCamera.HistoryChannel.CustomUserHistory0; channel <= HDCamera.HistoryChannel.RenderLoopHistory; ++channel) | ||
| { | ||
| Assert.IsTrue(HDCamera.IsHistoryChannelExisting(m_Camera, 0, channel)); | ||
| } | ||
| } | ||
|
|
||
| [Test, Description("Given a camera with all history channels generated, when trying to create a new user history channel, then an exception is thrown")] | ||
| public void ThrowWhenTryingToCreateExtraUserHistoryChannel() | ||
| { | ||
| // No more available channel, all created at Setup, function will throw an exception | ||
| Assert.Throws<Exception>(() => HDCamera.GetFreeUserHistoryChannel(m_Camera)); | ||
| } | ||
|
|
||
| [Test, Description("Given a camera with all history channels generated, when deleting a specific user history channel, then the user channel is deleted")] | ||
| public void FreeSpecificHistoryChannel() | ||
| { | ||
| // Clearing user channels one by one | ||
| for(HDCamera.HistoryChannel channel = HDCamera.HistoryChannel.CustomUserHistory0; channel <= HDCamera.HistoryChannel.CustomUserHistory7; ++channel) | ||
| { | ||
| Assert.IsTrue(HDCamera.FreeUserHistoryChannel(m_Camera, 0, channel)); | ||
| // Can't free channel again, already gone | ||
| Assert.IsFalse(HDCamera.FreeUserHistoryChannel(m_Camera, 0, channel)); | ||
| } | ||
|
|
||
| // Can never free main render loop history | ||
| Assert.IsFalse(HDCamera.FreeUserHistoryChannel(m_Camera, 0, HDCamera.HistoryChannel.RenderLoopHistory)); | ||
| } | ||
|
|
||
| [Test, Description("Given a camera with all history channels generated, when trying to delete all user history channels, then all user channels are deleted")] | ||
| public void FreeAllHistoryChannels() | ||
| { | ||
| // Clearing all user history channels at once | ||
| HDCamera.FreeAllUserHistoryChannels(m_Camera); | ||
|
|
||
| // Making sure all user history channels are gone | ||
| for(HDCamera.HistoryChannel channel = HDCamera.HistoryChannel.CustomUserHistory0; channel <= HDCamera.HistoryChannel.CustomUserHistory7; ++channel) | ||
| { | ||
| Assert.IsFalse(HDCamera.IsHistoryChannelExisting(m_Camera, 0, channel)); | ||
| } | ||
|
|
||
| // Can never free main render loop history | ||
| Assert.IsTrue(HDCamera.IsHistoryChannelExisting(m_Camera, 0, HDCamera.HistoryChannel.RenderLoopHistory)); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!84 &8400000 | ||
| RenderTexture: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: CubeTarget | ||
| m_ImageContentsHash: | ||
| serializedVersion: 2 | ||
| Hash: 00000000000000000000000000000000 | ||
| m_ForcedFallbackFormat: 4 | ||
| m_DownscaleFallback: 0 | ||
| m_IsAlphaChannelOptional: 0 | ||
| serializedVersion: 5 | ||
| m_Width: 256 | ||
| m_Height: 256 | ||
| m_AntiAliasing: 1 | ||
| m_MipCount: -1 | ||
| m_DepthStencilFormat: 0 | ||
| m_ColorFormat: 8 | ||
| m_MipMap: 0 | ||
| m_GenerateMips: 1 | ||
| m_SRGB: 0 | ||
| m_UseDynamicScale: 0 | ||
| m_BindMS: 0 | ||
| m_EnableCompatibleFormat: 1 | ||
| m_TextureSettings: | ||
| serializedVersion: 2 | ||
| m_FilterMode: 1 | ||
| m_Aniso: 0 | ||
| m_MipBias: 0 | ||
| m_WrapU: 1 | ||
| m_WrapV: 1 | ||
| m_WrapW: 1 | ||
| m_Dimension: 4 | ||
| m_VolumeDepth: 1 | ||
| m_ShadowSamplingMode: 2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!114 &-6857844957278198841 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 11 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| version: 13 | ||
| hdPluginSubTargetMaterialVersions: | ||
| m_Keys: [] | ||
| m_Values: | ||
| --- !u!21 &2100000 | ||
| Material: | ||
| serializedVersion: 8 | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: 2DArrayMaterial | ||
| m_Shader: {fileID: -6465566751694194690, guid: 2f3133a777ef57245bc0b7b9856963be, | ||
| type: 3} | ||
| m_Parent: {fileID: 0} | ||
| m_ModifiedSerializedProperties: 0 | ||
| m_ValidKeywords: | ||
| - _DISABLE_SSR_TRANSPARENT | ||
| m_InvalidKeywords: [] | ||
| m_LightmapFlags: 4 | ||
| m_EnableInstancingVariants: 0 | ||
| m_DoubleSidedGI: 0 | ||
| m_CustomRenderQueue: 2225 | ||
| stringTagMap: | ||
| MotionVector: User | ||
| disabledShaderPasses: | ||
| - TransparentDepthPrepass | ||
| - TransparentDepthPostpass | ||
| - TransparentBackface | ||
| - RayTracingPrepass | ||
| - MOTIONVECTORS | ||
| m_LockedProperties: | ||
| m_SavedProperties: | ||
| serializedVersion: 3 | ||
| m_TexEnvs: | ||
| - _Texture2D_Array: | ||
| m_Texture: {fileID: 8400000, guid: 4f23887bfac34674bac778e33c332f23, type: 2} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_Lightmaps: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_LightmapsInd: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_ShadowMasks: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| m_Ints: [] | ||
| m_Floats: | ||
| - _AddPrecomputedVelocity: 0 | ||
| - _AlphaCutoffEnable: 0 | ||
| - _AlphaDstBlend: 0 | ||
| - _AlphaSrcBlend: 1 | ||
| - _BlendMode: 0 | ||
| - _ConservativeDepthOffsetEnable: 0 | ||
| - _CullMode: 2 | ||
| - _CullModeForward: 2 | ||
| - _DepthOffsetEnable: 0 | ||
| - _DoubleSidedEnable: 0 | ||
| - _DoubleSidedGIMode: 0 | ||
| - _DoubleSidedNormalMode: 2 | ||
| - _DstBlend: 0 | ||
| - _EnableBlendModePreserveSpecularLighting: 1 | ||
| - _EnableFogOnTransparent: 1 | ||
| - _MaterialID: 1 | ||
| - _MaterialTypeMask: 2 | ||
| - _OpaqueCullMode: 2 | ||
| - _QueueControl: 0 | ||
| - _QueueOffset: 0 | ||
| - _RayTracing: 0 | ||
| - _ReceivesSSR: 1 | ||
| - _ReceivesSSRTransparent: 0 | ||
| - _RefractionModel: 0 | ||
| - _RenderQueueType: 1 | ||
| - _RequireSplitLighting: 0 | ||
| - _SrcBlend: 1 | ||
| - _StencilRef: 0 | ||
| - _StencilRefDepth: 8 | ||
| - _StencilRefDistortionVec: 4 | ||
| - _StencilRefGBuffer: 10 | ||
| - _StencilRefMV: 40 | ||
| - _StencilWriteMask: 6 | ||
| - _StencilWriteMaskDepth: 9 | ||
| - _StencilWriteMaskDistortionVec: 4 | ||
| - _StencilWriteMaskGBuffer: 15 | ||
| - _StencilWriteMaskMV: 41 | ||
| - _SupportDecals: 1 | ||
| - _SurfaceType: 0 | ||
| - _TransmissionEnable: 1 | ||
| - _TransparentBackfaceEnable: 0 | ||
| - _TransparentCullMode: 2 | ||
| - _TransparentDepthPostpassEnable: 0 | ||
| - _TransparentDepthPrepassEnable: 0 | ||
| - _TransparentSortPriority: 0 | ||
| - _TransparentWritingMotionVec: 0 | ||
| - _TransparentZWrite: 0 | ||
| - _UseShadowThreshold: 0 | ||
| - _ZTestDepthEqualForOpaque: 3 | ||
| - _ZTestGBuffer: 4 | ||
| - _ZTestTransparent: 4 | ||
| - _ZWrite: 1 | ||
| m_Colors: | ||
| - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} | ||
| - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} | ||
| m_BuildTextureStacks: [] | ||
| --- !u!114 &3052253946277034384 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 11 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| version: 7 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,276 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!114 &-3204572539675280851 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 11 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| version: 13 | ||
| hdPluginSubTargetMaterialVersions: | ||
| m_Keys: [] | ||
| m_Values: | ||
| --- !u!21 &2100000 | ||
| Material: | ||
| serializedVersion: 8 | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: Scene | ||
| m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} | ||
| m_Parent: {fileID: 0} | ||
| m_ModifiedSerializedProperties: 0 | ||
| m_ValidKeywords: | ||
| - _DISABLE_SSR_TRANSPARENT | ||
| - _NORMALMAP_TANGENT_SPACE | ||
| m_InvalidKeywords: [] | ||
| m_LightmapFlags: 4 | ||
| m_EnableInstancingVariants: 0 | ||
| m_DoubleSidedGI: 0 | ||
| m_CustomRenderQueue: 2225 | ||
| stringTagMap: {} | ||
| disabledShaderPasses: | ||
| - TransparentDepthPrepass | ||
| - TransparentDepthPostpass | ||
| - TransparentBackface | ||
| - RayTracingPrepass | ||
| - MOTIONVECTORS | ||
| m_LockedProperties: | ||
| 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} | ||
| - _BentNormalMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _BentNormalMapOS: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _CoatMaskMap: | ||
| 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} | ||
| - _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} | ||
| - _IridescenceMaskMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _IridescenceThicknessMap: | ||
| 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} | ||
| - _NormalMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _NormalMapOS: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _SpecularColorMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _SubsurfaceMaskMap: | ||
| 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} | ||
| - _TangentMapOS: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _ThicknessMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _TransmissionMaskMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _TransmittanceColorMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_Lightmaps: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_LightmapsInd: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_ShadowMasks: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| m_Ints: [] | ||
| m_Floats: | ||
| - _AORemapMax: 1 | ||
| - _AORemapMin: 0 | ||
| - _ATDistance: 1 | ||
| - _AddPrecomputedVelocity: 0 | ||
| - _AlbedoAffectEmissive: 0 | ||
| - _AlphaCutoff: 0.5 | ||
| - _AlphaCutoffEnable: 0 | ||
| - _AlphaCutoffPostpass: 0.5 | ||
| - _AlphaCutoffPrepass: 0.5 | ||
| - _AlphaCutoffShadow: 0.5 | ||
| - _AlphaDstBlend: 0 | ||
| - _AlphaRemapMax: 1 | ||
| - _AlphaRemapMin: 0 | ||
| - _AlphaSrcBlend: 1 | ||
| - _Anisotropy: 0 | ||
| - _BlendMode: 0 | ||
| - _CoatMask: 0 | ||
| - _CullMode: 2 | ||
| - _CullModeForward: 2 | ||
| - _Cutoff: 0.5 | ||
| - _DepthOffsetEnable: 0 | ||
| - _DetailAlbedoScale: 1 | ||
| - _DetailNormalScale: 1 | ||
| - _DetailSmoothnessScale: 1 | ||
| - _DiffusionProfile: 0 | ||
| - _DiffusionProfileHash: 0 | ||
| - _DisplacementLockObjectScale: 1 | ||
| - _DisplacementLockTilingScale: 1 | ||
| - _DisplacementMode: 0 | ||
| - _DoubleSidedEnable: 0 | ||
| - _DoubleSidedGIMode: 0 | ||
| - _DoubleSidedNormalMode: 1 | ||
| - _DstBlend: 0 | ||
| - _EmissiveColorMode: 1 | ||
| - _EmissiveExposureWeight: 1 | ||
| - _EmissiveIntensity: 1 | ||
| - _EmissiveIntensityUnit: 0 | ||
| - _EnableBlendModePreserveSpecularLighting: 1 | ||
| - _EnableFogOnTransparent: 1 | ||
| - _EnableGeometricSpecularAA: 0 | ||
| - _EnergyConservingSpecularColor: 1 | ||
| - _HeightAmplitude: 0.02 | ||
| - _HeightCenter: 0.5 | ||
| - _HeightMapParametrization: 0 | ||
| - _HeightMax: 1 | ||
| - _HeightMin: -1 | ||
| - _HeightOffset: 0 | ||
| - _HeightPoMAmplitude: 2 | ||
| - _HeightTessAmplitude: 2 | ||
| - _HeightTessCenter: 0.5 | ||
| - _InvTilingScale: 1 | ||
| - _Ior: 1.5 | ||
| - _IridescenceMask: 1 | ||
| - _IridescenceThickness: 1 | ||
| - _LinkDetailsWithBase: 1 | ||
| - _MaterialID: 1 | ||
| - _Metallic: 0 | ||
| - _MetallicRemapMax: 1 | ||
| - _MetallicRemapMin: 0 | ||
| - _NormalMapSpace: 0 | ||
| - _NormalScale: 1 | ||
| - _ObjectSpaceUVMapping: 0 | ||
| - _ObjectSpaceUVMappingEmissive: 0 | ||
| - _OpaqueCullMode: 2 | ||
| - _PPDLodThreshold: 5 | ||
| - _PPDMaxSamples: 15 | ||
| - _PPDMinSamples: 5 | ||
| - _PPDPrimitiveLength: 1 | ||
| - _PPDPrimitiveWidth: 1 | ||
| - _RayTracing: 0 | ||
| - _ReceivesSSR: 1 | ||
| - _ReceivesSSRTransparent: 0 | ||
| - _RefractionModel: 0 | ||
| - _Smoothness: 0.5 | ||
| - _SmoothnessRemapMax: 1 | ||
| - _SmoothnessRemapMin: 0 | ||
| - _SpecularAAScreenSpaceVariance: 0.1 | ||
| - _SpecularAAThreshold: 0.2 | ||
| - _SpecularOcclusionMode: 1 | ||
| - _SrcBlend: 1 | ||
| - _StencilRef: 0 | ||
| - _StencilRefDepth: 8 | ||
| - _StencilRefGBuffer: 10 | ||
| - _StencilRefMV: 40 | ||
| - _StencilWriteMask: 6 | ||
| - _StencilWriteMaskDepth: 9 | ||
| - _StencilWriteMaskGBuffer: 15 | ||
| - _StencilWriteMaskMV: 41 | ||
| - _SubsurfaceMask: 1 | ||
| - _SupportDecals: 1 | ||
| - _SurfaceType: 0 | ||
| - _TexWorldScale: 1 | ||
| - _TexWorldScaleEmissive: 1 | ||
| - _Thickness: 1 | ||
| - _TransmissionEnable: 1 | ||
| - _TransmissionMask: 1 | ||
| - _TransparentBackfaceEnable: 0 | ||
| - _TransparentCullMode: 2 | ||
| - _TransparentDepthPostpassEnable: 0 | ||
| - _TransparentDepthPrepassEnable: 0 | ||
| - _TransparentSortPriority: 0 | ||
| - _TransparentWritingMotionVec: 0 | ||
| - _TransparentZWrite: 0 | ||
| - _UVBase: 0 | ||
| - _UVDetail: 0 | ||
| - _UVEmissive: 0 | ||
| - _UseEmissiveIntensity: 0 | ||
| - _UseShadowThreshold: 0 | ||
| - _ZTestDepthEqualForOpaque: 3 | ||
| - _ZTestGBuffer: 4 | ||
| - _ZTestTransparent: 4 | ||
| - _ZWrite: 1 | ||
| m_Colors: | ||
| - _BaseColor: {r: 1, g: 1, b: 1, a: 1} | ||
| - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} | ||
| - _Color: {r: 1, g: 1, b: 1, a: 1} | ||
| - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} | ||
| - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} | ||
| - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} | ||
| - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} | ||
| - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} | ||
| - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} | ||
| - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} | ||
| - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} | ||
| - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} | ||
| - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} | ||
| - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} | ||
| - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} | ||
| - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} | ||
| m_BuildTextureStacks: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,353 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!114 &-1324166032169216762 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 11 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| version: 13 | ||
| hdPluginSubTargetMaterialVersions: | ||
| m_Keys: [] | ||
| m_Values: | ||
| --- !u!21 &2100000 | ||
| Material: | ||
| serializedVersion: 8 | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: Texture2DTarget | ||
| m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} | ||
| m_Parent: {fileID: 0} | ||
| m_ModifiedSerializedProperties: 0 | ||
| m_ValidKeywords: | ||
| - _DISABLE_SSR_TRANSPARENT | ||
| - _NORMALMAP_TANGENT_SPACE | ||
| m_InvalidKeywords: [] | ||
| m_LightmapFlags: 4 | ||
| m_EnableInstancingVariants: 0 | ||
| m_DoubleSidedGI: 0 | ||
| m_CustomRenderQueue: 2225 | ||
| stringTagMap: {} | ||
| disabledShaderPasses: | ||
| - TransparentDepthPrepass | ||
| - TransparentDepthPostpass | ||
| - TransparentBackface | ||
| - RayTracingPrepass | ||
| - MOTIONVECTORS | ||
| m_LockedProperties: | ||
| 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: 8400000, guid: 3e4a877aea3e91540a72b16a50cd5644, type: 2} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _BaseMap: | ||
| m_Texture: {fileID: 8400000, guid: 93902ee79cd9b0a46a26567520a7aa01, type: 2} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _BentNormalMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _BentNormalMapOS: | ||
| 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} | ||
| - _CoatMaskMap: | ||
| 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} | ||
| - _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} | ||
| - _IridescenceMaskMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _IridescenceThicknessMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _MainTex: | ||
| m_Texture: {fileID: 8400000, guid: 3e4a877aea3e91540a72b16a50cd5644, type: 2} | ||
| 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} | ||
| - _NormalMapOS: | ||
| 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} | ||
| - _SpecGlossMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _SpecularColorMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _SubsurfaceMaskMap: | ||
| 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} | ||
| - _TangentMapOS: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _ThicknessMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _TransmissionMaskMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - _TransmittanceColorMap: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_Lightmaps: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_LightmapsInd: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_ShadowMasks: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| m_Ints: [] | ||
| m_Floats: | ||
| - _AORemapMax: 1 | ||
| - _AORemapMin: 0 | ||
| - _ATDistance: 1 | ||
| - _AddPrecomputedVelocity: 0 | ||
| - _AlbedoAffectEmissive: 0 | ||
| - _AlphaClip: 0 | ||
| - _AlphaCutoff: 0.5 | ||
| - _AlphaCutoffEnable: 0 | ||
| - _AlphaCutoffPostpass: 0.5 | ||
| - _AlphaCutoffPrepass: 0.5 | ||
| - _AlphaCutoffShadow: 0.5 | ||
| - _AlphaDstBlend: 0 | ||
| - _AlphaRemapMax: 1 | ||
| - _AlphaRemapMin: 0 | ||
| - _AlphaSrcBlend: 1 | ||
| - _Anisotropy: 0 | ||
| - _Blend: 0 | ||
| - _BlendMode: 0 | ||
| - _BlendModePreserveSpecular: 1 | ||
| - _BumpScale: 1 | ||
| - _ClearCoatMask: 0 | ||
| - _ClearCoatSmoothness: 0 | ||
| - _CoatMask: 0 | ||
| - _Cull: 2 | ||
| - _CullMode: 2 | ||
| - _CullModeForward: 2 | ||
| - _Cutoff: 0.5 | ||
| - _DepthOffsetEnable: 0 | ||
| - _DetailAlbedoMapScale: 1 | ||
| - _DetailAlbedoScale: 1 | ||
| - _DetailNormalMapScale: 1 | ||
| - _DetailNormalScale: 1 | ||
| - _DetailSmoothnessScale: 1 | ||
| - _DiffusionProfile: 0 | ||
| - _DiffusionProfileHash: 0 | ||
| - _DisplacementLockObjectScale: 1 | ||
| - _DisplacementLockTilingScale: 1 | ||
| - _DisplacementMode: 0 | ||
| - _DoubleSidedEnable: 0 | ||
| - _DoubleSidedGIMode: 0 | ||
| - _DoubleSidedNormalMode: 1 | ||
| - _DstBlend: 0 | ||
| - _DstBlendAlpha: 0 | ||
| - _EmissiveColorMode: 1 | ||
| - _EmissiveExposureWeight: 1 | ||
| - _EmissiveIntensity: 1 | ||
| - _EmissiveIntensityUnit: 0 | ||
| - _EnableBlendModePreserveSpecularLighting: 1 | ||
| - _EnableFogOnTransparent: 1 | ||
| - _EnableGeometricSpecularAA: 0 | ||
| - _EnergyConservingSpecularColor: 1 | ||
| - _EnvironmentReflections: 1 | ||
| - _GlossMapScale: 0 | ||
| - _Glossiness: 0 | ||
| - _GlossyReflections: 0 | ||
| - _HeightAmplitude: 0.02 | ||
| - _HeightCenter: 0.5 | ||
| - _HeightMapParametrization: 0 | ||
| - _HeightMax: 1 | ||
| - _HeightMin: -1 | ||
| - _HeightOffset: 0 | ||
| - _HeightPoMAmplitude: 2 | ||
| - _HeightTessAmplitude: 2 | ||
| - _HeightTessCenter: 0.5 | ||
| - _InvTilingScale: 1 | ||
| - _Ior: 1.5 | ||
| - _IridescenceMask: 1 | ||
| - _IridescenceThickness: 1 | ||
| - _LinkDetailsWithBase: 1 | ||
| - _MaterialID: 1 | ||
| - _Metallic: 0 | ||
| - _MetallicRemapMax: 0 | ||
| - _MetallicRemapMin: 0 | ||
| - _NormalMapSpace: 0 | ||
| - _NormalScale: 1 | ||
| - _ObjectSpaceUVMapping: 0 | ||
| - _ObjectSpaceUVMappingEmissive: 0 | ||
| - _OcclusionStrength: 1 | ||
| - _OpaqueCullMode: 2 | ||
| - _PPDLodThreshold: 5 | ||
| - _PPDMaxSamples: 15 | ||
| - _PPDMinSamples: 5 | ||
| - _PPDPrimitiveLength: 1 | ||
| - _PPDPrimitiveWidth: 1 | ||
| - _Parallax: 0.005 | ||
| - _QueueOffset: 0 | ||
| - _RayTracing: 0 | ||
| - _ReceiveShadows: 1 | ||
| - _ReceivesSSR: 1 | ||
| - _ReceivesSSRTransparent: 0 | ||
| - _RefractionModel: 0 | ||
| - _Smoothness: 0.5 | ||
| - _SmoothnessRemapMax: 1 | ||
| - _SmoothnessRemapMin: 0 | ||
| - _SmoothnessTextureChannel: 0 | ||
| - _SpecularAAScreenSpaceVariance: 0.1 | ||
| - _SpecularAAThreshold: 0.2 | ||
| - _SpecularHighlights: 1 | ||
| - _SpecularOcclusionMode: 1 | ||
| - _SrcBlend: 1 | ||
| - _SrcBlendAlpha: 1 | ||
| - _StencilRef: 0 | ||
| - _StencilRefDepth: 8 | ||
| - _StencilRefGBuffer: 10 | ||
| - _StencilRefMV: 40 | ||
| - _StencilWriteMask: 6 | ||
| - _StencilWriteMaskDepth: 9 | ||
| - _StencilWriteMaskGBuffer: 15 | ||
| - _StencilWriteMaskMV: 41 | ||
| - _SubsurfaceMask: 1 | ||
| - _SupportDecals: 1 | ||
| - _Surface: 0 | ||
| - _SurfaceType: 0 | ||
| - _TexWorldScale: 1 | ||
| - _TexWorldScaleEmissive: 1 | ||
| - _Thickness: 1 | ||
| - _TransmissionEnable: 1 | ||
| - _TransmissionMask: 1 | ||
| - _TransparentBackfaceEnable: 0 | ||
| - _TransparentCullMode: 2 | ||
| - _TransparentDepthPostpassEnable: 0 | ||
| - _TransparentDepthPrepassEnable: 0 | ||
| - _TransparentSortPriority: 0 | ||
| - _TransparentWritingMotionVec: 0 | ||
| - _TransparentZWrite: 0 | ||
| - _UVBase: 0 | ||
| - _UVDetail: 0 | ||
| - _UVEmissive: 0 | ||
| - _UseEmissiveIntensity: 0 | ||
| - _UseShadowThreshold: 0 | ||
| - _WorkflowMode: 1 | ||
| - _ZTestDepthEqualForOpaque: 3 | ||
| - _ZTestGBuffer: 4 | ||
| - _ZTestTransparent: 4 | ||
| - _ZWrite: 1 | ||
| m_Colors: | ||
| - _BaseColor: {r: 1, g: 1, b: 1, a: 1} | ||
| - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} | ||
| - _Color: {r: 1, g: 1, b: 1, a: 1} | ||
| - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} | ||
| - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} | ||
| - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} | ||
| - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} | ||
| - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} | ||
| - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} | ||
| - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} | ||
| - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | ||
| - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} | ||
| - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} | ||
| - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} | ||
| - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} | ||
| - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} | ||
| - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} | ||
| m_BuildTextureStacks: [] | ||
| --- !u!114 &6330573358565326672 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 11 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| version: 7 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!114 &-652487388218780746 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 11 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| version: 7 | ||
| --- !u!21 &2100000 | ||
| Material: | ||
| serializedVersion: 8 | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: Texture3DMaterial | ||
| m_Shader: {fileID: -6465566751694194690, guid: bcbfcfa7d1a936a43b447d2965faadd1, | ||
| type: 3} | ||
| m_Parent: {fileID: 0} | ||
| m_ModifiedSerializedProperties: 0 | ||
| m_ValidKeywords: | ||
| - _DISABLE_SSR_TRANSPARENT | ||
| m_InvalidKeywords: [] | ||
| m_LightmapFlags: 4 | ||
| m_EnableInstancingVariants: 0 | ||
| m_DoubleSidedGI: 0 | ||
| m_CustomRenderQueue: 2225 | ||
| stringTagMap: | ||
| MotionVector: User | ||
| disabledShaderPasses: | ||
| - TransparentDepthPrepass | ||
| - TransparentDepthPostpass | ||
| - TransparentBackface | ||
| - RayTracingPrepass | ||
| - MOTIONVECTORS | ||
| m_LockedProperties: | ||
| m_SavedProperties: | ||
| serializedVersion: 3 | ||
| m_TexEnvs: | ||
| - _Texture3D: | ||
| m_Texture: {fileID: 8400000, guid: 197769df871dcab4ebf6687b159e729b, type: 2} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_Lightmaps: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_LightmapsInd: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_ShadowMasks: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| m_Ints: [] | ||
| m_Floats: | ||
| - _AddPrecomputedVelocity: 0 | ||
| - _AlphaCutoffEnable: 0 | ||
| - _AlphaDstBlend: 0 | ||
| - _AlphaSrcBlend: 1 | ||
| - _BlendMode: 0 | ||
| - _ConservativeDepthOffsetEnable: 0 | ||
| - _CullMode: 2 | ||
| - _CullModeForward: 2 | ||
| - _DepthOffsetEnable: 0 | ||
| - _DoubleSidedEnable: 0 | ||
| - _DoubleSidedGIMode: 0 | ||
| - _DoubleSidedNormalMode: 2 | ||
| - _DstBlend: 0 | ||
| - _EnableBlendModePreserveSpecularLighting: 1 | ||
| - _EnableFogOnTransparent: 1 | ||
| - _MaterialID: 1 | ||
| - _MaterialTypeMask: 2 | ||
| - _OpaqueCullMode: 2 | ||
| - _QueueControl: 0 | ||
| - _QueueOffset: 0 | ||
| - _RayTracing: 0 | ||
| - _ReceivesSSR: 1 | ||
| - _ReceivesSSRTransparent: 0 | ||
| - _RefractionModel: 0 | ||
| - _RenderQueueType: 1 | ||
| - _RequireSplitLighting: 0 | ||
| - _SrcBlend: 1 | ||
| - _StencilRef: 0 | ||
| - _StencilRefDepth: 8 | ||
| - _StencilRefDistortionVec: 4 | ||
| - _StencilRefGBuffer: 10 | ||
| - _StencilRefMV: 40 | ||
| - _StencilWriteMask: 6 | ||
| - _StencilWriteMaskDepth: 9 | ||
| - _StencilWriteMaskDistortionVec: 4 | ||
| - _StencilWriteMaskGBuffer: 15 | ||
| - _StencilWriteMaskMV: 41 | ||
| - _SupportDecals: 1 | ||
| - _SurfaceType: 0 | ||
| - _TransmissionEnable: 1 | ||
| - _TransparentBackfaceEnable: 0 | ||
| - _TransparentCullMode: 2 | ||
| - _TransparentDepthPostpassEnable: 0 | ||
| - _TransparentDepthPrepassEnable: 0 | ||
| - _TransparentSortPriority: 0 | ||
| - _TransparentWritingMotionVec: 0 | ||
| - _TransparentZWrite: 0 | ||
| - _UseShadowThreshold: 0 | ||
| - _ZTestDepthEqualForOpaque: 3 | ||
| - _ZTestGBuffer: 4 | ||
| - _ZTestTransparent: 4 | ||
| - _ZWrite: 1 | ||
| m_Colors: | ||
| - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} | ||
| - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} | ||
| m_BuildTextureStacks: [] | ||
| --- !u!114 &1984176137618647316 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 11 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| version: 13 | ||
| hdPluginSubTargetMaterialVersions: | ||
| m_Keys: [] | ||
| m_Values: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!114 &-7627984445654775351 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 11 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| version: 13 | ||
| hdPluginSubTargetMaterialVersions: | ||
| m_Keys: [] | ||
| m_Values: | ||
| --- !u!114 &-1623093597045508073 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 11 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| version: 7 | ||
| --- !u!21 &2100000 | ||
| Material: | ||
| serializedVersion: 8 | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: cubeMaterial | ||
| m_Shader: {fileID: -6465566751694194690, guid: 474a8569bb8db314ebf758dd15911ea1, | ||
| type: 3} | ||
| m_Parent: {fileID: 0} | ||
| m_ModifiedSerializedProperties: 0 | ||
| m_ValidKeywords: | ||
| - _DISABLE_SSR_TRANSPARENT | ||
| m_InvalidKeywords: [] | ||
| m_LightmapFlags: 4 | ||
| m_EnableInstancingVariants: 0 | ||
| m_DoubleSidedGI: 0 | ||
| m_CustomRenderQueue: 2225 | ||
| stringTagMap: | ||
| MotionVector: User | ||
| disabledShaderPasses: | ||
| - TransparentDepthPrepass | ||
| - TransparentDepthPostpass | ||
| - TransparentBackface | ||
| - RayTracingPrepass | ||
| - MOTIONVECTORS | ||
| m_LockedProperties: | ||
| m_SavedProperties: | ||
| serializedVersion: 3 | ||
| m_TexEnvs: | ||
| - _Cubemap: | ||
| m_Texture: {fileID: 8400000, guid: a814dcfb0bee3be4c8ca5a369bf68730, type: 2} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_Lightmaps: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_LightmapsInd: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| - unity_ShadowMasks: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| m_Ints: [] | ||
| m_Floats: | ||
| - _AddPrecomputedVelocity: 0 | ||
| - _AlphaCutoffEnable: 0 | ||
| - _AlphaDstBlend: 0 | ||
| - _AlphaSrcBlend: 1 | ||
| - _BlendMode: 0 | ||
| - _ConservativeDepthOffsetEnable: 0 | ||
| - _CullMode: 2 | ||
| - _CullModeForward: 2 | ||
| - _DepthOffsetEnable: 0 | ||
| - _DoubleSidedEnable: 0 | ||
| - _DoubleSidedGIMode: 0 | ||
| - _DoubleSidedNormalMode: 2 | ||
| - _DstBlend: 0 | ||
| - _EnableBlendModePreserveSpecularLighting: 1 | ||
| - _EnableFogOnTransparent: 1 | ||
| - _MaterialID: 1 | ||
| - _MaterialTypeMask: 2 | ||
| - _OpaqueCullMode: 2 | ||
| - _QueueControl: 0 | ||
| - _QueueOffset: 0 | ||
| - _RayTracing: 0 | ||
| - _ReceivesSSR: 1 | ||
| - _ReceivesSSRTransparent: 0 | ||
| - _RefractionModel: 0 | ||
| - _RenderQueueType: 1 | ||
| - _RequireSplitLighting: 0 | ||
| - _SrcBlend: 1 | ||
| - _StencilRef: 0 | ||
| - _StencilRefDepth: 8 | ||
| - _StencilRefDistortionVec: 4 | ||
| - _StencilRefGBuffer: 10 | ||
| - _StencilRefMV: 40 | ||
| - _StencilWriteMask: 6 | ||
| - _StencilWriteMaskDepth: 9 | ||
| - _StencilWriteMaskDistortionVec: 4 | ||
| - _StencilWriteMaskGBuffer: 15 | ||
| - _StencilWriteMaskMV: 41 | ||
| - _SupportDecals: 1 | ||
| - _SurfaceType: 0 | ||
| - _TransmissionEnable: 1 | ||
| - _TransparentBackfaceEnable: 0 | ||
| - _TransparentCullMode: 2 | ||
| - _TransparentDepthPostpassEnable: 0 | ||
| - _TransparentDepthPrepassEnable: 0 | ||
| - _TransparentSortPriority: 0 | ||
| - _TransparentWritingMotionVec: 0 | ||
| - _TransparentZWrite: 0 | ||
| - _UseShadowThreshold: 0 | ||
| - _ZTestDepthEqualForOpaque: 3 | ||
| - _ZTestGBuffer: 4 | ||
| - _ZTestTransparent: 4 | ||
| - _ZWrite: 1 | ||
| m_Colors: | ||
| - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} | ||
| - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} | ||
| m_BuildTextureStacks: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| using System; | ||
| using System.Collections; | ||
| using System.Collections.Generic; | ||
| using UnityEngine; | ||
| using UnityEngine.Experimental.Rendering; | ||
| using UnityEngine.Rendering; | ||
| using UnityEngine.Rendering.HighDefinition; | ||
|
|
||
| // Non-graphics related parts of the RenderRequest API are tested in HDRP_PlayMode | ||
| [RequireComponent(typeof(HDAdditionalCameraData))] | ||
| public class RenderRequest : MonoBehaviour | ||
| { | ||
| [SerializeField] | ||
| RenderTexture texture2D, texture2DArray, cubeMap, texture3D; | ||
| Texture2D blackTexture; | ||
| RTHandle aovDepthTexture; | ||
|
|
||
| bool m_IsAOVCallbackTriggered = false; | ||
|
|
||
| void CheckSubmitRenderRequestAPI(Camera cam) | ||
| { | ||
| RenderPipeline.StandardRequest request = new RenderPipeline.StandardRequest(); | ||
|
|
||
| if (RenderPipeline.SupportsRenderRequest(cam, request)) | ||
| { | ||
| // Adding AOV request to HDRP in parallel to SRP render requests, it should not be triggered by them | ||
| GetComponent<HDAdditionalCameraData>().SetAOVRequests(BuildAovRequest()); | ||
|
|
||
| request.destination = texture2D; | ||
| RenderPipeline.SubmitRenderRequest(cam, request); | ||
|
|
||
| request.destination = texture2DArray; | ||
| for(int i = 0; i < texture2DArray.volumeDepth; i++) | ||
| { | ||
| request.slice = i; | ||
| RenderPipeline.SubmitRenderRequest(cam, request); | ||
| } | ||
|
|
||
| //Set all cubemap faces to black, Switch doesn't initialize the data to black | ||
| blackTexture = new Texture2D(256, 256, TextureFormat.RGBA32, false); | ||
| Color[] colors = new Color[256 * 256]; | ||
| for (int i = 0; i < colors.Length; i++) | ||
| { | ||
| colors[i] = Color.black; | ||
| } | ||
| blackTexture.SetPixels(colors); | ||
| blackTexture.Apply(); | ||
| for (int i = 0; i < 6; ++i) | ||
| { | ||
| Graphics.CopyTexture(blackTexture, 0, cubeMap, i); | ||
| } | ||
|
|
||
| var faces = new[] { | ||
| CubemapFace.NegativeX, CubemapFace.PositiveX, | ||
| CubemapFace.NegativeY, CubemapFace.PositiveY, | ||
| CubemapFace.NegativeZ, CubemapFace.PositiveZ | ||
| }; | ||
|
|
||
| request.destination = cubeMap; | ||
| request.slice = 0; | ||
| foreach (var face in faces) | ||
| { | ||
| request.face = face; | ||
| RenderPipeline.SubmitRenderRequest(cam, request); | ||
| } | ||
|
|
||
| request.destination = texture3D; | ||
| for (int i = 0; i < texture3D.volumeDepth; i++) | ||
| { | ||
| request.slice = i; | ||
| RenderPipeline.SubmitRenderRequest(cam, request); | ||
| } | ||
|
|
||
| // StandardRequests should not trigger AOV callbacks | ||
| if (m_IsAOVCallbackTriggered) | ||
| throw new System.Exception("AOV callback should NOT have been triggered"); | ||
| } | ||
| } | ||
|
|
||
| // Callback is done by main thread sequentially after rendering, no data race | ||
| void AovCallback( | ||
| CommandBuffer cmd, | ||
| List<RTHandle> buffers, | ||
| RenderOutputProperties outProps | ||
| ) | ||
| { | ||
| m_IsAOVCallbackTriggered = true; | ||
| } | ||
|
|
||
| RTHandle RTAllocator(AOVBuffers bufferID) | ||
| { | ||
| if(bufferID == AOVBuffers.DepthStencil) | ||
| return aovDepthTexture ?? | ||
| (aovDepthTexture = RTHandles.Alloc( | ||
| 256, 256, 1, DepthBits.None, GraphicsFormat.R8G8B8A8_SRGB)); | ||
|
|
||
| return null; | ||
| } | ||
|
|
||
| AOVRequestDataCollection BuildAovRequest() | ||
| { | ||
| return new AOVRequestBuilder().Add( | ||
| AOVRequest.NewDefault(), | ||
| RTAllocator, | ||
| null, // lightFilter | ||
| new[] | ||
| { | ||
| AOVBuffers.DepthStencil, | ||
| }, | ||
| AovCallback | ||
| ).Build(); | ||
| } | ||
|
|
||
| public void OnDisable() | ||
| { | ||
| RTHandles.Release(aovDepthTexture); | ||
| Destroy(blackTexture); | ||
| } | ||
|
|
||
| bool m_TriggerOnce = true; | ||
|
|
||
| // Update is called once per frame | ||
| public void Update() | ||
| { | ||
| if(m_TriggerOnce) | ||
| { | ||
| Camera cam = GetComponent<Camera>(); | ||
|
|
||
| // Check if the texture transfers from SRP to user project can be done | ||
| CheckSubmitRenderRequestAPI(cam); | ||
|
|
||
| m_TriggerOnce = false; | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!84 &8400000 | ||
| RenderTexture: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: SceneCamera | ||
| m_ImageContentsHash: | ||
| serializedVersion: 2 | ||
| Hash: 00000000000000000000000000000000 | ||
| m_ForcedFallbackFormat: 4 | ||
| m_DownscaleFallback: 0 | ||
| m_IsAlphaChannelOptional: 0 | ||
| serializedVersion: 5 | ||
| m_Width: 256 | ||
| m_Height: 256 | ||
| m_AntiAliasing: 1 | ||
| m_MipCount: -1 | ||
| m_DepthStencilFormat: 94 | ||
| m_ColorFormat: 8 | ||
| m_MipMap: 0 | ||
| m_GenerateMips: 1 | ||
| m_SRGB: 0 | ||
| m_UseDynamicScale: 0 | ||
| m_BindMS: 0 | ||
| m_EnableCompatibleFormat: 1 | ||
| m_TextureSettings: | ||
| serializedVersion: 2 | ||
| m_FilterMode: 1 | ||
| m_Aniso: 0 | ||
| m_MipBias: 0 | ||
| m_WrapU: 1 | ||
| m_WrapV: 1 | ||
| m_WrapW: 1 | ||
| m_Dimension: 2 | ||
| m_VolumeDepth: 1 | ||
| m_ShadowSamplingMode: 2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!84 &8400000 | ||
| RenderTexture: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: Texture2DArrayTarget | ||
| m_ImageContentsHash: | ||
| serializedVersion: 2 | ||
| Hash: 00000000000000000000000000000000 | ||
| m_ForcedFallbackFormat: 4 | ||
| m_DownscaleFallback: 0 | ||
| m_IsAlphaChannelOptional: 0 | ||
| serializedVersion: 5 | ||
| m_Width: 256 | ||
| m_Height: 256 | ||
| m_AntiAliasing: 1 | ||
| m_MipCount: -1 | ||
| m_DepthStencilFormat: 94 | ||
| m_ColorFormat: 8 | ||
| m_MipMap: 0 | ||
| m_GenerateMips: 1 | ||
| m_SRGB: 0 | ||
| m_UseDynamicScale: 0 | ||
| m_BindMS: 0 | ||
| m_EnableCompatibleFormat: 1 | ||
| m_TextureSettings: | ||
| serializedVersion: 2 | ||
| m_FilterMode: 1 | ||
| m_Aniso: 0 | ||
| m_MipBias: 0 | ||
| m_WrapU: 1 | ||
| m_WrapV: 1 | ||
| m_WrapW: 1 | ||
| m_Dimension: 5 | ||
| m_VolumeDepth: 10 | ||
| m_ShadowSamplingMode: 2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!84 &8400000 | ||
| RenderTexture: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: Texture2DTarget | ||
| m_ImageContentsHash: | ||
| serializedVersion: 2 | ||
| Hash: 00000000000000000000000000000000 | ||
| m_ForcedFallbackFormat: 4 | ||
| m_DownscaleFallback: 0 | ||
| m_IsAlphaChannelOptional: 0 | ||
| serializedVersion: 5 | ||
| m_Width: 256 | ||
| m_Height: 256 | ||
| m_AntiAliasing: 1 | ||
| m_MipCount: -1 | ||
| m_DepthStencilFormat: 94 | ||
| m_ColorFormat: 8 | ||
| m_MipMap: 0 | ||
| m_GenerateMips: 1 | ||
| m_SRGB: 0 | ||
| m_UseDynamicScale: 0 | ||
| m_BindMS: 0 | ||
| m_EnableCompatibleFormat: 1 | ||
| m_TextureSettings: | ||
| serializedVersion: 2 | ||
| m_FilterMode: 1 | ||
| m_Aniso: 0 | ||
| m_MipBias: 0 | ||
| m_WrapU: 1 | ||
| m_WrapV: 1 | ||
| m_WrapW: 1 | ||
| m_Dimension: 2 | ||
| m_VolumeDepth: 1 | ||
| m_ShadowSamplingMode: 2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!84 &8400000 | ||
| RenderTexture: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_Name: Texture3DTarget | ||
| m_ImageContentsHash: | ||
| serializedVersion: 2 | ||
| Hash: 00000000000000000000000000000000 | ||
| m_ForcedFallbackFormat: 4 | ||
| m_DownscaleFallback: 0 | ||
| m_IsAlphaChannelOptional: 0 | ||
| serializedVersion: 5 | ||
| m_Width: 256 | ||
| m_Height: 256 | ||
| m_AntiAliasing: 1 | ||
| m_MipCount: -1 | ||
| m_DepthStencilFormat: 0 | ||
| m_ColorFormat: 8 | ||
| m_MipMap: 0 | ||
| m_GenerateMips: 1 | ||
| m_SRGB: 0 | ||
| m_UseDynamicScale: 0 | ||
| m_BindMS: 0 | ||
| m_EnableCompatibleFormat: 1 | ||
| m_TextureSettings: | ||
| serializedVersion: 2 | ||
| m_FilterMode: 1 | ||
| m_Aniso: 0 | ||
| m_MipBias: 0 | ||
| m_WrapU: 1 | ||
| m_WrapV: 1 | ||
| m_WrapW: 1 | ||
| m_Dimension: 3 | ||
| m_VolumeDepth: 1 | ||
| m_ShadowSamplingMode: 2 |