From 1f26f125e4297bc73c96c3b9379a5187a780eb79 Mon Sep 17 00:00:00 2001 From: Dieter Date: Fri, 26 Apr 2019 11:02:39 +0200 Subject: [PATCH 001/143] [VirtualTexturing] Initial support for VT inside lwrp. Uses an additional (lowres) renderpass and currently only Unlit_VT is the only shader supported (handcoded). requires latest graphics/virtualtexturing engine branch --- .../LightweightRenderPipelineAssetEditor.cs | 4 + .../Data/LightweightRenderPipelineAsset.cs | 7 + .../Runtime/ForwardRenderer.cs | 9 + .../Runtime/LightweightRenderPipeline.cs | 3 + .../Runtime/Passes/VTFeedbackPass.cs | 88 +++++ .../Runtime/Passes/VTFeedbackPass.cs.meta | 11 + .../Shaders/Unlit_VT.shader | 308 ++++++++++++++++++ .../Shaders/Unlit_VT.shader.meta | 9 + 8 files changed, 439 insertions(+) create mode 100644 com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs create mode 100644 com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs.meta create mode 100644 com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader create mode 100644 com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader.meta diff --git a/com.unity.render-pipelines.lightweight/Editor/LightweightRenderPipelineAssetEditor.cs b/com.unity.render-pipelines.lightweight/Editor/LightweightRenderPipelineAssetEditor.cs index 2c139ee462a..d3a77af3895 100644 --- a/com.unity.render-pipelines.lightweight/Editor/LightweightRenderPipelineAssetEditor.cs +++ b/com.unity.render-pipelines.lightweight/Editor/LightweightRenderPipelineAssetEditor.cs @@ -50,6 +50,7 @@ internal class Styles public static GUIContent srpBatcher = EditorGUIUtility.TrTextContent("SRP Batcher (Experimental)", "If enabled, the render pipeline uses the SRP batcher."); public static GUIContent dynamicBatching = EditorGUIUtility.TrTextContent("Dynamic Batching", "If enabled, the render pipeline will batch drawcalls with few triangles together by copying their vertex buffers into a shared buffer on a per-frame basis."); public static GUIContent mixedLightingSupportLabel = EditorGUIUtility.TrTextContent("Mixed Lighting", "Support for mixed light mode."); + public static GUIContent virtualTexturing = EditorGUIUtility.TrTextContent("Virtual Texturing (Experimental)", "If enabled, the render pipeline can be used with virtual textures."); public static GUIContent shaderVariantLogLevel = EditorGUIUtility.TrTextContent("Shader Variant Log Level", "Controls the level logging in of shader variants information is outputted when a build is performed. Information will appear in the Unity console when the build finishes."); @@ -97,6 +98,7 @@ internal class Styles SerializedProperty m_SRPBatcher; SerializedProperty m_SupportsDynamicBatching; SerializedProperty m_MixedLightingSupportedProp; + SerializedProperty m_VirtualTexturing; SerializedProperty m_ShaderVariantLogLevel; @@ -154,6 +156,7 @@ void OnEnable() m_SRPBatcher = serializedObject.FindProperty("m_UseSRPBatcher"); m_SupportsDynamicBatching = serializedObject.FindProperty("m_SupportsDynamicBatching"); m_MixedLightingSupportedProp = serializedObject.FindProperty("m_MixedLightingSupported"); + m_VirtualTexturing = serializedObject.FindProperty("m_UseVirtualTexturing"); m_ShaderVariantLogLevel = serializedObject.FindProperty("m_ShaderVariantLogLevel"); selectedLightRenderingMode = (LightRenderingMode)m_AdditionalLightsRenderingModeProp.intValue; @@ -302,6 +305,7 @@ void DrawAdvancedSettings() EditorGUILayout.PropertyField(m_SupportsDynamicBatching, Styles.dynamicBatching); EditorGUILayout.PropertyField(m_MixedLightingSupportedProp, Styles.mixedLightingSupportLabel); EditorGUILayout.PropertyField(m_ShaderVariantLogLevel, Styles.shaderVariantLogLevel); + EditorGUILayout.PropertyField(m_VirtualTexturing, Styles.virtualTexturing); EditorGUI.indentLevel--; EditorGUILayout.Space(); EditorGUILayout.Space(); diff --git a/com.unity.render-pipelines.lightweight/Runtime/Data/LightweightRenderPipelineAsset.cs b/com.unity.render-pipelines.lightweight/Runtime/Data/LightweightRenderPipelineAsset.cs index dedcfa4d868..99e876bd7b4 100644 --- a/com.unity.render-pipelines.lightweight/Runtime/Data/LightweightRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.lightweight/Runtime/Data/LightweightRenderPipelineAsset.cs @@ -120,6 +120,7 @@ public class LightweightRenderPipelineAsset : RenderPipelineAsset, ISerializatio [SerializeField] bool m_UseSRPBatcher = true; [SerializeField] bool m_SupportsDynamicBatching = false; [SerializeField] bool m_MixedLightingSupported = true; + [SerializeField] bool m_UseVirtualTexturing = true; // Deprecated settings [SerializeField] ShadowQuality m_ShadowType = ShadowQuality.HardShadows; @@ -421,6 +422,12 @@ public bool useSRPBatcher set { m_UseSRPBatcher = value; } } + public bool usesVirtualTexturing + { + get { return m_UseVirtualTexturing; } + set { m_UseVirtualTexturing = value; } + } + public override Material defaultMaterial { get { return GetMaterial(DefaultMaterialType.Standard); } diff --git a/com.unity.render-pipelines.lightweight/Runtime/ForwardRenderer.cs b/com.unity.render-pipelines.lightweight/Runtime/ForwardRenderer.cs index 2b3029754f2..d9c8525ad95 100644 --- a/com.unity.render-pipelines.lightweight/Runtime/ForwardRenderer.cs +++ b/com.unity.render-pipelines.lightweight/Runtime/ForwardRenderer.cs @@ -19,6 +19,8 @@ internal class ForwardRenderer : ScriptableRenderer FinalBlitPass m_FinalBlitPass; CapturePass m_CapturePass; + VTFeedbackPass m_VTFeedbackPass; + #if UNITY_EDITOR SceneViewDepthCopyPass m_SceneViewDepthCopyPass; #endif @@ -56,6 +58,7 @@ public ForwardRenderer(ForwardRendererData data) : base(data) m_AdditionalLightsShadowCasterPass = new AdditionalLightsShadowCasterPass(RenderPassEvent.BeforeRenderingShadows); m_DepthPrepass = new DepthOnlyPass(RenderPassEvent.BeforeRenderingPrepasses, RenderQueueRange.opaque, data.opaqueLayerMask); m_ScreenSpaceShadowResolvePass = new ScreenSpaceShadowResolvePass(RenderPassEvent.BeforeRenderingPrepasses, screenspaceShadowsMaterial); + m_VTFeedbackPass = new VTFeedbackPass(RenderPassEvent.BeforeRenderingPrepasses, RenderQueueRange.opaque, data.opaqueLayerMask); m_RenderOpaqueForwardPass = new DrawObjectsPass("Render Opaques", true, RenderPassEvent.BeforeRenderingOpaques, RenderQueueRange.opaque, data.opaqueLayerMask, m_DefaultStencilState, stencilData.stencilReference); m_CopyDepthPass = new CopyDepthPass(RenderPassEvent.BeforeRenderingOpaques, copyDepthMaterial); m_OpaquePostProcessPass = new PostProcessPass(RenderPassEvent.BeforeRenderingOpaques, true); @@ -163,6 +166,12 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re EnqueuePass(m_ScreenSpaceShadowResolvePass); } + if (LightweightRenderPipeline.asset.usesVirtualTexturing) + { + m_VTFeedbackPass.Setup(cameraTargetDescriptor); + EnqueuePass(m_VTFeedbackPass); + } + EnqueuePass(m_RenderOpaqueForwardPass); if (hasOpaquePostProcess) diff --git a/com.unity.render-pipelines.lightweight/Runtime/LightweightRenderPipeline.cs b/com.unity.render-pipelines.lightweight/Runtime/LightweightRenderPipeline.cs index cbb3dcfeb3d..9d35933c91d 100644 --- a/com.unity.render-pipelines.lightweight/Runtime/LightweightRenderPipeline.cs +++ b/com.unity.render-pipelines.lightweight/Runtime/LightweightRenderPipeline.cs @@ -7,6 +7,7 @@ using UnityEngine.Rendering.PostProcessing; using UnityEngine.Experimental.GlobalIllumination; using Lightmapping = UnityEngine.Experimental.GlobalIllumination.Lightmapping; +using Experimental = UnityEngine.Experimental; namespace UnityEngine.Rendering.LWRP { @@ -120,6 +121,8 @@ protected override void Render(ScriptableRenderContext renderContext, Camera[] c EndCameraRendering(renderContext, camera); } + Experimental.VirtualTexturing.UpdateSystem(); + EndFrameRendering(renderContext, cameras); } diff --git a/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs b/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs new file mode 100644 index 00000000000..e6561230418 --- /dev/null +++ b/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs @@ -0,0 +1,88 @@ +using System; +using Exerimental = UnityEngine.Experimental; + +namespace UnityEngine.Rendering.LWRP +{ + internal class VTFeedbackPass : ScriptableRenderPass + { + const int scale = 16; //== 1/16 res + + RenderTargetHandle m_FeedbackAttachmentHandle; + RenderTextureDescriptor m_Descriptor; + + FilteringSettings m_FilteringSettings; + string m_ProfilerTag = "VT feedback"; + ShaderTagId m_ShaderTagId = new ShaderTagId("VTFeedback"); + + Exerimental.VirtualTextureResolver m_Resolver; + int m_VirtualConstantPatchID = Shader.PropertyToID("VT_ResolveConstantPatch"); + + public VTFeedbackPass(RenderPassEvent evt, RenderQueueRange renderQueueRange, LayerMask layerMask) + { + m_FilteringSettings = new FilteringSettings(renderQueueRange, layerMask); + m_Resolver = new Exerimental.VirtualTextureResolver(); + renderPassEvent = evt; + } + + public void Setup(RenderTextureDescriptor baseDescriptor) + { + int w = baseDescriptor.width / scale; + int h = baseDescriptor.height / scale; + m_Descriptor = new RenderTextureDescriptor(w, h, Experimental.Rendering.GraphicsFormat.R8G8B8A8_UNorm, 32, 1); + m_Descriptor.useDynamicScale = false; + m_Descriptor.useMipMap = false; + m_Descriptor.autoGenerateMips = false; + m_Descriptor.enableRandomWrite = false; + + m_FeedbackAttachmentHandle.Init("VTFeedbackRT"); + + m_Resolver.Init(baseDescriptor.width, baseDescriptor.height, w, h); + } + + public override void Configure(CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) + { + cmd.GetTemporaryRT(m_FeedbackAttachmentHandle.id, m_Descriptor, FilterMode.Point); + ConfigureTarget(m_FeedbackAttachmentHandle.Identifier()); + ConfigureClear(ClearFlag.All, Color.white); + } + + public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) + { + CommandBuffer cmd = CommandBufferPool.Get(m_ProfilerTag); + using (new ProfilingSample(cmd, m_ProfilerTag)) + { + context.ExecuteCommandBuffer(cmd); + cmd.Clear(); + + cmd.SetGlobalVector(m_VirtualConstantPatchID, m_Resolver.VirtualConstantPatch); + + var sortFlags = renderingData.cameraData.defaultOpaqueSortFlags; + var drawSettings = CreateDrawingSettings(m_ShaderTagId, ref renderingData, sortFlags); + drawSettings.perObjectData = PerObjectData.None; + + ref CameraData cameraData = ref renderingData.cameraData; + Camera camera = cameraData.camera; + if (cameraData.isStereoEnabled) + context.StartMultiEye(camera); + + context.DrawRenderers(renderingData.cullResults, ref drawSettings, ref m_FilteringSettings); + + m_Resolver.Process(m_FeedbackAttachmentHandle.Identifier(), cmd); + } + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + } + + public override void FrameCleanup(CommandBuffer cmd) + { + if (cmd == null) + throw new ArgumentNullException("cmd"); + + if (m_FeedbackAttachmentHandle != RenderTargetHandle.CameraTarget) + { + cmd.ReleaseTemporaryRT(m_FeedbackAttachmentHandle.id); + m_FeedbackAttachmentHandle = RenderTargetHandle.CameraTarget; + } + } + } +} \ No newline at end of file diff --git a/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs.meta b/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs.meta new file mode 100644 index 00000000000..92a09460335 --- /dev/null +++ b/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 78bace8f18db1754ca42551dd4eef41c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader new file mode 100644 index 00000000000..3d786007588 --- /dev/null +++ b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader @@ -0,0 +1,308 @@ +Shader "Lightweight Render Pipeline/Unlit VT" +{ + Properties + { + [Stack(_TextureStack)] _BaseMap("Texture", 2D) = "white" {} + _TextureStack ("_TextureStack", Stack ) = { _BaseMap } + + _BaseColor("Color", Color) = (1, 1, 1, 1) + _Cutoff("AlphaCutout", Range(0.0, 1.0)) = 0.5 + + // BlendMode + [HideInInspector] _Surface("__surface", Float) = 0.0 + [HideInInspector] _Blend("__blend", Float) = 0.0 + [HideInInspector] _AlphaClip("__clip", Float) = 0.0 + [HideInInspector] _SrcBlend("Src", Float) = 1.0 + [HideInInspector] _DstBlend("Dst", Float) = 0.0 + [HideInInspector] _ZWrite("ZWrite", Float) = 1.0 + [HideInInspector] _Cull("__cull", Float) = 2.0 + + // Editmode props + [HideInInspector] _QueueOffset("Queue offset", Float) = 0.0 + + // ObsoleteProperties + [HideInInspector] _MainTex("BaseMap", 2D) = "white" {} + [HideInInspector] _Color("Base Color", Color) = (0.5, 0.5, 0.5, 1) + [HideInInspector] _SampleGI("SampleGI", float) = 0.0 // needed from bakedlit + } + SubShader + { + Tags { "RenderType" = "Opaque" "IgnoreProjector" = "True" "RenderPipeline" = "LightweightPipeline" } + LOD 100 + + Blend [_SrcBlend][_DstBlend] + ZWrite [_ZWrite] + Cull [_Cull] + + Pass + { + Name "Unlit" + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature _ALPHATEST_ON + #pragma shader_feature _ALPHAPREMULTIPLY_ON + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_fog + #pragma multi_compile_instancing + + #include "UnlitInput.hlsl" + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct Varyings + { + float2 uv : TEXCOORD0; + float fogCoord : TEXCOORD1; + float4 vertex : SV_POSITION; + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + float4x4 _TextureStack_spaceparams[2]; + float4 _TextureStack_atlasparams[2]; + TEXTURE2D(_TextureStack_transtab); SAMPLER(sampler_TextureStack_transtab); + TEXTURE2D(_TextureStack_cache0); SAMPLER(sampler_TextureStack_cache0); + + #define GRA_HLSL_5 1 + #define GRA_ROW_MAJOR 1 + #define GRA_TEXTURE_ARRAY_SUPPORT 0 + #include "GraniteShaderLib3.cginc" + + Varyings vert(Attributes input) + { + Varyings output = (Varyings)0; + + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); + output.vertex = vertexInput.positionCS; + + //output.uv = TRANSFORM_TEX(input.uv, _BaseMap); + GraniteStreamingTextureConstantBuffer textureParamBlock; + textureParamBlock.data[0] = _TextureStack_atlasparams[0]; + textureParamBlock.data[1] = _TextureStack_atlasparams[1]; + output.uv = Granite_Transform(textureParamBlock, TRANSFORM_TEX(input.uv, _BaseMap)); + + output.fogCoord = ComputeFogFactor(vertexInput.positionCS.z); + + return output; + } + + half4 frag(Varyings input) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + + half2 uv = input.uv; + + // half4 texColor = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv); + + GraniteStreamingTextureConstantBuffer textureParamBlock; + textureParamBlock.data[0] = _TextureStack_atlasparams[0]; + textureParamBlock.data[1] = _TextureStack_atlasparams[1]; + + GraniteTilesetConstantBuffer graniteParamBlock; + graniteParamBlock.data[0] = _TextureStack_spaceparams[0]; + graniteParamBlock.data[1] = _TextureStack_spaceparams[1]; + + GraniteConstantBuffers grCB; + grCB.tilesetBuffer = graniteParamBlock; + grCB.streamingTextureBuffer = textureParamBlock; + + GraniteTranslationTexture translationTable; + translationTable.Texture = _TextureStack_transtab; + translationTable.Sampler = sampler_TextureStack_transtab; + + GraniteCacheTexture cache; + cache.Texture = _TextureStack_cache0; + cache.Sampler = sampler_TextureStack_cache0; + + GraniteLookupData graniteLookupData; + float4 resolve; + Granite_Lookup_PreTransformed_Anisotropic(grCB, translationTable, uv, graniteLookupData, resolve); + + half4 texColor; + Granite_Sample_HQ(grCB, graniteLookupData, cache, 0, texColor); + + half3 color = texColor.rgb * _BaseColor.rgb; + half alpha = texColor.a * _BaseColor.a; + AlphaDiscard(alpha, _Cutoff); + +#ifdef _ALPHAPREMULTIPLY_ON + color *= alpha; +#endif + + color = MixFog(color, input.fogCoord); + + return half4(color, alpha); + } + ENDHLSL + } + + Pass + { + Tags{"LightMode" = "DepthOnly"} + + ZWrite On + ColorMask 0 + + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 2.0 + + #pragma vertex DepthOnlyVertex + #pragma fragment DepthOnlyFragment + + // ------------------------------------- + // Material Keywords + #pragma shader_feature _ALPHATEST_ON + + //-------------------------------------- + // GPU Instancing + #pragma multi_compile_instancing + + #include "UnlitInput.hlsl" + #include "DepthOnlyPass.hlsl" + ENDHLSL + } + + // This pass it not used during regular rendering, only for lightmap baking. + Pass + { + Name "Meta" + Tags{"LightMode" = "Meta"} + + Cull Off + + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma vertex LightweightVertexMeta + #pragma fragment LightweightFragmentMetaUnlit + + #include "UnlitInput.hlsl" + #include "UnlitMetaPass.hlsl" + + ENDHLSL + } + + + // This pass it not used during regular rendering, only for lightmap baking. + Pass + { + Name "VTFeedback" + Tags{"LightMode" = "VTFeedback"} + + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + #pragma vertex vert + #pragma fragment frag + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_instancing + + #include "UnlitInput.hlsl" + + float4x4 _TextureStack_spaceparams[2]; + float4 _TextureStack_atlasparams[2]; + + float4 VT_ResolveConstantPatch; + + #define GRA_HLSL_5 1 + #define GRA_ROW_MAJOR 1 + #define GRA_TEXTURE_ARRAY_SUPPORT 0 + #include "GraniteShaderLib3.cginc" + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct Varyings + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + Varyings vert(Attributes input) + { + Varyings output = (Varyings)0; + + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); + output.vertex = vertexInput.positionCS; + + GraniteStreamingTextureConstantBuffer textureParamBlock; + textureParamBlock.data[0] = _TextureStack_atlasparams[0]; + textureParamBlock.data[1] = _TextureStack_atlasparams[1]; + + output.uv = Granite_Transform(textureParamBlock, TRANSFORM_TEX(input.uv, _BaseMap)); + + return output; + } + + half4 frag(Varyings input) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + + GraniteStreamingTextureConstantBuffer textureParamBlock; + textureParamBlock.data[0] = _TextureStack_atlasparams[0]; + textureParamBlock.data[1] = _TextureStack_atlasparams[1]; + + //TODO(ddebaets) this should be part of the GraniteShaderLib +#if GRA_ROW_MAJOR == 1 + #define gra_CalcMiplevelDeltaScaleX _TextureStack_spaceparams[0][2][0] + #define gra_CalcMiplevelDeltaScaleY _TextureStack_spaceparams[0][3][0] +#else + #define gra_CalcMiplevelDeltaScaleX _TextureStack_spaceparams[0][0][2] + #define gra_CalcMiplevelDeltaScaleY _TextureStack_spaceparams[0][0][3] +#endif + + gra_CalcMiplevelDeltaScaleX *= VT_ResolveConstantPatch.x; + gra_CalcMiplevelDeltaScaleY *= VT_ResolveConstantPatch.y; + + GraniteTilesetConstantBuffer graniteParamBlock; + graniteParamBlock.data[0] = _TextureStack_spaceparams[0]; + graniteParamBlock.data[1] = _TextureStack_spaceparams[1]; + + GraniteConstantBuffers grCB; + grCB.tilesetBuffer = graniteParamBlock; + grCB.streamingTextureBuffer = textureParamBlock; + + return Granite_ResolverPixel_PreTransformed_Anisotropic(grCB, input.uv); + } + ENDHLSL + } + } + FallBack "Hidden/InternalErrorShader" + CustomEditor "UnityEditor.Rendering.LWRP.ShaderGUI.UnlitShader" +} diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader.meta b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader.meta new file mode 100644 index 00000000000..c657d058e5b --- /dev/null +++ b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9e6c4243c3bc6c54e863f4f8348d4a0b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: From fcd902a9a92391d1f68fbfc682bafac989860768 Mon Sep 17 00:00:00 2001 From: Dieter Date: Mon, 29 Apr 2019 10:15:36 +0200 Subject: [PATCH 002/143] [VirtualTexturing] updated unlit shader to have atlas transform in PS (avoid bleeding) --- .../Shaders/Unlit_VT.shader | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader index 3d786007588..d02f43d6f75 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader @@ -92,12 +92,7 @@ Shader "Lightweight Render Pipeline/Unlit VT" VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); output.vertex = vertexInput.positionCS; - //output.uv = TRANSFORM_TEX(input.uv, _BaseMap); - GraniteStreamingTextureConstantBuffer textureParamBlock; - textureParamBlock.data[0] = _TextureStack_atlasparams[0]; - textureParamBlock.data[1] = _TextureStack_atlasparams[1]; - output.uv = Granite_Transform(textureParamBlock, TRANSFORM_TEX(input.uv, _BaseMap)); - + output.uv = TRANSFORM_TEX(input.uv, _BaseMap); output.fogCoord = ComputeFogFactor(vertexInput.positionCS.z); return output; @@ -133,7 +128,7 @@ Shader "Lightweight Render Pipeline/Unlit VT" GraniteLookupData graniteLookupData; float4 resolve; - Granite_Lookup_PreTransformed_Anisotropic(grCB, translationTable, uv, graniteLookupData, resolve); + Granite_Lookup_Anisotropic(grCB, translationTable, uv, graniteLookupData, resolve); half4 texColor; Granite_Sample_HQ(grCB, graniteLookupData, cache, 0, texColor); From 399056a9a05d78f87a3439a2e32e99be232b39e6 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 6 May 2019 17:23:06 +0200 Subject: [PATCH 003/143] Initial checkin of the shaderlib + adjust existing code to use it. --- .../ShaderLibrary/TextureStack.cginc | 196 ++++++++++++++++++ .../ShaderLibrary/TextureStack.cginc.meta | 9 + .../Runtime/Passes/VTFeedbackPass.cs | 7 +- .../ShaderLibrary/UnityInput.hlsl | 6 + .../Shaders/UnlitInput.hlsl | 4 + .../Shaders/Unlit_VT.shader | 87 +------- 6 files changed, 230 insertions(+), 79 deletions(-) create mode 100644 com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc create mode 100644 com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc.meta diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc new file mode 100644 index 00000000000..36db62fc547 --- /dev/null +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc @@ -0,0 +1,196 @@ +#define GRA_HLSL_5 1 +#define GRA_ROW_MAJOR 1 +#define GRA_TEXTURE_ARRAY_SUPPORT 0 +#include "GraniteShaderLib3.cginc" + +/* + This header adds the following pseudo definitions. Actual types etc may vary depending + on vt- being on or off. + + struct StackInfo { opaque struct ... } + StackInfo PrepareStack(float2 uv, Stack object); + float4 SampleStack(StackInfo info, Texture tex); + + To use this in your materials add the following to various locations in the shader: + + In shaderlab "Properties" section add: + + MyFancyStack ("Fancy Stack", Stack ) = { TextureSlot1, TextureSlot2, ... } + + In your CGPROGRAM code for each of the passes add: + + #pragma shader_feature_local VT_ON + + Then add the following to the PerMaterial constant buffer: + + CBUFFER_START(UnityPerMaterial) + ... + DECLARE_STACK_CB + ... + CBUFFER_END + + Then in your shader root add the following: + + ... + + DECLARE_STACK(MyFancyStack, TextureSlot1) + or + DECLARE_STACK2(MyFancyStack, TextureSlot1, TextureSlot2) + or + DECLARE_STACK3(MyFancyStack, TextureSlot1, TextureSlot2, TextureSlot2) + etc... + + NOTE: The Stack shaderlab property and DECLARE_STACKn define need to match i.e. the same name and same texture slots. + + Then in the pixel shader function (likely somewhere at the beginning) do a call: + + StackInfo info = PrepareStack(MyFancyStack, uvs); + + Then later on when you want to sample the actual texture do a call(s): + + float4 color = SampleStack(info, TextureSlot1); + float4 color2 = SampleStack(info, TextureSlot2); + ... + + The above steps can be repeated for multiple stacks. But be sure that when using the SampleStack you always + pass in the result of the PrepareStack for the correct stack the texture belongs to. + +*/ + +#ifdef VT_ON + +#define StackInfo GraniteLookupData + +#define DECLARE_STACK_CB(stackName) \ + float4x4 stackName##_spaceparams[2];\ + float4 stackName##_atlasparams[2];\ + +#define DECLARE_STACK_BASE(stackName) \ +TEXTURE2D(stackName##_transtab);\ +SAMPLER(sampler##stackName##_transtab);\ +\ +StackInfo PrepareVT_##stackName(float2 uv)\ + {\ + GraniteStreamingTextureConstantBuffer textureParamBlock;\ + textureParamBlock.data[0] = stackName##_atlasparams[0];\ + textureParamBlock.data[1] = stackName##_atlasparams[1];\ +\ + GraniteTilesetConstantBuffer graniteParamBlock;\ + graniteParamBlock.data[0] = stackName##_spaceparams[0];\ + graniteParamBlock.data[1] = stackName##_spaceparams[1];\ +\ + GraniteConstantBuffers grCB;\ + grCB.tilesetBuffer = graniteParamBlock;\ + grCB.streamingTextureBuffer = textureParamBlock;\ +\ + GraniteTranslationTexture translationTable;\ + translationTable.Texture = stackName##_transtab;\ + translationTable.Sampler = sampler##stackName##_transtab;\ +\ + StackInfo outLookupData;\ + float4 outResolve;\ + Granite_Lookup_Anisotropic(grCB, translationTable, uv, outLookupData, outResolve);\ + return outLookupData;\ +} + +#define DECLARE_STACK_LAYER(stackName, layerSamplerName, layerIndex) \ +TEXTURE2D(stackName##_c##layerIndex);\ +SAMPLER(sampler##stackName##_c##layerIndex);\ +\ +float4 SampleVT_##layerSamplerName(StackInfo info)\ +{\ + GraniteStreamingTextureConstantBuffer textureParamBlock;\ + textureParamBlock.data[0] = stackName##_atlasparams[0];\ + textureParamBlock.data[1] = stackName##_atlasparams[1];\ +\ + GraniteTilesetConstantBuffer graniteParamBlock;\ + graniteParamBlock.data[0] = stackName##_spaceparams[0];\ + graniteParamBlock.data[1] = stackName##_spaceparams[1];\ +\ + GraniteConstantBuffers grCB;\ + grCB.tilesetBuffer = graniteParamBlock;\ + grCB.streamingTextureBuffer = textureParamBlock;\ +\ + GraniteCacheTexture cache;\ + cache.Texture = stackName##_c##layerIndex;\ + cache.Sampler = sampler##stackName##_c##layerIndex;\ +\ + float4 output;\ + Granite_Sample_HQ(grCB, info, cache, layerIndex, output);\ + return output;\ +} + +#define DECLARE_STACK_RESOLVE(stackName)\ +float4 ResolveVT_##stackName(float2 uv)\ +{\ + GraniteStreamingTextureConstantBuffer textureParamBlock;\ + textureParamBlock.data[0] = stackName##_atlasparams[0];\ + textureParamBlock.data[1] = stackName##_atlasparams[1];\ +\ + /* hack resolve scale into constant buffer here */\ + stackName##_spaceparams[0][2][0] *= VT_ResolveConstantPatch.x;\ + stackName##_spaceparams[0][3][0] *= VT_ResolveConstantPatch.y;\ +\ + GraniteTilesetConstantBuffer graniteParamBlock;\ + graniteParamBlock.data[0] = stackName##_spaceparams[0];\ + graniteParamBlock.data[1] = stackName##_spaceparams[1];\ +\ + GraniteConstantBuffers grCB;\ + grCB.tilesetBuffer = graniteParamBlock;\ + grCB.streamingTextureBuffer = textureParamBlock;\ +\ + return Granite_ResolverPixel_Anisotropic(grCB, uv);\ +} + +#define DECLARE_STACK(stackName, layer0SamplerName)\ + DECLARE_STACK_BASE(stackName)\ + DECLARE_STACK_RESOLVE(stackName)\ + DECLARE_STACK_LAYER(stackName, layer0SamplerName,0) + +#define DECLARE_STACK2(stackName, layer0SamplerName, layer1SamplerName)\ + DECLARE_STACK_BASE(stackName)\ + DECLARE_STACK_RESOLVE(stackName)\ + DECLARE_STACK_LAYER(stackName, layer0SamplerName,0)\ + DECLARE_STACK_LAYER(stackName, layer1SamplerName,1) + +#define DECLARE_STACK3(stackName, layer0SamplerName, layer1SamplerName, layer2SamplerName)\ + DECLARE_STACK_BASE(stackName)\ + DECLARE_STACK_RESOLVE(stackName)\ + DECLARE_STACK_LAYER(stackName, layer0SamplerName,0)\ + DECLARE_STACK_LAYER(stackName, layer1SamplerName,1)\ + DECLARE_STACK_LAYER(stackName, layer2SamplerName,2) + +#define DECLARE_STACK4(stackName, layer0SamplerName, layer1SamplerName, layer2SamplerName, layer3SamplerName)\ + DECLARE_STACK_BASE(stackName)\ + DECLARE_STACK_RESOLVE(stackName)\ + DECLARE_STACK_LAYER(stackName, layer0SamplerName,0)\ + DECLARE_STACK_LAYER(stackName, layer1SamplerName,1)\ + DECLARE_STACK_LAYER(stackName, layer2SamplerName,2)\ + DECLARE_STACK_LAYER(stackName, layer2SamplerName,3) + +#define PrepareStack(uv, stackName) PrepareVT_##stackName(uv) +#define SampleStack(info, textureName) SampleVT_##textureName(info) +#define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) + +#else + +// Stacks amount to nothing when VT is off +#define DECLARE_STACK(stackName, layer0) +#define DECLARE_STACK2(stackName, layer0, layer1) +#define DECLARE_STACK3(stackName, layer0, layer1, layer2) +#define DECLARE_STACK4(stackName, layer0, layer1, layer2, layer3) +#define DECLARE_STACK_CB(stackName) + +// Info is just the uv's +#define StackInfo float2 + +// Prepare just passes the texture coord around +#define PrepareStack(uv, stackName) uv + +// Sample just samples the texture +#define SampleStack(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info) + +// Resolve does nothing +#define ResolveStack(uv, stackName) + +#endif diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc.meta b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc.meta new file mode 100644 index 00000000000..a3bc587b6f7 --- /dev/null +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 79641ba14fe04324b8905bafbf3e82ed +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs b/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs index e6561230418..772a547f0a1 100644 --- a/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs +++ b/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs @@ -54,6 +54,11 @@ public override void Execute(ScriptableRenderContext context, ref RenderingData context.ExecuteCommandBuffer(cmd); cmd.Clear(); + if (m_VirtualConstantPatchID < 0) + { + Debug.LogError("Material is used with VT feedback but did not expose the VT_ResolveConstantPatch variable."); + } + cmd.SetGlobalVector(m_VirtualConstantPatchID, m_Resolver.VirtualConstantPatch); var sortFlags = renderingData.cameraData.defaultOpaqueSortFlags; @@ -85,4 +90,4 @@ public override void FrameCleanup(CommandBuffer cmd) } } } -} \ No newline at end of file +} diff --git a/com.unity.render-pipelines.lightweight/ShaderLibrary/UnityInput.hlsl b/com.unity.render-pipelines.lightweight/ShaderLibrary/UnityInput.hlsl index c5335d419fb..5af9b4d1451 100644 --- a/com.unity.render-pipelines.lightweight/ShaderLibrary/UnityInput.hlsl +++ b/com.unity.render-pipelines.lightweight/ShaderLibrary/UnityInput.hlsl @@ -72,6 +72,12 @@ float4 _ZBufferParams; // z = unused // w = 1.0 if camera is ortho, 0.0 if perspective float4 unity_OrthoParams; + +// x = scale for x derivative +// y = scale for y derivative +// z = unused +// w = unused +float4 VT_ResolveConstantPatch; CBUFFER_END diff --git a/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl b/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl index 37d7abad50e..e8261438445 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl @@ -2,6 +2,7 @@ #define LIGHTWEIGHT_UNLIT_INPUT_INCLUDED #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc" CBUFFER_START(UnityPerMaterial) float4 _BaseMap_ST; @@ -9,6 +10,9 @@ half4 _BaseColor; half _Cutoff; half _Glossiness; half _Metallic; +DECLARE_STACK_CB(_TextureStack); CBUFFER_END +DECLARE_STACK(_TextureStack, _BaseMap); + #endif diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader index d02f43d6f75..5ad4e7e0efd 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader @@ -52,6 +52,7 @@ Shader "Lightweight Render Pipeline/Unlit VT" #pragma multi_compile_fog #pragma multi_compile_instancing + #define VT_ON 1 #include "UnlitInput.hlsl" struct Attributes @@ -71,16 +72,6 @@ Shader "Lightweight Render Pipeline/Unlit VT" UNITY_VERTEX_OUTPUT_STEREO }; - float4x4 _TextureStack_spaceparams[2]; - float4 _TextureStack_atlasparams[2]; - TEXTURE2D(_TextureStack_transtab); SAMPLER(sampler_TextureStack_transtab); - TEXTURE2D(_TextureStack_cache0); SAMPLER(sampler_TextureStack_cache0); - - #define GRA_HLSL_5 1 - #define GRA_ROW_MAJOR 1 - #define GRA_TEXTURE_ARRAY_SUPPORT 0 - #include "GraniteShaderLib3.cginc" - Varyings vert(Attributes input) { Varyings output = (Varyings)0; @@ -104,34 +95,9 @@ Shader "Lightweight Render Pipeline/Unlit VT" half2 uv = input.uv; - // half4 texColor = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv); - - GraniteStreamingTextureConstantBuffer textureParamBlock; - textureParamBlock.data[0] = _TextureStack_atlasparams[0]; - textureParamBlock.data[1] = _TextureStack_atlasparams[1]; - - GraniteTilesetConstantBuffer graniteParamBlock; - graniteParamBlock.data[0] = _TextureStack_spaceparams[0]; - graniteParamBlock.data[1] = _TextureStack_spaceparams[1]; - - GraniteConstantBuffers grCB; - grCB.tilesetBuffer = graniteParamBlock; - grCB.streamingTextureBuffer = textureParamBlock; - - GraniteTranslationTexture translationTable; - translationTable.Texture = _TextureStack_transtab; - translationTable.Sampler = sampler_TextureStack_transtab; - - GraniteCacheTexture cache; - cache.Texture = _TextureStack_cache0; - cache.Sampler = sampler_TextureStack_cache0; - - GraniteLookupData graniteLookupData; - float4 resolve; - Granite_Lookup_Anisotropic(grCB, translationTable, uv, graniteLookupData, resolve); - - half4 texColor; - Granite_Sample_HQ(grCB, graniteLookupData, cache, 0, texColor); + // half4 texColor = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv); + StackInfo stackInfo = PrepareStack(uv, _TextureStack); + half4 texColor = SampleStack(stackInfo, _BaseMap); half3 color = texColor.rgb * _BaseColor.rgb; half alpha = texColor.a * _BaseColor.a; @@ -172,6 +138,7 @@ Shader "Lightweight Render Pipeline/Unlit VT" // GPU Instancing #pragma multi_compile_instancing + #define VT_ON 1 #include "UnlitInput.hlsl" #include "DepthOnlyPass.hlsl" ENDHLSL @@ -192,6 +159,7 @@ Shader "Lightweight Render Pipeline/Unlit VT" #pragma vertex LightweightVertexMeta #pragma fragment LightweightFragmentMetaUnlit + #define VT_ON 1 #include "UnlitInput.hlsl" #include "UnlitMetaPass.hlsl" @@ -217,18 +185,9 @@ Shader "Lightweight Render Pipeline/Unlit VT" // Unity defined keywords #pragma multi_compile_instancing + #define VT_ON 1 #include "UnlitInput.hlsl" - float4x4 _TextureStack_spaceparams[2]; - float4 _TextureStack_atlasparams[2]; - - float4 VT_ResolveConstantPatch; - - #define GRA_HLSL_5 1 - #define GRA_ROW_MAJOR 1 - #define GRA_TEXTURE_ARRAY_SUPPORT 0 - #include "GraniteShaderLib3.cginc" - struct Attributes { float4 positionOS : POSITION; @@ -256,11 +215,7 @@ Shader "Lightweight Render Pipeline/Unlit VT" VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); output.vertex = vertexInput.positionCS; - GraniteStreamingTextureConstantBuffer textureParamBlock; - textureParamBlock.data[0] = _TextureStack_atlasparams[0]; - textureParamBlock.data[1] = _TextureStack_atlasparams[1]; - - output.uv = Granite_Transform(textureParamBlock, TRANSFORM_TEX(input.uv, _BaseMap)); + output.uv = TRANSFORM_TEX(input.uv, _BaseMap); return output; } @@ -269,31 +224,7 @@ Shader "Lightweight Render Pipeline/Unlit VT" { UNITY_SETUP_INSTANCE_ID(input); - GraniteStreamingTextureConstantBuffer textureParamBlock; - textureParamBlock.data[0] = _TextureStack_atlasparams[0]; - textureParamBlock.data[1] = _TextureStack_atlasparams[1]; - - //TODO(ddebaets) this should be part of the GraniteShaderLib -#if GRA_ROW_MAJOR == 1 - #define gra_CalcMiplevelDeltaScaleX _TextureStack_spaceparams[0][2][0] - #define gra_CalcMiplevelDeltaScaleY _TextureStack_spaceparams[0][3][0] -#else - #define gra_CalcMiplevelDeltaScaleX _TextureStack_spaceparams[0][0][2] - #define gra_CalcMiplevelDeltaScaleY _TextureStack_spaceparams[0][0][3] -#endif - - gra_CalcMiplevelDeltaScaleX *= VT_ResolveConstantPatch.x; - gra_CalcMiplevelDeltaScaleY *= VT_ResolveConstantPatch.y; - - GraniteTilesetConstantBuffer graniteParamBlock; - graniteParamBlock.data[0] = _TextureStack_spaceparams[0]; - graniteParamBlock.data[1] = _TextureStack_spaceparams[1]; - - GraniteConstantBuffers grCB; - grCB.tilesetBuffer = graniteParamBlock; - grCB.streamingTextureBuffer = textureParamBlock; - - return Granite_ResolverPixel_PreTransformed_Anisotropic(grCB, input.uv); + return ResolveStack(input.uv, _TextureStack); } ENDHLSL } From 07b4fd4d5d34f75f6a78094bf8a3ae9cf8b28f36 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Thu, 9 May 2019 09:53:43 +0200 Subject: [PATCH 004/143] Basic Lit Shader VT support - Allows putting _BaseMap, _BumpMap, _MetallicGlossMap in VT - Other textures are not in VT - Enabling VT on the specular set-up will not work (gives shader compilation error, but should work with VT disabled) --- .../ShaderLibrary/TextureStack.cginc | 18 ++++++++-- .../Editor/ShaderGUI/Shaders/LitShader.cs | 3 +- .../Editor/ShaderGUI/ShadingModels/LitGUI.cs | 14 +++++++- .../ShaderLibrary/SurfaceInput.hlsl | 35 ++++++++++++++----- .../Shaders/Lit.shader | 11 +++++- .../Shaders/LitInput.hlsl | 29 +++++++++++---- 6 files changed, 89 insertions(+), 21 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc index 36db62fc547..e53c58cddf6 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc @@ -182,13 +182,25 @@ float4 ResolveVT_##stackName(float2 uv)\ #define DECLARE_STACK_CB(stackName) // Info is just the uv's -#define StackInfo float2 +// We could do a straight #defube StackInfo float2 but this makes it a bit more type safe +// and allows us to do things like function overloads,... +struct StackInfo +{ + float2 uv; +}; + +StackInfo MakeStackInfo(float2 uv) +{ + StackInfo result; + result.uv = uv; + return result; +} // Prepare just passes the texture coord around -#define PrepareStack(uv, stackName) uv +#define PrepareStack(uv, stackName) MakeStackInfo(uv) // Sample just samples the texture -#define SampleStack(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info) +#define SampleStack(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) // Resolve does nothing #define ResolveStack(uv, stackName) diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs index 9a5a285f5d6..63498dfb82a 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs @@ -61,12 +61,13 @@ public override void DrawSurfaceInputs(Material material) // material main advanced options public override void DrawAdvancedOptions(Material material) { - if (litProperties.reflections != null && litProperties.highlights != null) + if (litProperties.reflections != null && litProperties.highlights != null && litProperties.vt != null) { EditorGUI.BeginChangeCheck(); { materialEditor.ShaderProperty(litProperties.highlights, LitGUI.Styles.highlightsText); materialEditor.ShaderProperty(litProperties.reflections, LitGUI.Styles.reflectionsText); + materialEditor.ShaderProperty(litProperties.vt, LitGUI.Styles.vtText); EditorGUI.BeginChangeCheck(); } } diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs index dd67053664a..08483ce2f4f 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs @@ -1,4 +1,4 @@ -using System; +using System; using UnityEngine; using UnityEngine.Rendering; @@ -43,6 +43,10 @@ public static class Styles new GUIContent("Environment Reflections", "When enabled, the Material samples reflections from the nearest Reflection Probes or Lighting Probe."); + public static GUIContent vtText = + new GUIContent("Virtual Texturing", + "When enabled, use virtual texturing instead of regular textures."); + public static GUIContent occlusionText = new GUIContent("Occlusion Map", "Sets an occlusion map to simulate shadowing from ambient lighting."); @@ -70,6 +74,7 @@ public struct LitProperties // Advanced Props public MaterialProperty highlights; public MaterialProperty reflections; + public MaterialProperty vt; public LitProperties(MaterialProperty[] properties) { @@ -89,6 +94,7 @@ public LitProperties(MaterialProperty[] properties) // Advanced Props highlights = BaseShaderGUI.FindProperty("_SpecularHighlights", properties, false); reflections = BaseShaderGUI.FindProperty("_EnvironmentReflections", properties, false); + vt = BaseShaderGUI.FindProperty("_VirtualTexturing", properties, false); } } @@ -209,6 +215,12 @@ public static void SetMaterialKeywords(Material material) CoreUtils.SetKeyword(material, "_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A", GetSmoothnessMapChannel(material) == SmoothnessMapChannel.AlbedoAlpha && opaque); } + + if (material.HasProperty("_VirtualTexturing")) + { + CoreUtils.SetKeyword(material, "VT_ON", + material.GetFloat("_VirtualTexturing") == 1.0f); + } } } } diff --git a/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl b/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl index a94eb3ec106..eace17a2030 100644 --- a/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl +++ b/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl @@ -40,31 +40,50 @@ half Alpha(half albedoAlpha, half4 color, half cutoff) return alpha; } +half4 ProcessAlbedoAlpha(half4 rawTextureValue) +{ + return rawTextureValue; +} + half4 SampleAlbedoAlpha(float2 uv, TEXTURE2D_PARAM(albedoAlphaMap, sampler_albedoAlphaMap)) { - return SAMPLE_TEXTURE2D(albedoAlphaMap, sampler_albedoAlphaMap, uv); + return ProcessAlbedoAlpha(SAMPLE_TEXTURE2D(albedoAlphaMap, sampler_albedoAlphaMap, uv)); +} + +half3 ProcessNormal(half4 rawTextureValue, half scale = 1.0h) +{ +#ifdef _NORMALMAP +#if BUMP_SCALE_NOT_SUPPORTED + return UnpackNormal(rawTextureValue); +#else + return UnpackNormalScale(rawTextureValue, scale); +#endif +#else + return half3(0.0h, 0.0h, 1.0h); +#endif } + half3 SampleNormal(float2 uv, TEXTURE2D_PARAM(bumpMap, sampler_bumpMap), half scale = 1.0h) { #ifdef _NORMALMAP - half4 n = SAMPLE_TEXTURE2D(bumpMap, sampler_bumpMap, uv); - #if BUMP_SCALE_NOT_SUPPORTED - return UnpackNormal(n); - #else - return UnpackNormalScale(n, scale); - #endif + return ProcessNormal(SAMPLE_TEXTURE2D(bumpMap, sampler_bumpMap, uv),scale); #else return half3(0.0h, 0.0h, 1.0h); #endif } +half3 ProcessEmission(float4 rawTextureValue, half3 emissionColor) +{ + return rawTextureValue.rgb * emissionColor; +} + half3 SampleEmission(float2 uv, half3 emissionColor, TEXTURE2D_PARAM(emissionMap, sampler_emissionMap)) { #ifndef _EMISSION return 0; #else - return SAMPLE_TEXTURE2D(emissionMap, sampler_emissionMap, uv).rgb * emissionColor; + return ProcessEmission(SAMPLE_TEXTURE2D(emissionMap, sampler_emissionMap, uv), emissionColor); #endif } diff --git a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader index dececb77c21..d728d4ddac5 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader @@ -22,6 +22,7 @@ Shader "Lightweight Render Pipeline/Lit" [ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0 [ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0 + [Toggle(VT_ON)] _VirtualTexturing("Virtual Texturing", Float) = 1.0 _BumpScale("Scale", Float) = 1.0 _BumpMap("Normal Map", 2D) = "bump" {} @@ -51,6 +52,8 @@ Shader "Lightweight Render Pipeline/Lit" [HideInInspector] _GlossMapScale("Smoothness", Float) = 0.0 [HideInInspector] _Glossiness("Smoothness", Float) = 0.0 [HideInInspector] _GlossyReflections("EnvironmentReflections", Float) = 0.0 + + _TextureStack("_TextureStack", Stack) = { _BaseMap _BumpMap _MetallicGlossMap } } SubShader @@ -114,7 +117,13 @@ Shader "Lightweight Render Pipeline/Lit" //-------------------------------------- // GPU Instancing #pragma multi_compile_instancing - + + //-------------------------------------- + // Virtual Texturing + #pragma shader_feature VT_ON + //define VT_ON 1 + + #pragma vertex LitPassVertex #pragma fragment LitPassFragment diff --git a/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl b/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl index 7e962d463db..b65b78469a8 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl @@ -3,6 +3,7 @@ #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc" #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl" CBUFFER_START(UnityPerMaterial) @@ -15,24 +16,29 @@ half _Smoothness; half _Metallic; half _BumpScale; half _OcclusionStrength; +DECLARE_STACK_CB(_TextureStack); CBUFFER_END TEXTURE2D(_OcclusionMap); SAMPLER(sampler_OcclusionMap); TEXTURE2D(_MetallicGlossMap); SAMPLER(sampler_MetallicGlossMap); TEXTURE2D(_SpecGlossMap); SAMPLER(sampler_SpecGlossMap); +DECLARE_STACK3(_TextureStack, _BaseMap, _BumpMap, _MetallicGlossMap); + #ifdef _SPECULAR_SETUP - #define SAMPLE_METALLICSPECULAR(uv) SAMPLE_TEXTURE2D(_SpecGlossMap, sampler_SpecGlossMap, uv) + // TODO VT: We always put the _MetallicGlossMap in VT but never _SpecGlossMap need a way to be able to toggle + // this based on defines !? + #define SAMPLE_METALLICSPECULAR(info) SAMPLE_TEXTURE2D(_SpecGlossMap, sampler_SpecGlossMap, info.uv) #else - #define SAMPLE_METALLICSPECULAR(uv) SAMPLE_TEXTURE2D(_MetallicGlossMap, sampler_MetallicGlossMap, uv) + #define SAMPLE_METALLICSPECULAR(info) SampleStack(info, _MetallicGlossMap) #endif -half4 SampleMetallicSpecGloss(float2 uv, half albedoAlpha) +half4 SampleMetallicSpecGloss(StackInfo info, half albedoAlpha) { half4 specGloss; #ifdef _METALLICSPECGLOSSMAP - specGloss = SAMPLE_METALLICSPECULAR(uv); + specGloss = SAMPLE_METALLICSPECULAR(info); #ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A specGloss.a = albedoAlpha * _Smoothness; #else @@ -72,10 +78,19 @@ half SampleOcclusion(float2 uv) inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfaceData) { - half4 albedoAlpha = SampleAlbedoAlpha(uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap)); + StackInfo info = PrepareStack(uv, _TextureStack); + + float4 rawAlbedoAlpha = SampleStack(info, _BaseMap); +#ifdef _NORMALMAP + float4 rawNormal = SampleStack(info, _BumpMap); +#else + float4 rawNormal = float4(0,0,0,0); +#endif + + half4 albedoAlpha = ProcessAlbedoAlpha(rawAlbedoAlpha); outSurfaceData.alpha = Alpha(albedoAlpha.a, _BaseColor, _Cutoff); - half4 specGloss = SampleMetallicSpecGloss(uv, albedoAlpha.a); + half4 specGloss = SampleMetallicSpecGloss(info, albedoAlpha.a); outSurfaceData.albedo = albedoAlpha.rgb * _BaseColor.rgb; #if _SPECULAR_SETUP @@ -87,7 +102,7 @@ inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfa #endif outSurfaceData.smoothness = specGloss.a; - outSurfaceData.normalTS = SampleNormal(uv, TEXTURE2D_ARGS(_BumpMap, sampler_BumpMap), _BumpScale); + outSurfaceData.normalTS = ProcessNormal(rawNormal, _BumpScale); outSurfaceData.occlusion = SampleOcclusion(uv); outSurfaceData.emission = SampleEmission(uv, _EmissionColor.rgb, TEXTURE2D_ARGS(_EmissionMap, sampler_EmissionMap)); } From a64dd3cb307946693a8e728bcabbc0c4c5969c72 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Thu, 9 May 2019 10:08:29 +0200 Subject: [PATCH 005/143] Resolving for lit shader --- .../ShaderLibrary/TextureStack.cginc | 2 +- .../Shaders/Lit.shader | 62 +++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc index e53c58cddf6..99e64f2e3a5 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc @@ -203,6 +203,6 @@ StackInfo MakeStackInfo(float2 uv) #define SampleStack(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) // Resolve does nothing -#define ResolveStack(uv, stackName) +#define ResolveStack(uv, stackName) float4(1,1,1,1); #endif diff --git a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader index d728d4ddac5..3858c83fc07 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader @@ -226,6 +226,68 @@ Shader "Lightweight Render Pipeline/Lit" ENDHLSL } + // This pass it not used during regular rendering, only for finding out which VT tiles to load + Pass + { + Name "VTFeedback" + Tags{"LightMode" = "VTFeedback"} + + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + #pragma vertex vert + #pragma fragment frag + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_instancing + #pragma shader_feature VT_ON + + #include "LitInput.hlsl" + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct Varyings + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + Varyings vert(Attributes input) + { + Varyings output = (Varyings)0; + + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); + output.vertex = vertexInput.positionCS; + + output.uv = TRANSFORM_TEX(input.uv, _BaseMap); + + return output; + } + + half4 frag(Varyings input) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + + return ResolveStack(input.uv, _TextureStack); + } + ENDHLSL + } + } FallBack "Hidden/InternalErrorShader" CustomEditor "UnityEditor.Rendering.LWRP.ShaderGUI.LitShader" From 5c02c5173fcee8b9dd3186d3319126f12ddabfe4 Mon Sep 17 00:00:00 2001 From: Aljosha Demeulemeester Date: Thu, 16 May 2019 11:49:47 +0200 Subject: [PATCH 006/143] Toggling VT_ON keyword based on user setting (VT property) and the validness of the stacks set on the stack properties. --- .../Editor/ShaderGUI/BaseShaderGUI.cs | 2 + .../Editor/ShaderGUI/Shaders/LitShader.cs | 25 +++- .../Editor/ShaderGUI/ShadingModels/LitGUI.cs | 14 ++- .../ShaderGUI/ShadingModels/StackStatus.cs | 109 ++++++++++++++++++ .../Shaders/Lit.shader | 2 +- 5 files changed, 145 insertions(+), 7 deletions(-) create mode 100644 com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs index bbf6e1ef4a8..59043a2873e 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs @@ -298,7 +298,9 @@ public virtual void DrawBaseProperties(Material material) { if (baseMapProp != null && baseColorProp != null) // Draw the baseMap, most shader will have at least a baseMap { + materialEditor.TexturePropertySingleLine(Styles.baseMap, baseMapProp, baseColorProp); + // TODO Temporary fix for lightmapping, to be replaced with attribute tag. if (material.HasProperty("_MainTex")) { diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs index 63498dfb82a..ae8d1647259 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs @@ -7,6 +7,7 @@ namespace UnityEditor.Rendering.LWRP.ShaderGUI { internal class LitShader : BaseShaderGUI { + // Properties private LitGUI.LitProperties litProperties; @@ -24,6 +25,18 @@ public override void MaterialChanged(Material material) throw new ArgumentNullException("material"); SetMaterialKeywords(material, LitGUI.SetMaterialKeywords); + + if( litProperties.vt != null ) + { + if (litProperties.vt.floatValue == 0.0) + { + material.DisableKeyword("VT_ON"); + } + else if (StackStatus.AllStacksValid(material)) + { + material.EnableKeyword("VT_ON"); + } + } } // material main surface options @@ -58,23 +71,31 @@ public override void DrawSurfaceInputs(Material material) DrawTileOffset(materialEditor, baseMapProp); } + + // material main advanced options public override void DrawAdvancedOptions(Material material) { if (litProperties.reflections != null && litProperties.highlights != null && litProperties.vt != null) { EditorGUI.BeginChangeCheck(); - { + { materialEditor.ShaderProperty(litProperties.highlights, LitGUI.Styles.highlightsText); materialEditor.ShaderProperty(litProperties.reflections, LitGUI.Styles.reflectionsText); materialEditor.ShaderProperty(litProperties.vt, LitGUI.Styles.vtText); - EditorGUI.BeginChangeCheck(); + + if (EditorGUI.EndChangeCheck()) + { + + } } } base.DrawAdvancedOptions(material); } + + public override void AssignNewShaderToMaterial(Material material, Shader oldShader, Shader newShader) { if (material == null) diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs index 08483ce2f4f..97dbe905beb 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs @@ -215,11 +215,17 @@ public static void SetMaterialKeywords(Material material) CoreUtils.SetKeyword(material, "_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A", GetSmoothnessMapChannel(material) == SmoothnessMapChannel.AlbedoAlpha && opaque); } - + if (material.HasProperty("_VirtualTexturing")) - { - CoreUtils.SetKeyword(material, "VT_ON", - material.GetFloat("_VirtualTexturing") == 1.0f); + { + if (material.GetFloat("_VirtualTexturing") == 0.0f) + { + CoreUtils.SetKeyword(material, "VT_ON", false); + } + else if (StackStatus.AllStacksValid(material)) + { + CoreUtils.SetKeyword(material, "VT_ON", true); + } } } } diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs new file mode 100644 index 00000000000..88a2ea52b7d --- /dev/null +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs @@ -0,0 +1,109 @@ +using System; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; + + +//move to core Unity at some point, make sure the hash calculation is identical to GTSBuildInfoGenerator in the meantime + +public class StackStatus +{ + public static bool AllStacksValid(Material material) + { + var shader = material.shader; + + int propCount = ShaderUtil.GetPropertyCount(shader); + for (int i = 0; i < propCount; i++) + { + if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.Stack) + { + string stackPropName = ShaderUtil.GetPropertyName(shader, i); + VTStack vtStack = material.GetStack(stackPropName); + + if (vtStack != null) + { + string[] textureProperties = ShaderUtil.GetStackTextureProperties(shader, stackPropName); + + string hash = GetStackHash(textureProperties, material); + + if (hash != vtStack.atlasName) + return false; + + } + else + { + return false; + } + } + } + + return true; + } + + private static string GetStackHash(string[] textureProperties, Material material) + { + // fill in a (hashed) name + string texturesHash = ""; + + TextureWrapMode wrapMode = TextureWrapMode.Clamp; + TextureImporterNPOTScale textureScaling = TextureImporterNPOTScale.None; + + bool firstTextureAdded = false; + + for (int j = 0; j < textureProperties.Length; j++) + { + string textureProperty = textureProperties[j]; + + if (!material.HasProperty(textureProperty)) //todo is this a broken shader? Report to user? + continue; + + Texture2D tex2D = material.GetTexture(textureProperty) as Texture2D; + + if (tex2D == null) + continue; + + string path = AssetDatabase.GetAssetPath(tex2D); + + if (string.IsNullOrEmpty(path)) + continue; + + string hash = tex2D.imageContentsHash.ToString(); + + if (hash == null) + { + continue; + } + + TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter; + if (textureImporter == null) + { + // probably a fallback texture + continue; + } + + texturesHash += hash; + + if (!firstTextureAdded) + { + wrapMode = tex2D.wrapMode; + textureScaling = textureImporter.npotScale; + firstTextureAdded = true; + } + else + { + UnityEngine.Debug.Log("Texture settings don't match on all layers of StackedTexture"); + } + + } + + String assetHash = "" + wrapMode + textureScaling; + + //todo: ignoring overall settings in hash for now + //TileSetBuildSettings tileSetBuildSettings = new TileSetBuildSettings(ts); + String settingsHash = ""; // tileSetBuildSettings.GetHashString(); + + return ("version_1_" + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); + } + + +} diff --git a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader index 3858c83fc07..4f3f1ae7d2b 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader @@ -22,7 +22,7 @@ Shader "Lightweight Render Pipeline/Lit" [ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0 [ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0 - [Toggle(VT_ON)] _VirtualTexturing("Virtual Texturing", Float) = 1.0 + [Toggle] _VirtualTexturing("Virtual Texturing", Float) = 0.0 _BumpScale("Scale", Float) = 1.0 _BumpMap("Normal Map", 2D) = "bump" {} From 4aadf7e1f1d895b23aeb523476d5e8e29542ed58 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 17 May 2019 11:34:58 +0200 Subject: [PATCH 007/143] Initial VT support for shader graph. Kown issues: - VT feedback does not work in subgraphs, VT sampling does. --- .../{TextureStack.cginc => TextureStack.hlsl} | 0 ...tack.cginc.meta => TextureStack.hlsl.meta} | 0 .../ShaderGraph/HDSubShaderUtilities.cs | 7 + .../ShaderGraph/LightWeightPBRSubShader.cs | 49 +- .../ShaderGraph/LightWeightUnlitSubShader.cs | 55 +- .../lightweightPBRExtraPasses.template | 7 + .../lightweightPBRForwardPass.template | 5 + .../lightweightPBRStreamFeedbackPass.template | 100 ++++ ...tweightPBRStreamFeedbackPass.template.meta | 7 + .../lightweightUnlitExtraPasses.template | 4 +- .../ShaderGraph/lightweightUnlitPass.template | 6 +- ...ightweightUnlitStreamFeedbackPass.template | 94 +++ ...eightUnlitStreamFeedbackPass.template.meta | 7 + .../Shaders/LitInput.hlsl | 2 +- .../Shaders/UnlitInput.hlsl | 2 +- .../Data/Graphs/AbstractShaderProperty.cs | 33 ++ .../Editor/Data/Graphs/GraphData.cs | 11 + .../Editor/Data/Graphs/PreviewProperty.cs | 22 + .../Editor/Data/Graphs/SerializableStack.cs | 63 ++ .../Data/Graphs/SerializableStack.cs.meta | 11 + .../Data/Graphs/ShaderGraphRequirements.cs | 6 +- .../Editor/Data/Graphs/StackShaderProperty.cs | 126 ++++ .../Data/Graphs/StackShaderProperty.cs.meta | 11 + .../IMayRequireRequirePixelCoordinate.cs | 25 + .../IMayRequireRequirePixelCoordinate.cs.meta | 11 + .../Editor/Data/MasterNodes/PBRMasterNode.cs | 9 +- .../Data/MasterNodes/UnlitMasterNode.cs | 9 +- .../Editor/Data/Nodes/AbstractMaterialNode.cs | 5 + .../Data/Nodes/Input/Texture/StackNode.cs | 538 ++++++++++++++++++ .../Nodes/Input/Texture/StackNode.cs.meta | 11 + .../Editor/Data/Nodes/PropertyType.cs | 3 +- .../Editor/Data/Nodes/Utility/SubGraphNode.cs | 9 + .../Editor/Data/Util/GraphUtil.cs | 59 +- .../Editor/Data/Util/PragmaCollector.cs | 110 ++++ .../Editor/Data/Util/PragmaCollector.cs.meta | 11 + .../Editor/Data/Util/PropertyCollector.cs | 19 +- .../Editor/Data/Util/ShaderGenerator.cs | 11 +- .../Editor/Data/Util/ShaderGeneratorNames.cs | 2 +- .../Editor/ShaderGUI/UnlitMasterGUI.cs | 14 + .../Editor/ShaderGUI/UnlitMasterGUI.cs.meta | 11 + 40 files changed, 1464 insertions(+), 21 deletions(-) rename com.unity.render-pipelines.core/ShaderLibrary/{TextureStack.cginc => TextureStack.hlsl} (100%) rename com.unity.render-pipelines.core/ShaderLibrary/{TextureStack.cginc.meta => TextureStack.hlsl.meta} (100%) create mode 100644 com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template create mode 100644 com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template.meta create mode 100644 com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template create mode 100644 com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template.meta create mode 100644 com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs create mode 100644 com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs.meta create mode 100644 com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs create mode 100644 com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs.meta create mode 100644 com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireRequirePixelCoordinate.cs create mode 100644 com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireRequirePixelCoordinate.cs.meta create mode 100644 com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs create mode 100644 com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs.meta create mode 100644 com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs create mode 100644 com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs.meta create mode 100644 com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs create mode 100644 com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs.meta diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl similarity index 100% rename from com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc rename to com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc.meta b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl.meta similarity index 100% rename from com.unity.render-pipelines.core/ShaderLibrary/TextureStack.cginc.meta rename to com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl.meta diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs index 93e5b35f0d2..234bc0c8382 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs @@ -363,6 +363,11 @@ static public void AddActiveFieldsFromPixelGraphRequirements(HashSet act activeFields.Add("SurfaceDescriptionInputs.FaceSign"); } + if (requirements.requiresPixelCoordinate) + { + activeFields.Add(string.Format("SurfaceDescriptionInputs.{0}", ShaderGeneratorNames.PixelCoordinate)); + } + if (requirements.requiresNormal != 0) { if ((requirements.requiresNormal & NeededCoordinateSpace.Object) > 0) @@ -561,6 +566,7 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass masterNode.owner as GraphData, pixelGraphEvalFunction, functionRegistry, + new PragmaCollector(), // TODO: Fix for HDRP sharedProperties, pixelRequirements, // TODO : REMOVE UNUSED mode, @@ -593,6 +599,7 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass masterNode.owner as GraphData, vertexGraphEvalFunction, functionRegistry, + new PragmaCollector(), // TODO: Fix for HDRP sharedProperties, mode, vertexNodes, diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightPBRSubShader.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightPBRSubShader.cs index 11368698e86..99c49cae0cc 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightPBRSubShader.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightPBRSubShader.cs @@ -79,6 +79,23 @@ struct Pass } }; + Pass m_StreamFeedbackPass = new Pass + { + Name = "VtFeedback", + PixelShaderSlots = new List + { + PBRMasterNode.AlbedoSlotId, + PBRMasterNode.EmissionSlotId, + PBRMasterNode.AlphaSlotId, + PBRMasterNode.AlphaThresholdSlotId, + PBRMasterNode.FeedbackSlotId, + }, + VertexShaderSlots = new List() + { + PBRMasterNode.PositionSlotId + } + }; + public int GetPreviewPassIndex() { return 0; } public string GetSubshader(IMasterNode masterNode, GenerationMode mode, List sourceAssetDependencyPaths = null) @@ -91,13 +108,15 @@ public string GetSubshader(IMasterNode masterNode, GenerationMode mode, List() { - PBRMasterNode.AlphaSlotId, - PBRMasterNode.AlphaThresholdSlotId + UnlitMasterNode.AlphaSlotId, + UnlitMasterNode.AlphaThresholdSlotId }, VertexShaderSlots = new List() { - PBRMasterNode.PositionSlotId + UnlitMasterNode.PositionSlotId } }; - + + Pass m_StreamingFeedbackPass = new Pass() + { + Name = "", + PixelShaderSlots = new List() + { + UnlitMasterNode.AlphaSlotId, + UnlitMasterNode.AlphaThresholdSlotId, + UnlitMasterNode.FeedBackSlotId + }, + VertexShaderSlots = new List() + { + UnlitMasterNode.PositionSlotId + } + }; + public int GetPreviewPassIndex() { return 0; } public string GetSubshader(IMasterNode masterNode, GenerationMode mode, List sourceAssetDependencyPaths = null) @@ -63,13 +78,15 @@ public string GetSubshader(IMasterNode masterNode, GenerationMode mode, List(); } + // Make a deep copy of the graph through serialization. This means that the returned + // copy will be fully detached from the existing graph including things like registered callbacks... + // Any modifications will remain local to the scratch copy only + public GraphData ScratchCopy() + { + string serialized = EditorJsonUtility.ToJson(this, false); + GraphData dataCopy = new GraphData(); + EditorJsonUtility.FromJsonOverwrite(serialized, dataCopy); + return dataCopy; + } + public void ClearChanges() { m_AddedNodes.Clear(); diff --git a/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs index 238ee5cd79e..0d89c3f9a71 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs @@ -23,6 +23,8 @@ struct ClassData public Cubemap cubemapValue; [FieldOffset(0)] public Gradient gradientValue; + [FieldOffset(0)] + public VTStack stackValue; } [StructLayout(LayoutKind.Explicit)] @@ -108,6 +110,22 @@ public Gradient gradientValue } } + public VTStack stackValue + { + get + { + if (propType != PropertyType.Stack) + throw new ArgumentException(string.Format(k_GetErrorMessage, PropertyType.Stack, propType)); + return m_ClassData.stackValue; + } + set + { + if (propType != PropertyType.Stack) + throw new ArgumentException(string.Format(k_SetErrorMessage, PropertyType.Stack, propType)); + m_ClassData.stackValue = value; + } + } + public Vector4 vector4Value { get @@ -202,6 +220,10 @@ public void SetMaterialPropertyBlockValue(Material mat) for (int i = 0; i < 8; i++) mat.SetVector(string.Format("{0}_AlphaKey{1}", name, i), i < m_ClassData.gradientValue.alphaKeys.Length ? GradientUtils.AlphaKeyToVector(m_ClassData.gradientValue.alphaKeys[i]) : Vector2.zero); } + else if (propType == PropertyType.Stack) + { + mat.SetStack(name, m_ClassData.stackValue); + } } } diff --git a/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs b/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs new file mode 100644 index 00000000000..b35ceef9ad2 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs @@ -0,0 +1,63 @@ +using System; +using UnityEngine; + +namespace UnityEditor.ShaderGraph +{ + [Serializable] + class SerializableStack : ISerializationCallbackReceiver + { + [SerializeField] + string m_SerializedStack; + + [SerializeField] + string m_Guid; + + [NonSerialized] + VTStack m_Stack; + + [Serializable] + class StackHelper + { +#pragma warning disable 649 + public VTStack stack; +#pragma warning restore 649 + } + + public VTStack stack + { + get + { + if (!string.IsNullOrEmpty(m_SerializedStack)) + { + var textureHelper = new StackHelper(); + EditorJsonUtility.FromJsonOverwrite(m_SerializedStack, textureHelper); + m_SerializedStack = null; + m_Guid = null; + m_Stack = textureHelper.stack; + } + else if (!string.IsNullOrEmpty(m_Guid) && m_Stack == null) + { + m_Stack = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(m_Guid)); + m_Guid = null; + } + + return m_Stack; + } + set + { + m_Stack = value; + m_Guid = null; + m_SerializedStack = null; + } + } + + public void OnBeforeSerialize() + { + m_SerializedStack = EditorJsonUtility.ToJson(new StackHelper { stack = stack }, false); + } + + public void OnAfterDeserialize() + { + } + } +} diff --git a/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs.meta b/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs.meta new file mode 100644 index 00000000000..c298aec8d1e --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 85d73c3dc97255f4fa5a4a893b0b0b6d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs b/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs index c3f9d3eda11..17372795bde 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs @@ -19,6 +19,7 @@ struct ShaderGraphRequirements public bool requiresDepthTexture; public bool requiresCameraOpaqueTexture; public bool requiresTime; + public bool requiresPixelCoordinate; public static ShaderGraphRequirements none { @@ -54,6 +55,7 @@ public ShaderGraphRequirements Union(ShaderGraphRequirements other) newReqs.requiresDepthTexture = other.requiresDepthTexture | requiresDepthTexture; newReqs.requiresCameraOpaqueTexture = other.requiresCameraOpaqueTexture | requiresCameraOpaqueTexture; newReqs.requiresTime = other.requiresTime | requiresTime; + newReqs.requiresPixelCoordinate = other.requiresPixelCoordinate | requiresPixelCoordinate; newReqs.requiresMeshUVs = new List(); if (requiresMeshUVs != null) @@ -77,6 +79,7 @@ public static ShaderGraphRequirements FromNodes(List nodes, ShaderStageCap bool requiresDepthTexture = nodes.OfType().Any(x => x.RequiresDepthTexture()); bool requiresCameraOpaqueTexture = nodes.OfType().Any(x => x.RequiresCameraOpaqueTexture()); bool requiresTime = nodes.OfType().Any(x => x.RequiresTime()); + bool requiresPixelCoordinate = nodes.OfType().Any(x => x.RequiresPixelCoordinate()); var meshUV = new List(); for (int uvIndex = 0; uvIndex < ShaderGeneratorNames.UVCount; ++uvIndex) @@ -116,7 +119,8 @@ public static ShaderGraphRequirements FromNodes(List nodes, ShaderStageCap requiresMeshUVs = meshUV, requiresDepthTexture = requiresDepthTexture, requiresCameraOpaqueTexture = requiresCameraOpaqueTexture, - requiresTime = requiresTime + requiresTime = requiresTime, + requiresPixelCoordinate = requiresPixelCoordinate }; return reqs; diff --git a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs new file mode 100644 index 00000000000..01a3e0d6ad1 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs @@ -0,0 +1,126 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UnityEditor.Graphing; +using UnityEngine; + +namespace UnityEditor.ShaderGraph +{ + [Serializable] + class StackShaderProperty : AbstractShaderProperty + { + [SerializeField] + private bool m_Modifiable = true; + + public StackShaderProperty() + { + value = new SerializableStack(); + displayName = "Stack"; + slotNames = new List(); + slotNames.Add("Dummy"); + } + + public override PropertyType propertyType + { + get { return PropertyType.Stack; } + } + + public bool modifiable + { + get { return m_Modifiable; } + set { m_Modifiable = value; } + } + + public override Vector4 defaultValue + { + get { return new Vector4(); } + } + + public override bool isBatchable + { + // Note we are semi batchable, constants are but texture slots not. Need to clarify this. + get { return true; } + } + + public override bool isExposable + { + get { return true; } + } + + public List slotNames; + + private string GetSlotNamesString(string delimiter=",") + { + var result = new StringBuilder(); + + for (int i = 0; i < slotNames.Count; i++) + { + if (i != 0) result.Append(delimiter); + result.Append(slotNames[i]); + } + + return result.ToString(); + } + + public override string GetPropertyBlockString() + { + var result = new StringBuilder(); + + result.Append(referenceName); + result.Append("(\""); + result.Append(displayName); + result.Append("\", Stack) = {"); + result.Append(GetSlotNamesString(" ")); + result.Append("}"); + return result.ToString(); + } + + public override string GetPropertyDeclarationString(string delimiter = ";") + { + // This node needs to generate some properties both in batched as in unbatched mode + throw new Exception("Don't use this, use GetPropertyDeclarationStringForBatchMode instead"); + } + + public override string GetPropertyDeclarationStringForBatchMode(GenerationMode mode, string delimiter = ";") + { + int numSlots = slotNames.Count; + + if (mode == GenerationMode.InConstantBuffer) + { + return string.Format("DECLARE_STACK_CB({0}){1}", referenceName, delimiter); + } + else + { + return string.Format("DECLARE_STACK{0}({1}, {2}){3}", (numSlots <= 1) ? "" : "" + numSlots, referenceName, GetSlotNamesString(), delimiter); + } + } + + public override string GetPropertyAsArgumentString() + { + throw new NotImplementedException(); + //return string.Format("TEXTURECUBE_PARAM({0}, sampler{0})", referenceName); + } + + public override PreviewProperty GetPreviewMaterialProperty() + { + return new PreviewProperty(PropertyType.Stack ) + { + name = referenceName, + stackValue = value.stack + }; + } + + public override AbstractMaterialNode ToConcreteNode() + { + return null;// new StackAssetNode { cubemap = value.stack }; + } + + public override AbstractShaderProperty Copy() + { + var copied = new StackShaderProperty(); + copied.displayName = displayName; + copied.value = value; + return copied; + } + } +} diff --git a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs.meta b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs.meta new file mode 100644 index 00000000000..db3779cfec0 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 43c012a66d59ea54e85e56f52e873bc9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireRequirePixelCoordinate.cs b/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireRequirePixelCoordinate.cs new file mode 100644 index 00000000000..fa15f7b9fa2 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireRequirePixelCoordinate.cs @@ -0,0 +1,25 @@ +using UnityEditor.Graphing; + +namespace UnityEditor.ShaderGraph +{ + // Checks if the fragment shader needs access to the screen pixel coordinate built-in shader value + // AKA: SV_POSITION, VPOS, gl_FragCoord, ... + interface IMayRequireRequirePixelCoordinate + { + bool RequiresPixelCoordinate(ShaderStageCapability stageCapability = ShaderStageCapability.Fragment); + } + + static class MayRequirePixelCoordinateExtensions + { + public static bool RequiresPixelCoordinate(this AbstractMaterialNode node) + { + return node is IMayRequireRequirePixelCoordinate mayRequirePixelCoordinate && mayRequirePixelCoordinate.RequiresPixelCoordinate(); + } + + public static bool RequiresPixelCoordinate(this ISlot slot) + { + var mayRequirePixelCoordinate = slot as IMayRequireRequirePixelCoordinate; + return mayRequirePixelCoordinate != null && mayRequirePixelCoordinate.RequiresPixelCoordinate(); + } + } +} diff --git a/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireRequirePixelCoordinate.cs.meta b/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireRequirePixelCoordinate.cs.meta new file mode 100644 index 00000000000..cd1b7e49372 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireRequirePixelCoordinate.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2edd3878e3fa16241bf36a8d2c375f11 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs index 382d2579b7e..5bfbedde54e 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs @@ -23,6 +23,7 @@ class PBRMasterNode : MasterNode, IMayRequirePosition, IMayRequir public const string AlphaSlotName = "Alpha"; public const string AlphaClipThresholdSlotName = "AlphaClipThreshold"; public const string PositionName = "Position"; + public const string FeedbackSlotName = "StreamingFeedback"; public const int AlbedoSlotId = 0; public const int NormalSlotId = 1; @@ -34,6 +35,7 @@ class PBRMasterNode : MasterNode, IMayRequirePosition, IMayRequir public const int AlphaSlotId = 7; public const int AlphaThresholdSlotId = 8; public const int PositionSlotId = 9; + public const int FeedbackSlotId = 10; public enum Model { @@ -128,6 +130,10 @@ public sealed override void UpdateNodeAfterDeserialization() AddSlot(new Vector1MaterialSlot(AlphaSlotId, AlphaSlotName, AlphaSlotName, SlotType.Input, 1f, ShaderStageCapability.Fragment)); AddSlot(new Vector1MaterialSlot(AlphaThresholdSlotId, AlphaClipThresholdSlotName, AlphaClipThresholdSlotName, SlotType.Input, 0.5f, ShaderStageCapability.Fragment)); + var fbSlot = new Vector4MaterialSlot(FeedbackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); + fbSlot.hidden = true; + AddSlot(fbSlot); + // clear out slot names that do not match the slots // we support RemoveSlotsNameNotMatching( @@ -141,7 +147,8 @@ public sealed override void UpdateNodeAfterDeserialization() SmoothnessSlotId, OcclusionSlotId, AlphaSlotId, - AlphaThresholdSlotId + AlphaThresholdSlotId, + FeedbackSlotId, }, true); } diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs index 610748777ca..5a479a87e22 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs @@ -17,11 +17,13 @@ class UnlitMasterNode : MasterNode, IMayRequirePosition public const string AlphaSlotName = "Alpha"; public const string AlphaClipThresholdSlotName = "AlphaClipThreshold"; public const string PositionName = "Position"; + public const string FeedbackSlotName = "StreamingFeedback"; public const int ColorSlotId = 0; public const int AlphaSlotId = 7; public const int AlphaThresholdSlotId = 8; public const int PositionSlotId = 9; + public const int FeedBackSlotId = 10; [SerializeField] SurfaceType m_SurfaceType; @@ -85,6 +87,10 @@ public sealed override void UpdateNodeAfterDeserialization() AddSlot(new Vector1MaterialSlot(AlphaSlotId, AlphaSlotName, AlphaSlotName, SlotType.Input, 1, ShaderStageCapability.Fragment)); AddSlot(new Vector1MaterialSlot(AlphaThresholdSlotId, AlphaClipThresholdSlotName, AlphaClipThresholdSlotName, SlotType.Input, 0.5f, ShaderStageCapability.Fragment)); + var feedbackSlot = new Vector4MaterialSlot(FeedBackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); + feedbackSlot.hidden = true; + AddSlot(feedbackSlot); + // clear out slot names that do not match the slots // we support RemoveSlotsNameNotMatching( @@ -93,7 +99,8 @@ public sealed override void UpdateNodeAfterDeserialization() PositionSlotId, ColorSlotId, AlphaSlotId, - AlphaThresholdSlotId + AlphaThresholdSlotId, + FeedBackSlotId }); } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs index 2b13b83e214..c78a1398657 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs @@ -254,6 +254,11 @@ public string GetSlotValue(int inputSlotId, GenerationMode generationMode) return inputSlot.GetDefaultValue(generationMode); } + public virtual void CollectShaderPragmas(PragmaCollector pragmas, GenerationMode generationMode) + { + // None by default + } + public static bool ImplicitConversionExists(ConcreteSlotValueType from, ConcreteSlotValueType to) { if (from == to) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs new file mode 100644 index 00000000000..f4a8567f79b --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs @@ -0,0 +1,538 @@ +using System.Linq; +using UnityEngine; +using UnityEditor.Graphing; +using System.Collections.Generic; +using System; +using UnityEditor.ShaderGraph.Drawing.Controls; + +namespace UnityEditor.ShaderGraph +{ + //[Title("Input", "Texture", "Sample Stack")] + class SampleStackNodeBase : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV + { + public const int UVInputId = 0; + + [NonSerialized] + public int[] OutputSlotIds = new int[4]; + + [NonSerialized] + public int[] TextureInputIds = new int[4]; + + [NonSerialized] + public int FeedbackSlotId; + + static string[] OutputSlotNames = { "Out", "Out2", "Out3", "Out4" }; + static string[] TextureInputNames = { "Texture", "Texture2", "Texture3", "Texture4" }; + const string UVInputNAme = "UV"; + const string FeedbackSlotName = "Feedback"; + + int numSlots; + int[] liveIds; + + public override bool hasPreview { get { return false; } } + + [SerializeField] + protected TextureType[] m_TextureTypes = { TextureType.Default, TextureType.Default, TextureType.Default, TextureType.Default }; + + // We have one normal/object space field for all layers for now, probably a nice compromise + // between lots of settings and user flexibility? + [SerializeField] + private NormalMapSpace m_NormalMapSpace = NormalMapSpace.Tangent; + + [EnumControl("Space")] + public NormalMapSpace normalMapSpace + { + get { return m_NormalMapSpace; } + set + { + if (m_NormalMapSpace == value) + return; + + m_NormalMapSpace = value; + Dirty(ModificationScope.Graph); + } + } + + public SampleStackNodeBase(int numSlots) + { + if (numSlots > 4) + { + throw new System.Exception("Maximum 4 slots supported"); + } + this.numSlots = numSlots; + name = "Sample Stack " + numSlots; + + UpdateNodeAfterDeserialization(); + } + + public override void UpdateNodeAfterDeserialization() + { + // Allocate IDs + List usedSlots = new List(); + usedSlots.Add(UVInputId); + + for (int i = 0; i < numSlots; i++) + { + OutputSlotIds[i] = UVInputId + 1 + i; + TextureInputIds[i] = UVInputId + 1 + numSlots + i; + + usedSlots.Add(OutputSlotIds[i]); + usedSlots.Add(TextureInputIds[i]); + } + + FeedbackSlotId = UVInputId + 1 + numSlots * 2; + usedSlots.Add(FeedbackSlotId); + + liveIds = usedSlots.ToArray(); + + // Create slots + AddSlot(new UVMaterialSlot(UVInputId, UVInputNAme, UVInputNAme, UVChannel.UV0)); + + for (int i = 0; i < numSlots; i++) + { + AddSlot(new Vector4MaterialSlot(OutputSlotIds[i], OutputSlotNames[i], OutputSlotNames[i], SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment)); + } + + for (int i = 0; i < numSlots; i++) + { + AddSlot(new Texture2DInputMaterialSlot(TextureInputIds[i], TextureInputNames[i], TextureInputNames[i])); + } + + var slot = new Vector4MaterialSlot(FeedbackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment); + slot.hidden = true; + AddSlot(slot); + + RemoveSlotsNameNotMatching(liveIds); + } + + public override void ValidateNode() + { + for (int i = 0; i < numSlots; i++) + { + var textureSlot = FindInputSlot(TextureInputIds[i]); + textureSlot.defaultType = (m_TextureTypes[i] == TextureType.Normal ? TextureShaderProperty.DefaultType.Bump : TextureShaderProperty.DefaultType.White); + } + base.ValidateNode(); + } + + public override PreviewMode previewMode + { + get { return PreviewMode.Preview3D; } + } + + // Node generations + public virtual void GenerateNodeCode(ShaderGenerator visitor, GraphContext graphContext, GenerationMode generationMode) + { + // Not all outputs may be connected (well one is or we wouln't get called) so we are carefull to + // only generate code for connected outputs + string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_stack"; + + bool anyConnected = false; + for (int i = 0; i < numSlots; i++) + { + if (IsSlotConnected(OutputSlotIds[i])) + { + anyConnected = true; + break; + } + } + + if (anyConnected) + { + string result = string.Format("StackInfo {0}_info = PrepareStack({1}, {0});" + , stackName + , GetSlotValue(UVInputId, generationMode)); + visitor.AddShaderChunk(result, true); + } + + for (int i = 0; i < numSlots; i++) + { + if (IsSlotConnected(OutputSlotIds[i])) + { + var id = GetSlotValue(TextureInputIds[i], generationMode); + string resultLayer = string.Format("{2}4 {3} = SampleStack({0}_info, {4});" + , stackName + , GetSlotValue(UVInputId, generationMode) + , precision + , GetVariableNameForSlot(OutputSlotIds[i]) + , id); + visitor.AddShaderChunk(resultLayer, true); + } + } + + for (int i = 0; i < numSlots; i++) + { + if (IsSlotConnected(OutputSlotIds[i])) + { + + if (m_TextureTypes[i] == TextureType.Normal) + { + if (normalMapSpace == NormalMapSpace.Tangent) + { + visitor.AddShaderChunk(string.Format("{0}.rgb = UnpackNormalmapRGorAG({0});", GetVariableNameForSlot(OutputSlotIds[i])), true); + } + else + { + visitor.AddShaderChunk(string.Format("{0}.rgb = UnpackNormalRGB({0});", GetVariableNameForSlot(OutputSlotIds[i])), true); + } + } + } + } + + if (IsSlotConnected(FeedbackSlotId)) + { + string feedBackCode = string.Format("float4 {0} = ResolveStack({1}, {2});" + , GetVariableNameForSlot(FeedbackSlotId) + , GetSlotValue(UVInputId, generationMode) + , stackName); + visitor.AddShaderChunk(feedBackCode, true); + } + } + + public void GenerateFeedbackCode(GenerationMode generationMode, string assignLValue, out string code) + { + string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_stack"; + + code = string.Format("{0} = ResolveStack({1}, {2});" + , assignLValue + , GetSlotValue(UVInputId, generationMode) + , stackName); + } + + public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode) + { + base.CollectShaderProperties(properties, generationMode); + + List slotNames = new List(); + for (int i = 0; i < numSlots; i++) + { + var id = GetSlotValue(TextureInputIds[i], generationMode); + slotNames.Add(id); + } + + properties.AddShaderProperty(new StackShaderProperty() + { + overrideReferenceName = GetVariableNameForSlot(OutputSlotIds[0]) + "_stack", + generatePropertyBlock = true, + modifiable = false, + slotNames = slotNames + }); + + // If the property already exists additional calls will be ignored so we just try to add this on every VT node.. + properties.AddShaderProperty(new BooleanShaderProperty() + { + overrideReferenceName = "_VirtualTexturing", + displayName = "Virtual Texturing", + generatePropertyBlock = true, + value = false + }); + } + + public override void CollectShaderPragmas(PragmaCollector pragmas, GenerationMode generationMode) + { + pragmas.AddShaderPragma(new ShaderFeaturePragma(new string[] { "VT_ON" })); + } + + public bool RequiresMeshUV(UVChannel channel, ShaderStageCapability stageCapability) + { + s_TempSlots.Clear(); + GetInputSlots(s_TempSlots); + foreach (var slot in s_TempSlots) + { + if (slot.RequiresMeshUV(channel)) + return true; + } + return false; + } + } + + [Title("Input", "Texture", "Sample Stack")] + class SampleStackNode : SampleStackNodeBase + { + public SampleStackNode() : base(1) + { } + + [EnumControl("Type")] + public TextureType textureType + { + get { return m_TextureTypes[0]; } + set + { + if (m_TextureTypes[0] == value) + return; + + m_TextureTypes[0] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + } + + [Title("Input", "Texture", "Sample Stack 2")] + class SampleStackNode2 : SampleStackNodeBase + { + public SampleStackNode2() : base(2) + { } + + [EnumControl("Type 1")] + public TextureType textureType + { + get { return m_TextureTypes[0]; } + set + { + if (m_TextureTypes[0] == value) + return; + + m_TextureTypes[0] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + + [EnumControl("Type 2")] + public TextureType textureType2 + { + get { return m_TextureTypes[1]; } + set + { + if (m_TextureTypes[1] == value) + return; + + m_TextureTypes[1] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + } + + [Title("Input", "Texture", "Sample Stack 3")] + class SampleStackNode3 : SampleStackNodeBase + { + public SampleStackNode3() : base(3) + { } + + [EnumControl("Type 1")] + public TextureType textureType + { + get { return m_TextureTypes[0]; } + set + { + if (m_TextureTypes[0] == value) + return; + + m_TextureTypes[0] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + + [EnumControl("Type 2")] + public TextureType textureType2 + { + get { return m_TextureTypes[1]; } + set + { + if (m_TextureTypes[1] == value) + return; + + m_TextureTypes[1] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + + [EnumControl("Type 3")] + public TextureType textureType3 + { + get { return m_TextureTypes[2]; } + set + { + if (m_TextureTypes[2] == value) + return; + + m_TextureTypes[2] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + } + + [Title("Input", "Texture", "Sample Stack 4")] + class SampleStackNode4 : SampleStackNodeBase + { + public SampleStackNode4() : base(4) + { } + + [EnumControl("Type 1")] + public TextureType textureType + { + get { return m_TextureTypes[0]; } + set + { + if (m_TextureTypes[0] == value) + return; + + m_TextureTypes[0] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + + [EnumControl("Type 2")] + public TextureType textureType2 + { + get { return m_TextureTypes[1]; } + set + { + if (m_TextureTypes[1] == value) + return; + + m_TextureTypes[1] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + + [EnumControl("Type 3")] + public TextureType textureType3 + { + get { return m_TextureTypes[2]; } + set + { + if (m_TextureTypes[2] == value) + return; + + m_TextureTypes[2] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + } + + class AggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireRequirePixelCoordinate + { + public const int AggregateOutputId = 0; + const string AggregateOutputName = "FeedbackAggregateOut"; + + public const int AggregateInputFirstId = 1; + + public override bool hasPreview { get { return false; } } + + public AggregateFeedbackNode() + { + name = "Feedback Aggregate"; + UpdateNodeAfterDeserialization(); + } + + public override void UpdateNodeAfterDeserialization() + { + AddSlot(new Vector4MaterialSlot(AggregateOutputId, AggregateOutputName, AggregateOutputName, SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment)); + RemoveSlotsNameNotMatching(new int[] { AggregateOutputId }); + } + + public override PreviewMode previewMode + { + get { return PreviewMode.Preview3D; } + } + + // Node generations + public virtual void GenerateNodeCode(ShaderGenerator visitor, GraphContext graphContext, GenerationMode generationMode) + { + var slots = this.GetInputSlots(); + int numSlots = slots.Count(); + + if (numSlots > 1) + { + string arrayName = string.Format("{0}_array", GetVariableNameForSlot(AggregateOutputId)); + visitor.AddShaderChunk(string.Format("float4 {0}[{1}];", arrayName, numSlots)); + + int arrayIndex = 0; + foreach (var slot in slots) + { + string code = string.Format("{0}[{1}] = {2};" + , arrayName + , arrayIndex + , GetSlotValue(AggregateInputFirstId + arrayIndex, generationMode)); + visitor.AddShaderChunk(code); + arrayIndex++; + } + + string feedBackCode = string.Format("float4 {0} = {1}[IN.{2}.x%{3}];" + , GetVariableNameForSlot(AggregateOutputId) + , arrayName + , ShaderGeneratorNames.PixelCoordinate + , numSlots); + + visitor.AddShaderChunk(feedBackCode); + } + else if (numSlots == 1) + { + string feedBackCode = string.Format("float4 {0} = {1};" + , GetVariableNameForSlot(AggregateOutputId) + , GetSlotValue(AggregateInputFirstId, generationMode)); + + visitor.AddShaderChunk(feedBackCode); + } + else + { + string feedBackCode = string.Format("float4 {0} = float4(1,1,1,1);" + , GetVariableNameForSlot(AggregateOutputId) + , GetSlotValue(AggregateInputFirstId, generationMode)); + + visitor.AddShaderChunk(feedBackCode); + } + } + + public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) + { + // If there's only one VT slot we don't need the screen position + + var slots = this.GetInputSlots(); + int numSlots = slots.Count(); + + return (numSlots > 1); + } + + // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output + public static AggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode masterNode) + { + var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); + var feedbackNode = new AggregateFeedbackNode(); + masterNode.owner.AddNode(feedbackNode); + + // Add inputs to feedback node + int i = 0; + foreach (var node in stackNodes) + { + // Find feedback output slot on the vt node + var stackFeedbackOutputSlot = (node.FindOutputSlot(node.FeedbackSlotId)) as Vector4MaterialSlot; + + // Create a new slot on the aggregate that is similar to the uv input slot + string name = "FeedIn_" + i; + var newSlot = new Vector4MaterialSlot(AggregateFeedbackNode.AggregateInputFirstId + i, name, name, SlotType.Input, Vector4.zero, ShaderStageCapability.Fragment); + newSlot.owner = feedbackNode; + feedbackNode.AddSlot(newSlot); + + feedbackNode.owner.Connect(stackFeedbackOutputSlot.slotReference, newSlot.slotReference); + i++; + } + + // Add input to master node + var feedbackInputSlot = masterNode.FindInputSlot(PBRMasterNode.FeedbackSlotId); + var feedbackOutputSlot = feedbackNode.FindOutputSlot(AggregateFeedbackNode.AggregateOutputId); + masterNode.owner.Connect(feedbackOutputSlot.slotReference, feedbackInputSlot.slotReference); + masterNode.owner.ClearChanges(); + + return feedbackNode; + } + } +} diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs.meta b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs.meta new file mode 100644 index 00000000000..1854db3c53f --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d1c12fb33f3c7cb4e985e480acb68908 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Nodes/PropertyType.cs b/com.unity.shadergraph/Editor/Data/Nodes/PropertyType.cs index cc62bb3fb18..84413f46e42 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/PropertyType.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/PropertyType.cs @@ -16,6 +16,7 @@ enum PropertyType Matrix2, Matrix3, Matrix4, - SamplerState + SamplerState, + Stack } } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs index bf2b64f418f..63d255c52eb 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs @@ -21,6 +21,7 @@ class SubGraphNode : AbstractMaterialNode , IMayRequireVertexColor , IMayRequireTime , IMayRequireFaceSign + , IMayRequireRequirePixelCoordinate { [SerializeField] private string m_SerializedSubGraph = string.Empty; @@ -503,6 +504,14 @@ public bool RequiresFaceSign(ShaderStageCapability stageCapability) return subGraphData.requirements.requiresFaceSign; } + public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) + { + if (subGraphData == null) + return false; + + return subGraphData.requirements.requiresPixelCoordinate; + } + public NeededCoordinateSpace RequiresBitangent(ShaderStageCapability stageCapability) { if (subGraphData == null) diff --git a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs index 427f0f5d477..c9ce51e3f0c 100644 --- a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs +++ b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs @@ -959,6 +959,7 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial var results = new GenerationResults(); var shaderProperties = new PropertyCollector(); + var shaderPragmas = new PragmaCollector(); var functionBuilder = new ShaderStringBuilder(); var functionRegistry = new FunctionRegistry(functionBuilder); @@ -1034,6 +1035,7 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial graph, surfaceDescriptionFunction, functionRegistry, + shaderPragmas, shaderProperties, requirements, mode, @@ -1075,6 +1077,7 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial finalShader.AppendLine(@"#include ""Packages/com.unity.shadergraph/ShaderGraphLibrary/ShaderVariables.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.shadergraph/ShaderGraphLibrary/ShaderVariablesFunctions.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl"""); + finalShader.AppendLine(@"#include ""Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"""); finalShader.AppendNewLine(); finalShader.AppendLines(shaderProperties.GetPropertiesDeclaration(0, mode)); @@ -1098,7 +1101,7 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial finalShader.AppendLine(@"ENDHLSL"); - finalShader.AppendLines(ShaderGenerator.GetPreviewSubShader(node, requirements)); + finalShader.AppendLines(ShaderGenerator.GetPreviewSubShader(node, requirements, shaderPragmas)); ListPool.Release(activeNodeList); } @@ -1132,6 +1135,9 @@ public static void GenerateSurfaceInputStruct(ShaderStringBuilder sb, ShaderGrap if (requirements.requiresFaceSign) sb.AppendLine("float {0};", ShaderGeneratorNames.FaceSign); + if (requirements.requiresPixelCoordinate) + sb.AppendLine("float4 {0};", ShaderGeneratorNames.PixelCoordinate); + foreach (var channel in requirements.requiresMeshUVs.Distinct()) sb.AppendLine("half4 {0};", channel.GetUVName()); } @@ -1156,6 +1162,9 @@ public static void GenerateSurfaceInputTransferCode(ShaderStringBuilder sb, Shad if (requirements.requiresFaceSign) sb.AppendLine($"{variableName}.{ShaderGeneratorNames.FaceSign} = IN.{ShaderGeneratorNames.FaceSign};"); + if (requirements.requiresPixelCoordinate) + sb.AppendLine($"{variableName}.{ShaderGeneratorNames.PixelCoordinate} = IN.{ShaderGeneratorNames.PixelCoordinate};"); + foreach (var channel in requirements.requiresMeshUVs.Distinct()) sb.AppendLine($"{variableName}.{channel.GetUVName()} = IN.{channel.GetUVName()};"); } @@ -1186,6 +1195,7 @@ public static void GenerateSurfaceDescriptionFunction( GraphData graph, ShaderStringBuilder surfaceDescriptionFunction, FunctionRegistry functionRegistry, + PragmaCollector shaderPragmas, PropertyCollector shaderProperties, ShaderGraphRequirements requirements, GenerationMode mode, @@ -1221,6 +1231,7 @@ public static void GenerateSurfaceDescriptionFunction( } activeNode.CollectShaderProperties(shaderProperties, mode); + activeNode.CollectShaderPragmas(shaderPragmas, mode); } surfaceDescriptionFunction.AppendLines(sg.GetShaderString(0)); @@ -1284,6 +1295,7 @@ public static void GenerateVertexDescriptionFunction( GraphData graph, ShaderStringBuilder builder, FunctionRegistry functionRegistry, + PragmaCollector shaderPragmas, PropertyCollector shaderProperties, GenerationMode mode, List nodes, @@ -1318,6 +1330,7 @@ public static void GenerateVertexDescriptionFunction( generatesBodyCode.GenerateNodeCode(sg, graphContext, mode); } node.CollectShaderProperties(shaderProperties, mode); + node.CollectShaderPragmas(shaderPragmas, mode); } builder.AppendLines(sg.GetShaderString(0)); foreach (var slot in slots) @@ -1520,5 +1533,49 @@ public static void OpenFile(string path) p.Start(); } } + + /* + Find all VT nodes downstream from the given node + Returns a unique list. So even if a node can be reached through different paths it will be present only once. + */ + public static List FindDownStreamNodesOfType(AbstractMaterialNode node) where NodeType : AbstractMaterialNode + { + // Should never be called without a node + Debug.Assert(node != null); + + List visitedNodes = new List(); + List vtNodes = new List(); + Queue nodeStack = new Queue(); + nodeStack.Enqueue(node); + visitedNodes.Add(node.guid); + + while (nodeStack.Count > 0) + { + AbstractMaterialNode visit = nodeStack.Dequeue(); + + // Flood fill through all the nodes + foreach (var slot in visit.GetInputSlots()) + { + foreach (var edge in visit.owner.GetEdges(slot.slotReference)) + { + var inputNode = visit.owner.GetNodeFromGuid(edge.outputSlot.nodeGuid); + if (!visitedNodes.Contains(inputNode.guid)) + { + nodeStack.Enqueue(inputNode); + visitedNodes.Add(inputNode.guid); + } + } + } + + // Extract vt node + if (visit is NodeType) + { + NodeType vtNode = visit as NodeType; + vtNodes.Add(vtNode); + } + } + + return vtNodes; + } } } diff --git a/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs b/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs new file mode 100644 index 00000000000..4fc2f013d22 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs @@ -0,0 +1,110 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UnityEditor.ShaderGraph +{ + abstract class AbstractShaderPragma + { + // Check if this pragma is a of another pragma. Some pragmas may work identical if they are present several + // times and can be stripped while others do "something" each time they are used. + public abstract bool IsDuplicate(AbstractShaderPragma other); + public abstract string GetPragmaString(); + } + + // Just a list of string separated keywords + class SimplePragma : AbstractShaderPragma + { + public SimplePragma(string PragmaName, IEnumerable argumentKeywords) + { + keywords.Add("#pragma"); + keywords.Add(PragmaName); + keywords.AddRange(argumentKeywords); + } + + // By default we always emit the pragma + public override bool IsDuplicate(AbstractShaderPragma other) { return false; } + + public override string GetPragmaString() + { + return string.Join(" ", keywords); + } + + List keywords = new List(); + + public string pragmaname + { + get + { + return keywords[1]; + } + } + + public IEnumerable arguments + { + get + { + return keywords.Skip(2); + } + } + } + + class MultiCompilePragma : SimplePragma + { + public MultiCompilePragma(IEnumerable options) : base("multi_compile", options) + { + } + + public override bool IsDuplicate(AbstractShaderPragma other) + { + return (other is MultiCompilePragma) && (other as MultiCompilePragma).arguments.SequenceEqual(arguments); + } + } + + class ShaderFeaturePragma : SimplePragma + { + public ShaderFeaturePragma(IEnumerable options) : base("shader_feature", options) + { + } + + public override bool IsDuplicate(AbstractShaderPragma other) + { + return (other is ShaderFeaturePragma) && (other as ShaderFeaturePragma).arguments.SequenceEqual(arguments); + } + } + + // Todo add build-in multicompiles, skip_variants, .... + + class PragmaCollector + { + public readonly List pragmas = new List(); + + public void AddShaderPragma(AbstractShaderPragma newPragma) + { + // A equivalent pragma is already there + if (pragmas.Any(x => x.IsDuplicate(newPragma))) + return; + pragmas.Add(newPragma); + } + + public string GetPragmaLines(int baseIndentLevel) + { + var sb = new StringBuilder(); + foreach (var pragma in pragmas) + { + for (var i = 0; i < baseIndentLevel; i++) + { + //sb.Append("\t"); + sb.Append(" "); // unity convention use space instead of tab... + } + sb.AppendLine(pragma.GetPragmaString()); + } + return sb.ToString(); + } + + public override string ToString() + { + return GetPragmaLines(0); + } + } +} diff --git a/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs.meta b/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs.meta new file mode 100644 index 00000000000..91315f10f4f --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 14049a22003eeca4cae1d83c66b97721 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Util/PropertyCollector.cs b/com.unity.shadergraph/Editor/Data/Util/PropertyCollector.cs index 1949a642610..edda49e2576 100644 --- a/com.unity.shadergraph/Editor/Data/Util/PropertyCollector.cs +++ b/com.unity.shadergraph/Editor/Data/Util/PropertyCollector.cs @@ -46,11 +46,21 @@ public string GetPropertiesDeclaration(int baseIndentLevel, GenerationMode mode) public void GetPropertiesDeclaration(ShaderStringBuilder builder, GenerationMode mode) { + // In preview we ignore the isBatchable of the properties and always bundle them in a constant buffer + // not sure why... var batchAll = mode == GenerationMode.Preview; + builder.AppendLine("CBUFFER_START(UnityPerMaterial)"); - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + foreach (var prop in properties) { - builder.AppendLine(prop.GetPropertyDeclarationString()); + string s = prop.GetPropertyDeclarationStringForBatchMode(AbstractShaderProperty.GenerationMode.InConstantBuffer); + if (s != null) builder.AppendLine(s); + if (batchAll) + { + // BatchAll means BatchAll, so even things that would go in the root normally get batched in the CBUFFER + string s2 = prop.GetPropertyDeclarationStringForBatchMode(AbstractShaderProperty.GenerationMode.InRoot); + if (s2 != null) builder.AppendLine(s2); + } } builder.AppendLine("CBUFFER_END"); builder.AppendNewLine(); @@ -58,9 +68,10 @@ public void GetPropertiesDeclaration(ShaderStringBuilder builder, GenerationMode if (batchAll) return; - foreach (var prop in properties.Where(n => !n.isBatchable || !n.generatePropertyBlock)) + foreach (var prop in properties) { - builder.AppendLine(prop.GetPropertyDeclarationString()); + string s = prop.GetPropertyDeclarationStringForBatchMode(AbstractShaderProperty.GenerationMode.InRoot); + if ( s != null) builder.AppendLine(s); } } diff --git a/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs b/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs index 87d45afbd84..6713270a550 100644 --- a/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs +++ b/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs @@ -685,6 +685,9 @@ public static void GenerateStandardTransforms( if (pixelRequirements.requiresFaceSign) pixelShaderSurfaceInputs.AppendLine("surfaceInput.{0} = {0};", ShaderGeneratorNames.FaceSign); + if (pixelRequirements.requiresPixelCoordinate) + pixelShaderSurfaceInputs.AppendLine("surfaceInput.{0} = {0};", ShaderGeneratorNames.PixelCoordinate); + foreach (var channel in pixelRequirements.requiresMeshUVs.Distinct()) pixelShaderSurfaceInputs.AppendLine("surfaceInput.{0} = {0};", ShaderGeneratorNames.GetUVName(channel)); @@ -788,7 +791,7 @@ public static void GenerateSpaceTranslations( DimensionToSwizzle(dimension)); } - public static string GetPreviewSubShader(AbstractMaterialNode node, ShaderGraphRequirements shaderGraphRequirements) + public static string GetPreviewSubShader(AbstractMaterialNode node, ShaderGraphRequirements shaderGraphRequirements, PragmaCollector pragmas) { // Should never be called without a node Debug.Assert(node != null); @@ -849,12 +852,16 @@ public static string GetPreviewSubShader(AbstractMaterialNode node, ShaderGraphR if (shaderGraphRequirements.requiresFaceSign) faceSign.AppendLine(", half FaceSign : VFACE"); + if (shaderGraphRequirements.requiresPixelCoordinate) + faceSign.AppendLine(", half PixelCoordinate : VPOS"); + var res = subShaderTemplate.Replace("${Interpolators}", vertexOutputStruct.ToString()); res = res.Replace("${VertexShader}", vertexShader.ToString()); res = res.Replace("${FaceSign}", faceSign.ToString()); res = res.Replace("${LocalPixelShader}", pixelShader.ToString()); res = res.Replace("${SurfaceInputs}", pixelShaderSurfaceInputs.ToString()); res = res.Replace("${SurfaceOutputRemap}", pixelShaderSurfaceRemap.ToString()); + res = res.Replace("${Pragmas}", pragmas.ToString()); return res; } @@ -969,6 +976,8 @@ LOD 100 #pragma vertex vert #pragma fragment frag + ${Pragmas} + struct GraphVertexOutput { float4 position : POSITION; diff --git a/com.unity.shadergraph/Editor/Data/Util/ShaderGeneratorNames.cs b/com.unity.shadergraph/Editor/Data/Util/ShaderGeneratorNames.cs index 751dc3aa695..4cafa68b84c 100644 --- a/com.unity.shadergraph/Editor/Data/Util/ShaderGeneratorNames.cs +++ b/com.unity.shadergraph/Editor/Data/Util/ShaderGeneratorNames.cs @@ -10,7 +10,7 @@ static class ShaderGeneratorNames public const string ScreenPosition = "ScreenPosition"; public const string VertexColor = "VertexColor"; public const string FaceSign = "FaceSign"; - + public const string PixelCoordinate = "PixelCoordinate"; public static string GetUVName(this UVChannel channel) { diff --git a/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs b/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs new file mode 100644 index 00000000000..e856ad8b408 --- /dev/null +++ b/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs @@ -0,0 +1,14 @@ +using System; +using UnityEngine; + +namespace UnityEditor.ShaderGraph +{ + public class UnlitMasterGUI : ShaderGUI + { + public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) + { + materialEditor.PropertiesDefaultGUI(props); + // TODO: Add something here + } + } +} diff --git a/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs.meta b/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs.meta new file mode 100644 index 00000000000..baf2c8afa1f --- /dev/null +++ b/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 626ba3ac3d4c0524080375de120ed02c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From f61dd97370038adba6ccd6cd2824d4a864da8ca7 Mon Sep 17 00:00:00 2001 From: Aljosha Demeulemeester Date: Fri, 17 May 2019 17:04:11 +0200 Subject: [PATCH 008/143] moving VT from lit to baseshadergui, adding VT to unlit.shader --- .../Editor/ShaderGUI/BaseShaderGUI.cs | 37 ++++++++- .../Editor/ShaderGUI/Shaders/LitShader.cs | 18 +---- .../Editor/ShaderGUI/ShadingModels/LitGUI.cs | 20 +---- .../ShaderGUI/ShadingModels/StackStatus.cs | 8 +- .../Shaders/Unlit.shader | 76 ++++++++++++++++++- 5 files changed, 120 insertions(+), 39 deletions(-) diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs index 59043a2873e..b35b4c2f955 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs @@ -83,6 +83,9 @@ protected class Styles public static readonly GUIContent queueSlider = new GUIContent("Priority", "Determines the chronological rendering order for a Material. High values are rendered first."); + + public static GUIContent vtText = new GUIContent("Virtual Texturing", + "When enabled, use virtual texturing instead of regular textures."); } #endregion @@ -115,6 +118,8 @@ protected class Styles protected MaterialProperty queueOffsetProp { get; set; } + protected MaterialProperty vtProp { get; set; } + public bool m_FirstTimeApply = true; private const string k_KeyPrefix = "LightweightRP:Material:UI_State:"; @@ -152,6 +157,7 @@ public virtual void FindProperties(MaterialProperty[] properties) emissionMapProp = FindProperty("_EmissionMap", properties, false); emissionColorProp = FindProperty("_EmissionColor", properties, false); queueOffsetProp = FindProperty("_QueueOffset", properties, false); + vtProp = FindProperty("_VirtualTexturing", properties, false); } public override void OnGUI(MaterialEditor materialEditorIn, MaterialProperty[] properties) @@ -219,8 +225,21 @@ public void ShaderPropertiesGUI(Material material) DrawAdditionalFoldouts(material); if (EditorGUI.EndChangeCheck()) - { - foreach (var obj in materialEditor.targets) + { + //Based on user setting disable VT or enable VT. Only enable when the stacks are up to date. + if (vtProp != null) + { + if (vtProp.floatValue == 0.0) + { + material.DisableKeyword("VT_ON"); + } + else if (StackStatus.AllStacksValid(material)) + { + material.EnableKeyword("VT_ON"); + } + } + + foreach (var obj in materialEditor.targets) MaterialChanged((Material)obj); } } @@ -290,6 +309,8 @@ public virtual void DrawAdvancedOptions(Material material) queueOffsetProp.floatValue = queue; EditorGUI.showMixedValue = false; } + + materialEditor.ShaderProperty(vtProp, BaseShaderGUI.Styles.vtText); } public virtual void DrawAdditionalFoldouts(Material material){} @@ -403,6 +424,18 @@ public static void SetMaterialKeywords(Material material, Action shadi // Shader specific keyword functions shadingModelFunc?.Invoke(material); shaderFunc?.Invoke(material); + + if (material.HasProperty("_VirtualTexturing")) + { + if (material.GetFloat("_VirtualTexturing") == 0.0f) + { + CoreUtils.SetKeyword(material, "VT_ON", false); + } + else if (StackStatus.AllStacksValid(material)) + { + CoreUtils.SetKeyword(material, "VT_ON", true); + } + } } public static void SetupMaterialBlendMode(Material material) diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs index ae8d1647259..5a8c539b849 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/Shaders/LitShader.cs @@ -24,19 +24,7 @@ public override void MaterialChanged(Material material) if (material == null) throw new ArgumentNullException("material"); - SetMaterialKeywords(material, LitGUI.SetMaterialKeywords); - - if( litProperties.vt != null ) - { - if (litProperties.vt.floatValue == 0.0) - { - material.DisableKeyword("VT_ON"); - } - else if (StackStatus.AllStacksValid(material)) - { - material.EnableKeyword("VT_ON"); - } - } + SetMaterialKeywords(material, LitGUI.SetMaterialKeywords); } // material main surface options @@ -76,13 +64,13 @@ public override void DrawSurfaceInputs(Material material) // material main advanced options public override void DrawAdvancedOptions(Material material) { - if (litProperties.reflections != null && litProperties.highlights != null && litProperties.vt != null) + if (litProperties.reflections != null && litProperties.highlights != null) { EditorGUI.BeginChangeCheck(); { materialEditor.ShaderProperty(litProperties.highlights, LitGUI.Styles.highlightsText); materialEditor.ShaderProperty(litProperties.reflections, LitGUI.Styles.reflectionsText); - materialEditor.ShaderProperty(litProperties.vt, LitGUI.Styles.vtText); + if (EditorGUI.EndChangeCheck()) { diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs index 97dbe905beb..4b26ebb9c2a 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/LitGUI.cs @@ -43,10 +43,6 @@ public static class Styles new GUIContent("Environment Reflections", "When enabled, the Material samples reflections from the nearest Reflection Probes or Lighting Probe."); - public static GUIContent vtText = - new GUIContent("Virtual Texturing", - "When enabled, use virtual texturing instead of regular textures."); - public static GUIContent occlusionText = new GUIContent("Occlusion Map", "Sets an occlusion map to simulate shadowing from ambient lighting."); @@ -74,7 +70,7 @@ public struct LitProperties // Advanced Props public MaterialProperty highlights; public MaterialProperty reflections; - public MaterialProperty vt; + public LitProperties(MaterialProperty[] properties) { @@ -93,8 +89,7 @@ public LitProperties(MaterialProperty[] properties) occlusionMap = BaseShaderGUI.FindProperty("_OcclusionMap", properties, false); // Advanced Props highlights = BaseShaderGUI.FindProperty("_SpecularHighlights", properties, false); - reflections = BaseShaderGUI.FindProperty("_EnvironmentReflections", properties, false); - vt = BaseShaderGUI.FindProperty("_VirtualTexturing", properties, false); + reflections = BaseShaderGUI.FindProperty("_EnvironmentReflections", properties, false); } } @@ -216,17 +211,6 @@ public static void SetMaterialKeywords(Material material) GetSmoothnessMapChannel(material) == SmoothnessMapChannel.AlbedoAlpha && opaque); } - if (material.HasProperty("_VirtualTexturing")) - { - if (material.GetFloat("_VirtualTexturing") == 0.0f) - { - CoreUtils.SetKeyword(material, "VT_ON", false); - } - else if (StackStatus.AllStacksValid(material)) - { - CoreUtils.SetKeyword(material, "VT_ON", true); - } - } } } } diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs index 88a2ea52b7d..f8c3b106b4d 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs @@ -91,7 +91,8 @@ private static string GetStackHash(string[] textureProperties, Material material } else { - UnityEngine.Debug.Log("Texture settings don't match on all layers of StackedTexture"); + if( wrapMode != tex2D.wrapMode || textureScaling != textureImporter.npotScale ) + UnityEngine.Debug.LogError("Texture settings don't match on all layers of StackedTexture"); } } @@ -100,9 +101,10 @@ private static string GetStackHash(string[] textureProperties, Material material //todo: ignoring overall settings in hash for now //TileSetBuildSettings tileSetBuildSettings = new TileSetBuildSettings(ts); - String settingsHash = ""; // tileSetBuildSettings.GetHashString(); + String settingsHash = ""; + - return ("version_1_" + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); + return ("version_1_" + textureProperties.Length + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); } diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader b/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader index 8dd2d8dad7e..a8e013ff18f 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader @@ -6,6 +6,8 @@ Shader "Lightweight Render Pipeline/Unlit" _BaseColor("Color", Color) = (1, 1, 1, 1) _Cutoff("AlphaCutout", Range(0.0, 1.0)) = 0.5 + [Toggle] _VirtualTexturing("Virtual Texturing", Float) = 0.0 + // BlendMode [HideInInspector] _Surface("__surface", Float) = 0.0 [HideInInspector] _Blend("__blend", Float) = 0.0 @@ -22,6 +24,8 @@ Shader "Lightweight Render Pipeline/Unlit" [HideInInspector] _MainTex("BaseMap", 2D) = "white" {} [HideInInspector] _Color("Base Color", Color) = (0.5, 0.5, 0.5, 1) [HideInInspector] _SampleGI("SampleGI", float) = 0.0 // needed from bakedlit + + _TextureStack("_TextureStack", Stack) = { _BaseMap } } SubShader { @@ -50,6 +54,11 @@ Shader "Lightweight Render Pipeline/Unlit" #pragma multi_compile_fog #pragma multi_compile_instancing + //-------------------------------------- + // Virtual Texturing + #pragma shader_feature VT_ON + + #include "UnlitInput.hlsl" struct Attributes @@ -91,7 +100,10 @@ Shader "Lightweight Render Pipeline/Unlit" UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); half2 uv = input.uv; - half4 texColor = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv); + + StackInfo stackInfo = PrepareStack(uv, _TextureStack); + half4 texColor = SampleStack(stackInfo, _BaseMap); + half3 color = texColor.rgb * _BaseColor.rgb; half alpha = texColor.a * _BaseColor.a; AlphaDiscard(alpha, _Cutoff); @@ -156,6 +168,68 @@ Shader "Lightweight Render Pipeline/Unlit" ENDHLSL } + + // This pass it not used during regular rendering, only for finding out which VT tiles to load + Pass + { + Name "VTFeedback" + Tags{"LightMode" = "VTFeedback"} + + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + #pragma vertex vert + #pragma fragment frag + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_instancing + #pragma shader_feature VT_ON + + #include "LitInput.hlsl" + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct Varyings + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + Varyings vert(Attributes input) + { + Varyings output = (Varyings)0; + + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); + output.vertex = vertexInput.positionCS; + + output.uv = TRANSFORM_TEX(input.uv, _BaseMap); + + return output; + } + + half4 frag(Varyings input) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + + return ResolveStack(input.uv, _TextureStack); + } + ENDHLSL + } } FallBack "Hidden/InternalErrorShader" CustomEditor "UnityEditor.Rendering.LWRP.ShaderGUI.UnlitShader" From 88b039df052701316c43342c741b4491c61bfc6b Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Mon, 20 May 2019 10:09:03 +0200 Subject: [PATCH 009/143] [VirtualTexturing] Initial LWRP terrain shader support for proc VT --- .../Shaders/Terrain/TerrainLit-VT.shader | 153 ++++++++++++++++++ .../Shaders/Terrain/TerrainLit-VT.shader.meta | 9 ++ .../Shaders/Terrain/TerrainLitAdd-VT.shader | 55 +++++++ .../Terrain/TerrainLitAdd-VT.shader.meta | 9 ++ .../Shaders/Terrain/TerrainLitInput.hlsl | 6 + .../Shaders/Terrain/TerrainLitPasses.hlsl | 15 ++ 6 files changed, 247 insertions(+) create mode 100644 com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader create mode 100644 com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader.meta create mode 100644 com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader create mode 100644 com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader.meta diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader new file mode 100644 index 00000000000..f5a3d88ba8a --- /dev/null +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader @@ -0,0 +1,153 @@ +Shader "Lightweight Render Pipeline/Terrain/Lit-VT" +{ + Properties + { + // used in fallback on old cards & base map + [HideInInspector] _MainTex("BaseMap (RGB)", 2D) = "grey" {} + [HideInInspector] _BaseColor("Main Color", Color) = (1,1,1,1) + + // TODO: Implement ShaderGUI for the shader and display the checkbox only when instancing is enabled. + [Toggle(_TERRAIN_INSTANCED_PERPIXEL_NORMAL)] _TERRAIN_INSTANCED_PERPIXEL_NORMAL("Enable Instanced Per-pixel Normal", Float) = 0 + + _TextureStack("_TextureStack", Stack) = { _MainTex } + [HideInInspector]Transform("Transform", Vector) = (0,0,0,0) + [HideInInspector]DebugVTColor("DebugVTColor", Vector) = (1,0,1,0) + [HideInInspector]DebugVTParams("DebugVTParams", Vector) = (0,0,0,0) + } + + SubShader + { + Tags { "Queue" = "Geometry-100" "RenderType" = "Opaque" "RenderPipeline" = "LightweightPipeline" "IgnoreProjector" = "False"} + + Pass + { + Name "ForwardLit" + Tags { "LightMode" = "LightweightForward" } + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 3.0 + + #pragma vertex SplatmapVert + #pragma fragment SplatmapFragment + + #define _METALLICSPECGLOSSMAP 1 + #define _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A 1 + + // ------------------------------------- + // Lightweight Pipeline keywords + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile _ _SHADOWS_SOFT + #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile_fog + #pragma multi_compile_instancing + #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap + + #pragma shader_feature_local _NORMALMAP + // Sample normal in pixel shader when doing instancing + #pragma shader_feature_local _TERRAIN_INSTANCED_PERPIXEL_NORMAL + + #define VT_ON 1 + + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags{"LightMode" = "ShadowCaster"} + + ZWrite On + + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 2.0 + + #pragma vertex ShadowPassVertex + #pragma fragment ShadowPassFragment + + #pragma multi_compile_instancing + #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap + + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" + ENDHLSL + } + + Pass + { + Name "DepthOnly" + Tags{"LightMode" = "DepthOnly"} + + ZWrite On + ColorMask 0 + + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 2.0 + + #pragma vertex DepthOnlyVertex + #pragma fragment DepthOnlyFragment + + #pragma multi_compile_instancing + #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap + + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" + ENDHLSL + } + + Pass + { + Name "VTFeedback" + Tags { "LightMode" = "VTFeedback" } + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 3.0 + + #pragma vertex SplatmapVert + #pragma fragment frag + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_fog + #pragma multi_compile_instancing + #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap + + #define VT_ON 1 + + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" + + half4 frag(Varyings IN) : SV_TARGET + { + return ResolveStack(IN.uvMainAndLM.xy, _TextureStack); + } + ENDHLSL + } + + UsePass "Hidden/Nature/Terrain/Utilities/PICKING" + UsePass "Hidden/Nature/Terrain/Utilities/SELECTION" + } + Dependency "AddPassShader" = "Hidden/Lightweight Render Pipeline/Terrain/Lit-VT (Add Pass)" + Dependency "BaseMapShader" = "Hidden/Lightweight Render Pipeline/Terrain/Lit (Base Pass)" + + Fallback "Hidden/InternalErrorShader" +} diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader.meta b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader.meta new file mode 100644 index 00000000000..43ef89243cd --- /dev/null +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 000169addf5053b419e77acd7cbb5dc8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader new file mode 100644 index 00000000000..16cd3c0bc28 --- /dev/null +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader @@ -0,0 +1,55 @@ +Shader "Hidden/Lightweight Render Pipeline/Terrain/Lit-VT (Add Pass)" +{ + Properties + { + // used in fallback on old cards & base map + [HideInInspector] _BaseMap("BaseMap (RGB)", 2D) = "white" {} + [HideInInspector] _BaseColor("Main Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "Queue" = "Geometry-99" "RenderType" = "Opaque" "RenderPipeline" = "LightweightPipeline" "IgnoreProjector" = "True"} + + Pass + { + Name "TerrainAddLit" + Tags { "LightMode" = "LightweightForward" } + Blend One One + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 3.0 + + #pragma vertex SplatmapVert + #pragma fragment SplatmapFragment + + // ------------------------------------- + // Lightweight Pipeline keywords + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile _ _SHADOWS_SOFT + #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile_fog + #pragma multi_compile_instancing + #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap + + #pragma shader_feature_local _NORMALMAP + #define TERRAIN_SPLAT_ADDPASS 1 + #define VT_ON 1 + + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" + #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" + ENDHLSL + } + } + Fallback "Hidden/InternalErrorShader" +} diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader.meta b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader.meta new file mode 100644 index 00000000000..db6d3f1ea31 --- /dev/null +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 34d1ee9cbc2bc67448717527c65ebe87 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl index 96d67e51337..595d01bebf2 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl @@ -4,6 +4,7 @@ #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl" #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" CBUFFER_START(_Terrain) half _Metallic0, _Metallic1, _Metallic2, _Metallic3; @@ -37,6 +38,11 @@ CBUFFER_END TEXTURE2D(_MetallicTex); SAMPLER(sampler_MetallicTex); +#ifdef VT_ON +DECLARE_STACK_CB(_TextureStack); +DECLARE_STACK(_TextureStack, _MainTex); +#endif + half4 SampleMetallicSpecGloss(float2 uv, half albedoAlpha) { half4 specGloss; diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl index 0f8ddd71bde..debc8f6af4b 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl @@ -226,11 +226,26 @@ half4 SplatmapFragment(Varyings IN) : SV_TARGET half metallic = SAMPLE_TEXTURE2D(_MetallicTex, sampler_MetallicTex, IN.uvMainAndLM.xy).r; half alpha = 1; #else + +#ifdef VT_ON + StackInfo stackInfo = PrepareStack(IN.uvMainAndLM.xy, _TextureStack); + half4 mixedDiffuse = SampleStack(stackInfo, _MainTex); + + //TODO(ddebaets) this is a bit stupid but atm we only have diffuse + half4 splatControl = SAMPLE_TEXTURE2D(_Control, sampler_Control, IN.uvMainAndLM.xy); + half weight = dot(splatControl, 1.0h); +#if !defined(SHADER_API_MOBILE) && defined(TERRAIN_SPLAT_ADDPASS) + clip(weight == 0.0h ? -1.0h : 1.0h); +#endif + splatControl /= (weight + HALF_MIN); + + #else half4 splatControl; half weight; half4 mixedDiffuse; half4 defaultSmoothness = half4(_Smoothness0, _Smoothness1, _Smoothness2, _Smoothness3); SplatmapMix(IN, defaultSmoothness, splatControl, weight, mixedDiffuse, normalTS); +#endif half3 albedo = mixedDiffuse.rgb; half smoothness = mixedDiffuse.a; From 1c84d14ac39042c455d6802cc5b84293cee5c663 Mon Sep 17 00:00:00 2001 From: Aljosha Demeulemeester Date: Mon, 20 May 2019 12:23:13 +0200 Subject: [PATCH 010/143] enabling PBR shader graph node with VT toggle in the material editor and fallback when stack is not valid --- .../Editor/ShaderGUI/BaseShaderGUI.cs | 25 ++-- .../ShaderGUI/ShadingModels/StackStatus.cs | 111 ----------------- .../Editor/ShaderGUI/PBRMasterGUI.cs | 39 +++++- .../Editor/ShaderGUI/StackStatus.cs | 114 ++++++++++++++++++ 4 files changed, 158 insertions(+), 131 deletions(-) delete mode 100644 com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs create mode 100644 com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs index b35b4c2f955..433a726f542 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs @@ -3,6 +3,8 @@ using UnityEngine.Rendering; using UnityEditor.Rendering; +using UnityEditor.ShaderGraph; //remove when StackStatus is in core unity + namespace UnityEditor { public abstract class BaseShaderGUI : ShaderGUI @@ -225,20 +227,7 @@ public void ShaderPropertiesGUI(Material material) DrawAdditionalFoldouts(material); if (EditorGUI.EndChangeCheck()) - { - //Based on user setting disable VT or enable VT. Only enable when the stacks are up to date. - if (vtProp != null) - { - if (vtProp.floatValue == 0.0) - { - material.DisableKeyword("VT_ON"); - } - else if (StackStatus.AllStacksValid(material)) - { - material.EnableKeyword("VT_ON"); - } - } - + { foreach (var obj in materialEditor.targets) MaterialChanged((Material)obj); } @@ -427,13 +416,13 @@ public static void SetMaterialKeywords(Material material, Action shadi if (material.HasProperty("_VirtualTexturing")) { - if (material.GetFloat("_VirtualTexturing") == 0.0f) + if (material.GetFloat("_VirtualTexturing") == 0.0f || !StackStatus.AllStacksValid(material)) { - CoreUtils.SetKeyword(material, "VT_ON", false); + material.DisableKeyword("VT_ON"); } - else if (StackStatus.AllStacksValid(material)) + else { - CoreUtils.SetKeyword(material, "VT_ON", true); + material.EnableKeyword("VT_ON"); } } } diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs deleted file mode 100644 index f8c3b106b4d..00000000000 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/ShadingModels/StackStatus.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; -using UnityEngine.Rendering; - - -//move to core Unity at some point, make sure the hash calculation is identical to GTSBuildInfoGenerator in the meantime - -public class StackStatus -{ - public static bool AllStacksValid(Material material) - { - var shader = material.shader; - - int propCount = ShaderUtil.GetPropertyCount(shader); - for (int i = 0; i < propCount; i++) - { - if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.Stack) - { - string stackPropName = ShaderUtil.GetPropertyName(shader, i); - VTStack vtStack = material.GetStack(stackPropName); - - if (vtStack != null) - { - string[] textureProperties = ShaderUtil.GetStackTextureProperties(shader, stackPropName); - - string hash = GetStackHash(textureProperties, material); - - if (hash != vtStack.atlasName) - return false; - - } - else - { - return false; - } - } - } - - return true; - } - - private static string GetStackHash(string[] textureProperties, Material material) - { - // fill in a (hashed) name - string texturesHash = ""; - - TextureWrapMode wrapMode = TextureWrapMode.Clamp; - TextureImporterNPOTScale textureScaling = TextureImporterNPOTScale.None; - - bool firstTextureAdded = false; - - for (int j = 0; j < textureProperties.Length; j++) - { - string textureProperty = textureProperties[j]; - - if (!material.HasProperty(textureProperty)) //todo is this a broken shader? Report to user? - continue; - - Texture2D tex2D = material.GetTexture(textureProperty) as Texture2D; - - if (tex2D == null) - continue; - - string path = AssetDatabase.GetAssetPath(tex2D); - - if (string.IsNullOrEmpty(path)) - continue; - - string hash = tex2D.imageContentsHash.ToString(); - - if (hash == null) - { - continue; - } - - TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter; - if (textureImporter == null) - { - // probably a fallback texture - continue; - } - - texturesHash += hash; - - if (!firstTextureAdded) - { - wrapMode = tex2D.wrapMode; - textureScaling = textureImporter.npotScale; - firstTextureAdded = true; - } - else - { - if( wrapMode != tex2D.wrapMode || textureScaling != textureImporter.npotScale ) - UnityEngine.Debug.LogError("Texture settings don't match on all layers of StackedTexture"); - } - - } - - String assetHash = "" + wrapMode + textureScaling; - - //todo: ignoring overall settings in hash for now - //TileSetBuildSettings tileSetBuildSettings = new TileSetBuildSettings(ts); - String settingsHash = ""; - - - return ("version_1_" + textureProperties.Length + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); - } - - -} diff --git a/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs b/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs index 5fc4a1cbbe9..3f51c5b37e1 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs @@ -1,14 +1,27 @@ -using System; +using System; using UnityEngine; +using UnityEditor.Rendering; + + namespace UnityEditor.ShaderGraph { + + class PBRMasterGUI : ShaderGUI { + + public bool m_FirstTimeApply = true; + + public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { - materialEditor.PropertiesDefaultGUI(props); + Material material = materialEditor.target as Material; + EditorGUI.BeginChangeCheck(); + + materialEditor.PropertiesDefaultGUI(props); + foreach (MaterialProperty prop in props) { if (prop.name == "_EmissionColor") @@ -20,6 +33,28 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro return; } } + + if (EditorGUI.EndChangeCheck()) + { + SetMaterialKeywords(material); + } } + + + public static void SetMaterialKeywords(Material material, Action shadingModelFunc = null, Action shaderFunc = null) + { + if(material.HasProperty("_VirtualTexturing")) + { + if (material.GetFloat("_VirtualTexturing") == 0.0f || !StackStatus.AllStacksValid(material) ) + { + material.DisableKeyword("VT_ON"); + } + else + { + material.EnableKeyword("VT_ON"); + } + } + } + } } diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs new file mode 100644 index 00000000000..29e94eef060 --- /dev/null +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs @@ -0,0 +1,114 @@ +using System; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; + + +namespace UnityEditor.ShaderGraph +{ + //move to core Unity at some point, make sure the hash calculation is identical to GTSBuildInfoGenerator in the meantime + + public class StackStatus + { + public static bool AllStacksValid(Material material) + { + var shader = material.shader; + + int propCount = ShaderUtil.GetPropertyCount(shader); + for (int i = 0; i < propCount; i++) + { + if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.Stack) + { + string stackPropName = ShaderUtil.GetPropertyName(shader, i); + VTStack vtStack = material.GetStack(stackPropName); + + if (vtStack != null) + { + string[] textureProperties = ShaderUtil.GetStackTextureProperties(shader, stackPropName); + + string hash = GetStackHash(textureProperties, material); + + if (hash != vtStack.atlasName) + return false; + + } + else + { + return false; + } + } + } + + return true; + } + + private static string GetStackHash(string[] textureProperties, Material material) + { + // fill in a (hashed) name + string texturesHash = ""; + + TextureWrapMode wrapMode = TextureWrapMode.Clamp; + TextureImporterNPOTScale textureScaling = TextureImporterNPOTScale.None; + + bool firstTextureAdded = false; + + for (int j = 0; j < textureProperties.Length; j++) + { + string textureProperty = textureProperties[j]; + + if (!material.HasProperty(textureProperty)) //todo is this a broken shader? Report to user? + continue; + + Texture2D tex2D = material.GetTexture(textureProperty) as Texture2D; + + if (tex2D == null) + continue; + + string path = AssetDatabase.GetAssetPath(tex2D); + + if (string.IsNullOrEmpty(path)) + continue; + + string hash = tex2D.imageContentsHash.ToString(); + + if (hash == null) + { + continue; + } + + TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter; + if (textureImporter == null) + { + // probably a fallback texture + continue; + } + + texturesHash += hash; + + if (!firstTextureAdded) + { + wrapMode = tex2D.wrapMode; + textureScaling = textureImporter.npotScale; + firstTextureAdded = true; + } + else + { + if (wrapMode != tex2D.wrapMode || textureScaling != textureImporter.npotScale) + UnityEngine.Debug.LogError("Texture settings don't match on all layers of StackedTexture"); + } + + } + + String assetHash = "" + wrapMode + textureScaling; + + //todo: ignoring overall settings in hash for now + //TileSetBuildSettings tileSetBuildSettings = new TileSetBuildSettings(ts); + String settingsHash = ""; + + + return ("version_1_" + textureProperties.Length + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); + } + + + } +} From a9a4bdf0f4dece7b839565df127083e7253127ee Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Mon, 20 May 2019 14:05:26 +0200 Subject: [PATCH 011/143] [VirtualTexturing] Compile fix after merge master --- .../Editor/Data/Graphs/StackShaderProperty.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs index 01a3e0d6ad1..021e2bba760 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs @@ -42,6 +42,11 @@ public override bool isBatchable get { return true; } } + public override bool isRenamable + { + get { return true; } + } + public override bool isExposable { get { return true; } From 01a6123166c3b33e6d79f721e420d30d2a38381d Mon Sep 17 00:00:00 2001 From: Nico Leyman Date: Thu, 23 May 2019 13:48:27 +0200 Subject: [PATCH 012/143] [Virtual Texturing] Fixed DeclareStack4 typo --- .../ShaderLibrary/TextureStack.hlsl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 99e64f2e3a5..9b318c42e19 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -6,11 +6,11 @@ /* This header adds the following pseudo definitions. Actual types etc may vary depending on vt- being on or off. - + struct StackInfo { opaque struct ... } StackInfo PrepareStack(float2 uv, Stack object); float4 SampleStack(StackInfo info, Texture tex); - + To use this in your materials add the following to various locations in the shader: In shaderlab "Properties" section add: @@ -41,17 +41,17 @@ etc... NOTE: The Stack shaderlab property and DECLARE_STACKn define need to match i.e. the same name and same texture slots. - + Then in the pixel shader function (likely somewhere at the beginning) do a call: StackInfo info = PrepareStack(MyFancyStack, uvs); - + Then later on when you want to sample the actual texture do a call(s): - + float4 color = SampleStack(info, TextureSlot1); float4 color2 = SampleStack(info, TextureSlot2); ... - + The above steps can be repeated for multiple stacks. But be sure that when using the SampleStack you always pass in the result of the PrepareStack for the correct stack the texture belongs to. @@ -166,7 +166,7 @@ float4 ResolveVT_##stackName(float2 uv)\ DECLARE_STACK_LAYER(stackName, layer0SamplerName,0)\ DECLARE_STACK_LAYER(stackName, layer1SamplerName,1)\ DECLARE_STACK_LAYER(stackName, layer2SamplerName,2)\ - DECLARE_STACK_LAYER(stackName, layer2SamplerName,3) + DECLARE_STACK_LAYER(stackName, layer3SamplerName,3) #define PrepareStack(uv, stackName) PrepareVT_##stackName(uv) #define SampleStack(info, textureName) SampleVT_##textureName(info) From b4b5d823037fccb6753064633314a97acbc326b0 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 5 Jun 2019 11:00:17 +0200 Subject: [PATCH 013/143] [VirtualTexturing] Initial support for HDRP lit --- .../ShaderLibrary/TextureStack.hlsl | 37 ++- .../Editor/Material/Lit/BaseLitUI.cs | 20 ++ .../Editor/Material/Lit/LitUI.cs | 7 + .../RenderPipeline/HDRenderPipelineUI.Skin.cs | 4 +- .../RenderPipeline/HDRenderPipelineUI.cs | 22 ++ .../SerializedRenderPipelineSettings.cs | 3 + .../Runtime/Material/GBufferManager.cs | 28 ++- .../Runtime/Material/Lit/Lit.cs | 32 ++- .../Runtime/Material/Lit/Lit.cs.hlsl | 5 + .../Runtime/Material/Lit/Lit.hlsl | 34 ++- .../Runtime/Material/Lit/Lit.shader | 5 + .../Material/Lit/LitDataIndividualLayer.hlsl | 32 ++- .../Runtime/Material/Lit/LitProperties.hlsl | 6 + .../Runtime/RenderPipeline/Camera/HDCamera.cs | 52 ++++ .../RenderPipeline/HDCustomSamplerId.cs | 3 + .../RenderPipeline/HDRenderPipeline.cs | 7 + .../RenderPipeline/HDRenderPipelineAsset.cs | 10 +- .../RenderPipeline/RenderPipelineResources.cs | 7 + .../Settings/RenderPipelineSettings.cs | 3 + .../DownsampleVTFeedback.compute | 30 +++ .../DownsampleVTFeedback.compute.meta | 8 + .../Editor/ShaderGUI/BaseShaderGUI.cs | 12 +- .../LightWeightSpriteLitSubShader.cs | 4 + .../LightWeightSpriteUnlitSubShader.cs | 4 + .../Shaders/Lit.shader | 6 +- .../Shaders/LitInput.hlsl | 10 +- .../Shaders/Terrain/TerrainLit-VT.shader | 2 +- .../Shaders/Unlit.shader | 6 +- .../Shaders/Unlit_VT.shader | 234 ------------------ .../Shaders/Unlit_VT.shader.meta | 9 - .../Editor/ShaderGUI/StackStatus.cs | 13 + .../Editor/ShaderGUI/StackStatus.cs.meta | 11 + 32 files changed, 366 insertions(+), 300 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute create mode 100644 com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta delete mode 100644 com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader delete mode 100644 com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader.meta create mode 100644 com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs.meta diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 9b318c42e19..376cf4cf386 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -59,7 +59,12 @@ #ifdef VT_ON -#define StackInfo GraniteLookupData +struct StackInfo +{ + GraniteLookupData lookupData; + float4 resolveOutput; +}; + #define DECLARE_STACK_CB(stackName) \ float4x4 stackName##_spaceparams[2];\ @@ -87,12 +92,14 @@ StackInfo PrepareVT_##stackName(float2 uv)\ translationTable.Texture = stackName##_transtab;\ translationTable.Sampler = sampler##stackName##_transtab;\ \ - StackInfo outLookupData;\ - float4 outResolve;\ - Granite_Lookup_Anisotropic(grCB, translationTable, uv, outLookupData, outResolve);\ - return outLookupData;\ + StackInfo info;\ + Granite_Lookup_Anisotropic(grCB, translationTable, uv, info.lookupData, info.resolveOutput);\ + return info;\ } +#define jj2(a, b) a##b +#define jj(a, b) jj2(a, b) + #define DECLARE_STACK_LAYER(stackName, layerSamplerName, layerIndex) \ TEXTURE2D(stackName##_c##layerIndex);\ SAMPLER(sampler##stackName##_c##layerIndex);\ @@ -116,20 +123,24 @@ float4 SampleVT_##layerSamplerName(StackInfo info)\ cache.Sampler = sampler##stackName##_c##layerIndex;\ \ float4 output;\ - Granite_Sample_HQ(grCB, info, cache, layerIndex, output);\ + Granite_Sample_HQ(grCB, info.lookupData, cache, layerIndex, output);\ return output;\ +} \ +float3 SampleVT_Normal_##layerSamplerName(StackInfo info, float scale)\ +{\ + return Granite_UnpackNormal( jj(SampleVT_,layerSamplerName)( info ), scale ); \ } #define DECLARE_STACK_RESOLVE(stackName)\ -float4 ResolveVT_##stackName(float2 uv)\ +float4 ResolveVT_##stackName(float2 uv, float2 resolveConstantPatch)\ {\ GraniteStreamingTextureConstantBuffer textureParamBlock;\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ textureParamBlock.data[1] = stackName##_atlasparams[1];\ \ /* hack resolve scale into constant buffer here */\ - stackName##_spaceparams[0][2][0] *= VT_ResolveConstantPatch.x;\ - stackName##_spaceparams[0][3][0] *= VT_ResolveConstantPatch.y;\ + stackName##_spaceparams[0][2][0] *= resolveConstantPatch.x;\ + stackName##_spaceparams[0][3][0] *= resolveConstantPatch.y;\ \ GraniteTilesetConstantBuffer graniteParamBlock;\ graniteParamBlock.data[0] = stackName##_spaceparams[0];\ @@ -170,7 +181,9 @@ float4 ResolveVT_##stackName(float2 uv)\ #define PrepareStack(uv, stackName) PrepareVT_##stackName(uv) #define SampleStack(info, textureName) SampleVT_##textureName(info) -#define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) +#define SampleStack_Normal(info, textureName, scale) SampleVT_Normal_##textureName(info, scale) +#define GetResolveOutput(info) info.resolveOutput +#define ResolveStack(uv, stackName, scale) ResolveVT_##stackName(uv, scale) #else @@ -201,8 +214,10 @@ StackInfo MakeStackInfo(float2 uv) // Sample just samples the texture #define SampleStack(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) +#define SampleStack_Normal(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) // Resolve does nothing -#define ResolveStack(uv, stackName) float4(1,1,1,1); +#define GetResolveOutput(info) float4(1,1,1,1) +#define ResolveStack(uv, stackName, scale) float4(1,1,1,1) #endif diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/BaseLitUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/BaseLitUI.cs index 95cb1a687c5..0cbf656f3a7 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/BaseLitUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/BaseLitUI.cs @@ -2,6 +2,7 @@ using UnityEngine; using UnityEngine.Experimental.Rendering.HDPipeline; using UnityEngine.Rendering; +using UnityEditor.ShaderGraph; //TODO(ddebaets) remove when StackStatus is in core unity namespace UnityEditor.Experimental.Rendering.HDPipeline { @@ -76,6 +77,11 @@ protected static class StylesBaseLit // SSR public static GUIContent receivesSSRText = new GUIContent("Receive SSR", "When enabled, this Material can receive screen space reflections."); +#if ENABLE_VIRTUALTEXTURES + // VT + public static GUIContent enableVirtualTextureText = new GUIContent("Virtual Texturing", "When enabled, use virtual texturing instead of regular textures."); +#endif + } public enum DoubleSidedNormalMode @@ -193,6 +199,11 @@ public enum HeightmapParametrization protected MaterialProperty receivesSSR = null; protected const string kReceivesSSR = "_ReceivesSSR"; +#if ENABLE_VIRTUALTEXTURES + // VT + protected const string kVirtualTexturing = "_VirtualTexturing"; + protected MaterialProperty virtualTexturing { get; set; } +#endif protected override void FindBaseMaterialProperties(MaterialProperty[] props) { @@ -244,6 +255,11 @@ protected override void FindBaseMaterialProperties(MaterialProperty[] props) // SSR receivesSSR = FindProperty(kReceivesSSR, props, false); + +#if ENABLE_VIRTUALTEXTURES + // VT + virtualTexturing = FindProperty(kVirtualTexturing, props, false); +#endif } void TessellationModePopup() @@ -584,6 +600,10 @@ static public void SetupBaseLitKeywords(Material material) CoreUtils.SetKeyword(material, "_DISABLE_DECALS", material.HasProperty(kSupportDecals) && material.GetFloat(kSupportDecals) == 0.0); CoreUtils.SetKeyword(material, "_DISABLE_SSR", material.HasProperty(kReceivesSSR) && material.GetFloat(kReceivesSSR) == 0.0); CoreUtils.SetKeyword(material, "_ENABLE_GEOMETRIC_SPECULAR_AA", material.HasProperty(kEnableGeometricSpecularAA) && material.GetFloat(kEnableGeometricSpecularAA) == 1.0); + +#if ENABLE_VIRTUALTEXTURES + StackStatus.UpdateMaterial(material); +#endif } static public void SetupBaseLitMaterialPass(Material material) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/LitUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/LitUI.cs index f21d901dd62..75d33edf939 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/LitUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/LitUI.cs @@ -956,6 +956,13 @@ protected override void MaterialPropertiesGUI(Material material) protected override void MaterialPropertiesAdvanceGUI(Material material) { m_MaterialEditor.ShaderProperty(enableSpecularOcclusion, Styles.enableSpecularOcclusionText); + +#if ENABLE_VIRTUALTEXTURES + if (virtualTexturing != null) + { + m_MaterialEditor.ShaderProperty(virtualTexturing, StylesBaseLit.enableVirtualTextureText); + } +#endif } protected override bool ShouldEmissionBeEnabled(Material material) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index 3b97439c8ca..1692239ec44 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -55,6 +55,7 @@ static partial class HDRenderPipelineUI static readonly GUIContent k_SupportTransparentDepthPostpass = EditorGUIUtility.TrTextContent("Transparent Depth Postpass", "When disabled, HDRP removes all transparent depth postpass Shader variants when you build for the Unity Player. This decreases build time."); static readonly GUIContent k_SupportRaytracing = EditorGUIUtility.TrTextContent("Realtime Raytracing"); static readonly GUIContent k_RaytracingTier = EditorGUIUtility.TrTextContent("Raytracing Tier"); + static readonly GUIContent k_SupportsVirtualTexturing = EditorGUIUtility.TrTextContent("Virtual Texturing"); const string k_CacheErrorFormat = "This configuration will lead to more than 2 GB reserved for this cache at runtime! ({0} requested) Only {1} element will be reserved instead."; const string k_CacheInfoFormat = "Reserving {0} in memory at runtime."; @@ -142,7 +143,8 @@ static partial class HDRenderPipelineUI { k_SupportTransparentBackface , shaderVariantDrawback }, { k_SupportTransparentDepthPrepass , shaderVariantDrawback }, { k_SupportTransparentDepthPostpass , shaderVariantDrawback }, - { k_SupportRaytracing , string.Format("{0}, {1}", memoryDrawback, lotShaderVariantDrawback) } + { k_SupportRaytracing , string.Format("{0}, {1}", memoryDrawback, lotShaderVariantDrawback) }, + { k_SupportsVirtualTexturing , string.Format("{0}, {1}", memoryDrawback, lotShaderVariantDrawback) } }; static Dictionary k_SupportLitShaderModeDrawbacks = new Dictionary diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index 4a21ec96767..4ba08cf939e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -509,6 +509,27 @@ static void Drawer_SectionRenderingUnsorted(SerializedHDRenderPipelineAsset seri serialized.renderPipelineSettings.supportRayTracing.boolValue = false; } + + // VT + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportsVirtualTexturing, k_SupportsVirtualTexturing ); + if (EditorGUI.EndChangeCheck() ) + { + // disable VT on all materials + var matIds = AssetDatabase.FindAssets("t:Material"); + for (int i = 0, length = matIds.Length; i < length; i++) + { + EditorUtility.DisplayProgressBar("Updating Materials", "Updating materials for VT changes...", (float)(i / matIds.Length)); + var path = AssetDatabase.GUIDToAssetPath(matIds[i]); + var mat = AssetDatabase.LoadAssetAtPath(path); + if (mat != null) + { + ShaderGraph.StackStatus.UpdateMaterial(mat, serialized.renderPipelineSettings.supportsVirtualTexturing.boolValue == false); + } + } + EditorUtility.ClearProgressBar(); + } + EditorGUILayout.Space(); //to separate with following sub sections } @@ -618,6 +639,7 @@ static void SupportedSettingsInfoSection(SerializedHDRenderPipelineAsset seriali #if REALTIME_RAYTRACING_SUPPORT AppendSupport(builder, serialized.renderPipelineSettings.supportRayTracing, k_SupportRaytracing); #endif + AppendSupport(builder, serialized.renderPipelineSettings.supportsVirtualTexturing, k_SupportsVirtualTexturing); EditorGUILayout.HelpBox(builder.ToString(), MessageType.Info, wide: true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs index 3a674ef890d..84f22d0f769 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs @@ -32,6 +32,7 @@ class SerializedRenderPipelineSettings public SerializedProperty supportTransparentBackface; public SerializedProperty supportTransparentDepthPrepass; public SerializedProperty supportTransparentDepthPostpass; + public SerializedProperty supportsVirtualTexturing; public SerializedGlobalLightLoopSettings lightLoopSettings; @@ -69,6 +70,8 @@ public SerializedRenderPipelineSettings(SerializedProperty root) supportRayTracing = root.Find((RenderPipelineSettings s) => s.supportRayTracing); supportedRaytracingTier = root.Find((RenderPipelineSettings s) => s.supportedRaytracingTier); + supportsVirtualTexturing = root.Find((RenderPipelineSettings s) => s.supportsVirtualTexturing); + lightLoopSettings = new SerializedGlobalLightLoopSettings(root.Find((RenderPipelineSettings s) => s.lightLoopSettings)); hdShadowInitParams = new SerializedHDShadowInitParameters(root.Find((RenderPipelineSettings s) => s.hdShadowInitParams)); decalSettings = new SerializedGlobalDecalSettings(root.Find((RenderPipelineSettings s) => s.decalSettings)); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs index a4c043f08ec..39e5e483101 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs @@ -9,7 +9,10 @@ public enum GBufferUsage SubsurfaceScattering, Normal, LightLayers, - ShadowMask + ShadowMask, +#if ENABLE_VIRTUALTEXTURES + VTFeedback, +#endif } public class GBufferManager : MRTBufferManager @@ -20,6 +23,7 @@ public class GBufferManager : MRTBufferManager // This is the index of the gbuffer use for shadowmask and lightlayers, if any protected int m_ShadowMaskIndex = -1; protected int m_LightLayers = -1; + protected int m_VTFeedbackIndex = -1; protected HDRenderPipelineAsset m_asset; // We need to store current set of RT to bind exactly, as we can have dynamic RT (LightLayers, ShadowMask), we allocated an array for each possible size (to avoid gardbage collect pressure) protected RenderTargetIdentifier[][] m_RTIDsArray = new RenderTargetIdentifier[8][]; @@ -54,6 +58,10 @@ public override void CreateBuffers() m_ShadowMaskIndex = gbufferIndex; else if (m_GBufferUsage[gbufferIndex] == GBufferUsage.LightLayers) m_LightLayers = gbufferIndex; +#if ENABLE_VIRTUALTEXTURES + else if (m_GBufferUsage[gbufferIndex] == GBufferUsage.VTFeedback) + m_VTFeedbackIndex = gbufferIndex; +#endif } } @@ -73,6 +81,13 @@ public override void BindBufferAsTextures(CommandBuffer cmd) cmd.SetGlobalTexture(HDShaderIDs._LightLayersTexture, TextureXR.GetWhiteTexture()); // This is never use but need to be bind as the read is inside a if } +#if ENABLE_VIRTUALTEXTURES + public RTHandleSystem.RTHandle GetGBuffer0RT() + { + return m_RTs[0]; + } +#endif + // This function will setup the required render target array. This take into account if shadow mask and light layers are enabled or not. // Note for the future: Setup works fine as we don't have change per object (like velocity for example). If in the future it is the case // the changing per object buffer MUST be the last one so the shader can decide if it write to it or not @@ -130,6 +145,17 @@ public RTHandleSystem.RTHandle GetNormalBuffer(int index) return null; } +#if ENABLE_VIRTUALTEXTURES + public RTHandleSystem.RTHandle GetVTFeedbackBuffer() + { + if (m_VTFeedbackIndex != -1) + { + return m_RTs[m_VTFeedbackIndex]; + } + return null; + } +#endif + public RTHandleSystem.RTHandle GetSubsurfaceScatteringBuffer(int index) { int currentIndex = 0; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs index 5a506594252..2356489ccb1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs @@ -104,6 +104,9 @@ public struct SurfaceData public float atDistance; [SurfaceDataAttributes("Transmittance mask")] public float transmittanceMask; + + [SurfaceDataAttributes("VTFeedback")] + public Vector4 VTFeedback; }; //----------------------------------------------------------------------------- @@ -175,12 +178,13 @@ public struct BSDFData public override bool IsDefferedMaterial() { return true; } - protected void GetGBufferOptions(HDRenderPipelineAsset asset, out int gBufferCount, out bool supportShadowMask, out bool supportLightLayers) + protected void GetGBufferOptions(HDRenderPipelineAsset asset, out int gBufferCount, out bool supportShadowMask, out bool supportLightLayers, out bool supportsVirtualTexturing) { // Caution: This must be in sync with GBUFFERMATERIAL_COUNT definition in supportShadowMask = asset.currentPlatformRenderPipelineSettings.supportShadowMask; supportLightLayers = asset.currentPlatformRenderPipelineSettings.supportLightLayers; - gBufferCount = 4 + (supportShadowMask ? 1 : 0) + (supportLightLayers ? 1 : 0); + supportsVirtualTexturing = asset.currentPlatformRenderPipelineSettings.supportsVirtualTexturing; + gBufferCount = 4 + (supportShadowMask ? 1 : 0) + (supportLightLayers ? 1 : 0) + (supportsVirtualTexturing ? 1 : 0); } // This must return the number of GBuffer to allocate @@ -189,7 +193,8 @@ public override int GetMaterialGBufferCount(HDRenderPipelineAsset asset) int gBufferCount; bool unused0; bool unused1; - GetGBufferOptions(asset, out gBufferCount, out unused0, out unused1); + bool unused2; + GetGBufferOptions(asset, out gBufferCount, out unused0, out unused1, out unused2); return gBufferCount; } @@ -199,7 +204,8 @@ public override void GetMaterialGBufferDescription(HDRenderPipelineAsset asset, int gBufferCount; bool supportShadowMask; bool supportLightLayers; - GetGBufferOptions(asset, out gBufferCount, out supportShadowMask, out supportLightLayers); + bool supportsVirtualTexturing; + GetGBufferOptions(asset, out gBufferCount, out supportShadowMask, out supportLightLayers, out supportsVirtualTexturing); RTFormat = new GraphicsFormat[gBufferCount]; gBufferUsage = new GBufferUsage[gBufferCount]; @@ -218,20 +224,30 @@ public override void GetMaterialGBufferDescription(HDRenderPipelineAsset asset, gBufferUsage[3] = GBufferUsage.None; // If we are in raytracing mode and we want to have indirect diffuse active, we need to make sure that the gbuffer3 is writable - #if ENABLE_RAYTRACING +#if ENABLE_RAYTRACING enableWrite[3] = true; - #else +#else enableWrite[3] = false; - #endif +#endif int index = 4; +#if ENABLE_VIRTUALTEXTURES + if (supportsVirtualTexturing) + { + RTFormat[index] = GraphicsFormat.R8G8B8A8_UNorm; + gBufferUsage[index] = GBufferUsage.VTFeedback; + enableWrite[index] = false; //TODO(ddebaets) once VTF DD comes online, this needs to be true + index++; + } +#endif + if (supportLightLayers) { RTFormat[index] = GraphicsFormat.R8G8B8A8_UNorm; gBufferUsage[index] = GBufferUsage.LightLayers; index++; - } + } // All buffer above are fixed. However shadow mask buffer can be setup or not depends on light in view. // Thus it need to be the last one, so all indexes stay the same diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs.hlsl index c21ac3f7ac1..e2e37f8c703 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs.hlsl @@ -41,6 +41,7 @@ #define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_COLOR (1020) #define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_ABSORPTION_DISTANCE (1021) #define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_MASK (1022) +#define DEBUGVIEW_LIT_SURFACEDATA_VTFEEDBACK (1023) // // UnityEngine.Experimental.Rendering.HDPipeline.Lit+BSDFData: static fields @@ -98,6 +99,7 @@ struct SurfaceData float3 transmittanceColor; float atDistance; float transmittanceMask; + float4 VTFeedback; }; // Generated from UnityEngine.Experimental.Rendering.HDPipeline.Lit+BSDFData @@ -209,6 +211,9 @@ void GetGeneratedSurfaceDataDebug(uint paramId, SurfaceData surfacedata, inout f case DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_MASK: result = surfacedata.transmittanceMask.xxx; break; + case DEBUGVIEW_LIT_SURFACEDATA_VTFEEDBACK: + result = surfacedata.VTFeedback.xyz; + break; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index 7e21f6aa66c..97321cd7fa0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -57,6 +57,7 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/LTCAreaLight/LTCAreaLight.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/PreIntegratedFGD/PreIntegratedFGD.hlsl" +//#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderConfig.cs.hlsl" //----------------------------------------------------------------------------- // Definition @@ -68,6 +69,7 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k #define GBufferType3 float4 #define GBufferType4 float4 #define GBufferType5 float4 +#define GBufferType6 float4 #ifdef LIGHT_LAYERS #define GBUFFERMATERIAL_LIGHT_LAYERS 1 @@ -81,16 +83,35 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k #define GBUFFERMATERIAL_SHADOWMASK 0 #endif -// Caution: This must be in sync with Lit.cs GetMaterialGBufferCount() -#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK) +#ifdef VT_ON +#define GBUFFERMATERIAL_VTFEEDBACK 1 +#else +#define GBUFFERMATERIAL_VTFEEDBACK 0 +#endif -#if defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) + +// Caution: This must be in sync with Lit.cs GetMaterialGBufferCount() +#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK + GBUFFERMATERIAL_VTFEEDBACK) + +#if defined(VT_ON) && defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) +#define OUT_GBUFFER_VTFEEDBACK outGBuffer4 +#define OUT_GBUFFER_LIGHT_LAYERS outGBuffer5 +#define OUT_GBUFFER_SHADOWMASK outGBuffer6 +#elif defined(VT_ON) && defined(LIGHT_LAYERS) +#define OUT_GBUFFER_VTFEEDBACK outGBuffer4 +#define OUT_GBUFFER_LIGHT_LAYERS outGBuffer5 +#elif defined(VT_ON) && defined(SHADOWS_SHADOWMASK) +#define OUT_GBUFFER_VTFEEDBACK outGBuffer4 +#define OUT_GBUFFER_SHADOWMASK outGBuffer5 +#elif defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) #define OUT_GBUFFER_LIGHT_LAYERS outGBuffer4 #define OUT_GBUFFER_SHADOWMASK outGBuffer5 #elif defined(LIGHT_LAYERS) #define OUT_GBUFFER_LIGHT_LAYERS outGBuffer4 #elif defined(SHADOWS_SHADOWMASK) #define OUT_GBUFFER_SHADOWMASK outGBuffer4 +#elif defined(VT_ON) +#define OUT_GBUFFER_VTFEEDBACK outGBuffer4 #endif #define HAS_REFRACTION (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE)) @@ -556,6 +577,9 @@ void EncodeIntoGBuffer( SurfaceData surfaceData #endif #if GBUFFERMATERIAL_COUNT > 5 , out GBufferType5 outGBuffer5 +#endif +#if GBUFFERMATERIAL_COUNT > 6 + , out GBufferType6 outGBuffer6 #endif ) { @@ -661,6 +685,10 @@ void EncodeIntoGBuffer( SurfaceData surfaceData #ifdef SHADOWS_SHADOWMASK OUT_GBUFFER_SHADOWMASK = BUILTIN_DATA_SHADOW_MASK; #endif + +#ifdef VT_ON + OUT_GBUFFER_VTFEEDBACK = surfaceData.VTFeedback; +#endif } // Fills the BSDFData. Also returns the (per-pixel) material feature flags inferred diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index 6319d6c453c..3a1b7767fdf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -232,6 +232,9 @@ Shader "HDRP/Lit" [HideInInspector] _DiffusionProfile("Obsolete, kept for migration purpose", Int) = 0 [HideInInspector] _DiffusionProfileAsset("Diffusion Profile Asset", Vector) = (0, 0, 0, 0) [HideInInspector] _DiffusionProfileHash("Diffusion Profile Hash", Float) = 0 + + [Toggle] _VirtualTexturing("Virtual Texturing", Float) = 0.0 + _TextureStack("_TextureStack", Stack) = { _BaseColorMap _MaskMap _NormalMap } } HLSLINCLUDE @@ -299,6 +302,8 @@ Shader "HDRP/Lit" #pragma multi_compile_instancing #pragma instancing_options renderinglayer + #pragma shader_feature_local VT_ON + //------------------------------------------------------------------------------------- // Define //------------------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index cf1700b04d2..ffbd296ec01 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -97,13 +97,18 @@ void ADD_IDX(ComputeLayerTexCoord)( // Uv related parameters } // Caution: Duplicate from GetBentNormalTS - keep in sync! -float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float3 detailNormalTS, float detailMask) +float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float3 detailNormalTS, float detailMask, StackInfo stackInfo) { float3 normalTS; #ifdef _NORMALMAP_IDX #ifdef _NORMALMAP_TANGENT_SPACE_IDX + //TODO(ddebaets) VT does not handle full range of normal map sampling/reconstruction so special case here... +#ifdef VT_ON + normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); +#else normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), SAMPLER_NORMALMAP_IDX, ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); +#endif #else // Object space // We forbid scale in case of object space as it make no sense // To be able to combine object space normal with detail map then later we will re-transform it to world space. @@ -178,7 +183,12 @@ float3 ADD_IDX(GetBentNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, f // Return opacity float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out SurfaceData surfaceData, out float3 normalTS, out float3 bentNormalTS) { - float alpha = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)).a * ADD_IDX(_BaseColor).a; + // Prepare the VT stack for sampling + StackInfo stackInfo = PrepareStack(ADD_IDX(layerTexCoord.base).uv, ADD_IDX(_TextureStack)); + surfaceData.VTFeedback = GetResolveOutput(stackInfo); //TODO(ddebaets) merge this into StackInfo + + const float4 baseColorValue = SampleStack(stackInfo, ADD_IDX(_BaseColorMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); + float alpha = baseColorValue.a * ADD_IDX(_BaseColor).a; // Perform alha test very early to save performance (a killed pixel will not sample textures) #if defined(_ALPHATEST_ON) && !defined(LAYERED_LIT_SHADER) @@ -196,12 +206,17 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out #endif #endif + +#ifdef _MASKMAP_IDX + const float4 maskValue = SampleStack(stackInfo, ADD_IDX(_MaskMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).b; +#endif + float3 detailNormalTS = float3(0.0, 0.0, 0.0); float detailMask = 0.0; #ifdef _DETAIL_MAP_IDX detailMask = 1.0; #ifdef _MASKMAP_IDX - detailMask = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).b; + detailMask = maskValue.b; #endif float2 detailAlbedoAndSmoothness = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_DetailMap), SAMPLER_DETAILMAP_IDX, ADD_IDX(layerTexCoord.details)).rb; float detailAlbedo = detailAlbedoAndSmoothness.r * 2.0 - 1.0; @@ -210,8 +225,9 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out // We split both call due to trilinear mapping detailNormalTS = SAMPLE_UVMAPPING_NORMALMAP_AG(ADD_IDX(_DetailMap), SAMPLER_DETAILMAP_IDX, ADD_IDX(layerTexCoord.details), ADD_IDX(_DetailNormalScale)); #endif + + surfaceData.baseColor = baseColorValue.rgb * ADD_IDX(_BaseColor).rgb; - surfaceData.baseColor = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)).rgb * ADD_IDX(_BaseColor).rgb; #ifdef _DETAIL_MAP_IDX // Goal: we want the detail albedo map to be able to darken down to black and brighten up to white the surface albedo. @@ -230,11 +246,11 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out surfaceData.normalWS = float3(0.0, 0.0, 0.0); // Need to init this to keep quiet the compiler, but this is overriden later (0, 0, 0) so if we forget to override the compiler may comply. surfaceData.geomNormalWS = float3(0.0, 0.0, 0.0); // Not used, just to keep compiler quiet. - normalTS = ADD_IDX(GetNormalTS)(input, layerTexCoord, detailNormalTS, detailMask); + normalTS = ADD_IDX(GetNormalTS)(input, layerTexCoord, detailNormalTS, detailMask, stackInfo); bentNormalTS = ADD_IDX(GetBentNormalTS)(input, layerTexCoord, normalTS, detailNormalTS, detailMask); #if defined(_MASKMAP_IDX) - surfaceData.perceptualSmoothness = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).a; + surfaceData.perceptualSmoothness = maskValue.a; surfaceData.perceptualSmoothness = lerp(ADD_IDX(_SmoothnessRemapMin), ADD_IDX(_SmoothnessRemapMax), surfaceData.perceptualSmoothness); #else surfaceData.perceptualSmoothness = ADD_IDX(_Smoothness); @@ -250,8 +266,8 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out // MaskMap is RGBA: Metallic, Ambient Occlusion (Optional), detail Mask (Optional), Smoothness #ifdef _MASKMAP_IDX - surfaceData.metallic = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).r; - surfaceData.ambientOcclusion = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).g; + surfaceData.metallic = maskValue.r; + surfaceData.ambientOcclusion = maskValue.g; surfaceData.ambientOcclusion = lerp(ADD_IDX(_AORemapMin), ADD_IDX(_AORemapMax), surfaceData.ambientOcclusion); #else surfaceData.metallic = 1.0; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index ca5f450cf74..c2ab68172e9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -4,6 +4,8 @@ // Otherwise those parameters are not bound correctly at runtime. // =========================================================================== +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + TEXTURE2D(_DistortionVectorMap); SAMPLER(sampler_DistortionVectorMap); @@ -152,6 +154,8 @@ float _EnableGeometricSpecularAA; float _SpecularAAScreenSpaceVariance; float _SpecularAAThreshold; +DECLARE_STACK_CB(_TextureStack); + #ifndef LAYERED_LIT_SHADER // Set of users variables @@ -288,3 +292,5 @@ int _ObjectId; int _PassValue; CBUFFER_END + +DECLARE_STACK3(_TextureStack, _BaseColorMap, _MaskMap, _NormalMap); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs index 4ea2f59e691..1ddda01c361 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs @@ -215,6 +215,12 @@ public LayerMask probeLayerMask int m_NumColorPyramidBuffersAllocated = 0; int m_NumVolumetricBuffersAllocated = 0; +#if ENABLE_VIRTUALTEXTURES + Experimental.VirtualTextureResolver resolver; + RTHandleSystem.RTHandle lowresResolver; + int resolveScale = 16; +#endif + public HDCamera(Camera cam) { camera = cam; @@ -225,6 +231,10 @@ public HDCamera(Camera cam) frustumPlaneEquations = new Vector4[6]; +#if ENABLE_VIRTUALTEXTURES + resolver = new Experimental.VirtualTextureResolver(); +#endif + Reset(); } @@ -333,6 +343,18 @@ public void Update(FrameSettings currentFrameSettings, HDRenderPipeline hdrp, MS // This is necessary because we assume that after post processes, we have the full size render target for debug rendering // The only point of calling this here is to grow the render targets. The call in BeginRender will setup the current RTHandle viewport size. RTHandles.SetReferenceSize(nonScaledViewport.x, nonScaledViewport.y, m_msaaSamples); + +#if ENABLE_VIRTUALTEXTURES + var resolveWidth = (screenWidth + (resolveScale - 1)) / resolveScale; + var resolveHeight = (screenHeight + (resolveScale - 1)) / resolveScale; + if (resolveWidth != resolver.CurrentWidth || resolveHeight != resolver.CurrentHeight) + { + RTHandles.Release(lowresResolver); + } + lowresResolver = RTHandles.Alloc(resolveWidth, resolveHeight, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, enableRandomWrite: true, autoGenerateMips: false, name: "VTFeedback lowres"); + + resolver.Init(resolveWidth, resolveHeight); +#endif } // Updating RTHandle needs to be done at the beginning of rendering (not during update of HDCamera which happens in batches) @@ -345,6 +367,33 @@ public void BeginRender() m_RecorderCaptureActions = CameraCaptureBridge.GetCaptureActions(camera); } +#if ENABLE_VIRTUALTEXTURES + public void ResolveVT(CommandBuffer cmd, GBufferManager gBufferManager, HDRenderPipelineAsset asset) + { + using (new ProfilingSample(cmd, "VTFeedback Downsample", CustomSamplerId.VTFeedbackDownSample.GetSampler())) + { + var handle = gBufferManager.GetVTFeedbackBuffer(); + if (handle == null || lowresResolver == null) + { + return; + } + + var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; + int kernel = cs.FindKernel("KMain"); + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, handle.nameID); + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); + var resolveCounter = 0; + var startOffsetX = (resolveCounter % resolveScale); + var startOffsetY = (resolveCounter / resolveScale) % resolveScale; + cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); + var TGSize = 8; + cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); + + resolver.Process(lowresResolver.nameID, cmd); + } + } +#endif + void UpdateAntialiasing() { // Handle post-process AA @@ -732,6 +781,9 @@ public void Dispose() m_HistoryRTSystem.Dispose(); m_HistoryRTSystem = null; } +#if ENABLE_VIRTUALTEXTURES + resolver.Dispose(); +#endif } // BufferedRTHandleSystem API expects an allocator function. We define it here. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs index 78c3baad628..256ba0679dc 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs @@ -115,6 +115,9 @@ public enum CustomSamplerId SMAA, FinalPost, +#if ENABLE_VIRTUALTEXTURES + VTFeedbackDownSample, +#endif Max } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 2c349013a29..715ed6d867e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1637,6 +1637,13 @@ AOVRequestData aovRequest RenderGBuffer(cullingResults, hdCamera, renderContext, cmd); +#if ENABLE_VIRTUALTEXTURES + // Unbind the RT. TODO(ddebaets) there must be a better way right ? + HDUtils.SetRenderTarget(cmd, m_GbufferManager.GetGBuffer0RT(), m_SharedRTManager.GetDepthStencilBuffer()); + hdCamera.ResolveVT(cmd, m_GbufferManager, m_Asset); + Experimental.VirtualTexturing.UpdateSystem(); +#endif + // We can now bind the normal buffer to be use by any effect m_SharedRTManager.BindNormalBuffer(cmd); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index 6ad82cdd28f..91517cb8345 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -306,22 +306,24 @@ bool UpdateDefineList(bool flagValue, string defineMacroValue) // This function allows us to raise or remove some preprocessing defines based on the render pipeline settings public void EvaluateSettings() { -#if REALTIME_RAYTRACING_SUPPORT // Grab the current set of defines and split them string currentDefineList = UnityEditor.PlayerSettings.GetScriptingDefineSymbolsForGroup(UnityEditor.BuildTargetGroup.Standalone); defineArray.Clear(); defineArray.AddRange(currentDefineList.Split(';')); - // Update all the individual defines bool needUpdate = false; - needUpdate |= UpdateDefineList(currentPlatformRenderPipelineSettings.supportRayTracing, "ENABLE_RAYTRACING"); + needUpdate |= UpdateDefineList(currentPlatformRenderPipelineSettings.supportsVirtualTexturing, "ENABLE_VIRTUALTEXTURES");; +#if REALTIME_RAYTRACING_SUPPORT + // Update all the individual defines + needUpdate |= UpdateDefineList(currentPlatformRenderPipelineSettings.supportRayTracing, "ENABLE_RAYTRACING"); + +#endif // Only set if it changed if (needUpdate) { UnityEditor.PlayerSettings.SetScriptingDefineSymbolsForGroup(UnityEditor.BuildTargetGroup.Standalone, string.Join(";", defineArray.ToArray())); } -#endif } #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs index f36567c7b3d..7618618b488 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs @@ -224,6 +224,13 @@ public sealed class ShaderResources [Reload("Runtime/PostProcessing/Shaders/SubpixelMorphologicalAntialiasing.shader")] public Shader SMAAPS; + + //Virtual Texturing +#if ENABLE_VIRTUALTEXTURES + [Reload("Runtime/ShaderLibrary/DownsampleVTFeedback.compute")] + public ComputeShader VTFeedbackDownsample; +#endif + // Iterator to retrieve all compute shaders in reflection so we don't have to keep a list of // used compute shaders up to date (prefer editor-only usage) public IEnumerable GetAllComputeShaders() diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs index a380ec78088..e1f60b5e898 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs @@ -65,6 +65,7 @@ public enum ColorBufferFormat lowresTransparentSettings = GlobalLowResolutionTransparencySettings.@default, supportRayTracing = false, supportedRaytracingTier = RaytracingTier.Tier2, + supportsVirtualTexturing = false, }; // Lighting @@ -107,5 +108,7 @@ public bool supportMSAA public GlobalPostProcessSettings postProcessSettings; public GlobalDynamicResolutionSettings dynamicResolutionSettings; public GlobalLowResolutionTransparencySettings lowresTransparentSettings; + + public bool supportsVirtualTexturing; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute new file mode 100644 index 00000000000..419ebb05335 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute @@ -0,0 +1,30 @@ +// Each #kernel tells which function to compile; you can have many kernels +#pragma kernel KMain + +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" + +RW_TEXTURE2D(float4, _OutputTexture); +TEXTURE2D_X(_InputTexture); + +CBUFFER_START(cb0) + float4 _Params; +CBUFFER_END + +#define Scale _Params.x +#define startOffsetX _Params.y +#define startOffsetY _Params.z + +static const uint TGSize = 8; + +[numthreads(TGSize, TGSize, 1)] +void KMain(uint3 dispatchThreadId : SV_DispatchThreadID) +{ + const uint2 samplePos = dispatchThreadId.xy; + const uint2 startOffset = uint2(startOffsetX, startOffsetY); + const uint2 offset = (startOffset + samplePos) % Scale; + + float4 value = LOAD_TEXTURE2D_X(_InputTexture, samplePos * Scale + offset); + _OutputTexture[samplePos] = value; +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta new file mode 100644 index 00000000000..eb1e9464de7 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e17543230455e474fb91c9fabc965001 +ComputeShaderImporter: + externalObjects: {} + currentAPIMask: 4 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs index 433a726f542..eeace817b75 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGUI/BaseShaderGUI.cs @@ -414,17 +414,7 @@ public static void SetMaterialKeywords(Material material, Action shadi shadingModelFunc?.Invoke(material); shaderFunc?.Invoke(material); - if (material.HasProperty("_VirtualTexturing")) - { - if (material.GetFloat("_VirtualTexturing") == 0.0f || !StackStatus.AllStacksValid(material)) - { - material.DisableKeyword("VT_ON"); - } - else - { - material.EnableKeyword("VT_ON"); - } - } + StackStatus.UpdateMaterial(material); } public static void SetupMaterialBlendMode(Material material) diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightSpriteLitSubShader.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightSpriteLitSubShader.cs index 9b58bc99ab5..4542b7a1d6b 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightSpriteLitSubShader.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightSpriteLitSubShader.cs @@ -121,6 +121,7 @@ static string GetShaderPassFromTemplate(bool isColorPass, string template, Sprit // String builders var shaderProperties = new PropertyCollector(); + var shaderPragmas = new PragmaCollector(); var functionBuilder = new ShaderStringBuilder(1); var functionRegistry = new FunctionRegistry(functionBuilder); @@ -227,6 +228,7 @@ static string GetShaderPassFromTemplate(bool isColorPass, string template, Sprit masterNode.owner as GraphData, vertexDescriptionFunction, functionRegistry, + shaderPragmas, shaderProperties, mode, vertexNodes, @@ -276,6 +278,7 @@ static string GetShaderPassFromTemplate(bool isColorPass, string template, Sprit masterNode.owner as GraphData, surfaceDescriptionFunction, functionRegistry, + shaderPragmas, shaderProperties, pixelRequirements, mode, @@ -344,6 +347,7 @@ static string GetShaderPassFromTemplate(bool isColorPass, string template, Sprit resultPass = resultPass.Replace("${ZTest}", zTestBuilder.ToString()); resultPass = resultPass.Replace("${ZWrite}", zWriteBuilder.ToString()); resultPass = resultPass.Replace("${Defines}", defines.ToString()); + resultPass = resultPass.Replace("${Pragmas}", shaderPragmas.ToString()); resultPass = resultPass.Replace("${Graph}", graph.ToString()); resultPass = resultPass.Replace("${VertexOutputStruct}", vertexOutputStruct.ToString()); diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightSpriteUnlitSubShader.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightSpriteUnlitSubShader.cs index c200c070886..571d011a712 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightSpriteUnlitSubShader.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightSpriteUnlitSubShader.cs @@ -90,6 +90,7 @@ static string GetShaderPassFromTemplate(string template, SpriteUnlitMasterNode m // String builders var shaderProperties = new PropertyCollector(); + var shaderPragmas = new PragmaCollector(); var functionBuilder = new ShaderStringBuilder(1); var functionRegistry = new FunctionRegistry(functionBuilder); @@ -195,6 +196,7 @@ static string GetShaderPassFromTemplate(string template, SpriteUnlitMasterNode m masterNode.owner as GraphData, vertexDescriptionFunction, functionRegistry, + shaderPragmas, shaderProperties, mode, vertexNodes, @@ -244,6 +246,7 @@ static string GetShaderPassFromTemplate(string template, SpriteUnlitMasterNode m masterNode.owner as GraphData, surfaceDescriptionFunction, functionRegistry, + shaderPragmas, shaderProperties, pixelRequirements, mode, @@ -311,6 +314,7 @@ static string GetShaderPassFromTemplate(string template, SpriteUnlitMasterNode m resultPass = resultPass.Replace("${ZTest}", zTestBuilder.ToString()); resultPass = resultPass.Replace("${ZWrite}", zWriteBuilder.ToString()); resultPass = resultPass.Replace("${Defines}", defines.ToString()); + resultPass = resultPass.Replace("${Pragmas}", shaderPragmas.ToString()); resultPass = resultPass.Replace("${Graph}", graph.ToString()); resultPass = resultPass.Replace("${VertexOutputStruct}", vertexOutputStruct.ToString()); diff --git a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader index ceb0f828ef6..19380166bc7 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader @@ -120,7 +120,7 @@ Shader "Lightweight Render Pipeline/Lit" //-------------------------------------- // Virtual Texturing - #pragma shader_feature VT_ON + #pragma shader_feature_local VT_ON //define VT_ON 1 @@ -243,7 +243,7 @@ Shader "Lightweight Render Pipeline/Lit" // ------------------------------------- // Unity defined keywords #pragma multi_compile_instancing - #pragma shader_feature VT_ON + #pragma shader_feature_local VT_ON #include "LitInput.hlsl" @@ -283,7 +283,7 @@ Shader "Lightweight Render Pipeline/Lit" { UNITY_SETUP_INSTANCE_ID(input); - return ResolveStack(input.uv, _TextureStack); + return ResolveStack(input.uv, _TextureStack, VT_ResolveConstantPatch); } ENDHLSL } diff --git a/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl b/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl index a0f0013c8f8..399052dfe95 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl @@ -82,9 +82,13 @@ inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfa float4 rawAlbedoAlpha = SampleStack(info, _BaseMap); #ifdef _NORMALMAP - float4 rawNormal = SampleStack(info, _BumpMap); +#ifdef VT_ON + float3 normal = SampleStack_Normal(info, _BumpMap, _BumpScale); #else - float4 rawNormal = float4(0,0,0,0); + float3 normal = SampleNormal(uv, TEXTURE2D_ARGS(_BumpMap, sampler_BumpMap), _BumpScale); +#endif +#else + float3 normal = float3(0,0,0); #endif half4 albedoAlpha = ProcessAlbedoAlpha(rawAlbedoAlpha); @@ -102,7 +106,7 @@ inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfa #endif outSurfaceData.smoothness = specGloss.a; - outSurfaceData.normalTS = ProcessNormal(rawNormal, _BumpScale); + outSurfaceData.normalTS = normal; outSurfaceData.occlusion = SampleOcclusion(uv); outSurfaceData.emission = SampleEmission(uv, _EmissionColor.rgb, TEXTURE2D_ARGS(_EmissionMap, sampler_EmissionMap)); } diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader index f5a3d88ba8a..a5f1982c13e 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader @@ -138,7 +138,7 @@ Shader "Lightweight Render Pipeline/Terrain/Lit-VT" half4 frag(Varyings IN) : SV_TARGET { - return ResolveStack(IN.uvMainAndLM.xy, _TextureStack); + return ResolveStack(IN.uvMainAndLM.xy, _TextureStack, VT_ResolveConstantPatch); } ENDHLSL } diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader b/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader index a8e013ff18f..6274e0afe39 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader @@ -56,7 +56,7 @@ Shader "Lightweight Render Pipeline/Unlit" //-------------------------------------- // Virtual Texturing - #pragma shader_feature VT_ON + #pragma shader_feature_local VT_ON #include "UnlitInput.hlsl" @@ -186,7 +186,7 @@ Shader "Lightweight Render Pipeline/Unlit" // ------------------------------------- // Unity defined keywords #pragma multi_compile_instancing - #pragma shader_feature VT_ON + #pragma shader_feature_local VT_ON #include "LitInput.hlsl" @@ -226,7 +226,7 @@ Shader "Lightweight Render Pipeline/Unlit" { UNITY_SETUP_INSTANCE_ID(input); - return ResolveStack(input.uv, _TextureStack); + return ResolveStack(input.uv, _TextureStack, VT_ResolveConstantPatch); } ENDHLSL } diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader deleted file mode 100644 index 5ad4e7e0efd..00000000000 --- a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader +++ /dev/null @@ -1,234 +0,0 @@ -Shader "Lightweight Render Pipeline/Unlit VT" -{ - Properties - { - [Stack(_TextureStack)] _BaseMap("Texture", 2D) = "white" {} - _TextureStack ("_TextureStack", Stack ) = { _BaseMap } - - _BaseColor("Color", Color) = (1, 1, 1, 1) - _Cutoff("AlphaCutout", Range(0.0, 1.0)) = 0.5 - - // BlendMode - [HideInInspector] _Surface("__surface", Float) = 0.0 - [HideInInspector] _Blend("__blend", Float) = 0.0 - [HideInInspector] _AlphaClip("__clip", Float) = 0.0 - [HideInInspector] _SrcBlend("Src", Float) = 1.0 - [HideInInspector] _DstBlend("Dst", Float) = 0.0 - [HideInInspector] _ZWrite("ZWrite", Float) = 1.0 - [HideInInspector] _Cull("__cull", Float) = 2.0 - - // Editmode props - [HideInInspector] _QueueOffset("Queue offset", Float) = 0.0 - - // ObsoleteProperties - [HideInInspector] _MainTex("BaseMap", 2D) = "white" {} - [HideInInspector] _Color("Base Color", Color) = (0.5, 0.5, 0.5, 1) - [HideInInspector] _SampleGI("SampleGI", float) = 0.0 // needed from bakedlit - } - SubShader - { - Tags { "RenderType" = "Opaque" "IgnoreProjector" = "True" "RenderPipeline" = "LightweightPipeline" } - LOD 100 - - Blend [_SrcBlend][_DstBlend] - ZWrite [_ZWrite] - Cull [_Cull] - - Pass - { - Name "Unlit" - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - - #pragma vertex vert - #pragma fragment frag - #pragma shader_feature _ALPHATEST_ON - #pragma shader_feature _ALPHAPREMULTIPLY_ON - - // ------------------------------------- - // Unity defined keywords - #pragma multi_compile_fog - #pragma multi_compile_instancing - - #define VT_ON 1 - #include "UnlitInput.hlsl" - - struct Attributes - { - float4 positionOS : POSITION; - float2 uv : TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct Varyings - { - float2 uv : TEXCOORD0; - float fogCoord : TEXCOORD1; - float4 vertex : SV_POSITION; - - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - Varyings vert(Attributes input) - { - Varyings output = (Varyings)0; - - UNITY_SETUP_INSTANCE_ID(input); - UNITY_TRANSFER_INSTANCE_ID(input, output); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); - - VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); - output.vertex = vertexInput.positionCS; - - output.uv = TRANSFORM_TEX(input.uv, _BaseMap); - output.fogCoord = ComputeFogFactor(vertexInput.positionCS.z); - - return output; - } - - half4 frag(Varyings input) : SV_Target - { - UNITY_SETUP_INSTANCE_ID(input); - - half2 uv = input.uv; - - // half4 texColor = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv); - StackInfo stackInfo = PrepareStack(uv, _TextureStack); - half4 texColor = SampleStack(stackInfo, _BaseMap); - - half3 color = texColor.rgb * _BaseColor.rgb; - half alpha = texColor.a * _BaseColor.a; - AlphaDiscard(alpha, _Cutoff); - -#ifdef _ALPHAPREMULTIPLY_ON - color *= alpha; -#endif - - color = MixFog(color, input.fogCoord); - - return half4(color, alpha); - } - ENDHLSL - } - - Pass - { - Tags{"LightMode" = "DepthOnly"} - - ZWrite On - ColorMask 0 - - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma target 2.0 - - #pragma vertex DepthOnlyVertex - #pragma fragment DepthOnlyFragment - - // ------------------------------------- - // Material Keywords - #pragma shader_feature _ALPHATEST_ON - - //-------------------------------------- - // GPU Instancing - #pragma multi_compile_instancing - - #define VT_ON 1 - #include "UnlitInput.hlsl" - #include "DepthOnlyPass.hlsl" - ENDHLSL - } - - // This pass it not used during regular rendering, only for lightmap baking. - Pass - { - Name "Meta" - Tags{"LightMode" = "Meta"} - - Cull Off - - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma vertex LightweightVertexMeta - #pragma fragment LightweightFragmentMetaUnlit - - #define VT_ON 1 - #include "UnlitInput.hlsl" - #include "UnlitMetaPass.hlsl" - - ENDHLSL - } - - - // This pass it not used during regular rendering, only for lightmap baking. - Pass - { - Name "VTFeedback" - Tags{"LightMode" = "VTFeedback"} - - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - - #pragma vertex vert - #pragma fragment frag - - // ------------------------------------- - // Unity defined keywords - #pragma multi_compile_instancing - - #define VT_ON 1 - #include "UnlitInput.hlsl" - - struct Attributes - { - float4 positionOS : POSITION; - float2 uv : TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct Varyings - { - float2 uv : TEXCOORD0; - float4 vertex : SV_POSITION; - - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - Varyings vert(Attributes input) - { - Varyings output = (Varyings)0; - - UNITY_SETUP_INSTANCE_ID(input); - UNITY_TRANSFER_INSTANCE_ID(input, output); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); - - VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); - output.vertex = vertexInput.positionCS; - - output.uv = TRANSFORM_TEX(input.uv, _BaseMap); - - return output; - } - - half4 frag(Varyings input) : SV_Target - { - UNITY_SETUP_INSTANCE_ID(input); - - return ResolveStack(input.uv, _TextureStack); - } - ENDHLSL - } - } - FallBack "Hidden/InternalErrorShader" - CustomEditor "UnityEditor.Rendering.LWRP.ShaderGUI.UnlitShader" -} diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader.meta b/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader.meta deleted file mode 100644 index c657d058e5b..00000000000 --- a/com.unity.render-pipelines.lightweight/Shaders/Unlit_VT.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 9e6c4243c3bc6c54e863f4f8348d4a0b -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs index 29e94eef060..166b21ec033 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs @@ -10,6 +10,19 @@ namespace UnityEditor.ShaderGraph public class StackStatus { + public static void UpdateMaterial(Material material, bool forceOff = false) + { + if (material.HasProperty("_VirtualTexturing") == false) + return; + + bool enable = forceOff ? false : !(material.GetFloat("_VirtualTexturing") == 0.0f || !StackStatus.AllStacksValid(material)); + + if (enable) + material.EnableKeyword("VT_ON"); + else + material.DisableKeyword("VT_ON"); + } + public static bool AllStacksValid(Material material) { var shader = material.shader; diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs.meta b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs.meta new file mode 100644 index 00000000000..09c4040a879 --- /dev/null +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1e8d024c31c10ae439cc21b3f7b9bd19 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 8fec5950f0a5a2abc46cf1e252f09890a32a44b4 Mon Sep 17 00:00:00 2001 From: Aljosha Demeulemeester Date: Wed, 5 Jun 2019 11:00:53 +0200 Subject: [PATCH 014/143] adding the Granite layer datatype to the Stack hash --- .../Editor/ShaderGUI/StackStatus.cs | 146 +++++++++++++----- 1 file changed, 106 insertions(+), 40 deletions(-) diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs index 29e94eef060..10d0808c122 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs @@ -24,9 +24,7 @@ public static bool AllStacksValid(Material material) if (vtStack != null) { - string[] textureProperties = ShaderUtil.GetStackTextureProperties(shader, stackPropName); - - string hash = GetStackHash(textureProperties, material); + string hash = GetStackHash(stackPropName, material); if (hash != vtStack.atlasName) return false; @@ -42,11 +40,20 @@ public static bool AllStacksValid(Material material) return true; } - private static string GetStackHash(string[] textureProperties, Material material) - { + public static string GetStackHash(string stackPropName, Material material) + { // fill in a (hashed) name string texturesHash = ""; + if (material == null) + return texturesHash; + + if (material.shader == null) + return texturesHash; + + + string[] textureProperties = ShaderUtil.GetStackTextureProperties(material.shader, stackPropName); + TextureWrapMode wrapMode = TextureWrapMode.Clamp; TextureImporterNPOTScale textureScaling = TextureImporterNPOTScale.None; @@ -55,48 +62,43 @@ private static string GetStackHash(string[] textureProperties, Material material for (int j = 0; j < textureProperties.Length; j++) { string textureProperty = textureProperties[j]; + string hash = "NO-DATA"; //TODO for empty layers the Granite layer data type is unknown. Therefor, this stack can be part of different tile sets with different layer layouts and still have the same hash - if (!material.HasProperty(textureProperty)) //todo is this a broken shader? Report to user? - continue; + Debug.Assert(material.HasProperty(textureProperty)); Texture2D tex2D = material.GetTexture(textureProperty) as Texture2D; - if (tex2D == null) - continue; - - string path = AssetDatabase.GetAssetPath(tex2D); - - if (string.IsNullOrEmpty(path)) - continue; - - string hash = tex2D.imageContentsHash.ToString(); - - if (hash == null) - { - continue; - } - - TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter; - if (textureImporter == null) + if (tex2D != null) { - // probably a fallback texture - continue; - } + string path = AssetDatabase.GetAssetPath(tex2D); + + if (!string.IsNullOrEmpty(path) && tex2D.imageContentsHash != null ) + { + Debug.Assert(hash!=null); // todo we checked this before, does this still make sense? + + TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter; + + if (textureImporter != null)// probably a fallback texture if this is false + { + hash = GetTextureHash(tex2D); + + if (!firstTextureAdded) + { + wrapMode = tex2D.wrapMode; + textureScaling = textureImporter.npotScale; + firstTextureAdded = true; + } + else + { + if (wrapMode != tex2D.wrapMode || textureScaling != textureImporter.npotScale) + UnityEngine.Debug.LogError("Texture settings don't match on all layers of StackedTexture"); + } + } + } + } texturesHash += hash; - if (!firstTextureAdded) - { - wrapMode = tex2D.wrapMode; - textureScaling = textureImporter.npotScale; - firstTextureAdded = true; - } - else - { - if (wrapMode != tex2D.wrapMode || textureScaling != textureImporter.npotScale) - UnityEngine.Debug.LogError("Texture settings don't match on all layers of StackedTexture"); - } - } String assetHash = "" + wrapMode + textureScaling; @@ -106,9 +108,73 @@ private static string GetStackHash(string[] textureProperties, Material material String settingsHash = ""; - return ("version_1_" + textureProperties.Length + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); + return ("version_1_" + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); } + /// + /// Get a string that uniquely identifies the texture on the given slot of the given material. + /// + public static string GetTextureHash(Texture2D texture) + { + if (texture == null) + { + return null; + } + + // Do the texture resize here if needed. We only resize the texture if it's a normal texture. + // This makes sure we get the texture hash after the rescale, which is the hash we'll get when the material is valid + string assetPath = AssetDatabase.GetAssetPath(texture); + TextureImporter textureImporter = AssetImporter.GetAtPath(assetPath) as TextureImporter; + + if (textureImporter != null) + { + /* TODO no resizing for now + if (textureImporter.maxTextureSize > Constants.TextureResizeSize) + { + textureImporter.maxTextureSize = Constants.TextureResizeSize; + AssetDatabase.ImportAsset(assetPath); + // Validate setting the size worked. + TextureImporter validateImport = AssetImporter.GetAtPath(assetPath) as TextureImporter; + if (validateImport.maxTextureSize > Constants.TextureResizeSize) + { + UnityEngine.Debug.LogError("Could not set maxTextureSize of '" + assetPath + "' to " + Constants.TextureResizeSize + ". Do you have an AssetPostProcessor active that changes texture sizes?"); + } + } + */ + } + + return texture.imageContentsHash.ToString() + GetGraniteLayerDataType(textureImporter); + } + + //returns null if no valid texture importer is passed + public static string GetGraniteLayerDataType(TextureImporter textureImporter) + { + if (textureImporter == null) + return null; + + if (textureImporter.textureType == TextureImporterType.NormalMap) + return "X8Y8Z0_TANGENT"; + + if (textureImporter.textureType == TextureImporterType.SingleChannel) + return "X8"; + + //todo is this the only way to detect HDR? + TextureImporterFormat format = textureImporter.GetAutomaticFormat("Standalone"); + + switch (format) + { + case TextureImporterFormat.BC6H: + case TextureImporterFormat.RGB16: + return "R16G16B16_FLOAT"; + default: + break; + } + + if (textureImporter.sRGBTexture) + return "R8G8B8A8_SRGB"; + else + return "R8G8B8A8_LINEAR"; + } } } From bcb52584e80a144cfe3a6f52f02a74b3ef95e8b8 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Thu, 6 Jun 2019 15:29:51 +0200 Subject: [PATCH 015/143] bugfix LWRP graph --- .../Editor/Data/Nodes/Input/Texture/StackNode.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs index 4b438597a48..5f197df6a7d 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs @@ -150,10 +150,8 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GraphContext graphC if (IsSlotConnected(OutputSlotIds[i])) { var id = GetSlotValue(TextureInputIds[i], generationMode); - string resultLayer = string.Format("{2}4 {3} = SampleStack({0}_info, {4});" + string resultLayer = string.Format("$precision4 {1} = SampleStack({0}_info, {2});" , stackName - , GetSlotValue(UVInputId, generationMode) - , precision , GetVariableNameForSlot(OutputSlotIds[i]) , id); sb.AppendLine(resultLayer); @@ -181,10 +179,11 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GraphContext graphC if (IsSlotConnected(FeedbackSlotId)) { - string feedBackCode = string.Format("float4 {0} = ResolveStack({1}, {2});" + string feedBackCode = string.Format("float4 {0} = ResolveStack({1}, {2}, {3});" , GetVariableNameForSlot(FeedbackSlotId) , GetSlotValue(UVInputId, generationMode) - , stackName); + , stackName + , "VT_ResolveConstantPatch"); sb.AppendLine(feedBackCode); } } @@ -193,10 +192,11 @@ public void GenerateFeedbackCode(GenerationMode generationMode, string assignLVa { string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_stack"; - code = string.Format("{0} = ResolveStack({1}, {2});" + code = string.Format("{0} = ResolveStack({1}, {2}, {3});" , assignLValue , GetSlotValue(UVInputId, generationMode) - , stackName); + , stackName + , "VT_ResolveConstantPatch"); } public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode) From 5775f7cc43494b122ee3bdd40327c303b83f6b2c Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 14 Jun 2019 14:33:42 +0200 Subject: [PATCH 016/143] Improved HDRP support - Shader graph support - VT feedback for forward rendering (WIP) - Many fixes and refactoring after running HDRP tests (some still fail, mainly anything langscape related) (note LWRP untested needs testing) --- .../Sampling/SampleUVMapping.hlsl | 41 ++++++ .../ShaderLibrary/TextureStack.hlsl | 37 ++++- .../Lit/ShaderGraph/HDLitMasterNode.cs | 7 + .../Lit/ShaderGraph/HDLitPass.template | 2 + .../Lit/ShaderGraph/HDLitSubShader.cs | 10 +- .../Material/Lit/ShaderGraph/HDLitUI.cs | 7 + .../PBR/ShaderGraph/HDPBRPass.template | 2 + .../PBR/ShaderGraph/HDPBRSubShader.cs | 13 +- .../Unlit/ShaderGraph/HDUnlitMasterNode.cs | 7 + .../Unlit/ShaderGraph/HDUnlitPass.template | 2 + .../Unlit/ShaderGraph/HDUnlitSubShader.cs | 9 +- .../Material/Unlit/ShaderGraph/HDUnlitUI.cs | 6 + .../Unlit/ShaderGraph/UnlitPass.template | 4 +- .../Unlit/ShaderGraph/UnlitSubShader.cs | 8 +- .../RenderPipeline/HDRenderPipelineUI.cs | 17 --- .../ShaderGraph/HDSubShaderUtilities.cs | 15 +- .../Lighting/LightLoop/LightLoop.cs.hlsl | 1 + .../Material/LayeredLit/LayeredLit.shader | 3 + .../Material/LayeredLit/LayeredLitData.hlsl | 4 + .../Runtime/Material/Lit/Lit.cs | 15 +- .../Runtime/Material/Lit/Lit.hlsl | 14 +- .../Runtime/Material/Lit/Lit.shader | 3 +- .../Material/Lit/LitDataIndividualLayer.hlsl | 13 +- .../SubsurfaceScattering.hlsl | 9 +- .../Runtime/Material/Unlit/Unlit.cs | 3 + .../Runtime/Material/Unlit/Unlit.cs.hlsl | 5 + .../Runtime/Material/Unlit/UnlitData.hlsl | 2 + .../Runtime/RenderPipeline/Camera/HDCamera.cs | 48 +++++-- .../RenderPipeline/HDCustomSamplerId.cs | 1 + .../RenderPipeline/HDRenderPipeline.cs | 129 +++++++++++++++--- .../Settings/RenderPipelineSettings.cs | 2 +- .../ShaderPass/ShaderPassForward.hlsl | 23 +++- .../ShaderPass/ShaderPassForwardUnlit.hlsl | 14 +- .../lightweightPBRStreamFeedbackPass.template | 2 + ...ightweightUnlitStreamFeedbackPass.template | 2 + .../Shaders/Lit.shader | 6 +- .../Shaders/LitInput.hlsl | 2 +- .../Shaders/Terrain/TerrainLit-VT.shader | 4 +- .../Shaders/Terrain/TerrainLitAdd-VT.shader | 2 +- .../Shaders/Terrain/TerrainLitInput.hlsl | 2 +- .../Shaders/Terrain/TerrainLitPasses.hlsl | 2 +- .../Shaders/Unlit.shader | 4 +- .../Editor/Data/MasterNodes/PBRMasterNode.cs | 8 +- .../Data/MasterNodes/UnlitMasterNode.cs | 4 +- .../Data/Nodes/Input/Texture/StackNode.cs | 57 +++++--- .../Editor/Data/Util/PragmaCollector.cs | 16 +++ .../Editor/ShaderGUI/PBRMasterGUI.cs | 12 +- .../Editor/ShaderGUI/StackStatus.cs | 28 +++- .../Editor/Util/StackUtilities.cs | 38 ++++++ .../Editor/Util/StackUtilities.cs.meta | 11 ++ 50 files changed, 539 insertions(+), 137 deletions(-) create mode 100644 com.unity.shadergraph/Editor/Util/StackUtilities.cs create mode 100644 com.unity.shadergraph/Editor/Util/StackUtilities.cs.meta diff --git a/com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl index 3daac140e54..293fce58883 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl @@ -29,6 +29,47 @@ struct UVMapping #endif }; + +real2 UVMappingTo2D(UVMapping mapping) +{ + if (mapping.mappingType == UV_MAPPING_TRIPLANAR) + { + real3 triplanarWeights = mapping.triplanarWeights; + real4 val = real4(0.0, 0.0, 0.0, 0.0); + + // x -> mapping.uvZY + // y -> mapping.uvXZ + // z -> mapping.uvXY + + if (triplanarWeights.x > triplanarWeights.y) + { + if (triplanarWeights.x > triplanarWeights.z) + { + return mapping.uvZY; + } + else + { + return mapping.uvXY; + } + } + else + { + if (triplanarWeights.y > triplanarWeights.z) + { + return mapping.uvXZ; + } + else + { + return mapping.uvXY; + } + } + } + else // UV_MAPPING_UVSET / UV_MAPPING_PLANAR + { + return mapping.uv; + } +} + // Multiple includes of the file to handle all variations of textures sampling for regular, lod and bias // Regular sampling functions diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 376cf4cf386..4f8e478fd1a 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -19,7 +19,7 @@ In your CGPROGRAM code for each of the passes add: - #pragma shader_feature_local VT_ON + #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT Then add the following to the PerMaterial constant buffer: @@ -57,7 +57,18 @@ */ -#ifdef VT_ON +// A note about the on/off defines +// VIRTUAL_TEXTURES_ENABLED current render pipeline is configured to use VT this is something even non vt materials may need to be aware of (e.g. different gbuffer layout used etc...) +// VIRTUAL_TEXTURES_BUILT valid vt data has been build for the material the material can render with VT from a data point but not nececarry rendering using VT because RP may have it disabled +// VIRTUAL_TEXTURES_ACTIVE vt data is built and enabled so the current shader should actively use VT sampling + +#if VIRTUAL_TEXTURES_ENABLED && VIRTUAL_TEXTURES_BUILT +#define VIRTUAL_TEXTURES_ACTIVE 1 +#else +#define VIRTUAL_TEXTURES_ACTIVE 0 +#endif + +#if VIRTUAL_TEXTURES_ACTIVE struct StackInfo { @@ -65,6 +76,10 @@ struct StackInfo float4 resolveOutput; }; +// This can be used by certain resolver implementations to override screen space derivatives +#ifndef RESOLVE_SCALE_OVERRIDE +#define RESOLVE_SCALE_OVERRIDE float2(1,1) +#endif #define DECLARE_STACK_CB(stackName) \ float4x4 stackName##_spaceparams[2];\ @@ -79,6 +94,10 @@ StackInfo PrepareVT_##stackName(float2 uv)\ GraniteStreamingTextureConstantBuffer textureParamBlock;\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ textureParamBlock.data[1] = stackName##_atlasparams[1];\ +\ + /* hack resolve scale into constant buffer here */\ + stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ + stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ \ GraniteTilesetConstantBuffer graniteParamBlock;\ graniteParamBlock.data[0] = stackName##_spaceparams[0];\ @@ -109,6 +128,10 @@ float4 SampleVT_##layerSamplerName(StackInfo info)\ GraniteStreamingTextureConstantBuffer textureParamBlock;\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ textureParamBlock.data[1] = stackName##_atlasparams[1];\ +\ + /* hack resolve scale into constant buffer here */\ + stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ + stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ \ GraniteTilesetConstantBuffer graniteParamBlock;\ graniteParamBlock.data[0] = stackName##_spaceparams[0];\ @@ -132,15 +155,15 @@ float3 SampleVT_Normal_##layerSamplerName(StackInfo info, float scale)\ } #define DECLARE_STACK_RESOLVE(stackName)\ -float4 ResolveVT_##stackName(float2 uv, float2 resolveConstantPatch)\ +float4 ResolveVT_##stackName(float2 uv)\ {\ GraniteStreamingTextureConstantBuffer textureParamBlock;\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ textureParamBlock.data[1] = stackName##_atlasparams[1];\ \ /* hack resolve scale into constant buffer here */\ - stackName##_spaceparams[0][2][0] *= resolveConstantPatch.x;\ - stackName##_spaceparams[0][3][0] *= resolveConstantPatch.y;\ + stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ + stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ \ GraniteTilesetConstantBuffer graniteParamBlock;\ graniteParamBlock.data[0] = stackName##_spaceparams[0];\ @@ -183,7 +206,7 @@ float4 ResolveVT_##stackName(float2 uv, float2 resolveConstantPatch)\ #define SampleStack(info, textureName) SampleVT_##textureName(info) #define SampleStack_Normal(info, textureName, scale) SampleVT_Normal_##textureName(info, scale) #define GetResolveOutput(info) info.resolveOutput -#define ResolveStack(uv, stackName, scale) ResolveVT_##stackName(uv, scale) +#define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) #else @@ -218,6 +241,6 @@ StackInfo MakeStackInfo(float2 uv) // Resolve does nothing #define GetResolveOutput(info) float4(1,1,1,1) -#define ResolveStack(uv, stackName, scale) float4(1,1,1,1) +#define ResolveStack(uv, stackName) float4(1,1,1,1) #endif diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs index c73fd6b2877..424fae10d8b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs @@ -52,6 +52,7 @@ class HDLitMasterNode : MasterNode, IMayRequirePosition, IMayRe public const string BakedGISlotName = "Baked GI"; public const string BakedBackGISlotName = "Baked Back GI"; public const string DepthOffsetSlotName = "DepthOffset"; + public const string VTFeedbackSlotName = "VTFeedback"; public const int PositionSlotId = 0; public const int AlbedoSlotId = 1; @@ -86,6 +87,7 @@ class HDLitMasterNode : MasterNode, IMayRequirePosition, IMayRe public const int LightingSlotId = 30; public const int BackLightingSlotId = 31; public const int DepthOffsetSlotId = 32; + public const int VTFeedbackSlotId = AggregateFeedbackNode.MasterNodeFeedbackInputSlotID; public enum MaterialType { @@ -834,6 +836,11 @@ public sealed override void UpdateNodeAfterDeserialization() validSlots.Add(DepthOffsetSlotId); } + var vtFeedbackSlot = new Vector4MaterialSlot(VTFeedbackSlotId, VTFeedbackSlotName, VTFeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); + vtFeedbackSlot.hidden = true; + AddSlot(vtFeedbackSlot); + validSlots.Add(VTFeedbackSlotId); + RemoveSlotsNameNotMatching(validSlots, true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template index bea775cefee..1c3d1fd1374 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template @@ -104,6 +104,7 @@ Pass // End Defines //------------------------------------------------------------------------------------- + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #ifdef DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" @@ -174,6 +175,7 @@ $include("SharedCode.template.hlsl") $SurfaceDescription.Anisotropy: surfaceData.anisotropy = surfaceDescription.Anisotropy; $SurfaceDescription.IridescenceMask: surfaceData.iridescenceMask = surfaceDescription.IridescenceMask; $SurfaceDescription.IridescenceThickness: surfaceData.iridescenceThickness = surfaceDescription.IridescenceThickness; + $SurfaceDescription.VTFeedback: surfaceData.VTFeedback = surfaceDescription.VTFeedback; #ifdef _HAS_REFRACTION if (_EnableSSRefraction) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs index b7326ed5993..9044bbcd00c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs @@ -66,6 +66,7 @@ class HDLitSubShader : IHDLitSubShader HDLitMasterNode.LightingSlotId, HDLitMasterNode.BackLightingSlotId, HDLitMasterNode.DepthOffsetSlotId, + HDLitMasterNode.VTFeedbackSlotId, }, VertexShaderSlots = new List() { @@ -515,6 +516,7 @@ class HDLitSubShader : IHDLitSubShader HDLitMasterNode.LightingSlotId, HDLitMasterNode.BackLightingSlotId, HDLitMasterNode.DepthOffsetSlotId, + HDLitMasterNode.VTFeedbackSlotId, }, VertexShaderSlots = new List() { @@ -1023,7 +1025,13 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List() { @@ -297,7 +298,8 @@ class HDPBRSubShader : IPBRSubShader PBRMasterNode.SmoothnessSlotId, PBRMasterNode.OcclusionSlotId, PBRMasterNode.AlphaSlotId, - PBRMasterNode.AlphaThresholdSlotId + PBRMasterNode.AlphaThresholdSlotId, + PBRMasterNode.VTFeedbackSlotId }, VertexShaderSlots = new List() { @@ -423,6 +425,13 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List, IMayRequirePosition public const string DistortionBlurSlotName = "DistortionBlur"; public const string PositionSlotName = "Position"; public const string EmissionSlotName = "Emission"; + public const string FeedbackSlotName = "VTFeedback"; public const int ColorSlotId = 0; public const int AlphaSlotId = 7; @@ -30,6 +31,7 @@ class HDUnlitMasterNode : MasterNode, IMayRequirePosition public const int DistortionSlotId = 10; public const int DistortionBlurSlotId = 11; public const int EmissionSlotId = 12; + public const int FeedBackSlotId = AggregateFeedbackNode.MasterNodeFeedbackInputSlotID; // Don't support Multiply public enum AlphaModeLit @@ -256,6 +258,11 @@ public sealed override void UpdateNodeAfterDeserialization() validSlots.Add(DistortionBlurSlotId); } + var feedbackSlot = new Vector4MaterialSlot(FeedBackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); + feedbackSlot.hidden = true; + AddSlot(feedbackSlot); + validSlots.Add(FeedBackSlotId); + RemoveSlotsNameNotMatching(validSlots, true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template index 88277707685..8756769b8ed 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template @@ -44,6 +44,7 @@ Pass #pragma fragment Frag #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" @@ -114,6 +115,7 @@ $include("SharedCode.template.hlsl") // copy across graph values, if defined $SurfaceDescription.Color: surfaceData.color = surfaceDescription.Color; + $SurfaceDescription.VTFeedback: surfaceData.VTFeedback = surfaceDescription.VTFeedback; #if defined(DEBUG_DISPLAY) if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs index eeab54e90db..ce4ca4969d4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs @@ -269,7 +269,8 @@ class HDUnlitSubShader : IHDUnlitSubShader HDUnlitMasterNode.ColorSlotId, HDUnlitMasterNode.AlphaSlotId, HDUnlitMasterNode.AlphaThresholdSlotId, - HDUnlitMasterNode.EmissionSlotId + HDUnlitMasterNode.EmissionSlotId, + HDUnlitMasterNode.FeedBackSlotId, }, VertexShaderSlots = new List() { @@ -360,6 +361,12 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List() { @@ -285,6 +286,11 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List(path); - if (mat != null) - { - ShaderGraph.StackStatus.UpdateMaterial(mat, serialized.renderPipelineSettings.supportsVirtualTexturing.boolValue == false); - } - } - EditorUtility.ClearProgressBar(); - } EditorGUILayout.Space(); //to separate with following sub sections } diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs index 84e4fc7b561..67108216fcd 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs @@ -547,6 +547,9 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass PropertyCollector sharedProperties = new PropertyCollector(); ShaderStringBuilder shaderPropertyUniforms = new ShaderStringBuilder(1); + // pragmas generated by nodes + PragmaCollector pragmaCollector = new PragmaCollector(); + // build the graph outputs structure to hold the results of each active slots (and fill out activeFields to indicate they are active) string pixelGraphInputStructName = "SurfaceDescriptionInputs"; string pixelGraphOutputStructName = "SurfaceDescription"; @@ -567,7 +570,7 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass masterNode.owner as GraphData, pixelGraphEvalFunction, functionRegistry, - new PragmaCollector(), // TODO: Fix for HDRP + pragmaCollector, sharedProperties, pixelRequirements, // TODO : REMOVE UNUSED mode, @@ -600,7 +603,7 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass masterNode.owner as GraphData, vertexGraphEvalFunction, functionRegistry, - new PragmaCollector(), // TODO: Fix for HDRP + pragmaCollector, sharedProperties, mode, vertexNodes, @@ -675,6 +678,14 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass if (graphRequirements.requiresCameraOpaqueTexture) defines.AddShaderChunk("#define REQUIRE_OPAQUE_TEXTURE"); defines.AddGenerator(interpolatorDefines); + + + // Should we add a separate "pragmas" chunk instead of surfing along with defines? + foreach (var pragma in pragmaCollector.pragmas) + { + Debug.Log("Adding pragma: " + pragma.GetPragmaString()); + defines.AddShaderChunk(pragma.GetPragmaString()); + } } var shaderPassIncludes = new ShaderGenerator(); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl index 9c32d1c9886..ba8c3006763 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl @@ -54,6 +54,7 @@ #define LIGHT_FEATURE_MASK_FLAGS_OPAQUE (16642048) #define LIGHT_FEATURE_MASK_FLAGS_TRANSPARENT (16510976) #define MATERIAL_FEATURE_MASK_FLAGS (4095) +#define MAX_RAY_TRACED_SHADOWS (4) // Generated from UnityEngine.Experimental.Rendering.HDPipeline.SFiniteLightBound // PackingRules = Exact diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader index 6dcab255c0d..f8028d1fa44 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader @@ -461,6 +461,9 @@ Shader "HDRP/LayeredLit" #pragma multi_compile_instancing #pragma instancing_options renderinglayer + #pragma multi_compile _ VIRTUAL_TEXTURES_ENABLED // Is vt enabled render pipleine wide? + #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT // Is VT built for this material + //------------------------------------------------------------------------------------- // Define //------------------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index a3a1a4c904e..ed655f83b88 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -743,6 +743,10 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION; #endif + // VT Feedback + // TODO: properly + surfaceData.VTFeedback = surfaceData0.VTFeedback; + // Init other parameters surfaceData.anisotropy = 0.0; surfaceData.specularColor = float3(0.0, 0.0, 0.0); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs index 2356489ccb1..ed2c7928190 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs @@ -178,13 +178,15 @@ public struct BSDFData public override bool IsDefferedMaterial() { return true; } - protected void GetGBufferOptions(HDRenderPipelineAsset asset, out int gBufferCount, out bool supportShadowMask, out bool supportLightLayers, out bool supportsVirtualTexturing) + protected void GetGBufferOptions(HDRenderPipelineAsset asset, out int gBufferCount, out bool supportShadowMask, out bool supportLightLayers) { // Caution: This must be in sync with GBUFFERMATERIAL_COUNT definition in supportShadowMask = asset.currentPlatformRenderPipelineSettings.supportShadowMask; supportLightLayers = asset.currentPlatformRenderPipelineSettings.supportLightLayers; - supportsVirtualTexturing = asset.currentPlatformRenderPipelineSettings.supportsVirtualTexturing; - gBufferCount = 4 + (supportShadowMask ? 1 : 0) + (supportLightLayers ? 1 : 0) + (supportsVirtualTexturing ? 1 : 0); + gBufferCount = 4 + (supportShadowMask ? 1 : 0) + (supportLightLayers ? 1 : 0); +#if ENABLE_VIRTUALTEXTURES + gBufferCount++; +#endif } // This must return the number of GBuffer to allocate @@ -193,8 +195,7 @@ public override int GetMaterialGBufferCount(HDRenderPipelineAsset asset) int gBufferCount; bool unused0; bool unused1; - bool unused2; - GetGBufferOptions(asset, out gBufferCount, out unused0, out unused1, out unused2); + GetGBufferOptions(asset, out gBufferCount, out unused0, out unused1); return gBufferCount; } @@ -204,8 +205,7 @@ public override void GetMaterialGBufferDescription(HDRenderPipelineAsset asset, int gBufferCount; bool supportShadowMask; bool supportLightLayers; - bool supportsVirtualTexturing; - GetGBufferOptions(asset, out gBufferCount, out supportShadowMask, out supportLightLayers, out supportsVirtualTexturing); + GetGBufferOptions(asset, out gBufferCount, out supportShadowMask, out supportLightLayers); RTFormat = new GraphicsFormat[gBufferCount]; gBufferUsage = new GBufferUsage[gBufferCount]; @@ -233,7 +233,6 @@ public override void GetMaterialGBufferDescription(HDRenderPipelineAsset asset, int index = 4; #if ENABLE_VIRTUALTEXTURES - if (supportsVirtualTexturing) { RTFormat[index] = GraphicsFormat.R8G8B8A8_UNorm; gBufferUsage[index] = GBufferUsage.VTFeedback; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index 97321cd7fa0..dbbbbef3ac0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -83,7 +83,7 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k #define GBUFFERMATERIAL_SHADOWMASK 0 #endif -#ifdef VT_ON +#ifdef VIRTUAL_TEXTURES_ENABLED #define GBUFFERMATERIAL_VTFEEDBACK 1 #else #define GBUFFERMATERIAL_VTFEEDBACK 0 @@ -93,14 +93,14 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k // Caution: This must be in sync with Lit.cs GetMaterialGBufferCount() #define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK + GBUFFERMATERIAL_VTFEEDBACK) -#if defined(VT_ON) && defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) +#if defined(VIRTUAL_TEXTURES_ENABLED) && defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) #define OUT_GBUFFER_VTFEEDBACK outGBuffer4 #define OUT_GBUFFER_LIGHT_LAYERS outGBuffer5 #define OUT_GBUFFER_SHADOWMASK outGBuffer6 -#elif defined(VT_ON) && defined(LIGHT_LAYERS) +#elif defined(VIRTUAL_TEXTURES_ENABLED) && defined(LIGHT_LAYERS) #define OUT_GBUFFER_VTFEEDBACK outGBuffer4 #define OUT_GBUFFER_LIGHT_LAYERS outGBuffer5 -#elif defined(VT_ON) && defined(SHADOWS_SHADOWMASK) +#elif defined(VIRTUAL_TEXTURES_ENABLED) && defined(SHADOWS_SHADOWMASK) #define OUT_GBUFFER_VTFEEDBACK outGBuffer4 #define OUT_GBUFFER_SHADOWMASK outGBuffer5 #elif defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) @@ -110,7 +110,7 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k #define OUT_GBUFFER_LIGHT_LAYERS outGBuffer4 #elif defined(SHADOWS_SHADOWMASK) #define OUT_GBUFFER_SHADOWMASK outGBuffer4 -#elif defined(VT_ON) +#elif defined(VIRTUAL_TEXTURES_ENABLED) #define OUT_GBUFFER_VTFEEDBACK outGBuffer4 #endif @@ -686,8 +686,10 @@ void EncodeIntoGBuffer( SurfaceData surfaceData OUT_GBUFFER_SHADOWMASK = BUILTIN_DATA_SHADOW_MASK; #endif -#ifdef VT_ON +#if VIRTUAL_TEXTURES_ACTIVE OUT_GBUFFER_VTFEEDBACK = surfaceData.VTFeedback; +#elif VIRTUAL_TEXTURES_ENABLED + OUT_GBUFFER_VTFEEDBACK = float4(1,1,1,1); #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index 6055a1ef85a..50c1b36bdbf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -302,7 +302,8 @@ Shader "HDRP/Lit" #pragma multi_compile_instancing #pragma instancing_options renderinglayer - #pragma shader_feature_local VT_ON + #pragma multi_compile _ VIRTUAL_TEXTURES_ENABLED // Is vt enabled render pipleine wide? dad + #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT // Is vt enabled for this material? //------------------------------------------------------------------------------------- // Define diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index bb5c5ea0b47..9698e5aea13 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -104,7 +104,7 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float #ifdef _NORMALMAP_IDX #ifdef _NORMALMAP_TANGENT_SPACE_IDX //TODO(ddebaets) VT does not handle full range of normal map sampling/reconstruction so special case here... -#ifdef VT_ON +#if VIRTUAL_TEXTURES_ACTIVE normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); #else normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), SAMPLER_NORMALMAP_IDX, ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); @@ -184,10 +184,13 @@ float3 ADD_IDX(GetBentNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, f float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out SurfaceData surfaceData, out float3 normalTS, out float3 bentNormalTS) { // Prepare the VT stack for sampling - StackInfo stackInfo = PrepareStack(ADD_IDX(layerTexCoord.base).uv, ADD_IDX(_TextureStack)); + StackInfo stackInfo = PrepareStack(UVMappingTo2D(ADD_IDX(layerTexCoord.base)), ADD_IDX(_TextureStack)); surfaceData.VTFeedback = GetResolveOutput(stackInfo); - +#if VIRTUAL_TEXTURES_ACTIVE const float4 baseColorValue = SampleStack(stackInfo, ADD_IDX(_BaseColorMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); +#else + const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); +#endif float alpha = baseColorValue.a * ADD_IDX(_BaseColor).a; // Perform alha test very early to save performance (a killed pixel will not sample textures) @@ -208,7 +211,11 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out #ifdef _MASKMAP_IDX +#if VIRTUAL_TEXTURES_ACTIVE const float4 maskValue = SampleStack(stackInfo, ADD_IDX(_MaskMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).b; +#else + const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)); +#endif #endif float3 detailNormalTS = float3(0.0, 0.0, 0.0); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl index 007fd8af99d..ad12ad22efd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl @@ -92,7 +92,14 @@ void DecodeFromSSSBuffer(uint2 positionSS, out SSSData sssData) } // OUTPUT_SSSBUFFER start from SV_Target2 as SV_Target0 and SV_Target1 are used for lighting buffer -#define OUTPUT_SSSBUFFER(NAME) out SSSBufferType0 MERGE_NAME(NAME, 0) : SV_Target2 + +#if VIRTUAL_TEXTURES_ENABLED +#define SS_BUFFER_TARGET SV_Target3 +#else +#define SS_BUFFER_TARGET SV_Target2 +#endif + +#define OUTPUT_SSSBUFFER(NAME) out SSSBufferType0 MERGE_NAME(NAME, 0) : SS_BUFFER_TARGET #define ENCODE_INTO_SSSBUFFER(SURFACE_DATA, UNPOSITIONSS, NAME) EncodeIntoSSSBuffer(ConvertSurfaceDataToSSSData(SURFACE_DATA), UNPOSITIONSS, MERGE_NAME(NAME, 0)) #define DECODE_FROM_SSSBUFFER(UNPOSITIONSS, SSS_DATA) DecodeFromSSSBuffer(UNPOSITIONSS, SSS_DATA) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs index 850199fd0c2..ffbb2c27cec 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs @@ -20,6 +20,9 @@ public struct SurfaceData [MaterialSharedPropertyMapping(MaterialSharedProperty.Albedo)] [SurfaceDataAttributes("Color", false, true)] public Vector3 color; + + [SurfaceDataAttributes("VTFeedback")] + public Vector4 VTFeedback; }; //----------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs.hlsl index 86fdbe36df0..ef708136616 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs.hlsl @@ -8,6 +8,7 @@ // UnityEngine.Experimental.Rendering.HDPipeline.Unlit+SurfaceData: static fields // #define DEBUGVIEW_UNLIT_SURFACEDATA_COLOR (300) +#define DEBUGVIEW_UNLIT_SURFACEDATA_VTFEEDBACK (301) // // UnityEngine.Experimental.Rendering.HDPipeline.Unlit+BSDFData: static fields @@ -19,6 +20,7 @@ struct SurfaceData { float3 color; + float4 VTFeedback; }; // Generated from UnityEngine.Experimental.Rendering.HDPipeline.Unlit+BSDFData @@ -39,6 +41,9 @@ void GetGeneratedSurfaceDataDebug(uint paramId, SurfaceData surfacedata, inout f result = surfacedata.color; needLinearToSRGB = true; break; + case DEBUGVIEW_UNLIT_SURFACEDATA_VTFEEDBACK: + result = surfacedata.VTFeedback.xyz; + break; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl index 4d33fcee841..59cda8f67ec 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl @@ -13,6 +13,8 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p surfaceData.color = SAMPLE_TEXTURE2D(_UnlitColorMap, sampler_UnlitColorMap, unlitColorMapUv).rgb * _UnlitColor.rgb; float alpha = SAMPLE_TEXTURE2D(_UnlitColorMap, sampler_UnlitColorMap, unlitColorMapUv).a * _UnlitColor.a; + surfaceData.VTFeedback = float4(1,1,1,1); + #ifdef _ALPHATEST_ON DoAlphaTest(alpha, _AlphaCutoff); #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs index 9984b408027..02cec274264 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs @@ -365,28 +365,46 @@ public void BeginRender() } #if ENABLE_VIRTUALTEXTURES - public void ResolveVT(CommandBuffer cmd, GBufferManager gBufferManager, HDRenderPipelineAsset asset) + public void ResolveVT(CommandBuffer cmd, RTHandleSystem.RTHandle primary, RTHandleSystem.RTHandle secondary, HDRenderPipelineAsset asset) { using (new ProfilingSample(cmd, "VTFeedback Downsample", CustomSamplerId.VTFeedbackDownSample.GetSampler())) { - var handle = gBufferManager.GetVTFeedbackBuffer(); - if (handle == null || lowresResolver == null) + if (lowresResolver == null) { return; } - var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; - int kernel = cs.FindKernel("KMain"); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, handle.nameID); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); - var resolveCounter = 0; - var startOffsetX = (resolveCounter % resolveScale); - var startOffsetY = (resolveCounter / resolveScale) % resolveScale; - cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); - var TGSize = 8; - cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); - - resolver.Process(lowresResolver.nameID, cmd); + if (primary != null) + { + var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; + int kernel = cs.FindKernel("KMain"); + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, primary.nameID); + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); + var resolveCounter = 0; + var startOffsetX = (resolveCounter % resolveScale); + var startOffsetY = (resolveCounter / resolveScale) % resolveScale; + cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); + var TGSize = 8; + cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); + + resolver.Process(lowresResolver.nameID, cmd); + } + + if (secondary != null && secondary.m_EnableMSAA == false) + { + var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; + int kernel = cs.FindKernel("KMain"); + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, secondary.nameID); + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); + var resolveCounter = 0; + var startOffsetX = (resolveCounter % resolveScale); + var startOffsetY = (resolveCounter / resolveScale) % resolveScale; + cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); + var TGSize = 8; + cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); + + resolver.Process(lowresResolver.nameID, cmd); + } } } #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs index 256ba0679dc..537acec9109 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs @@ -117,6 +117,7 @@ public enum CustomSamplerId #if ENABLE_VIRTUALTEXTURES VTFeedbackDownSample, + VTFeedbackClear, #endif Max } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 4a3e1cd7425..c4b8cb6d478 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -120,6 +120,8 @@ enum ForwardPass // MSAA Versions of regular textures RTHandleSystem.RTHandle m_CameraColorMSAABuffer; RTHandleSystem.RTHandle m_CameraSssDiffuseLightingMSAABuffer; + RTHandleSystem.RTHandle m_VTFeedbackBufferMSAA; + RTHandleSystem.RTHandle m_VTFeedbackBuffer; // The current MSAA count MSAASamples m_MSAASamples; @@ -210,6 +212,8 @@ public int GetDecalAtlasMipCount() RenderTargetIdentifier[] m_MRTTransparentMotionVec; RenderTargetIdentifier[] m_MRTWithSSS; + RenderTargetIdentifier[] m_MRTWithVTFeedback; + string m_ForwardPassProfileName; Vector2Int m_PyramidSizeV2I = new Vector2Int(); @@ -362,8 +366,16 @@ public HDRenderPipeline(HDRenderPipelineAsset asset) // Propagate it to the debug menu m_DebugDisplaySettings.data.msaaSamples = m_MSAASamples; - m_MRTWithSSS = new RenderTargetIdentifier[2 + m_SSSBufferManager.sssBufferCount]; - m_MRTTransparentMotionVec = new RenderTargetIdentifier[2]; + int additionalVtRenderTargets = 0; +#if ENABLE_VIRTUALTEXTURES + additionalVtRenderTargets = 1; + Shader.EnableKeyword("VIRTUAL_TEXTURES_ENABLED"); +#else + Shader.DisableKeyword("VIRTUAL_TEXTURES_ENABLED"); +#endif + m_MRTWithVTFeedback = new RenderTargetIdentifier[1 + additionalVtRenderTargets]; + m_MRTWithSSS = new RenderTargetIdentifier[2 + m_SSSBufferManager.sssBufferCount + additionalVtRenderTargets]; + m_MRTTransparentMotionVec = new RenderTargetIdentifier[2 + additionalVtRenderTargets]; #if ENABLE_RAYTRACING m_RayTracingManager.Init(m_Asset.currentPlatformRenderPipelineSettings, m_Asset.renderPipelineResources, m_Asset.renderPipelineRayTracingResources, m_BlueNoise, this, m_SharedRTManager, m_DebugDisplaySettings); m_RaytracingReflections.Init(m_Asset, m_SkyManager, m_RayTracingManager, m_SharedRTManager, m_GbufferManager); @@ -478,6 +490,16 @@ void InitializeRenderTextures() m_CameraColorMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "CameraColorMSAA"); m_CameraSssDiffuseLightingMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "CameraSSSDiffuseLightingMSAA"); } + + // Allocate a VT feedback buffer when the one from the GBuffer can't be used. + if (settings.supportMSAA || settings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) + { + m_VTFeedbackBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, useDynamicScale: true, name: "VTFeedbackExtra"); + if (settings.supportMSAA) + { + m_VTFeedbackBufferMSAA = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "VTFeedbackMSAA"); + } + } } void DestroyRenderTextures() @@ -1640,13 +1662,6 @@ AOVRequestData aovRequest RenderGBuffer(cullingResults, hdCamera, renderContext, cmd); -#if ENABLE_VIRTUALTEXTURES - // Unbind the RT. TODO(ddebaets) there must be a better way right ? - HDUtils.SetRenderTarget(cmd, m_GbufferManager.GetGBuffer0RT(), m_SharedRTManager.GetDepthStencilBuffer()); - hdCamera.ResolveVT(cmd, m_GbufferManager, m_Asset); - Experimental.VirtualTexturing.UpdateSystem(); -#endif - // We can now bind the normal buffer to be use by any effect m_SharedRTManager.BindNormalBuffer(cmd); @@ -1970,6 +1985,13 @@ void Callback() #endif } +#if ENABLE_VIRTUALTEXTURES + // Unbind the RT. TODO(ddebaets) there must be a better way right ? + HDUtils.SetRenderTarget(cmd, m_GbufferManager.GetGBuffer0RT(), m_SharedRTManager.GetDepthStencilBuffer()); + m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, m_VTFeedbackBufferMSAA, m_VTFeedbackBuffer);//FIXME: Refactor + hdCamera.ResolveVT(cmd, m_GbufferManager.GetVTFeedbackBuffer(), m_VTFeedbackBuffer, m_Asset); + Experimental.VirtualTexturing.UpdateSystem(); +#endif // At this point, m_CameraColorBuffer has been filled by either debug views are regular rendering so we can push it here. PushColorPickerDebugTexture(cmd, hdCamera, m_CameraColorBuffer); @@ -2902,26 +2924,44 @@ void RenderForward(CullingResults cullResults, HDCamera hdCamera, ScriptableRend if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) { m_MRTWithSSS[0] = m_CameraColorMSAABuffer; // Store the specular color - m_MRTWithSSS[1] = m_CameraSssDiffuseLightingMSAABuffer; +#if ENABLE_VIRTUALTEXTURES + m_MRTWithSSS[1] = GetVTFeedbackBufferForForward(); + const int offset = 2; +#else + const int offset = 1; +#endif + m_MRTWithSSS[offset] = m_CameraSssDiffuseLightingMSAABuffer; + for (int i = 0; i < m_SSSBufferManager.sssBufferCount; ++i) { - m_MRTWithSSS[i + 2] = m_SSSBufferManager.GetSSSBufferMSAA(i); + m_MRTWithSSS[i + offset + 1] = m_SSSBufferManager.GetSSSBufferMSAA(i); } } else { m_MRTWithSSS[0] = m_CameraColorBuffer; // Store the specular color - m_MRTWithSSS[1] = m_CameraSssDiffuseLightingBuffer; +#if ENABLE_VIRTUALTEXTURES + m_MRTWithSSS[1] = GetVTFeedbackBufferForForward(); + const int offset = 2; +#else + const int offset = 1; +#endif + m_MRTWithSSS[offset] = m_CameraSssDiffuseLightingBuffer; + for (int i = 0; i < m_SSSBufferManager.sssBufferCount; ++i) { - m_MRTWithSSS[i + 2] = m_SSSBufferManager.GetSSSBuffer(i); + m_MRTWithSSS[i + offset + 1] = m_SSSBufferManager.GetSSSBuffer(i); } } HDUtils.SetRenderTarget(cmd, m_MRTWithSSS, m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA))); } else { - HDUtils.SetRenderTarget(cmd, hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA) ? m_CameraColorMSAABuffer : m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA))); + m_MRTWithVTFeedback[0] = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA) ? m_CameraColorMSAABuffer : m_CameraColorBuffer; +#if ENABLE_VIRTUALTEXTURES + m_MRTWithVTFeedback[1] = GetVTFeedbackBufferForForward(); +#endif + HDUtils.SetRenderTarget(cmd, m_MRTWithVTFeedback, m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA))); } var passNames = hdCamera.frameSettings.litShaderMode == LitShaderMode.Forward @@ -2932,18 +2972,35 @@ void RenderForward(CullingResults cullResults, HDCamera hdCamera, ScriptableRend } else { + // If enabled in the shader settings the shader always outputs motion vector data. If we don't need it, mask out the render target writes here. bool renderMotionVecForTransparent = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MotionVectors) && hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector); + + // Fixme: This is broken/not implemented if VT is on. The _ColorMaskTransparentVel is always applied to RT1 but depending on VT state this may be RT1 or RT2 + // the problem is while shader lab lets you set mask state from code it doesn't let you set mask RT index from code (or through defines or in any sort of "dynamic" way) + // I.e. this is valid + // ColorMask [_ColorMaskTransparentVel] 1 + // this not... + // ColorMask [_ColorMaskTransparentVel] [_ColorMaskTransparentVelRtIndex] + // In my option it's probably cleaner and more generically useful to allow the above + // than jumping through lots and lots of hoops in HDRP code to ensure it's setup correctly + // altough it seems some rather heavy lifting in c++ to to that as well (see ShaderState.h) + cmd.SetGlobalInt(HDShaderIDs._ColorMaskTransparentVel, renderMotionVecForTransparent ? (int)UnityEngine.Rendering.ColorWriteMask.All : 0); m_MRTTransparentMotionVec[0] = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA) ? m_CameraColorMSAABuffer : m_CameraColorBuffer; - m_MRTTransparentMotionVec[1] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) +#if ENABLE_VIRTUALTEXTURES + m_MRTTransparentMotionVec[1] = GetVTFeedbackBufferForForward(); + const int offset = 2; +#else + const int offset = 1; +#endif + m_MRTTransparentMotionVec[offset] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) // It doesn't really matter what gets bound here since the color mask state set will prevent this from ever being written to. However, we still need to bind something // to avoid warnings about unbound render targets. The following rendertarget could really be anything if renderVelocitiesForTransparent, here the normal buffer // as it is guaranteed to exist and to have the same size. // to avoid warnings about unbound render targets. : m_SharedRTManager.GetNormalBuffer(); - HDUtils.SetRenderTarget(cmd, m_MRTTransparentMotionVec, m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA))); if ((hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) && (DecalSystem.m_DecalDatasCount > 0)) // enable d-buffer flag value is being interpreted more like enable decals in general now that we have clustered // decal datas count is 0 if no decals affect transparency @@ -3554,6 +3611,26 @@ void ClearBuffers(HDCamera hdCamera, CommandBuffer cmd) } } +#if ENABLE_VIRTUALTEXTURES + // Clearing VT buffers ensure we never end up thinking stale date is still relevant for the current frame. + using (new ProfilingSample(cmd, "Clear VTFeedback Buffers", CustomSamplerId.VTFeedbackClear.GetSampler())) + { + RTHandleSystem.RTHandle alreadyCleared = null; + if (m_GbufferManager != null && m_GbufferManager.GetVTFeedbackBuffer() != null) + { + alreadyCleared = m_GbufferManager.GetVTFeedbackBuffer(); + HDUtils.SetRenderTarget(cmd, alreadyCleared, ClearFlag.Color, Color.white); + + } + + // If the forward buffer is different from the GBuffer clear it also + if (GetVTFeedbackBufferForForward() != alreadyCleared) + { + HDUtils.SetRenderTarget(cmd, GetVTFeedbackBufferForForward(), ClearFlag.Color, Color.white); + } + } +#endif + // We don't need to clear the GBuffers as scene is rewrite and we are suppose to only access valid data (invalid data are tagged with stencil as StencilLightingUsage.NoLighting), // This is to save some performance if (hdCamera.frameSettings.litShaderMode == LitShaderMode.Deferred) @@ -3706,5 +3783,25 @@ RTHandleSystem.RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHa VFX.VFXManager.SetCameraBuffer(hdCamera.camera, VFX.VFXCameraBufferTypes.Color, colorBuffer, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight); } } + + // GBuffer vt feedback is handled in GBufferManager + RTHandleSystem.RTHandle GetVTFeedbackBufferForForward() + { + if (m_Asset.currentPlatformRenderPipelineSettings.supportMSAA || m_Asset.currentPlatformRenderPipelineSettings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) + { + if (m_Asset.currentPlatformRenderPipelineSettings.supportMSAA) + { + return m_VTFeedbackBufferMSAA; + } + else + { + return m_VTFeedbackBuffer; + } + } + else + { + return m_GbufferManager.GetVTFeedbackBuffer(); + } + } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs index e1f60b5e898..fe2cd95c032 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs @@ -109,6 +109,6 @@ public bool supportMSAA public GlobalDynamicResolutionSettings dynamicResolutionSettings; public GlobalLowResolutionTransparencySettings lowresTransparentSettings; - public bool supportsVirtualTexturing; + public bool supportsVirtualTexturing; // Note only ever use this var in ui's. To check if VT is on or not at run time, always use the C# define ENABLE_VIRTUALTEXTURES as both may be out of sync while the compile+domain reload happen } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl index 95125eb9bcb..5756c81f82c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl @@ -60,15 +60,28 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/TessellationShare.hlsl" #endif +#if VIRTUAL_TEXTURES_ENABLED +#define VT_BUFFER_TARGET SV_Target1 +#define EXTRA_BUFFER_TARGET SV_Target2 +#else +#define EXTRA_BUFFER_TARGET SV_Target1 +#endif + void Frag(PackedVaryingsToPS packedInput, #ifdef OUTPUT_SPLIT_LIGHTING out float4 outColor : SV_Target0, // outSpecularLighting - out float4 outDiffuseLighting : SV_Target1, + #if VIRTUAL_TEXTURES_ENABLED + out float4 outVTFeedback : VT_BUFFER_TARGET, + #endif // VIRTUAL_TEXTURES_ENABLED + out float4 outDiffuseLighting : EXTRA_BUFFER_TARGET, OUTPUT_SSSBUFFER(outSSSBuffer) #else out float4 outColor : SV_Target0 + #if VIRTUAL_TEXTURES_ENABLED + , out float4 outVTFeedback : VT_BUFFER_TARGET + #endif // VIRTUAL_TEXTURES_ENABLED #ifdef _WRITE_TRANSPARENT_MOTION_VECTOR - , out float4 outMotionVec : SV_Target1 + , out float4 outMotionVec : EXTRA_BUFFER_TARGET #endif // _WRITE_TRANSPARENT_MOTION_VECTOR #endif // OUTPUT_SPLIT_LIGHTING #ifdef _DEPTHOFFSET_ON @@ -219,4 +232,10 @@ void Frag(PackedVaryingsToPS packedInput, #ifdef _DEPTHOFFSET_ON outputDepth = posInput.deviceDepth; #endif + +#if VIRTUAL_TEXTURES_ACTIVE + outVTFeedback = surfaceData.VTFeedback; +#elif VIRTUAL_TEXTURES_ENABLED + outVTFeedback = float4(1,1,1,1); +#endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl index 0c566f8bb50..a9c32cb1c3d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl @@ -24,7 +24,12 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) #endif // TESSELLATION_ON -float4 Frag(PackedVaryingsToPS packedInput) : SV_Target +void Frag(PackedVaryingsToPS packedInput, + out float4 outResult : SV_Target0 +#if VIRTUAL_TEXTURES_ENABLED + ,out float4 outVTFeedback : SV_Target1 +#endif +) { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); @@ -86,5 +91,10 @@ float4 Frag(PackedVaryingsToPS packedInput) : SV_Target } #endif - return outColor; + outResult = outColor; +#if VIRTUAL_TEXTURES_ACTIVE + outVTFeedback = surfaceData.VTFeedback; +#elif VIRTUAL_TEXTURES_ENABLED + outVTFeedback = float4(1,1,1,1); +#endif } diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template index 28bfaaedaa5..d8cbba528cb 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template @@ -19,6 +19,8 @@ ${ZTest} #pragma vertex vert #pragma fragment frag + #define RESOLVE_SCALE_OVERRIDE VT_ResolveConstantPatch + //Pragmas generated by graph ${Pragmas} diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template index 1864462c729..26573e97ecf 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template @@ -20,6 +20,8 @@ ${ZTest} #pragma vertex vert #pragma fragment frag + #define RESOLVE_SCALE_OVERRIDE VT_ResolveConstantPatch + //Pragmas generated by graph ${Pragmas} diff --git a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader index 07fef3e3bce..382ae2c9eb6 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader @@ -120,8 +120,8 @@ Shader "Lightweight Render Pipeline/Lit" //-------------------------------------- // Virtual Texturing - #pragma shader_feature_local VT_ON - //define VT_ON 1 + #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT + //define VIRTUAL_TEXTURES_BUILT 1 #pragma vertex LitPassVertex @@ -267,7 +267,7 @@ Shader "Lightweight Render Pipeline/Lit" // ------------------------------------- // Unity defined keywords #pragma multi_compile_instancing - #pragma shader_feature_local VT_ON + #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT #include "LitInput.hlsl" diff --git a/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl b/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl index 399052dfe95..6485966b919 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl @@ -82,7 +82,7 @@ inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfa float4 rawAlbedoAlpha = SampleStack(info, _BaseMap); #ifdef _NORMALMAP -#ifdef VT_ON +#ifdef VIRTUAL_TEXTURES_ACTIVE float3 normal = SampleStack_Normal(info, _BumpMap, _BumpScale); #else float3 normal = SampleNormal(uv, TEXTURE2D_ARGS(_BumpMap, sampler_BumpMap), _BumpScale); diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader index a5f1982c13e..b86eb0053d1 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader @@ -56,7 +56,7 @@ Shader "Lightweight Render Pipeline/Terrain/Lit-VT" // Sample normal in pixel shader when doing instancing #pragma shader_feature_local _TERRAIN_INSTANCED_PERPIXEL_NORMAL - #define VT_ON 1 + #define VIRTUAL_TEXTURES_BUILT 1 #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" @@ -131,7 +131,7 @@ Shader "Lightweight Render Pipeline/Terrain/Lit-VT" #pragma multi_compile_instancing #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap - #define VT_ON 1 + #define VIRTUAL_TEXTURES_BUILT 1 #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader index 16cd3c0bc28..173213e9cb6 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader @@ -44,7 +44,7 @@ Shader "Hidden/Lightweight Render Pipeline/Terrain/Lit-VT (Add Pass)" #pragma shader_feature_local _NORMALMAP #define TERRAIN_SPLAT_ADDPASS 1 - #define VT_ON 1 + #define VIRTUAL_TEXTURES_BUILT 1 #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl index 595d01bebf2..de47f98f4b4 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl @@ -38,7 +38,7 @@ CBUFFER_END TEXTURE2D(_MetallicTex); SAMPLER(sampler_MetallicTex); -#ifdef VT_ON +#if VIRTUAL_TEXTURES_BUILT DECLARE_STACK_CB(_TextureStack); DECLARE_STACK(_TextureStack, _MainTex); #endif diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl index debc8f6af4b..638af7967a8 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl @@ -227,7 +227,7 @@ half4 SplatmapFragment(Varyings IN) : SV_TARGET half alpha = 1; #else -#ifdef VT_ON +#ifdef VIRTUAL_TEXTURES_ACTIVE StackInfo stackInfo = PrepareStack(IN.uvMainAndLM.xy, _TextureStack); half4 mixedDiffuse = SampleStack(stackInfo, _MainTex); diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader b/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader index 52d69a945f5..8e8cc040991 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader @@ -56,7 +56,7 @@ Shader "Lightweight Render Pipeline/Unlit" //-------------------------------------- // Virtual Texturing - #pragma shader_feature_local VT_ON + #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT #include "UnlitInput.hlsl" @@ -185,7 +185,7 @@ Shader "Lightweight Render Pipeline/Unlit" // ------------------------------------- // Unity defined keywords #pragma multi_compile_instancing - #pragma shader_feature_local VT_ON + #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT #include "LitInput.hlsl" diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs index 5bfbedde54e..6cc52f92dc1 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs @@ -23,7 +23,7 @@ class PBRMasterNode : MasterNode, IMayRequirePosition, IMayRequir public const string AlphaSlotName = "Alpha"; public const string AlphaClipThresholdSlotName = "AlphaClipThreshold"; public const string PositionName = "Position"; - public const string FeedbackSlotName = "StreamingFeedback"; + public const string VTFeedbackSlotName = "VTFeedback"; public const int AlbedoSlotId = 0; public const int NormalSlotId = 1; @@ -35,7 +35,7 @@ class PBRMasterNode : MasterNode, IMayRequirePosition, IMayRequir public const int AlphaSlotId = 7; public const int AlphaThresholdSlotId = 8; public const int PositionSlotId = 9; - public const int FeedbackSlotId = 10; + public const int VTFeedbackSlotId = AggregateFeedbackNode.MasterNodeFeedbackInputSlotID; public enum Model { @@ -130,7 +130,7 @@ public sealed override void UpdateNodeAfterDeserialization() AddSlot(new Vector1MaterialSlot(AlphaSlotId, AlphaSlotName, AlphaSlotName, SlotType.Input, 1f, ShaderStageCapability.Fragment)); AddSlot(new Vector1MaterialSlot(AlphaThresholdSlotId, AlphaClipThresholdSlotName, AlphaClipThresholdSlotName, SlotType.Input, 0.5f, ShaderStageCapability.Fragment)); - var fbSlot = new Vector4MaterialSlot(FeedbackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); + var fbSlot = new Vector4MaterialSlot(VTFeedbackSlotId, VTFeedbackSlotName, VTFeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); fbSlot.hidden = true; AddSlot(fbSlot); @@ -148,7 +148,7 @@ public sealed override void UpdateNodeAfterDeserialization() OcclusionSlotId, AlphaSlotId, AlphaThresholdSlotId, - FeedbackSlotId, + VTFeedbackSlotId, }, true); } diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs index 5a479a87e22..5818048e3ca 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs @@ -17,13 +17,13 @@ class UnlitMasterNode : MasterNode, IMayRequirePosition public const string AlphaSlotName = "Alpha"; public const string AlphaClipThresholdSlotName = "AlphaClipThreshold"; public const string PositionName = "Position"; - public const string FeedbackSlotName = "StreamingFeedback"; + public const string FeedbackSlotName = "VTFeedback"; public const int ColorSlotId = 0; public const int AlphaSlotId = 7; public const int AlphaThresholdSlotId = 8; public const int PositionSlotId = 9; - public const int FeedBackSlotId = 10; + public const int FeedBackSlotId = AggregateFeedbackNode.MasterNodeFeedbackInputSlotID; [SerializeField] SurfaceType m_SurfaceType; diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs index 5f197df6a7d..3a41cc42a76 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs @@ -136,6 +136,8 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GraphContext graphC break; } } + bool feedbackConnected = IsSlotConnected(FeedbackSlotId); ; + anyConnected |= feedbackConnected; if (anyConnected) { @@ -177,28 +179,16 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GraphContext graphC } } - if (IsSlotConnected(FeedbackSlotId)) + if (feedbackConnected) { - string feedBackCode = string.Format("float4 {0} = ResolveStack({1}, {2}, {3});" - , GetVariableNameForSlot(FeedbackSlotId) - , GetSlotValue(UVInputId, generationMode) - , stackName - , "VT_ResolveConstantPatch"); - sb.AppendLine(feedBackCode); + //TODO: Investigate if the feedback pass can use halfs + string feedBackCode = string.Format("float4 {0} = GetResolveOutput({1}_info);", + GetVariableNameForSlot(FeedbackSlotId), + stackName); + sb.AppendLine(feedBackCode); } } - public void GenerateFeedbackCode(GenerationMode generationMode, string assignLValue, out string code) - { - string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_stack"; - - code = string.Format("{0} = ResolveStack({1}, {2}, {3});" - , assignLValue - , GetSlotValue(UVInputId, generationMode) - , stackName - , "VT_ResolveConstantPatch"); - } - public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode) { base.CollectShaderProperties(properties, generationMode); @@ -230,7 +220,8 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener public override void CollectShaderPragmas(PragmaCollector pragmas, GenerationMode generationMode) { - pragmas.AddShaderPragma(new ShaderFeaturePragma(new string[] { "VT_ON" })); + pragmas.AddShaderPragma(new MultiCompilePragma(new string[] { "_", "VIRTUAL_TEXTURES_ENABLED" })); + pragmas.AddShaderPragma(new ShaderFeatureLocalPragma(new string[] { "VIRTUAL_TEXTURES_BUILT" })); } public bool RequiresMeshUV(UVChannel channel, ShaderStageCapability stageCapability) @@ -427,6 +418,8 @@ class AggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequ public override bool hasPreview { get { return false; } } + public const int MasterNodeFeedbackInputSlotID = 22021982; + public AggregateFeedbackNode() { name = "Feedback Aggregate"; @@ -506,6 +499,13 @@ public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) public static AggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode masterNode) { var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); + + // Early out if there are no VT nodes in the graph + if ( stackNodes.Count <= 0 ) + { + return null; + } + var feedbackNode = new AggregateFeedbackNode(); masterNode.owner.AddNode(feedbackNode); @@ -515,6 +515,11 @@ public static AggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode { // Find feedback output slot on the vt node var stackFeedbackOutputSlot = (node.FindOutputSlot(node.FeedbackSlotId)) as Vector4MaterialSlot; + if (stackFeedbackOutputSlot == null) + { + Debug.LogWarning("Could not find the VT feedback output slot on the stack node."); + return null; + } // Create a new slot on the aggregate that is similar to the uv input slot string name = "FeedIn_" + i; @@ -527,8 +532,20 @@ public static AggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode } // Add input to master node - var feedbackInputSlot = masterNode.FindInputSlot(PBRMasterNode.FeedbackSlotId); + var feedbackInputSlot = masterNode.FindInputSlot(MasterNodeFeedbackInputSlotID); + if ( feedbackInputSlot == null ) + { + Debug.LogWarning("Could not find the VT feedback input slot on the master node."); + return null; + } + var feedbackOutputSlot = feedbackNode.FindOutputSlot(AggregateFeedbackNode.AggregateOutputId); + if ( feedbackOutputSlot == null ) + { + Debug.LogWarning("Could not find the VT feedback output slot on the aggregate node."); + return null; + } + masterNode.owner.Connect(feedbackOutputSlot.slotReference, feedbackInputSlot.slotReference); masterNode.owner.ClearChanges(); diff --git a/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs b/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs index 4fc2f013d22..7e8cc640454 100644 --- a/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs +++ b/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs @@ -53,6 +53,10 @@ class MultiCompilePragma : SimplePragma { public MultiCompilePragma(IEnumerable options) : base("multi_compile", options) { + if ( options.Count() < 2) + { + throw new System.Exception("multi_compile needs at least 2 options, you probably need to use the empty '_' option."); + } } public override bool IsDuplicate(AbstractShaderPragma other) @@ -73,6 +77,18 @@ public override bool IsDuplicate(AbstractShaderPragma other) } } + class ShaderFeatureLocalPragma : SimplePragma + { + public ShaderFeatureLocalPragma(IEnumerable options) : base("shader_feature_local", options) + { + } + + public override bool IsDuplicate(AbstractShaderPragma other) + { + return (other is ShaderFeatureLocalPragma) && (other as ShaderFeatureLocalPragma).arguments.SequenceEqual(arguments); + } + } + // Todo add build-in multicompiles, skip_variants, .... class PragmaCollector diff --git a/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs b/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs index 3f51c5b37e1..57be26b9e4b 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs @@ -43,17 +43,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro public static void SetMaterialKeywords(Material material, Action shadingModelFunc = null, Action shaderFunc = null) { - if(material.HasProperty("_VirtualTexturing")) - { - if (material.GetFloat("_VirtualTexturing") == 0.0f || !StackStatus.AllStacksValid(material) ) - { - material.DisableKeyword("VT_ON"); - } - else - { - material.EnableKeyword("VT_ON"); - } - } + StackUtilities.SetMaterialKeywords(material); } } diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs index 25b067bd9be..fafd9afa37e 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs @@ -10,6 +10,11 @@ namespace UnityEditor.ShaderGraph public class StackStatus { + /// + /// Update the keywords on a material to reflect the correct VT state. + /// + /// Material to update + /// Force VT off even if the material indiates it wants VT and VT assets are correctly build. public static void UpdateMaterial(Material material, bool forceOff = false) { if (material.HasProperty("_VirtualTexturing") == false) @@ -18,9 +23,28 @@ public static void UpdateMaterial(Material material, bool forceOff = false) bool enable = forceOff ? false : !(material.GetFloat("_VirtualTexturing") == 0.0f || !StackStatus.AllStacksValid(material)); if (enable) - material.EnableKeyword("VT_ON"); + material.EnableKeyword("VIRTUAL_TEXTURES_BUILT"); else - material.DisableKeyword("VT_ON"); + material.DisableKeyword("VIRTUAL_TEXTURES_BUILT"); + } + + // Scans all materials and updates their VT status + // Note this may take a long time, don't over use this. + public static void UpdateAllMaterials(bool forceOff = false) + { + // disable VT on all materials + var matIds = AssetDatabase.FindAssets("t:Material"); + for (int i = 0, length = matIds.Length; i < length; i++) + { + EditorUtility.DisplayProgressBar("Updating Materials", "Updating materials for VT changes...", (float)(i / matIds.Length)); + var path = AssetDatabase.GUIDToAssetPath(matIds[i]); + var mat = AssetDatabase.LoadAssetAtPath(path); + if (mat != null) + { + ShaderGraph.StackStatus.UpdateMaterial(mat, forceOff); + } + } + EditorUtility.ClearProgressBar(); } public static bool AllStacksValid(Material material) diff --git a/com.unity.shadergraph/Editor/Util/StackUtilities.cs b/com.unity.shadergraph/Editor/Util/StackUtilities.cs new file mode 100644 index 00000000000..44b3e4fe577 --- /dev/null +++ b/com.unity.shadergraph/Editor/Util/StackUtilities.cs @@ -0,0 +1,38 @@ +using System.Linq; +using UnityEngine; +using UnityEditor.Graphing; +using System.Collections.Generic; +using System; +using UnityEditor.ShaderGraph.Drawing.Controls; + +namespace UnityEditor.ShaderGraph +{ + class StackUtilities + { + public static void SetMaterialKeywords(IEnumerable materials) + { + foreach( var mat in materials) + { + if ( mat is Material) + { + SetMaterialKeywords(mat as Material); + } + } + } + + public static void SetMaterialKeywords(Material material) + { + if (material.HasProperty("_VirtualTexturing")) + { + if (material.GetFloat("_VirtualTexturing") == 0.0f || !StackStatus.AllStacksValid(material)) + { + material.DisableKeyword("VIRTUAL_TEXTURES_BUILT"); + } + else + { + material.EnableKeyword("VIRTUAL_TEXTURES_BUILT"); + } + } + } + } +} diff --git a/com.unity.shadergraph/Editor/Util/StackUtilities.cs.meta b/com.unity.shadergraph/Editor/Util/StackUtilities.cs.meta new file mode 100644 index 00000000000..2379f75b332 --- /dev/null +++ b/com.unity.shadergraph/Editor/Util/StackUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 47b69849be258aa41b7911d850b02577 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 778ad46b26e24ac2b29d9d30e1ac48317b0380b2 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 17 Jun 2019 17:28:29 +0200 Subject: [PATCH 017/143] Fix LWRP for recent changes - Add correct status keywords - Feedback veriable name consistent with HDRP/shared code --- .../Editor/ShaderGraph/LightWeightPBRSubShader.cs | 2 +- .../lightweightPBRStreamFeedbackPass.template | 4 ++-- .../lightweightUnlitStreamFeedbackPass.template | 4 ++-- .../Runtime/LightweightRenderPipeline.cs | 11 +++++++++++ .../Shaders/Lit.shader | 6 +++++- .../Shaders/Unlit.shader | 3 +++ 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightPBRSubShader.cs b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightPBRSubShader.cs index d0851c3e7d7..9726de554dd 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightPBRSubShader.cs +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/LightWeightPBRSubShader.cs @@ -88,7 +88,7 @@ struct Pass PBRMasterNode.EmissionSlotId, PBRMasterNode.AlphaSlotId, PBRMasterNode.AlphaThresholdSlotId, - PBRMasterNode.FeedbackSlotId, + PBRMasterNode.VTFeedbackSlotId, }, VertexShaderSlots = new List() { diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template index d8cbba528cb..15d8bbd802e 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template @@ -88,7 +88,7 @@ ${PixelShaderSurfaceInputs} float Occlusion = 1; float Alpha = 1; float AlphaClipThreshold = 0; - float4 StreamingFeedback = float4(1, 1, 1, 1); + float4 VTFeedback = float4(1, 1, 1, 1); // Surface description remap performed by graph ${PixelShaderSurfaceRemap} @@ -96,7 +96,7 @@ ${PixelShaderSurfaceRemap} #if _AlphaClip clip(Alpha - AlphaClipThreshold); #endif - return StreamingFeedback; + return VTFeedback; } ENDHLSL } diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template index 26573e97ecf..742674a9468 100644 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template +++ b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template @@ -83,14 +83,14 @@ ${PixelShaderSurfaceInputs} float3 Color = float3(0.5, 0.5, 0.5); float Alpha = 1; float AlphaClipThreshold = 0; - float4 StreamingFeedback = float4(1, 1, 1, 1); + float4 VTFeedback = float4(1, 1, 1, 1); // Surface description remap performed by graph ${PixelShaderSurfaceRemap} #if _AlphaClip clip(Alpha - AlphaClipThreshold); #endif - return StreamingFeedback; + return VTFeedback; } ENDHLSL } diff --git a/com.unity.render-pipelines.lightweight/Runtime/LightweightRenderPipeline.cs b/com.unity.render-pipelines.lightweight/Runtime/LightweightRenderPipeline.cs index c1284f3011c..e65dec6f7bb 100644 --- a/com.unity.render-pipelines.lightweight/Runtime/LightweightRenderPipeline.cs +++ b/com.unity.render-pipelines.lightweight/Runtime/LightweightRenderPipeline.cs @@ -102,6 +102,17 @@ public LightweightRenderPipeline(LightweightRenderPipelineAsset asset) CameraCaptureBridge.enabled = true; RenderingUtils.ClearSystemInfoCache(); + + if (asset.usesVirtualTexturing) + { + Shader.EnableKeyword("VIRTUAL_TEXTURES_ENABLED"); + Debug.Log("Enable VT keword"); + } + else + { + Shader.DisableKeyword("VIRTUAL_TEXTURES_ENABLED"); + Debug.Log("Disable VT keword"); + } } protected override void Dispose(bool disposing) diff --git a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader index 382ae2c9eb6..4f5cc4a2fd9 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Lit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Lit.shader @@ -120,6 +120,7 @@ Shader "Lightweight Render Pipeline/Lit" //-------------------------------------- // Virtual Texturing + #pragma multi_compile _ VIRTUAL_TEXTURES_ENABLED #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT //define VIRTUAL_TEXTURES_BUILT 1 @@ -267,6 +268,9 @@ Shader "Lightweight Render Pipeline/Lit" // ------------------------------------- // Unity defined keywords #pragma multi_compile_instancing + + #define RESOLVE_SCALE_OVERRIDE VT_ResolveConstantPatch + #pragma multi_compile _ VIRTUAL_TEXTURES_ENABLED #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT #include "LitInput.hlsl" @@ -307,7 +311,7 @@ Shader "Lightweight Render Pipeline/Lit" { UNITY_SETUP_INSTANCE_ID(input); - return ResolveStack(input.uv, _TextureStack, VT_ResolveConstantPatch); + return ResolveStack(input.uv, _TextureStack); } ENDHLSL } diff --git a/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader b/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader index 8e8cc040991..617cdd54921 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader +++ b/com.unity.render-pipelines.lightweight/Shaders/Unlit.shader @@ -56,6 +56,7 @@ Shader "Lightweight Render Pipeline/Unlit" //-------------------------------------- // Virtual Texturing + #pragma multi_compile _ VIRTUAL_TEXTURES_ENABLED #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT @@ -185,6 +186,8 @@ Shader "Lightweight Render Pipeline/Unlit" // ------------------------------------- // Unity defined keywords #pragma multi_compile_instancing + #define RESOLVE_SCALE_OVERRIDE VT_ResolveConstantPatch + #pragma multi_compile _ VIRTUAL_TEXTURES_ENABLED #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT #include "LitInput.hlsl" From 32e2703e22de2f91cb9b87aa175639f11558a2c7 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Tue, 18 Jun 2019 15:16:21 +0200 Subject: [PATCH 018/143] [VirtualTexturing] Changes to reflect new VT terrain packages" --- .../ShaderLibrary/TextureStack.hlsl | 8 +- .../Material/TerrainLit/TerrainLitData.hlsl | 1 + .../Shaders/Terrain/TerrainLit-VT.shader | 153 ------------------ .../Shaders/Terrain/TerrainLit-VT.shader.meta | 9 -- .../Shaders/Terrain/TerrainLitAdd-VT.shader | 55 ------- .../Terrain/TerrainLitAdd-VT.shader.meta | 9 -- .../Shaders/Terrain/TerrainLitInput.hlsl | 5 - .../Shaders/Terrain/TerrainLitPasses.hlsl | 14 -- 8 files changed, 8 insertions(+), 246 deletions(-) delete mode 100644 com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader delete mode 100644 com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader.meta delete mode 100644 com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader delete mode 100644 com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader.meta diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 376cf4cf386..dc73f251bfc 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -65,6 +65,12 @@ struct StackInfo float4 resolveOutput; }; +#ifdef TEXTURESTACK_CLAMP + #define GR_LOOKUP Granite_Lookup_Clamp_Linear +#else + #define GR_LOOKUP Granite_Lookup_Anisotropic +#endif + #define DECLARE_STACK_CB(stackName) \ float4x4 stackName##_spaceparams[2];\ @@ -93,7 +99,7 @@ StackInfo PrepareVT_##stackName(float2 uv)\ translationTable.Sampler = sampler##stackName##_transtab;\ \ StackInfo info;\ - Granite_Lookup_Anisotropic(grCB, translationTable, uv, info.lookupData, info.resolveOutput);\ + GR_LOOKUP(grCB, translationTable, uv, info.lookupData, info.resolveOutput);\ return info;\ } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl index a3203014165..160857b7bea 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl @@ -177,6 +177,7 @@ void GetSurfaceAndBuiltinData(inout FragInputs input, float3 V, inout PositionIn surfaceData.subsurfaceMask = 0; surfaceData.thickness = 1; surfaceData.diffusionProfileHash = 0; + surfaceData.VTFeedback = float4(1, 1, 1, 1); surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD; diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader deleted file mode 100644 index a5f1982c13e..00000000000 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader +++ /dev/null @@ -1,153 +0,0 @@ -Shader "Lightweight Render Pipeline/Terrain/Lit-VT" -{ - Properties - { - // used in fallback on old cards & base map - [HideInInspector] _MainTex("BaseMap (RGB)", 2D) = "grey" {} - [HideInInspector] _BaseColor("Main Color", Color) = (1,1,1,1) - - // TODO: Implement ShaderGUI for the shader and display the checkbox only when instancing is enabled. - [Toggle(_TERRAIN_INSTANCED_PERPIXEL_NORMAL)] _TERRAIN_INSTANCED_PERPIXEL_NORMAL("Enable Instanced Per-pixel Normal", Float) = 0 - - _TextureStack("_TextureStack", Stack) = { _MainTex } - [HideInInspector]Transform("Transform", Vector) = (0,0,0,0) - [HideInInspector]DebugVTColor("DebugVTColor", Vector) = (1,0,1,0) - [HideInInspector]DebugVTParams("DebugVTParams", Vector) = (0,0,0,0) - } - - SubShader - { - Tags { "Queue" = "Geometry-100" "RenderType" = "Opaque" "RenderPipeline" = "LightweightPipeline" "IgnoreProjector" = "False"} - - Pass - { - Name "ForwardLit" - Tags { "LightMode" = "LightweightForward" } - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma target 3.0 - - #pragma vertex SplatmapVert - #pragma fragment SplatmapFragment - - #define _METALLICSPECGLOSSMAP 1 - #define _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A 1 - - // ------------------------------------- - // Lightweight Pipeline keywords - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE - #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS - #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS - #pragma multi_compile _ _SHADOWS_SOFT - #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE - - // ------------------------------------- - // Unity defined keywords - #pragma multi_compile _ DIRLIGHTMAP_COMBINED - #pragma multi_compile _ LIGHTMAP_ON - #pragma multi_compile_fog - #pragma multi_compile_instancing - #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap - - #pragma shader_feature_local _NORMALMAP - // Sample normal in pixel shader when doing instancing - #pragma shader_feature_local _TERRAIN_INSTANCED_PERPIXEL_NORMAL - - #define VT_ON 1 - - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" - ENDHLSL - } - - Pass - { - Name "ShadowCaster" - Tags{"LightMode" = "ShadowCaster"} - - ZWrite On - - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma target 2.0 - - #pragma vertex ShadowPassVertex - #pragma fragment ShadowPassFragment - - #pragma multi_compile_instancing - #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap - - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" - ENDHLSL - } - - Pass - { - Name "DepthOnly" - Tags{"LightMode" = "DepthOnly"} - - ZWrite On - ColorMask 0 - - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma target 2.0 - - #pragma vertex DepthOnlyVertex - #pragma fragment DepthOnlyFragment - - #pragma multi_compile_instancing - #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap - - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" - ENDHLSL - } - - Pass - { - Name "VTFeedback" - Tags { "LightMode" = "VTFeedback" } - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma target 3.0 - - #pragma vertex SplatmapVert - #pragma fragment frag - - // ------------------------------------- - // Unity defined keywords - #pragma multi_compile_fog - #pragma multi_compile_instancing - #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap - - #define VT_ON 1 - - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" - - half4 frag(Varyings IN) : SV_TARGET - { - return ResolveStack(IN.uvMainAndLM.xy, _TextureStack, VT_ResolveConstantPatch); - } - ENDHLSL - } - - UsePass "Hidden/Nature/Terrain/Utilities/PICKING" - UsePass "Hidden/Nature/Terrain/Utilities/SELECTION" - } - Dependency "AddPassShader" = "Hidden/Lightweight Render Pipeline/Terrain/Lit-VT (Add Pass)" - Dependency "BaseMapShader" = "Hidden/Lightweight Render Pipeline/Terrain/Lit (Base Pass)" - - Fallback "Hidden/InternalErrorShader" -} diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader.meta b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader.meta deleted file mode 100644 index 43ef89243cd..00000000000 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLit-VT.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 000169addf5053b419e77acd7cbb5dc8 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader deleted file mode 100644 index 16cd3c0bc28..00000000000 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Hidden/Lightweight Render Pipeline/Terrain/Lit-VT (Add Pass)" -{ - Properties - { - // used in fallback on old cards & base map - [HideInInspector] _BaseMap("BaseMap (RGB)", 2D) = "white" {} - [HideInInspector] _BaseColor("Main Color", Color) = (1,1,1,1) - } - - SubShader - { - Tags { "Queue" = "Geometry-99" "RenderType" = "Opaque" "RenderPipeline" = "LightweightPipeline" "IgnoreProjector" = "True"} - - Pass - { - Name "TerrainAddLit" - Tags { "LightMode" = "LightweightForward" } - Blend One One - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma target 3.0 - - #pragma vertex SplatmapVert - #pragma fragment SplatmapFragment - - // ------------------------------------- - // Lightweight Pipeline keywords - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE - #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS - #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS - #pragma multi_compile _ _SHADOWS_SOFT - #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE - - // ------------------------------------- - // Unity defined keywords - #pragma multi_compile _ DIRLIGHTMAP_COMBINED - #pragma multi_compile _ LIGHTMAP_ON - #pragma multi_compile_fog - #pragma multi_compile_instancing - #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap - - #pragma shader_feature_local _NORMALMAP - #define TERRAIN_SPLAT_ADDPASS 1 - #define VT_ON 1 - - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl" - ENDHLSL - } - } - Fallback "Hidden/InternalErrorShader" -} diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader.meta b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader.meta deleted file mode 100644 index db6d3f1ea31..00000000000 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitAdd-VT.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 34d1ee9cbc2bc67448717527c65ebe87 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl index 595d01bebf2..05c5457b70f 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitInput.hlsl @@ -4,7 +4,6 @@ #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl" #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl" -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" CBUFFER_START(_Terrain) half _Metallic0, _Metallic1, _Metallic2, _Metallic3; @@ -38,10 +37,6 @@ CBUFFER_END TEXTURE2D(_MetallicTex); SAMPLER(sampler_MetallicTex); -#ifdef VT_ON -DECLARE_STACK_CB(_TextureStack); -DECLARE_STACK(_TextureStack, _MainTex); -#endif half4 SampleMetallicSpecGloss(float2 uv, half albedoAlpha) { diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl index debc8f6af4b..75e62006979 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl @@ -227,25 +227,11 @@ half4 SplatmapFragment(Varyings IN) : SV_TARGET half alpha = 1; #else -#ifdef VT_ON - StackInfo stackInfo = PrepareStack(IN.uvMainAndLM.xy, _TextureStack); - half4 mixedDiffuse = SampleStack(stackInfo, _MainTex); - - //TODO(ddebaets) this is a bit stupid but atm we only have diffuse - half4 splatControl = SAMPLE_TEXTURE2D(_Control, sampler_Control, IN.uvMainAndLM.xy); - half weight = dot(splatControl, 1.0h); -#if !defined(SHADER_API_MOBILE) && defined(TERRAIN_SPLAT_ADDPASS) - clip(weight == 0.0h ? -1.0h : 1.0h); -#endif - splatControl /= (weight + HALF_MIN); - - #else half4 splatControl; half weight; half4 mixedDiffuse; half4 defaultSmoothness = half4(_Smoothness0, _Smoothness1, _Smoothness2, _Smoothness3); SplatmapMix(IN, defaultSmoothness, splatControl, weight, mixedDiffuse, normalTS); -#endif half3 albedo = mixedDiffuse.rgb; half smoothness = mixedDiffuse.a; From afeaf5ef08c1b874cb9910188f5d8f975b1c589f Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 2 Jul 2019 14:29:30 +0200 Subject: [PATCH 019/143] Fix MSAA VT feedback (pick a single sample of the MSAA feedback rendertarget). --- .../Runtime/RenderPipeline/Camera/HDCamera.cs | 32 +++++++++++++++---- .../RenderPipeline/HDRenderPipeline.cs | 18 ++--------- .../DownsampleVTFeedback.compute | 13 ++++++++ 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs index 02cec274264..28ecc9ac8d7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs @@ -376,37 +376,57 @@ public void ResolveVT(CommandBuffer cmd, RTHandleSystem.RTHandle primary, RTHand if (primary != null) { - var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; + ResolveVTDispatch(cmd, primary, asset); + /*var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; int kernel = cs.FindKernel("KMain"); cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, primary.nameID); cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); var resolveCounter = 0; var startOffsetX = (resolveCounter % resolveScale); var startOffsetY = (resolveCounter / resolveScale) % resolveScale; - cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); + cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, -1)); var TGSize = 8; cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); - resolver.Process(lowresResolver.nameID, cmd); + resolver.Process(lowresResolver.nameID, cmd);*/ } if (secondary != null && secondary.m_EnableMSAA == false) { - var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; + ResolveVTDispatch(cmd, secondary, asset); + /*var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; int kernel = cs.FindKernel("KMain"); cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, secondary.nameID); cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); var resolveCounter = 0; var startOffsetX = (resolveCounter % resolveScale); var startOffsetY = (resolveCounter / resolveScale) % resolveScale; - cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); + cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, -1)); var TGSize = 8; cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); - resolver.Process(lowresResolver.nameID, cmd); + resolver.Process(lowresResolver.nameID, cmd);*/ } } } + + private void ResolveVTDispatch(CommandBuffer cmd, RTHandleSystem.RTHandle buffer, HDRenderPipelineAsset asset) + { + string mainFunction = (buffer.m_EnableMSAA) ? "KMainMSAA" : "KMain"; + + var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; + int kernel = cs.FindKernel(mainFunction); + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, buffer.nameID); + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); + var resolveCounter = 0; + var startOffsetX = (resolveCounter % resolveScale); + var startOffsetY = (resolveCounter / resolveScale) % resolveScale; + cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); + var TGSize = 8; + cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); + + resolver.Process(lowresResolver.nameID, cmd); + } #endif void UpdateAntialiasing() diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index c4b8cb6d478..546e379fc29 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -120,7 +120,6 @@ enum ForwardPass // MSAA Versions of regular textures RTHandleSystem.RTHandle m_CameraColorMSAABuffer; RTHandleSystem.RTHandle m_CameraSssDiffuseLightingMSAABuffer; - RTHandleSystem.RTHandle m_VTFeedbackBufferMSAA; RTHandleSystem.RTHandle m_VTFeedbackBuffer; // The current MSAA count @@ -494,11 +493,8 @@ void InitializeRenderTextures() // Allocate a VT feedback buffer when the one from the GBuffer can't be used. if (settings.supportMSAA || settings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) { - m_VTFeedbackBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, useDynamicScale: true, name: "VTFeedbackExtra"); - if (settings.supportMSAA) - { - m_VTFeedbackBufferMSAA = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "VTFeedbackMSAA"); - } + // Our processing handles both MSAA and regular buffers so we don't need to explicitly resolve here saving a buffer + m_VTFeedbackBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "VTFeedbackForward"); } } @@ -1988,7 +1984,6 @@ void Callback() #if ENABLE_VIRTUALTEXTURES // Unbind the RT. TODO(ddebaets) there must be a better way right ? HDUtils.SetRenderTarget(cmd, m_GbufferManager.GetGBuffer0RT(), m_SharedRTManager.GetDepthStencilBuffer()); - m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, m_VTFeedbackBufferMSAA, m_VTFeedbackBuffer);//FIXME: Refactor hdCamera.ResolveVT(cmd, m_GbufferManager.GetVTFeedbackBuffer(), m_VTFeedbackBuffer, m_Asset); Experimental.VirtualTexturing.UpdateSystem(); #endif @@ -3789,14 +3784,7 @@ RTHandleSystem.RTHandle GetVTFeedbackBufferForForward() { if (m_Asset.currentPlatformRenderPipelineSettings.supportMSAA || m_Asset.currentPlatformRenderPipelineSettings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) { - if (m_Asset.currentPlatformRenderPipelineSettings.supportMSAA) - { - return m_VTFeedbackBufferMSAA; - } - else - { - return m_VTFeedbackBuffer; - } + return m_VTFeedbackBuffer; } else { diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute index 419ebb05335..703a52aba3e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute @@ -1,5 +1,6 @@ // Each #kernel tells which function to compile; you can have many kernels #pragma kernel KMain +#pragma kernel KMainMSAA #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" @@ -7,6 +8,7 @@ RW_TEXTURE2D(float4, _OutputTexture); TEXTURE2D_X(_InputTexture); +TEXTURE2D_X_MSAA(float4, _InputTextureMSAA); CBUFFER_START(cb0) float4 _Params; @@ -28,3 +30,14 @@ void KMain(uint3 dispatchThreadId : SV_DispatchThreadID) float4 value = LOAD_TEXTURE2D_X(_InputTexture, samplePos * Scale + offset); _OutputTexture[samplePos] = value; } + +[numthreads(TGSize, TGSize, 1)] +void KMainMSAA(uint3 dispatchThreadId : SV_DispatchThreadID) +{ + const uint2 samplePos = dispatchThreadId.xy; + const uint2 startOffset = uint2(startOffsetX, startOffsetY); + const uint2 offset = (startOffset + samplePos) % Scale; + + float4 value = LOAD_TEXTURE2D_X_MSAA(_InputTextureMSAA, samplePos * Scale + offset, 0); + _OutputTexture[samplePos] = value; +} From 185a93674a013943a11deab06ce1c6869fd82d58 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 3 Jul 2019 15:31:44 +0200 Subject: [PATCH 020/143] Post-merge fixes for HDRP (needs more testing, basics seem to work fine) - Compile error - Adjust for new inspector ui architecture - Fix render tirget binding --- .../Editor/Material/GeneralNodes.meta | 8 ---- .../Material/Lit/ShaderGraph/HDLitGUI.cs | 1 + .../Editor/Material/PBR/HDPBRLit.cs | 6 +++ .../UIBlocks/AdvancedOptionsUIBlock.cs | 13 +++++- .../Editor/Material/Unlit/BaseUnlitGUI.cs | 5 +++ .../Material/Unlit/ShaderGraph/HDUnlitGUI.cs | 1 + .../Editor/Material/Unlit/UnlitGUI.cs | 2 +- .../RenderPipeline/HDRenderPipeline.cs | 45 ++++++++++++++----- .../Settings/DefaultSettings.cs.meta | 11 ----- .../Editor/Data/Nodes/Utility/SubGraphNode.cs | 4 +- 10 files changed, 61 insertions(+), 35 deletions(-) delete mode 100644 com.unity.render-pipelines.high-definition/Editor/Material/GeneralNodes.meta delete mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/DefaultSettings.cs.meta diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/GeneralNodes.meta b/com.unity.render-pipelines.high-definition/Editor/Material/GeneralNodes.meta deleted file mode 100644 index d84158fa105..00000000000 --- a/com.unity.render-pipelines.high-definition/Editor/Material/GeneralNodes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 10136a792e4db8743936b8f8e0fe88c7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs index cbf62c850fa..41b6194bdab 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs @@ -21,6 +21,7 @@ class HDLitGUI : HDShaderGUI { new SurfaceOptionUIBlock(MaterialUIBlock.Expandable.Base, features: surfaceOptionFeatures), new ShaderGraphUIBlock(MaterialUIBlock.Expandable.ShaderGraph), + new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.VirtualTexturing), }; public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs index 6b46a56e09d..95528548d1c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs @@ -7,7 +7,13 @@ public class HDPBRLitGUI : ShaderGUI { public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { + EditorGUI.BeginChangeCheck(); materialEditor.PropertiesDefaultGUI(props); + if (EditorGUI.EndChangeCheck()) + { + ShaderGraph.StackUtilities.SetMaterialKeywords(materialEditor.targets); + } + if (materialEditor.EmissionEnabledProperty()) { materialEditor.LightmapEmissionFlagsProperty(MaterialEditor.kMiniTextureFieldLabelIndentLevel, true, true); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs index 24012d9abf4..0d6df6c7214 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs @@ -13,18 +13,24 @@ public enum Features None = 0, Instancing = 1 << 0, SpecularOcclusion = 1 << 1, - All = ~0 + VirtualTexturing = 1 << 2, + All = ~0, + Unlit = Instancing | VirtualTexturing, } public class Styles { public const string header = "Advanced Options"; public static GUIContent enableSpecularOcclusionText = new GUIContent("Specular Occlusion From Bent Normal", "Requires cosine weighted bent normal and cosine weighted ambient occlusion. Specular occlusion for Reflection Probe"); + public static GUIContent enableVirtualTexturingText = new GUIContent("Virtual Texturing", "When enabled, use virtual texturing instead of regular textures."); } protected MaterialProperty enableSpecularOcclusion = null; protected const string kEnableSpecularOcclusion = "_EnableSpecularOcclusion"; + protected MaterialProperty enableVirtualTexturing = null; + protected const string kEnableVirtualTexturing = "_VirtualTexturing"; + Expandable m_ExpandableBit; Features m_Features; @@ -37,6 +43,7 @@ public AdvancedOptionsUIBlock(Expandable expandableBit, Features features = Feat public override void LoadMaterialProperties() { enableSpecularOcclusion = FindProperty(kEnableSpecularOcclusion); + enableVirtualTexturing = FindProperty(kEnableVirtualTexturing); } public override void OnGUI() @@ -54,6 +61,8 @@ void DrawAdvancedOptionsGUI() materialEditor.EnableInstancingField(); if ((m_Features & Features.SpecularOcclusion) != 0) materialEditor.ShaderProperty(enableSpecularOcclusion, Styles.enableSpecularOcclusionText); + if ((m_Features & Features.VirtualTexturing) != 0) + materialEditor.ShaderProperty(enableVirtualTexturing, Styles.enableVirtualTexturingText); } } -} \ No newline at end of file +} diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs index c810ab5b9e4..78d99e7ab9a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs @@ -5,6 +5,7 @@ using UnityEngine.Experimental.Rendering.HDPipeline; using UnityEngine.Rendering; using UnityEditor.ShaderGraph; +using UnityEditor.ShaderGraph; //TODO(ddebaets) remove when StackStatus is in core unity // Include material common properties names using static UnityEngine.Experimental.Rendering.HDPipeline.HDMaterialProperties; @@ -196,6 +197,10 @@ public static void SetupBaseUnlitKeywords(this Material material) material.SetInt("_DistortionBlurBlendOp", (int)UnityEngine.Rendering.BlendOp.Add); break; } + +#if ENABLE_VIRTUALTEXTURES + StackStatus.UpdateMaterial(material); +#endif } CullMode doubleSidedOffMode = (surfaceType == SurfaceType.Transparent) ? material.GetTransparentCullMode() : CullMode.Back; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs index 57365224499..7f031629322 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs @@ -22,6 +22,7 @@ class HDUnlitGUI : HDShaderGUI { new SurfaceOptionUIBlock(MaterialUIBlock.Expandable.Base, features: surfaceOptionFeatures), new ShaderGraphUIBlock(MaterialUIBlock.Expandable.ShaderGraph, ShaderGraphUIBlock.Features.Unlit), + new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.VirtualTexturing), }; public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs index 262569889d2..709dc3068fa 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs @@ -18,7 +18,7 @@ class UnlitGUI : HDShaderGUI new UnlitSurfaceInputsUIBlock(MaterialUIBlock.Expandable.Input), new TransparencyUIBlock(MaterialUIBlock.Expandable.Transparency), new EmissionUIBlock(MaterialUIBlock.Expandable.Emissive), - new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.Instancing), + new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.Unlit), }; public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 3baca72592e..18303744824 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -242,10 +242,16 @@ public int GetMaxScreenSpaceShadows() RenderTexture m_TemporaryTargetForCubemaps; Stack m_ProbeCameraPool = new Stack(); +#if ENABLE_VIRTUALTEXTURES + const int additionalVtRenderTargets = 1; +#else + const int additionalVtRenderTargets = 0; +#endif + RenderTargetIdentifier[] m_MRTTransparentMotionVec; - RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3]; // Specular, diffuse, sss buffer; + RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3+additionalVtRenderTargets]; // Specular, (optional) VT, diffuse, sss buffer; note: vt is alway on slot 1 to keep in sync with unlit. RenderTargetIdentifier[] mMRTSingle = new RenderTargetIdentifier[1]; - RenderTargetIdentifier[] m_MRTWithVTFeedback; + RenderTargetIdentifier[] m_MRTWithVTFeedback = new RenderTargetIdentifier[2]; string m_ForwardPassProfileName; public Material GetBlitMaterial(bool useTexArray) { return useTexArray ? m_BlitTexArray : m_Blit; } @@ -395,9 +401,7 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau // Propagate it to the debug menu m_DebugDisplaySettings.data.msaaSamples = m_MSAASamples; - int additionalVtRenderTargets = 0; #if ENABLE_VIRTUALTEXTURES - additionalVtRenderTargets = 1; Shader.EnableKeyword("VIRTUAL_TEXTURES_ENABLED"); #else Shader.DisableKeyword("VIRTUAL_TEXTURES_ENABLED"); @@ -3009,13 +3013,26 @@ void RenderForwardOpaque(CullingResults cullResults, HDCamera hdCamera, Scriptab { renderTarget = m_MRTWithSSS; renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; // Store the specular color - renderTarget[1] = msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer; - renderTarget[2] = msaa ? GetSSSBufferMSAA() : GetSSSBuffer(); +#if ENABLE_VIRTUALTEXTURES + renderTarget[1] = GetVTFeedbackBufferForForward(hdCamera); + const int offset = 2; +#else + const int offset = 1; +#endif + renderTarget[offset+0] = msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer; + renderTarget[offset+1] = msaa ? GetSSSBufferMSAA() : GetSSSBuffer(); } else { + +#if ENABLE_VIRTUALTEXTURES + renderTarget = m_MRTWithVTFeedback; + renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; + renderTarget[1] = GetVTFeedbackBufferForForward(hdCamera); +#else renderTarget = mMRTSingle; renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; +#endif } RenderForwardRendererList(hdCamera.frameSettings, @@ -3088,7 +3105,13 @@ void RenderForwardTransparent(CullingResults cullResults, HDCamera hdCamera, boo cmd.SetGlobalInt(HDShaderIDs._ColorMaskTransparentVel, renderMotionVecForTransparent ? (int)ColorWriteMask.All : 0); m_MRTTransparentMotionVec[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; - m_MRTTransparentMotionVec[1] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) +#if ENABLE_VIRTUALTEXTURES + m_MRTTransparentMotionVec[1] = GetVTFeedbackBufferForForward(hdCamera); + const int offset = 2; +#else + const int offset = 1; +#endif + m_MRTTransparentMotionVec[offset] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) // It doesn't really matter what gets bound here since the color mask state set will prevent this from ever being written to. However, we still need to bind something // to avoid warnings about unbound render targets. The following rendertarget could really be anything if renderVelocitiesForTransparent, here the normal buffer // as it is guaranteed to exist and to have the same size. @@ -3712,9 +3735,9 @@ void ClearBuffers(HDCamera hdCamera, CommandBuffer cmd) } // If the forward buffer is different from the GBuffer clear it also - if (GetVTFeedbackBufferForForward() != alreadyCleared) + if (GetVTFeedbackBufferForForward(hdCamera) != alreadyCleared) { - HDUtils.SetRenderTarget(cmd, GetVTFeedbackBufferForForward(), ClearFlag.Color, Color.white); + HDUtils.SetRenderTarget(cmd, GetVTFeedbackBufferForForward(hdCamera), ClearFlag.Color, Color.white); } } #endif @@ -3875,9 +3898,9 @@ RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) } // GBuffer vt feedback is handled in GBufferManager - RTHandleSystem.RTHandle GetVTFeedbackBufferForForward() + RTHandleSystem.RTHandle GetVTFeedbackBufferForForward(HDCamera hdCamera) { - if (m_Asset.currentPlatformRenderPipelineSettings.supportMSAA || m_Asset.currentPlatformRenderPipelineSettings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) { return m_VTFeedbackBuffer; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/DefaultSettings.cs.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/DefaultSettings.cs.meta deleted file mode 100644 index e05c0d21808..00000000000 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/DefaultSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d770677777c38da4cbaf858cf85fef60 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs index cd8af76e97d..8ebaddda4d4 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs @@ -522,10 +522,10 @@ public bool RequiresFaceSign(ShaderStageCapability stageCapability) public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) { - if (subGraphData == null) + if (asset == null) return false; - return subGraphData.requirements.requiresPixelCoordinate; + return asset.requirements.requiresPixelCoordinate; } public NeededCoordinateSpace RequiresBitangent(ShaderStageCapability stageCapability) From 502d95789ef3f05ddc42458483bb351bcfecfe48 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 10 Jul 2019 15:28:26 +0200 Subject: [PATCH 021/143] Stack -> Texture Stack - Rename for HDRP --- .../Lit/ShaderGraph/HDLitMasterNode.cs | 2 +- .../Lit/ShaderGraph/HDLitSubShader.cs | 2 +- .../PBR/ShaderGraph/HDPBRSubShader.cs | 2 +- .../Editor/Material/Unlit/BaseUnlitGUI.cs | 3 +- .../Unlit/ShaderGraph/HDUnlitMasterNode.cs | 2 +- .../Unlit/ShaderGraph/HDUnlitSubShader.cs | 2 +- .../Unlit/ShaderGraph/UnlitSubShader.cs | 2 +- .../Runtime/Material/Lit/Lit.shader | 2 +- .../Editor/Data/Graphs/PreviewProperty.cs | 20 ++++---- .../Editor/Data/Graphs/SerializableStack.cs | 30 ++++++------ .../Editor/Data/Graphs/StackShaderProperty.cs | 8 ++-- .../Editor/Data/MasterNodes/PBRMasterNode.cs | 2 +- .../Data/MasterNodes/UnlitMasterNode.cs | 2 +- .../{StackNode.cs => TextureStackNode.cs} | 48 +++++++++---------- ...kNode.cs.meta => TextureStackNode.cs.meta} | 2 +- .../Editor/Data/Nodes/PropertyType.cs | 2 +- .../Editor/ShaderGUI/StackStatus.cs | 8 ++-- .../Editor/Util/StackUtilities.cs | 2 +- 18 files changed, 70 insertions(+), 71 deletions(-) rename com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/{StackNode.cs => TextureStackNode.cs} (91%) rename com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/{StackNode.cs.meta => TextureStackNode.cs.meta} (83%) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs index d4c7e44c586..5fc7ac27a1f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs @@ -92,7 +92,7 @@ class HDLitMasterNode : MasterNode, IMayRequirePosition, IMayRe public const int LightingSlotId = 30; public const int BackLightingSlotId = 31; public const int DepthOffsetSlotId = 32; - public const int VTFeedbackSlotId = AggregateFeedbackNode.MasterNodeFeedbackInputSlotID; + public const int VTFeedbackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; public enum MaterialType { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs index 587362925e2..6f87ffd0b23 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs @@ -1011,7 +1011,7 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List, IMayRequirePosition public const int DistortionSlotId = 10; public const int DistortionBlurSlotId = 11; public const int EmissionSlotId = 12; - public const int FeedBackSlotId = AggregateFeedbackNode.MasterNodeFeedbackInputSlotID; + public const int FeedBackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; // Don't support Multiply public enum AlphaModeLit diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs index 31214500d73..ae7fff18d07 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs @@ -345,7 +345,7 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List(AssetDatabase.GUIDToAssetPath(m_Guid)); + m_TextureStack = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(m_Guid)); m_Guid = null; } - return m_Stack; + return m_TextureStack; } set { - m_Stack = value; + m_TextureStack = value; m_Guid = null; - m_SerializedStack = null; + m_SerializedTextureStack = null; } } public void OnBeforeSerialize() { - m_SerializedStack = EditorJsonUtility.ToJson(new StackHelper { stack = stack }, false); + m_SerializedTextureStack = EditorJsonUtility.ToJson(new TextureStackHelper { stack = textureStack }, false); } public void OnAfterDeserialize() diff --git a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs index 021e2bba760..216115f9881 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs @@ -22,7 +22,7 @@ public StackShaderProperty() public override PropertyType propertyType { - get { return PropertyType.Stack; } + get { return PropertyType.TextureStack; } } public bool modifiable @@ -74,7 +74,7 @@ public override string GetPropertyBlockString() result.Append(referenceName); result.Append("(\""); result.Append(displayName); - result.Append("\", Stack) = {"); + result.Append("\", TextureStack) = {"); result.Append(GetSlotNamesString(" ")); result.Append("}"); return result.ToString(); @@ -108,10 +108,10 @@ public override string GetPropertyAsArgumentString() public override PreviewProperty GetPreviewMaterialProperty() { - return new PreviewProperty(PropertyType.Stack ) + return new PreviewProperty(PropertyType.TextureStack) { name = referenceName, - stackValue = value.stack + textureStackValue = value.textureStack }; } diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs index 6cc52f92dc1..ed2eeb14bc5 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs @@ -35,7 +35,7 @@ class PBRMasterNode : MasterNode, IMayRequirePosition, IMayRequir public const int AlphaSlotId = 7; public const int AlphaThresholdSlotId = 8; public const int PositionSlotId = 9; - public const int VTFeedbackSlotId = AggregateFeedbackNode.MasterNodeFeedbackInputSlotID; + public const int VTFeedbackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; public enum Model { diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs index 5818048e3ca..f13af5cdd17 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs @@ -23,7 +23,7 @@ class UnlitMasterNode : MasterNode, IMayRequirePosition public const int AlphaSlotId = 7; public const int AlphaThresholdSlotId = 8; public const int PositionSlotId = 9; - public const int FeedBackSlotId = AggregateFeedbackNode.MasterNodeFeedbackInputSlotID; + public const int FeedBackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; [SerializeField] SurfaceType m_SurfaceType; diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs similarity index 91% rename from com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs rename to com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 3a41cc42a76..d4c21fd6d7c 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -8,7 +8,7 @@ namespace UnityEditor.ShaderGraph { //[Title("Input", "Texture", "Sample Stack")] - class SampleStackNodeBase : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV + class SampleTextureStackNodeBase : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV { public const int UVInputId = 0; @@ -53,14 +53,14 @@ public NormalMapSpace normalMapSpace } } - public SampleStackNodeBase(int numSlots) + public SampleTextureStackNodeBase(int numSlots) { if (numSlots > 4) { throw new System.Exception("Maximum 4 slots supported"); } this.numSlots = numSlots; - name = "Sample Stack " + numSlots; + name = "Sample Texture Stack " + numSlots; UpdateNodeAfterDeserialization(); } @@ -125,7 +125,7 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GraphContext graphC { // Not all outputs may be connected (well one is or we wouln't get called) so we are carefull to // only generate code for connected outputs - string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_stack"; + string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_texturestack"; bool anyConnected = false; for (int i = 0; i < numSlots; i++) @@ -202,7 +202,7 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener properties.AddShaderProperty(new StackShaderProperty() { - overrideReferenceName = GetVariableNameForSlot(OutputSlotIds[0]) + "_stack", + overrideReferenceName = GetVariableNameForSlot(OutputSlotIds[0]) + "_texturestack", generatePropertyBlock = true, modifiable = false, slotNames = slotNames @@ -237,10 +237,10 @@ public bool RequiresMeshUV(UVChannel channel, ShaderStageCapability stageCapabil } } - [Title("Input", "Texture", "Sample Stack")] - class SampleStackNode : SampleStackNodeBase + [Title("Input", "Texture", "Sample Texture Stack")] + class SampleTextureStackNode : SampleTextureStackNodeBase { - public SampleStackNode() : base(1) + public SampleTextureStackNode() : base(1) { } [EnumControl("Type")] @@ -260,10 +260,10 @@ public TextureType textureType } } - [Title("Input", "Texture", "Sample Stack 2")] - class SampleStackNode2 : SampleStackNodeBase + [Title("Input", "Texture", "Sample Texture Stack 2")] + class SampleTextureStackNode2 : SampleTextureStackNodeBase { - public SampleStackNode2() : base(2) + public SampleTextureStackNode2() : base(2) { } [EnumControl("Type 1")] @@ -299,10 +299,10 @@ public TextureType textureType2 } } - [Title("Input", "Texture", "Sample Stack 3")] - class SampleStackNode3 : SampleStackNodeBase + [Title("Input", "Texture", "Sample Texture Stack 3")] + class SampleTextureStackNode3 : SampleTextureStackNodeBase { - public SampleStackNode3() : base(3) + public SampleTextureStackNode3() : base(3) { } [EnumControl("Type 1")] @@ -354,10 +354,10 @@ public TextureType textureType3 } } - [Title("Input", "Texture", "Sample Stack 4")] - class SampleStackNode4 : SampleStackNodeBase + [Title("Input", "Texture", "Sample Texture Stack 4")] + class SampleTextureStackNode4 : SampleTextureStackNodeBase { - public SampleStackNode4() : base(4) + public SampleTextureStackNode4() : base(4) { } [EnumControl("Type 1")] @@ -409,7 +409,7 @@ public TextureType textureType3 } } - class AggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireRequirePixelCoordinate + class TextureStackAggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireRequirePixelCoordinate { public const int AggregateOutputId = 0; const string AggregateOutputName = "FeedbackAggregateOut"; @@ -420,7 +420,7 @@ class AggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequ public const int MasterNodeFeedbackInputSlotID = 22021982; - public AggregateFeedbackNode() + public TextureStackAggregateFeedbackNode() { name = "Feedback Aggregate"; UpdateNodeAfterDeserialization(); @@ -496,9 +496,9 @@ public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) } // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output - public static AggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode masterNode) + public static TextureStackAggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode masterNode) { - var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); + var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); // Early out if there are no VT nodes in the graph if ( stackNodes.Count <= 0 ) @@ -506,7 +506,7 @@ public static AggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode return null; } - var feedbackNode = new AggregateFeedbackNode(); + var feedbackNode = new TextureStackAggregateFeedbackNode(); masterNode.owner.AddNode(feedbackNode); // Add inputs to feedback node @@ -523,7 +523,7 @@ public static AggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode // Create a new slot on the aggregate that is similar to the uv input slot string name = "FeedIn_" + i; - var newSlot = new Vector4MaterialSlot(AggregateFeedbackNode.AggregateInputFirstId + i, name, name, SlotType.Input, Vector4.zero, ShaderStageCapability.Fragment); + var newSlot = new Vector4MaterialSlot(TextureStackAggregateFeedbackNode.AggregateInputFirstId + i, name, name, SlotType.Input, Vector4.zero, ShaderStageCapability.Fragment); newSlot.owner = feedbackNode; feedbackNode.AddSlot(newSlot); @@ -539,7 +539,7 @@ public static AggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode return null; } - var feedbackOutputSlot = feedbackNode.FindOutputSlot(AggregateFeedbackNode.AggregateOutputId); + var feedbackOutputSlot = feedbackNode.FindOutputSlot(TextureStackAggregateFeedbackNode.AggregateOutputId); if ( feedbackOutputSlot == null ) { Debug.LogWarning("Could not find the VT feedback output slot on the aggregate node."); diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs.meta b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs.meta similarity index 83% rename from com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs.meta rename to com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs.meta index 1854db3c53f..c43a05471d4 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/StackNode.cs.meta +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d1c12fb33f3c7cb4e985e480acb68908 +guid: e2db046575851ad4c806c1fb14f28290 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/com.unity.shadergraph/Editor/Data/Nodes/PropertyType.cs b/com.unity.shadergraph/Editor/Data/Nodes/PropertyType.cs index 84413f46e42..794336b88ee 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/PropertyType.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/PropertyType.cs @@ -17,6 +17,6 @@ enum PropertyType Matrix3, Matrix4, SamplerState, - Stack + TextureStack } } diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs index fafd9afa37e..3e30e61cf1c 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs @@ -8,7 +8,7 @@ namespace UnityEditor.ShaderGraph { //move to core Unity at some point, make sure the hash calculation is identical to GTSBuildInfoGenerator in the meantime - public class StackStatus + public class TextureStackStatus { /// /// Update the keywords on a material to reflect the correct VT state. @@ -20,7 +20,7 @@ public static void UpdateMaterial(Material material, bool forceOff = false) if (material.HasProperty("_VirtualTexturing") == false) return; - bool enable = forceOff ? false : !(material.GetFloat("_VirtualTexturing") == 0.0f || !StackStatus.AllStacksValid(material)); + bool enable = forceOff ? false : !(material.GetFloat("_VirtualTexturing") == 0.0f || !TextureStackStatus.AllStacksValid(material)); if (enable) material.EnableKeyword("VIRTUAL_TEXTURES_BUILT"); @@ -41,7 +41,7 @@ public static void UpdateAllMaterials(bool forceOff = false) var mat = AssetDatabase.LoadAssetAtPath(path); if (mat != null) { - ShaderGraph.StackStatus.UpdateMaterial(mat, forceOff); + ShaderGraph.TextureStackStatus.UpdateMaterial(mat, forceOff); } } EditorUtility.ClearProgressBar(); @@ -57,7 +57,7 @@ public static bool AllStacksValid(Material material) if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.Stack) { string stackPropName = ShaderUtil.GetPropertyName(shader, i); - VTStack vtStack = material.GetStack(stackPropName); + VTStack vtStack = material.GetTextureStack(stackPropName); if (vtStack != null) { diff --git a/com.unity.shadergraph/Editor/Util/StackUtilities.cs b/com.unity.shadergraph/Editor/Util/StackUtilities.cs index 44b3e4fe577..62265d14a87 100644 --- a/com.unity.shadergraph/Editor/Util/StackUtilities.cs +++ b/com.unity.shadergraph/Editor/Util/StackUtilities.cs @@ -24,7 +24,7 @@ public static void SetMaterialKeywords(Material material) { if (material.HasProperty("_VirtualTexturing")) { - if (material.GetFloat("_VirtualTexturing") == 0.0f || !StackStatus.AllStacksValid(material)) + if (material.GetFloat("_VirtualTexturing") == 0.0f || !TextureStackStatus.AllStacksValid(material)) { material.DisableKeyword("VIRTUAL_TEXTURES_BUILT"); } From 30a541175488e9cadab909d19cbfc70f130e0dfb Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Tue, 2 Jul 2019 13:53:26 +0200 Subject: [PATCH 022/143] Version Nico --- .../1601_TerrainLit/New Terrain.asset | Bin 5494916 -> 5494883 bytes .../2301_Shadow_Mask/LightingData.asset | Bin 1610660 -> 1610609 bytes .../LightingData.asset | Bin 1052012 -> 1052008 bytes .../LightingData.asset | Bin 35568 -> 35567 bytes .../New Terrain.asset | Bin 2922580 -> 2922573 bytes .../LightingData.asset | Bin 35568 -> 35567 bytes .../ProjectSettings/AudioManager.asset | 34 +- .../ProjectSettings/ClusterInputManager.asset | 12 +- .../ProjectSettings/DynamicsManager.asset | 58 +- .../ProjectSettings/InputManager.asset | 590 +++++++++--------- .../ProjectSettings/NavMeshAreas.asset | 182 +++--- .../ProjectSettings/NetworkManager.asset | 16 +- .../ProjectSettings/Physics2DSettings.asset | 74 +-- .../ProjectSettings/PresetManager.asset | 54 +- .../ProjectSettings/QualitySettings.asset | 380 +++++------ .../ProjectSettings/TagManager.asset | 86 +-- .../ProjectSettings/TimeManager.asset | 18 +- .../UnityConnectSettings.asset | 68 +- .../Core/CoreResources/GPUCopy.compute | 4 +- .../Runtime/Debug/DebugLightVolumes.compute | 4 +- .../LightLoop/builddispatchindirect.compute | 10 +- .../ScreenSpaceReflections.compute | 18 +- .../RenderPass/DepthPyramid.compute | 4 +- .../Foliage Diffusion Profile.asset | 4 +- .../Mesh/Cylinder.fbx.meta | 8 +- .../Mesh/Disc.FBX.meta | 51 +- .../Mesh/Quad.FBX.meta | 51 +- .../Mesh/Sphere.FBX.meta | 51 +- .../AutodeskInteractive.ShaderGraph.meta | 4 +- ...AutodeskInteractiveMasked.ShaderGraph.meta | 4 +- ...eskInteractiveTransparent.ShaderGraph.meta | 4 +- .../Skin Diffusion Profile.asset | 4 +- .../defaultDiffusionProfile.asset | 4 +- 33 files changed, 927 insertions(+), 870 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1601_TerrainLit/New Terrain.asset b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1601_TerrainLit/New Terrain.asset index edbbd6bedc4c0b80b9e4c980e389b618d286bb87..133a33bdd1e7d02ce1790e15bd48fc254828d5fe 100644 GIT binary patch delta 477 zcmWN=O-Pyn00v;xm45nVIxBz6W^LNmQrm1fXKrh$*?!zkc3E}oGKG*%LBS_qw{{uK zf#A)-4x6y`-a-bEmr@uk=#&H{5mW@-hI=1)q;gGp^rNO+l@yXvQb{+YHmO}w|J3ZZ zu-DRr>d@AOZ)$Ar3l0nZoC^y@1U_nQ8YDk!&)jmjqD8o(3wW^9)V0)Dy3nb{vFs5O zKKxFJJ}0i0#p?)8A%3^uOII3tdPH-5p=$m2x*$%02dVTKQ31rR#Y3d_LN);+EEKSwqy9T=1^zk!li?IxsRRP&$rmc13bvL z`3}3;!$W+R@9{9-=Mna@kNrH#5BMPmc#I$MI0yMLhxiGHd4ePSl%Mf)p5zxi#ZiuN YoToX#GyIZY@oRp=Nq&pM<-3#P|Fj|Q0ssI2 delta 543 zcmWm8Pb`~Z9Ki9sHQKj*ORJ;BOUsNJqccjCvH4fU);Z~Eb9s|lEWOAs4jQjmM8c7q zxDXE7AkVcIvx~I1B@zi)GCfGf#Z9_zllPPFli&M1Po6)Cv_Vg%4U4*@8}tJGiC(A| z>BeKzc}}v5^PDM|p{9&{V5CRCWz|K~|Kyo%>f10^nrL{_eA_5lSNtin@TV-DUS?mj zmR$bK?46~co6dQau#bvq#pk9s-<5}cdMT8{{GDqV<)TfpE^BbUftmbZk3DzOXkcKNV5A%(}-~OO^>OSzh&n z|M7tH%uhoxXV6ZU;?C4JI(X;u7Ob!B8D}wVzg^9kYPa2S z7o&gj_KC7g<`m>_wrty@ZP~Z3Z3l9Jm;;D8ftU-3xq+Amhvvny#D5uejYm zm48|B_HQ@%-TAlMz2N^Hzun41z(RVucc+NY_5;ZR5A~-X-7TUh$HfYSLK7Gg{`2zk z3JbGyiwp6y@$qqSvGZ}Uac^heBl41Q``M`iLK4#-tQGLzZm>?^4@bN1c7g4>+XeHK zrq+q2Y`Y~GBC}maR?L@i`=alH7v(s)92giFdf6D*ryJUe#kb!P6WV@9O!!3^it`pT zZtv?Cb}pI@bmZynbD2b9`KAM1x_!W=HBg(uZi$+Ob0srNc*{Ke#VAv`xzT{^L0QM0NG9Lt*_aEm;;D8ftU-3xq+Amh2eK*9qiv0NpIG9RvmQlz^7h-4xsb^7U&OF<-{*&EEwt%5m{>IWRCV^s+IqPycTt z7T>-{OlbQaG2s_wXii_kxIMdH*trO(9q0iKexN--x3AycDk$Os^*}hn>Dz%$*D(UB z!R6|Il5qEK2fBAQ(5cgb4n5M|eqUsJ`+d>l3XHs4{lw-%oy!m8w*Rsb+y2W&JRuqA KhNuPN;-3L$Qn0cB diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2303_Shadow_Mask_Directional_OcclusionProbes/LightingData.asset b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2303_Shadow_Mask_Directional_OcclusionProbes/LightingData.asset index 31876bace2214e532b6e4a1673300a73fd18227e..45c072a000fb049d14c77f0a01661c4488042e3a 100644 GIT binary patch delta 84 zcmaDe%i+Z=hYc$pHm`ixzVaa>5HoFG`H*?~sqKzySnQ?R8;`MUZ#>4DeYO4VY&IZf d2VxE&<^*CcAm#>Q9w6ogV!rKfXYIu;OHy2+y3*HhB2N;L7kj(nzLE9N@qe=LfAQ1Wu}y_46HGG2G&9UH$2(5m>A9{tw86Rb>DG delta 229 zcmWm6ISRs16op})G0t&_v&MNIPy|M1)sZge)MPyRgX$g1^Og zxf~A1dpyMl`l!8a*1d4Qm@L|bsEmTAhMGSEykVFdq zP8u0xk(1U!-|X1C-1YU94cE-0fFepLqk<}GsKY=5O|;NP2VL~g#{ff&FvbK^%%p41 G&)Xl*hE%lx diff --git a/TestProjects/LWGraphicsTest/Assets/Scenes/049_Lighting_Mixed_Subtractive/LightingData.asset b/TestProjects/LWGraphicsTest/Assets/Scenes/049_Lighting_Mixed_Subtractive/LightingData.asset index b2043e9a7eeca10e8b0e973f01dc4141e593ff52..d8487f1a5f34174f2bb6cfe82b36944d9c501d92 100644 GIT binary patch delta 14 Vcmew`mFfLdrVXhTo6{<~ga9|V2FL&a delta 16 XcmaDqmFdG&rVXhTjJ%suE4qXLK|BW4 diff --git a/TestProjects/ShaderGraph/ProjectSettings/AudioManager.asset b/TestProjects/ShaderGraph/ProjectSettings/AudioManager.asset index 304925ebde5..4f31e74482c 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/AudioManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/AudioManager.asset @@ -1,17 +1,17 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!11 &1 -AudioManager: - m_ObjectHideFlags: 0 - m_Volume: 1 - Rolloff Scale: 1 - Doppler Factor: 1 - Default Speaker Mode: 2 - m_SampleRate: 0 - m_DSPBufferSize: 1024 - m_VirtualVoiceCount: 512 - m_RealVoiceCount: 32 - m_SpatializerPlugin: - m_AmbisonicDecoderPlugin: - m_DisableAudio: 0 - m_VirtualizeEffects: 1 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!11 &1 +AudioManager: + m_ObjectHideFlags: 0 + m_Volume: 1 + Rolloff Scale: 1 + Doppler Factor: 1 + Default Speaker Mode: 2 + m_SampleRate: 0 + m_DSPBufferSize: 1024 + m_VirtualVoiceCount: 512 + m_RealVoiceCount: 32 + m_SpatializerPlugin: + m_AmbisonicDecoderPlugin: + m_DisableAudio: 0 + m_VirtualizeEffects: 1 diff --git a/TestProjects/ShaderGraph/ProjectSettings/ClusterInputManager.asset b/TestProjects/ShaderGraph/ProjectSettings/ClusterInputManager.asset index a84cf4e6fe7..e7886b266a0 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/ClusterInputManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/ClusterInputManager.asset @@ -1,6 +1,6 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!236 &1 -ClusterInputManager: - m_ObjectHideFlags: 0 - m_Inputs: [] +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!236 &1 +ClusterInputManager: + m_ObjectHideFlags: 0 + m_Inputs: [] diff --git a/TestProjects/ShaderGraph/ProjectSettings/DynamicsManager.asset b/TestProjects/ShaderGraph/ProjectSettings/DynamicsManager.asset index d2855a33d74..78992f08c7a 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/DynamicsManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/DynamicsManager.asset @@ -1,29 +1,29 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!55 &1 -PhysicsManager: - m_ObjectHideFlags: 0 - serializedVersion: 7 - m_Gravity: {x: 0, y: -9.81, z: 0} - m_DefaultMaterial: {fileID: 0} - m_BounceThreshold: 2 - m_SleepThreshold: 0.005 - m_DefaultContactOffset: 0.01 - m_DefaultSolverIterations: 6 - m_DefaultSolverVelocityIterations: 1 - m_QueriesHitBackfaces: 0 - m_QueriesHitTriggers: 1 - m_EnableAdaptiveForce: 0 - m_ClothInterCollisionDistance: 0 - m_ClothInterCollisionStiffness: 0 - m_ContactsGeneration: 1 - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - m_AutoSimulation: 1 - m_AutoSyncTransforms: 1 - m_ClothInterCollisionSettingsToggle: 0 - m_ContactPairsMode: 0 - m_BroadphaseType: 0 - m_WorldBounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 250, y: 250, z: 250} - m_WorldSubdivisions: 8 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!55 &1 +PhysicsManager: + m_ObjectHideFlags: 0 + serializedVersion: 7 + m_Gravity: {x: 0, y: -9.81, z: 0} + m_DefaultMaterial: {fileID: 0} + m_BounceThreshold: 2 + m_SleepThreshold: 0.005 + m_DefaultContactOffset: 0.01 + m_DefaultSolverIterations: 6 + m_DefaultSolverVelocityIterations: 1 + m_QueriesHitBackfaces: 0 + m_QueriesHitTriggers: 1 + m_EnableAdaptiveForce: 0 + m_ClothInterCollisionDistance: 0 + m_ClothInterCollisionStiffness: 0 + m_ContactsGeneration: 1 + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_AutoSimulation: 1 + m_AutoSyncTransforms: 1 + m_ClothInterCollisionSettingsToggle: 0 + m_ContactPairsMode: 0 + m_BroadphaseType: 0 + m_WorldBounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 250, y: 250, z: 250} + m_WorldSubdivisions: 8 diff --git a/TestProjects/ShaderGraph/ProjectSettings/InputManager.asset b/TestProjects/ShaderGraph/ProjectSettings/InputManager.asset index 25966468fff..17c8f538e21 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/InputManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/InputManager.asset @@ -1,295 +1,295 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!13 &1 -InputManager: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Axes: - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: left - positiveButton: right - altNegativeButton: a - altPositiveButton: d - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: down - positiveButton: up - altNegativeButton: s - altPositiveButton: w - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left ctrl - altNegativeButton: - altPositiveButton: mouse 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left alt - altNegativeButton: - altPositiveButton: mouse 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left shift - altNegativeButton: - altPositiveButton: mouse 2 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: space - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse X - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse Y - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse ScrollWheel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 2 - joyNum: 0 - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 0 - type: 2 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 1 - type: 2 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 0 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 1 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 2 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 3 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: return - altNegativeButton: - altPositiveButton: joystick button 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: enter - altNegativeButton: - altPositiveButton: space - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Cancel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: escape - altNegativeButton: - altPositiveButton: joystick button 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!13 &1 +InputManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Axes: + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: a + altPositiveButton: d + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: s + altPositiveButton: w + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left ctrl + altNegativeButton: + altPositiveButton: mouse 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left alt + altNegativeButton: + altPositiveButton: mouse 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left shift + altNegativeButton: + altPositiveButton: mouse 2 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse X + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse Y + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse ScrollWheel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 2 + joyNum: 0 + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 1 + type: 2 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 0 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 1 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 2 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 3 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: return + altNegativeButton: + altPositiveButton: joystick button 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: enter + altNegativeButton: + altPositiveButton: space + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Cancel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: escape + altNegativeButton: + altPositiveButton: joystick button 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 diff --git a/TestProjects/ShaderGraph/ProjectSettings/NavMeshAreas.asset b/TestProjects/ShaderGraph/ProjectSettings/NavMeshAreas.asset index c8fa1b5bd1e..3b0b7c3d183 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/NavMeshAreas.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/NavMeshAreas.asset @@ -1,91 +1,91 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!126 &1 -NavMeshProjectSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - areas: - - name: Walkable - cost: 1 - - name: Not Walkable - cost: 1 - - name: Jump - cost: 2 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - m_LastAgentTypeID: -887442657 - m_Settings: - - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.75 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_SettingNames: - - Humanoid +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!126 &1 +NavMeshProjectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + areas: + - name: Walkable + cost: 1 + - name: Not Walkable + cost: 1 + - name: Jump + cost: 2 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + m_LastAgentTypeID: -887442657 + m_Settings: + - serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.75 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_SettingNames: + - Humanoid diff --git a/TestProjects/ShaderGraph/ProjectSettings/NetworkManager.asset b/TestProjects/ShaderGraph/ProjectSettings/NetworkManager.asset index e9cd5781b1a..5dc6a831d9f 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/NetworkManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/NetworkManager.asset @@ -1,8 +1,8 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!149 &1 -NetworkManager: - m_ObjectHideFlags: 0 - m_DebugLevel: 0 - m_Sendrate: 15 - m_AssetToPrefab: {} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!149 &1 +NetworkManager: + m_ObjectHideFlags: 0 + m_DebugLevel: 0 + m_Sendrate: 15 + m_AssetToPrefab: {} diff --git a/TestProjects/ShaderGraph/ProjectSettings/Physics2DSettings.asset b/TestProjects/ShaderGraph/ProjectSettings/Physics2DSettings.asset index 2446c25ee2c..132ee6bc868 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/Physics2DSettings.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/Physics2DSettings.asset @@ -1,37 +1,37 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!19 &1 -Physics2DSettings: - m_ObjectHideFlags: 0 - serializedVersion: 3 - m_Gravity: {x: 0, y: -9.81} - m_DefaultMaterial: {fileID: 0} - m_VelocityIterations: 8 - m_PositionIterations: 3 - m_VelocityThreshold: 1 - m_MaxLinearCorrection: 0.2 - m_MaxAngularCorrection: 8 - m_MaxTranslationSpeed: 100 - m_MaxRotationSpeed: 360 - m_BaumgarteScale: 0.2 - m_BaumgarteTimeOfImpactScale: 0.75 - m_TimeToSleep: 0.5 - m_LinearSleepTolerance: 0.01 - m_AngularSleepTolerance: 2 - m_DefaultContactOffset: 0.01 - m_AutoSimulation: 1 - m_QueriesHitTriggers: 1 - m_QueriesStartInColliders: 1 - m_ChangeStopsCallbacks: 0 - m_CallbacksOnDisable: 1 - m_AutoSyncTransforms: 1 - m_AlwaysShowColliders: 0 - m_ShowColliderSleep: 1 - m_ShowColliderContacts: 0 - m_ShowColliderAABB: 0 - m_ContactArrowScale: 0.2 - m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} - m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} - m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} - m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!19 &1 +Physics2DSettings: + m_ObjectHideFlags: 0 + serializedVersion: 3 + m_Gravity: {x: 0, y: -9.81} + m_DefaultMaterial: {fileID: 0} + m_VelocityIterations: 8 + m_PositionIterations: 3 + m_VelocityThreshold: 1 + m_MaxLinearCorrection: 0.2 + m_MaxAngularCorrection: 8 + m_MaxTranslationSpeed: 100 + m_MaxRotationSpeed: 360 + m_BaumgarteScale: 0.2 + m_BaumgarteTimeOfImpactScale: 0.75 + m_TimeToSleep: 0.5 + m_LinearSleepTolerance: 0.01 + m_AngularSleepTolerance: 2 + m_DefaultContactOffset: 0.01 + m_AutoSimulation: 1 + m_QueriesHitTriggers: 1 + m_QueriesStartInColliders: 1 + m_ChangeStopsCallbacks: 0 + m_CallbacksOnDisable: 1 + m_AutoSyncTransforms: 1 + m_AlwaysShowColliders: 0 + m_ShowColliderSleep: 1 + m_ShowColliderContacts: 0 + m_ShowColliderAABB: 0 + m_ContactArrowScale: 0.2 + m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} + m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} + m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} + m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/TestProjects/ShaderGraph/ProjectSettings/PresetManager.asset b/TestProjects/ShaderGraph/ProjectSettings/PresetManager.asset index b43eac1dd54..820e662d557 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/PresetManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/PresetManager.asset @@ -1,27 +1,27 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1386491679 &1 -PresetManager: - m_ObjectHideFlags: 0 - m_DefaultList: - - type: - m_NativeTypeID: 108 - m_ManagedTypePPtr: {fileID: 0} - m_ManagedTypeFallback: - defaultPresets: - - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, - type: 2} - - type: - m_NativeTypeID: 1020 - m_ManagedTypePPtr: {fileID: 0} - m_ManagedTypeFallback: - defaultPresets: - - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, - type: 2} - - type: - m_NativeTypeID: 1006 - m_ManagedTypePPtr: {fileID: 0} - m_ManagedTypeFallback: - defaultPresets: - - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, - type: 2} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + m_DefaultList: + - type: + m_NativeTypeID: 108 + m_ManagedTypePPtr: {fileID: 0} + m_ManagedTypeFallback: + defaultPresets: + - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, + type: 2} + - type: + m_NativeTypeID: 1020 + m_ManagedTypePPtr: {fileID: 0} + m_ManagedTypeFallback: + defaultPresets: + - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, + type: 2} + - type: + m_NativeTypeID: 1006 + m_ManagedTypePPtr: {fileID: 0} + m_ManagedTypeFallback: + defaultPresets: + - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, + type: 2} diff --git a/TestProjects/ShaderGraph/ProjectSettings/QualitySettings.asset b/TestProjects/ShaderGraph/ProjectSettings/QualitySettings.asset index ddad6fe8b12..b9320b34224 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/QualitySettings.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/QualitySettings.asset @@ -1,190 +1,190 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!47 &1 -QualitySettings: - m_ObjectHideFlags: 0 - serializedVersion: 5 - m_CurrentQuality: 4 - m_QualitySettings: - - serializedVersion: 2 - name: Very Low - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 15 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - blendWeights: 1 - textureQuality: 1 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.3 - maximumLODLevel: 0 - particleRaycastBudget: 4 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Low - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.4 - maximumLODLevel: 0 - particleRaycastBudget: 16 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Medium - pixelLightCount: 1 - shadows: 1 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 1 - lodBias: 0.7 - maximumLODLevel: 0 - particleRaycastBudget: 64 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: High - pixelLightCount: 2 - shadows: 2 - shadowResolution: 1 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 40 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 2 - softParticles: 0 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1 - maximumLODLevel: 0 - particleRaycastBudget: 256 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Very High - pixelLightCount: 3 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 40 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - blendWeights: 4 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 4 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1.5 - maximumLODLevel: 0 - particleRaycastBudget: 1024 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Ultra - pixelLightCount: 4 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 4 - shadowDistance: 150 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - blendWeights: 4 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 4 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 2 - maximumLODLevel: 0 - particleRaycastBudget: 4096 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - m_PerPlatformDefaultQuality: - Android: 2 - Nintendo 3DS: 5 - Nintendo Switch: 5 - PS4: 5 - PSP2: 2 - Standalone: 5 - Tizen: 2 - WebGL: 3 - WiiU: 5 - Windows Store Apps: 5 - XboxOne: 5 - iPhone: 2 - tvOS: 2 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!47 &1 +QualitySettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_CurrentQuality: 4 + m_QualitySettings: + - serializedVersion: 2 + name: Very Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 15 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 1 + textureQuality: 1 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.3 + maximumLODLevel: 0 + particleRaycastBudget: 4 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.4 + maximumLODLevel: 0 + particleRaycastBudget: 16 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Medium + pixelLightCount: 1 + shadows: 1 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 1 + lodBias: 0.7 + maximumLODLevel: 0 + particleRaycastBudget: 64 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: High + pixelLightCount: 2 + shadows: 2 + shadowResolution: 1 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 2 + softParticles: 0 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1 + maximumLODLevel: 0 + particleRaycastBudget: 256 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Very High + pixelLightCount: 3 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 4 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1.5 + maximumLODLevel: 0 + particleRaycastBudget: 1024 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Ultra + pixelLightCount: 4 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 4 + shadowDistance: 150 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 4 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 2 + maximumLODLevel: 0 + particleRaycastBudget: 4096 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + m_PerPlatformDefaultQuality: + Android: 2 + Nintendo 3DS: 5 + Nintendo Switch: 5 + PS4: 5 + PSP2: 2 + Standalone: 5 + Tizen: 2 + WebGL: 3 + WiiU: 5 + Windows Store Apps: 5 + XboxOne: 5 + iPhone: 2 + tvOS: 2 diff --git a/TestProjects/ShaderGraph/ProjectSettings/TagManager.asset b/TestProjects/ShaderGraph/ProjectSettings/TagManager.asset index 5ce97fb0cb9..17cb8036c53 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/TagManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/TagManager.asset @@ -1,43 +1,43 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!78 &1 -TagManager: - serializedVersion: 2 - tags: [] - layers: - - Default - - TransparentFX - - Ignore Raycast - - - - Water - - UI - - - - - - PostProcessing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m_SortingLayers: - - name: Default - uniqueID: 0 - locked: 0 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!78 &1 +TagManager: + serializedVersion: 2 + tags: [] + layers: + - Default + - TransparentFX + - Ignore Raycast + - + - Water + - UI + - + - + - PostProcessing + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + m_SortingLayers: + - name: Default + uniqueID: 0 + locked: 0 diff --git a/TestProjects/ShaderGraph/ProjectSettings/TimeManager.asset b/TestProjects/ShaderGraph/ProjectSettings/TimeManager.asset index 6beec3dff01..035ddcaa934 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/TimeManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/TimeManager.asset @@ -1,9 +1,9 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!5 &1 -TimeManager: - m_ObjectHideFlags: 0 - Fixed Timestep: 0.0167 - Maximum Allowed Timestep: 0.1 - m_TimeScale: 1 - Maximum Particle Timestep: 0.03 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!5 &1 +TimeManager: + m_ObjectHideFlags: 0 + Fixed Timestep: 0.0167 + Maximum Allowed Timestep: 0.1 + m_TimeScale: 1 + Maximum Particle Timestep: 0.03 diff --git a/TestProjects/ShaderGraph/ProjectSettings/UnityConnectSettings.asset b/TestProjects/ShaderGraph/ProjectSettings/UnityConnectSettings.asset index 9b1020b1d93..f327fe1484a 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/UnityConnectSettings.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/UnityConnectSettings.asset @@ -1,34 +1,34 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!310 &1 -UnityConnectSettings: - m_ObjectHideFlags: 0 - m_Enabled: 0 - m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: - m_TestInitMode: 0 - CrashReportingSettings: - m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes - m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate - m_Enabled: 0 - m_CaptureEditorExceptions: 1 - UnityPurchasingSettings: - m_Enabled: 0 - m_TestMode: 0 - UnityAnalyticsSettings: - m_Enabled: 1 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: - UnityAdsSettings: - m_Enabled: 0 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_IosGameId: - m_AndroidGameId: - m_GameIds: {} - m_GameId: - PerformanceReportingSettings: - m_Enabled: 0 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + m_Enabled: 0 + m_TestMode: 0 + m_TestEventUrl: + m_TestConfigUrl: + m_TestInitMode: 0 + CrashReportingSettings: + m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes + m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate + m_Enabled: 0 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 1 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_TestEventUrl: + m_TestConfigUrl: + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute b/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute index eab274bedcc..31fc18e932f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute @@ -1,7 +1,7 @@ #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" CBUFFER_START (UnityCBuffer) uint2 _RectOffset; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute index febb65a0ab7..b9a2dd621e4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute @@ -2,8 +2,8 @@ #pragma kernel LightVolumeColors -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" // Tile size of this compute #define DEBUG_LIGHT_VOLUME_TILE_SIZE 8 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute index 57aacfd90d4..d5e85c210e7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute @@ -2,13 +2,13 @@ #pragma kernel BuildDrawInstancedIndirect BUILDINDIRECT=BuildDrawInstancedIndirect IS_DRAWINSTANCEDINDIRECT=1 #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" #ifdef PLATFORM_LANE_COUNT // We can infer the size of a wave. This is currently not possible on non-consoles, so we have to fallback to a sensible default in those cases. #define NR_THREADS PLATFORM_LANE_COUNT diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute index 23bad0742d1..ff005e6bb30 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute @@ -19,19 +19,19 @@ // Included headers //-------------------------------------------------------------------------------------------------- -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceLighting.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceLighting.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" #ifdef DEBUG_DISPLAY - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Debug.hlsl" - #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" + #include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Debug.hlsl" + #include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" #endif -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl" //-------------------------------------------------------------------------------------------------- // Inputs & outputs @@ -352,7 +352,7 @@ void ScreenSpaceReflectionsReprojection(uint3 dispatchThreadId : SV_DispatchThre // Inverse pre-exposure float prevExposure = GetPreviousExposureMultiplier(); color /= prevExposure + (prevExposure == 0.0); // zero-div guard - + // Disable SSR for negative, infinite and NaN history values. uint3 intCol = asuint(color); bool isPosFin = Max3(intCol.r, intCol.g, intCol.b) < 0x7F800000; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute index 22b26725b25..6d0a23bbeae 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute @@ -1,5 +1,5 @@ -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Foliage Diffusion Profile.asset b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Foliage Diffusion Profile.asset index 1e0cf48c755..9b6e603a98a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Foliage Diffusion Profile.asset +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Foliage Diffusion Profile.asset @@ -12,6 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} m_Name: Foliage Diffusion Profile m_EditorClassIdentifier: + m_Version: 1 + profiles: [] profile: name: Foliage scatteringDistance: {r: 0.7568628, g: 0.7019608, b: 0.24313727, a: 1} @@ -22,5 +24,3 @@ MonoBehaviour: worldScale: 1 ior: 1.4 hash: 1081692787 - m_Version: 1 - profiles: [] diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Cylinder.fbx.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Cylinder.fbx.meta index e7ae66cd8ae..59416a9938b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Cylinder.fbx.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Cylinder.fbx.meta @@ -1,13 +1,13 @@ fileFormatVersion: 2 guid: accb6d90f0d50fe4ca0f68159b4323de ModelImporter: - serializedVersion: 26 + serializedVersion: 27 internalIDToNameTable: [] externalObjects: {} materials: importMaterials: 1 - materialName: 0 - materialSearch: 1 + materialName: 1 + materialSearch: 2 materialLocation: 1 animations: legacyGenerateAnimations: 4 @@ -69,7 +69,6 @@ ModelImporter: normalSmoothingSource: 0 referencedClips: [] importAnimation: 1 - copyAvatar: 0 humanDescription: serializedVersion: 3 human: [] @@ -89,6 +88,7 @@ ModelImporter: lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 humanoidOversampling: 1 + avatarSetup: 0 additionalBone: 0 userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Disc.FBX.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Disc.FBX.meta index 1d31e4f41f7..66881fb78bf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Disc.FBX.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Disc.FBX.meta @@ -1,19 +1,31 @@ fileFormatVersion: 2 guid: aa0197e8182e0924897ca6c14966b2d0 ModelImporter: - serializedVersion: 23 - fileIDToRecycleName: - 100000: //RootNode - 400000: //RootNode - 2100000: No Name - 2300000: //RootNode - 3300000: //RootNode - 4300000: Circle + serializedVersion: 27 + internalIDToNameTable: + - first: + 1: 100000 + second: //RootNode + - first: + 4: 400000 + second: //RootNode + - first: + 21: 2100000 + second: No Name + - first: + 23: 2300000 + second: //RootNode + - first: + 33: 3300000 + second: //RootNode + - first: + 43: 4300000 + second: Circle externalObjects: {} materials: importMaterials: 1 - materialName: 0 - materialSearch: 1 + materialName: 1 + materialSearch: 2 materialLocation: 1 animations: legacyGenerateAnimations: 4 @@ -43,6 +55,8 @@ ModelImporter: globalScale: 1 meshCompression: 0 addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 importVisibility: 1 importBlendShapes: 1 importCameras: 1 @@ -50,27 +64,31 @@ ModelImporter: swapUVChannels: 0 generateSecondaryUV: 0 useFileUnits: 1 - optimizeMeshForGPU: 1 keepQuads: 0 weldVertices: 1 preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 indexFormat: 0 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 secondaryUVPackMargin: 4 useFileScale: 1 - previousCalculatedGlobalScale: 1 - hasPreviousCalculatedGlobalScale: 0 tangentSpace: normalSmoothAngle: 60 normalImportMode: 0 tangentImportMode: 3 normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] importAnimation: 1 - copyAvatar: 0 humanDescription: - serializedVersion: 2 + serializedVersion: 3 human: [] skeleton: [] armTwist: 0.5 @@ -80,14 +98,15 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 + globalScale: 1 rootMotionBoneName: - rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} hasTranslationDoF: 0 hasExtraRoot: 0 skeletonHasParents: 1 lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 humanoidOversampling: 1 + avatarSetup: 0 additionalBone: 0 userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Quad.FBX.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Quad.FBX.meta index a4ad266dd17..39fc5db748d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Quad.FBX.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Quad.FBX.meta @@ -1,19 +1,31 @@ fileFormatVersion: 2 guid: 1d5a8595286f94f4bb54171d49f473c3 ModelImporter: - serializedVersion: 23 - fileIDToRecycleName: - 100000: //RootNode - 400000: //RootNode - 2100000: No Name - 2300000: //RootNode - 3300000: //RootNode - 4300000: Rectangle + serializedVersion: 27 + internalIDToNameTable: + - first: + 1: 100000 + second: //RootNode + - first: + 4: 400000 + second: //RootNode + - first: + 21: 2100000 + second: No Name + - first: + 23: 2300000 + second: //RootNode + - first: + 33: 3300000 + second: //RootNode + - first: + 43: 4300000 + second: Rectangle externalObjects: {} materials: importMaterials: 1 - materialName: 0 - materialSearch: 1 + materialName: 1 + materialSearch: 2 materialLocation: 1 animations: legacyGenerateAnimations: 4 @@ -43,6 +55,8 @@ ModelImporter: globalScale: 1 meshCompression: 0 addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 importVisibility: 1 importBlendShapes: 1 importCameras: 1 @@ -50,27 +64,31 @@ ModelImporter: swapUVChannels: 0 generateSecondaryUV: 0 useFileUnits: 1 - optimizeMeshForGPU: 1 keepQuads: 0 weldVertices: 1 preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 indexFormat: 0 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 secondaryUVPackMargin: 4 useFileScale: 1 - previousCalculatedGlobalScale: 1 - hasPreviousCalculatedGlobalScale: 0 tangentSpace: normalSmoothAngle: 60 normalImportMode: 0 tangentImportMode: 3 normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] importAnimation: 1 - copyAvatar: 0 humanDescription: - serializedVersion: 2 + serializedVersion: 3 human: [] skeleton: [] armTwist: 0.5 @@ -80,14 +98,15 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 + globalScale: 1 rootMotionBoneName: - rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} hasTranslationDoF: 0 hasExtraRoot: 0 skeletonHasParents: 1 lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 humanoidOversampling: 1 + avatarSetup: 0 additionalBone: 0 userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Sphere.FBX.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Sphere.FBX.meta index fb87f7716b2..024976afef9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Sphere.FBX.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Sphere.FBX.meta @@ -1,19 +1,31 @@ fileFormatVersion: 2 guid: 9e0af751bc36ea146940ba245193e28c ModelImporter: - serializedVersion: 23 - fileIDToRecycleName: - 100000: //RootNode - 400000: //RootNode - 2100000: No Name - 2300000: //RootNode - 3300000: //RootNode - 4300000: Sphere + serializedVersion: 27 + internalIDToNameTable: + - first: + 1: 100000 + second: //RootNode + - first: + 4: 400000 + second: //RootNode + - first: + 21: 2100000 + second: No Name + - first: + 23: 2300000 + second: //RootNode + - first: + 33: 3300000 + second: //RootNode + - first: + 43: 4300000 + second: Sphere externalObjects: {} materials: importMaterials: 1 - materialName: 0 - materialSearch: 1 + materialName: 1 + materialSearch: 2 materialLocation: 1 animations: legacyGenerateAnimations: 4 @@ -43,6 +55,8 @@ ModelImporter: globalScale: 1 meshCompression: 0 addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 importVisibility: 1 importBlendShapes: 1 importCameras: 1 @@ -50,27 +64,31 @@ ModelImporter: swapUVChannels: 0 generateSecondaryUV: 0 useFileUnits: 1 - optimizeMeshForGPU: 1 keepQuads: 0 weldVertices: 1 preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 indexFormat: 0 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 secondaryUVPackMargin: 4 useFileScale: 1 - previousCalculatedGlobalScale: 1 - hasPreviousCalculatedGlobalScale: 0 tangentSpace: normalSmoothAngle: 60 normalImportMode: 0 tangentImportMode: 3 normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] importAnimation: 1 - copyAvatar: 0 humanDescription: - serializedVersion: 2 + serializedVersion: 3 human: [] skeleton: [] armTwist: 0.5 @@ -80,14 +98,15 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 + globalScale: 1 rootMotionBoneName: - rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} hasTranslationDoF: 0 hasExtraRoot: 0 skeletonHasParents: 1 lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 humanoidOversampling: 1 + avatarSetup: 0 additionalBone: 0 userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractive.ShaderGraph.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractive.ShaderGraph.meta index a3d5fee3b53..bf1787d41a7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractive.ShaderGraph.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractive.ShaderGraph.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 7252379db4c18b641b517f2c91bb57e1 ScriptedImporter: - fileIDToRecycleName: - 4800000: MainAsset + internalIDToNameTable: [] externalObjects: {} + serializedVersion: 2 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveMasked.ShaderGraph.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveMasked.ShaderGraph.meta index 03b365c7d9b..bfb4c1f3edd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveMasked.ShaderGraph.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveMasked.ShaderGraph.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 29c4adff654862b40a2e9fb2015a42c3 ScriptedImporter: - fileIDToRecycleName: - 4800000: MainAsset + internalIDToNameTable: [] externalObjects: {} + serializedVersion: 2 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveTransparent.ShaderGraph.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveTransparent.ShaderGraph.meta index 0d09c35b9ee..f91b0e7bd30 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveTransparent.ShaderGraph.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveTransparent.ShaderGraph.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: ee2ce0be66f45d9449d71ba9b49c2acd ScriptedImporter: - fileIDToRecycleName: - 4800000: MainAsset + internalIDToNameTable: [] externalObjects: {} + serializedVersion: 2 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Skin Diffusion Profile.asset b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Skin Diffusion Profile.asset index 295a25cebbe..dc5bc11c19e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Skin Diffusion Profile.asset +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Skin Diffusion Profile.asset @@ -12,6 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} m_Name: Skin Diffusion Profile m_EditorClassIdentifier: + m_Version: 1 + profiles: [] profile: name: Skin scatteringDistance: {r: 0.7568628, g: 0.32156864, b: 0.20000002, a: 1} @@ -22,5 +24,3 @@ MonoBehaviour: worldScale: 1 ior: 1.4 hash: 1075477546 - m_Version: 1 - profiles: [] diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/defaultDiffusionProfile.asset b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/defaultDiffusionProfile.asset index 7d075add032..c1dee6ca0a8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/defaultDiffusionProfile.asset +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/defaultDiffusionProfile.asset @@ -12,6 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} m_Name: defaultDiffusionProfile m_EditorClassIdentifier: + m_Version: 1 + profiles: [] profile: name: Diffusion Profile scatteringDistance: {r: 0, g: 1, b: 0, a: 1} @@ -22,5 +24,3 @@ MonoBehaviour: worldScale: 1 ior: 1.4 hash: 1080714638 - m_Version: 1 - profiles: [] From d3596257a8c585607144a9031e991bfc9ee691e0 Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Tue, 2 Jul 2019 14:59:05 +0200 Subject: [PATCH 023/143] Changes made by Nico --- .../Material/LayeredLit/LayeredLitUI.cs | 892 ++++++++++++++++++ .../Material/LayeredLit/LayeredLit.shader | 12 +- .../Material/LayeredLit/LayeredLitData.hlsl | 149 +-- .../Runtime/Material/Lit/Lit.shader | 28 +- .../Material/Lit/LitDataIndividualLayer.hlsl | 32 +- .../Runtime/Material/Lit/LitProperties.hlsl | 44 +- 6 files changed, 1069 insertions(+), 88 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Editor/Material/LayeredLit/LayeredLitUI.cs diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/LayeredLit/LayeredLitUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/LayeredLit/LayeredLitUI.cs new file mode 100644 index 00000000000..a76ac7310e6 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/Material/LayeredLit/LayeredLitUI.cs @@ -0,0 +1,892 @@ +using System; +using UnityEngine; +using System.Linq; +using UnityEditor.Rendering; +using UnityEngine.Rendering; + +namespace UnityEditor.Experimental.Rendering.HDPipeline +{ + class LayeredLitGUI : LitGUI + { + //Be sure to start after last BaseUnlitGUI.Expandable + [Flags] + protected enum LayerExpandable : uint + { + MainLayer = 1 << 11, + Layer1 = 1 << 12, + Layer2 = 1 << 13, + Layer3 = 1 << 14, + LayeringOptionMain = 1 << 15, + ShowLayer1 = 1 << 16, + ShowLayer2 = 1 << 17, + ShowLayer3 = 1 << 18, + MaterialReferences = 1 << 19, + MainInput = 1 << 20, + Layer1Input = 1 << 21, + Layer2Input = 1 << 22, + Layer3Input = 1 << 23, + MainDetail = 1 << 24, + Layer1Detail = 1 << 25, + Layer2Detail = 1 << 26, + Layer3Detail = 1 << 27, + LayeringOption1 = 1 << 28, + LayeringOption2 = 1 << 29, + LayeringOption3 = 1 << 30 + } + + protected override uint defaultExpandedState { get { return (uint)(Expandable.Base | Expandable.Input | Expandable.VertexAnimation | Expandable.Detail | Expandable.Emissive | Expandable.Transparency | Expandable.Other | Expandable.Tesselation) + (uint)(LayerExpandable.MaterialReferences | LayerExpandable.MainInput | LayerExpandable.MainDetail | LayerExpandable.Layer1 | LayerExpandable.Layer2 | LayerExpandable.Layer3); } } + + public enum VertexColorMode + { + None, + Multiply, + Add + } + + private class StylesLayer + { + public readonly Color[] layerColors = + { + Color.white, + Color.red, + Color.green, + Color.blue + }; + + public readonly GUIContent[] layerLabels = + { + new GUIContent("Main layer"), + new GUIContent("Layer 1"), + new GUIContent("Layer 2"), + new GUIContent("Layer 3"), + }; + + public readonly GUIStyle[] layerLabelColors = + { + new GUIStyle(EditorStyles.foldout), + new GUIStyle(EditorStyles.foldout), + new GUIStyle(EditorStyles.foldout), + new GUIStyle(EditorStyles.foldout) + }; + + public readonly GUIContent layerNameHeader = EditorGUIUtility.TrTextContent("Layer name"); + public readonly GUIContent materialToCopyHeader = EditorGUIUtility.TrTextContent("Material to copy"); + + public readonly GUIContent uvHeader = EditorGUIUtility.TrTextContent("UV", "Also copy UV."); + public readonly GUIContent copyButtonIcon = EditorGUIUtility.IconContent("d_UnityEditor.ConsoleWindow", "Copy Material parameters to layer. If UV is disabled, this will not copy UV."); + public readonly GUIContent layersText = EditorGUIUtility.TrTextContent("Surface Inputs"); + public readonly GUIContent emissiveText = EditorGUIUtility.TrTextContent("Emissive"); + public readonly GUIContent layerMapMaskText = EditorGUIUtility.TrTextContent("Layer Mask", "Specifies the Layer Mask for this Material"); + public readonly GUIContent layerInfluenceMapMaskText = EditorGUIUtility.TrTextContent("Layer Influence Mask", "Specifies the Layer Influence Mask for this Material."); + public readonly GUIContent vertexColorModeText = EditorGUIUtility.TrTextContent("Vertex Color Mode", "Specifies the method HDRP uses to color vertices.\nMultiply: Multiplies vertex color with the mask.\nAdditive: Remaps vertex color values between [-1, 1] and adds them to the mask (neutral value is 0.5 vertex color)."); + public readonly GUIContent layerCountText = EditorGUIUtility.TrTextContent("Layer Count", "Controls the number of layers for this Material."); + public readonly GUIContent objectScaleAffectTileText = EditorGUIUtility.TrTextContent("Lock layers 0123 tiling with object Scale", "When enabled, tiling of each layer is affected by the Transform's Scale."); + public readonly GUIContent objectScaleAffectTileText2 = EditorGUIUtility.TrTextContent("Lock layers 123 tiling with object Scale", "When enabled, tiling of each influenced layer (except the main layer) is affected by the Transform's Scale."); + + public readonly GUIContent layerTexWorldScaleText = EditorGUIUtility.TrTextContent("World Scale", "Sets the tiling factor of the Planar/Trilinear mapping."); + public readonly GUIContent UVBlendMaskText = EditorGUIUtility.TrTextContent("BlendMask UV Mapping", "Specifies the UV Mapping mode of the layer."); + + + public readonly GUIContent layeringOptionText = EditorGUIUtility.TrTextContent("Layering Options"); + + public readonly GUIContent useHeightBasedBlendText = EditorGUIUtility.TrTextContent("Use Height Based Blend", "When enabled, HDRP blends the layer with the underlying layer based on the height."); + public readonly GUIContent useMainLayerInfluenceModeText = EditorGUIUtility.TrTextContent("Main Layer Influence", "Switches between regular layers mode and base/layers mode."); + + public readonly GUIContent opacityAsDensityText = EditorGUIUtility.TrTextContent("Use Opacity map as Density map", "When enabled, HDRP uses the opacity map (alpha channel of Base Color) as the Density map."); + public readonly GUIContent inheritBaseNormalText = EditorGUIUtility.TrTextContent("Normal influence", "Controls the strength of the normals inherited from the base layer."); + public readonly GUIContent inheritBaseHeightText = EditorGUIUtility.TrTextContent("Heightmap influence", "Controls the strength of the height map inherited from the base layer."); + public readonly GUIContent inheritBaseColorText = EditorGUIUtility.TrTextContent("BaseColor influence", "Controls the strength of the Base Color inherited from the base layer."); + public readonly GUIContent heightTransition = EditorGUIUtility.TrTextContent("Height Transition", "Sets the size, in world units, of the smooth transition between layers."); + + public readonly GUIContent perPixelDisplacementLayersWarning = EditorGUIUtility.TrTextContent("For pixel displacement to work correctly, all layers with a heightmap must use the same UV mapping."); + + + public readonly GUIContent materialReferencesText = EditorGUIUtility.TrTextContent("Material To Copy"); + + public readonly string materialImporterNotAvailable = "Can't display material layer options because the material is not an asset"; + + public StylesLayer() + { + layerLabelColors[0].normal.textColor = layerColors[0]; + layerLabelColors[1].normal.textColor = layerColors[1]; + layerLabelColors[2].normal.textColor = layerColors[2]; + layerLabelColors[3].normal.textColor = layerColors[3]; + } + } + + static StylesLayer s_Styles = null; + private static StylesLayer styles { get { if (s_Styles == null) s_Styles = new StylesLayer(); return s_Styles; } } + + // Needed for json serialization to work + [Serializable] + internal struct SerializeableGUIDs + { + public string[] GUIDArray; + } + + const int kSyncButtonWidth = 58; + + bool[] m_WithUV; + + public LayeredLitGUI() + { + m_LayerCount = 4; + m_PropertySuffixes[0] = "0"; + m_PropertySuffixes[1] = "1"; + m_PropertySuffixes[2] = "2"; + m_PropertySuffixes[3] = "3"; + + m_WithUV = new bool[]{ true, true, true, true }; + } + + Material[] m_MaterialLayers = new Material[kMaxLayerCount]; + + // Layer options + MaterialProperty layerCount = null; + const string kLayerCount = "_LayerCount"; + MaterialProperty layerMaskMap = null; + const string kLayerMaskMap = "_LayerMaskMap"; + MaterialProperty layerInfluenceMaskMap = null; + const string kLayerInfluenceMaskMap = "_LayerInfluenceMaskMap"; + MaterialProperty vertexColorMode = null; + const string kVertexColorMode = "_VertexColorMode"; + MaterialProperty objectScaleAffectTile = null; + const string kObjectScaleAffectTile = "_ObjectScaleAffectTile"; + MaterialProperty UVBlendMask = null; + const string kUVBlendMask = "_UVBlendMask"; + MaterialProperty UVMappingMaskBlendMask = null; + const string kUVMappingMaskBlendMask = "_UVMappingMaskBlendMask"; + MaterialProperty texWorldScaleBlendMask = null; + const string kTexWorldScaleBlendMask = "_TexWorldScaleBlendMask"; + MaterialProperty useMainLayerInfluence = null; + const string kkUseMainLayerInfluence = "_UseMainLayerInfluence"; + MaterialProperty useHeightBasedBlend = null; + const string kUseHeightBasedBlend = "_UseHeightBasedBlend"; + + // Density/opacity mode + MaterialProperty[] opacityAsDensity = new MaterialProperty[kMaxLayerCount]; + const string kOpacityAsDensity = "_OpacityAsDensity"; + + // Influence + MaterialProperty[] inheritBaseNormal = new MaterialProperty[kMaxLayerCount - 1]; + const string kInheritBaseNormal = "_InheritBaseNormal"; + MaterialProperty[] inheritBaseHeight = new MaterialProperty[kMaxLayerCount - 1]; + const string kInheritBaseHeight = "_InheritBaseHeight"; + MaterialProperty[] inheritBaseColor = new MaterialProperty[kMaxLayerCount - 1]; + const string kInheritBaseColor = "_InheritBaseColor"; + + // Height blend + MaterialProperty heightTransition = null; + const string kHeightTransition = "_HeightTransition"; + + bool m_UseHeightBasedBlend; + + protected override void FindMaterialProperties(MaterialProperty[] props) + { + base.FindMaterialLayerProperties(props); + base.FindMaterialEmissiveProperties(props); + + layerCount = FindProperty(kLayerCount, props); + layerMaskMap = FindProperty(kLayerMaskMap, props); + layerInfluenceMaskMap = FindProperty(kLayerInfluenceMaskMap, props); + vertexColorMode = FindProperty(kVertexColorMode, props); + objectScaleAffectTile = FindProperty(kObjectScaleAffectTile, props); + UVBlendMask = FindProperty(kUVBlendMask, props); + UVMappingMaskBlendMask = FindProperty(kUVMappingMaskBlendMask, props); + texWorldScaleBlendMask = FindProperty(kTexWorldScaleBlendMask, props); + + useMainLayerInfluence = FindProperty(kkUseMainLayerInfluence, props); + useHeightBasedBlend = FindProperty(kUseHeightBasedBlend, props); + heightTransition = FindProperty(kHeightTransition, props); + + for (int i = 0; i < kMaxLayerCount; ++i) + { + // Density/opacity mode + opacityAsDensity[i] = FindProperty(string.Format("{0}{1}", kOpacityAsDensity, i), props); + + if (i != 0) + { + // Influence + inheritBaseNormal[i - 1] = FindProperty(string.Format("{0}{1}", kInheritBaseNormal, i), props); + inheritBaseHeight[i - 1] = FindProperty(string.Format("{0}{1}", kInheritBaseHeight, i), props); + inheritBaseColor[i - 1] = FindProperty(string.Format("{0}{1}", kInheritBaseColor, i), props); + } + } + + UpdateEditorExpended((int)layerCount.floatValue); + } + + void UpdateEditorExpended(int layerNumber) + { + if (layerNumber == 4) + { + SetExpandedAreas((uint)LayerExpandable.ShowLayer3, true); + } + if (layerNumber >= 3) + { + SetExpandedAreas((uint)LayerExpandable.ShowLayer2, true); + } + SetExpandedAreas((uint)LayerExpandable.ShowLayer1, true); + } + + int numLayer + { + get { return (int)layerCount.floatValue; } + set + { + layerCount.floatValue = (float)value; + UpdateEditorExpended(value); + } + } + + // This function is call by a script to help artists to ahve up to date material + // that why it is static + public static void SynchronizeAllLayers(Material material) + { + int layerCount = (int)material.GetFloat(kLayerCount); + AssetImporter materialImporter = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(material.GetInstanceID())); + + Material[] layers = null; + + // Material importer can be null when the selected material doesn't exists as asset (Material saved inside the scene) + if (materialImporter != null) + InitializeMaterialLayers(materialImporter, ref layers); + + // We could have no userData in the assets, so test if we have load something + if (layers != null) + { + for (int i = 0; i < layerCount; ++i) + { + SynchronizeLayerProperties(material, layers, i, true); + } + } + } + + void SynchronizeAllLayersProperties(bool excludeUVMappingProperties) + { + for (int i = 0; i < numLayer; ++i) + { + SynchronizeLayerProperties(m_MaterialEditor.target as Material, m_MaterialLayers, i, excludeUVMappingProperties); + } + } + + // This function will look for all referenced lit material, and assign value from Lit to layered lit layers. + // This is based on the naming of the variables, i.E BaseColor will match BaseColor0, if a properties shouldn't be override + // put the name in the exclusionList below + static void SynchronizeLayerProperties(Material material, Material[] layers, int layerIndex, bool excludeUVMappingProperties) + { + Material layerMaterial = layers[layerIndex]; + string[] exclusionList = { kTexWorldScale, kUVBase, kUVMappingMask, kUVDetail, kUVDetailsMappingMask }; + + if (layerMaterial != null) + { + Shader layerShader = layerMaterial.shader; + int propertyCount = ShaderUtil.GetPropertyCount(layerShader); + for (int i = 0; i < propertyCount; ++i) + { + string propertyName = ShaderUtil.GetPropertyName(layerShader, i); + string layerPropertyName = propertyName + layerIndex; + + if (!exclusionList.Contains(propertyName) || !excludeUVMappingProperties) + { + if (material.HasProperty(layerPropertyName)) + { + ShaderUtil.ShaderPropertyType type = ShaderUtil.GetPropertyType(layerShader, i); + switch (type) + { + case ShaderUtil.ShaderPropertyType.Color: + { + material.SetColor(layerPropertyName, layerMaterial.GetColor(propertyName)); + break; + } + case ShaderUtil.ShaderPropertyType.Float: + case ShaderUtil.ShaderPropertyType.Range: + { + material.SetFloat(layerPropertyName, layerMaterial.GetFloat(propertyName)); + break; + } + case ShaderUtil.ShaderPropertyType.Vector: + { + material.SetVector(layerPropertyName, layerMaterial.GetVector(propertyName)); + break; + } + case ShaderUtil.ShaderPropertyType.TexEnv: + { + material.SetTexture(layerPropertyName, layerMaterial.GetTexture(propertyName)); + if (!excludeUVMappingProperties) + { + material.SetTextureOffset(layerPropertyName, layerMaterial.GetTextureOffset(propertyName)); + material.SetTextureScale(layerPropertyName, layerMaterial.GetTextureScale(propertyName)); + } + break; + } + } + } + } + } + } + } + + // We use the user data to save a string that represent the referenced lit material + // so we can keep reference during serialization + static void InitializeMaterialLayers(AssetImporter materialImporter, ref Material[] layers) + { + if (materialImporter.userData != string.Empty) + { + SerializeableGUIDs layersGUID = JsonUtility.FromJson(materialImporter.userData); + if (layersGUID.GUIDArray.Length > 0) + { + layers = new Material[layersGUID.GUIDArray.Length]; + for (int i = 0; i < layersGUID.GUIDArray.Length; ++i) + { + layers[i] = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(layersGUID.GUIDArray[i]), typeof(Material)) as Material; + } + } + } + } + + void SaveMaterialLayers(AssetImporter materialImporter) + { + SerializeableGUIDs layersGUID; + layersGUID.GUIDArray = new string[m_MaterialLayers.Length]; + for (int i = 0; i < m_MaterialLayers.Length; ++i) + { + if (m_MaterialLayers[i] != null) + layersGUID.GUIDArray[i] = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_MaterialLayers[i].GetInstanceID())); + } + + materialImporter.userData = JsonUtility.ToJson(layersGUID); + } + + void DrawLayeringOptions(bool mainLayerInfluenceEnable, uint expended, int layerIndex) + { + // do layering option (if main layer (0) check if there is any content before drawing the foldout) + if (layerIndex > 0 || layerIndex == 0 && !useMainLayerInfluence.hasMixedValue && useMainLayerInfluence.floatValue != 0.0f) + { + using (var header = new HeaderScope(styles.layeringOptionText.text, expended, this, colorDot: s_Styles.layerColors[layerIndex], subHeader: true)) + { + if (header.expanded) + { + // Main layer does not have any options but height base blend. + if (layerIndex > 0) + { + m_MaterialEditor.ShaderProperty(opacityAsDensity[layerIndex], styles.opacityAsDensityText); + + if (mainLayerInfluenceEnable) + { + m_MaterialEditor.ShaderProperty(inheritBaseColor[layerIndex - 1], styles.inheritBaseColorText); + m_MaterialEditor.ShaderProperty(inheritBaseNormal[layerIndex - 1], styles.inheritBaseNormalText); + // Main height influence is only available if the shader use the heightmap for displacement (per vertex or per level) + // We always display it as it can be tricky to know when per pixel displacement is enabled or not + m_MaterialEditor.ShaderProperty(inheritBaseHeight[layerIndex - 1], styles.inheritBaseHeightText); + } + } + else + { + m_MaterialEditor.TexturePropertySingleLine(styles.layerInfluenceMapMaskText, layerInfluenceMaskMap); + } + } + } + } + } + + bool DoLayerGUI(AssetImporter materialImporter, int layerIndex) + { + bool result = false; + + Array values = Enum.GetValues(typeof(LayerExpandable)); + if (layerIndex > 1) //main layer (0) and layer 1 always here + { + int startShowVal = Array.IndexOf(values, LayerExpandable.ShowLayer1); + if (!GetExpandedAreas((uint)values.GetValue(startShowVal + layerIndex))) + { + return false; + } + } + + Material material = m_MaterialEditor.target as Material; + + bool mainLayerInfluenceEnable = useMainLayerInfluence.floatValue > 0.0f; + + int startLayer = Array.IndexOf(values, LayerExpandable.MainLayer); + using (var layerHeader = new HeaderScope(s_Styles.layerLabels[layerIndex].text, (uint)values.GetValue(startLayer + layerIndex), this, false, s_Styles.layerColors[layerIndex])) + { + if (layerHeader.expanded) + { + //Note LayeringOptionMain do not preced LayeringOption1 + int startLayeringOptionValue = Array.IndexOf(values, LayerExpandable.LayeringOption1); + var layeringOptionValue = layerIndex == 0 ? LayerExpandable.LayeringOptionMain : (LayerExpandable)values.GetValue(startLayeringOptionValue + layerIndex - 1); + DrawLayeringOptions(mainLayerInfluenceEnable, (uint)layeringOptionValue, layerIndex); + + int startInputValue = Array.IndexOf(values, LayerExpandable.MainInput); + var inputValue = (LayerExpandable)values.GetValue(startInputValue + layerIndex); + int startDetailValue = Array.IndexOf(values, LayerExpandable.MainDetail); + var detailValue = (LayerExpandable)values.GetValue(startDetailValue + layerIndex); + DoLayerGUI(material, layerIndex, true, m_UseHeightBasedBlend, (uint)inputValue, (uint)detailValue, colorDot: s_Styles.layerColors[layerIndex], subHeader: true); + + if (!GetExpandedAreas((uint)detailValue)) + EditorGUILayout.Space(); + } + } + return result; + } + + void DoLayeringInputGUI() + { + using (var header = new HeaderScope(styles.layersText.text, (uint)Expandable.Input, this)) + { + if (header.expanded) + { + EditorGUI.showMixedValue = layerCount.hasMixedValue; + EditorGUI.BeginChangeCheck(); + int newLayerCount = EditorGUILayout.IntSlider(styles.layerCountText, (int)layerCount.floatValue, 2, 4); + if (EditorGUI.EndChangeCheck()) + { + Material material = m_MaterialEditor.target as Material; + Undo.RecordObject(material, "Change layer count"); + numLayer = newLayerCount; + } + + m_MaterialEditor.TexturePropertySingleLine(styles.layerMapMaskText, layerMaskMap); + + EditorGUI.indentLevel++; + m_MaterialEditor.ShaderProperty(UVBlendMask, styles.UVBlendMaskText); + UVBaseMapping uvBlendMask = (UVBaseMapping)UVBlendMask.floatValue; + + float X, Y, Z, W; + X = (uvBlendMask == UVBaseMapping.UV0) ? 1.0f : 0.0f; + Y = (uvBlendMask == UVBaseMapping.UV1) ? 1.0f : 0.0f; + Z = (uvBlendMask == UVBaseMapping.UV2) ? 1.0f : 0.0f; + W = (uvBlendMask == UVBaseMapping.UV3) ? 1.0f : 0.0f; + + UVMappingMaskBlendMask.colorValue = new Color(X, Y, Z, W); + + if (((UVBaseMapping)UVBlendMask.floatValue == UVBaseMapping.Planar) || + ((UVBaseMapping)UVBlendMask.floatValue == UVBaseMapping.Triplanar)) + { + m_MaterialEditor.ShaderProperty(texWorldScaleBlendMask, styles.layerTexWorldScaleText); + } + m_MaterialEditor.TextureScaleOffsetProperty(layerMaskMap); + EditorGUI.indentLevel--; + + m_MaterialEditor.ShaderProperty(vertexColorMode, styles.vertexColorModeText); + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = useMainLayerInfluence.hasMixedValue; + bool mainLayerModeInfluenceEnable = EditorGUILayout.Toggle(styles.useMainLayerInfluenceModeText, useMainLayerInfluence.floatValue > 0.0f); + if (EditorGUI.EndChangeCheck()) + { + useMainLayerInfluence.floatValue = mainLayerModeInfluenceEnable ? 1.0f : 0.0f; + } + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = useHeightBasedBlend.hasMixedValue; + m_UseHeightBasedBlend = EditorGUILayout.Toggle(styles.useHeightBasedBlendText, useHeightBasedBlend.floatValue > 0.0f); + if (EditorGUI.EndChangeCheck()) + { + useHeightBasedBlend.floatValue = m_UseHeightBasedBlend ? 1.0f : 0.0f; + } + + if (m_UseHeightBasedBlend) + { + EditorGUI.indentLevel++; + m_MaterialEditor.ShaderProperty(heightTransition, styles.heightTransition); + EditorGUI.indentLevel--; + } + + m_MaterialEditor.ShaderProperty(objectScaleAffectTile, mainLayerModeInfluenceEnable ? styles.objectScaleAffectTileText2 : styles.objectScaleAffectTileText); + } + } + } + + bool DoMaterialReferencesGUI(AssetImporter materialImporter) + { + bool layersChanged = false; + + using (var header = new HeaderScope(styles.materialReferencesText.text, (uint)LayerExpandable.MaterialReferences, this)) + { + if (header.expanded) + { + var width = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = 90; + + Material material = m_MaterialEditor.target as Material; + + Color originalContentColor = GUI.contentColor; + + float indentOffset = EditorGUI.indentLevel * 15f; + float colorWidth = 14; + float UVWidth = 30; + float copyButtonWidth = EditorGUIUtility.singleLineHeight; + float endOffset = 5f; + + Rect headerLineRect = GUILayoutUtility.GetRect(1, EditorGUIUtility.singleLineHeight); + Rect headerLabelRect = new Rect(headerLineRect.x, headerLineRect.y, EditorGUIUtility.labelWidth - indentOffset, headerLineRect.height); + Rect headerUVRect = new Rect(headerLineRect.x + headerLineRect.width - 48 - endOffset, headerLineRect.y, UVWidth + 5, headerLineRect.height); + Rect headerMaterialDropRect = new Rect(headerLineRect.x + headerLabelRect.width, headerLineRect.y, headerLineRect.width - headerLabelRect.width - headerUVRect.width, headerLineRect.height); + + EditorGUI.LabelField(headerLabelRect, styles.layerNameHeader, EditorStyles.centeredGreyMiniLabel); + EditorGUI.LabelField(headerMaterialDropRect, styles.materialToCopyHeader, EditorStyles.centeredGreyMiniLabel); + EditorGUI.LabelField(headerUVRect, styles.uvHeader, EditorStyles.centeredGreyMiniLabel); + + for (int layerIndex = 0; layerIndex < numLayer; ++layerIndex) + { + using (new EditorGUILayout.HorizontalScope()) + { + EditorGUI.BeginChangeCheck(); + + Rect lineRect = GUILayoutUtility.GetRect(1, EditorGUIUtility.singleLineHeight); + Rect colorRect = new Rect(lineRect.x, lineRect.y, colorWidth, lineRect.height); + Rect materialRect = new Rect(lineRect.x + colorRect.width, lineRect.y, lineRect.width - UVWidth - colorWidth - copyButtonWidth + endOffset, lineRect.height); + Rect uvRect = new Rect(lineRect.x + lineRect.width - copyButtonWidth - UVWidth - endOffset, lineRect.y, UVWidth, lineRect.height); + Rect copyRect = new Rect(lineRect.x + lineRect.width - copyButtonWidth - endOffset, lineRect.y, copyButtonWidth, lineRect.height); + + m_MaterialLayers[layerIndex] = EditorGUI.ObjectField(materialRect, styles.layerLabels[layerIndex], m_MaterialLayers[layerIndex], typeof(Material), true) as Material; + if (EditorGUI.EndChangeCheck()) + { + Undo.RecordObject(materialImporter, "Change layer material"); + SynchronizeLayerProperties(material, m_MaterialLayers, layerIndex, true); + layersChanged = true; + } + + + colorRect.width = 30f; + GUI.contentColor = styles.layerColors[layerIndex]; + EditorGUI.LabelField(colorRect, "■"); + GUI.contentColor = originalContentColor; + + m_WithUV[layerIndex] = EditorGUI.Toggle(uvRect, m_WithUV[layerIndex]); + + if (GUI.Button(copyRect, GUIContent.none)) + { + SynchronizeLayerProperties(material, m_MaterialLayers, layerIndex, !m_WithUV[layerIndex]); + layersChanged = true; + } + + //fake the icon with two Console icon + //Rect copyRect = GUILayoutUtility.GetLastRect(); + copyRect.x -= 16; + copyRect.width = 40; + EditorGUI.LabelField(copyRect, styles.copyButtonIcon); + copyRect.x -= 3; + copyRect.y += 3; + EditorGUI.LabelField(copyRect, styles.copyButtonIcon); + } + } + + EditorGUIUtility.labelWidth = width; + } + } + + return layersChanged; + } + + bool DoLayersGUI(AssetImporter materialImporter) + { + if (materialImporter == null) + { + EditorGUILayout.HelpBox(styles.materialImporterNotAvailable, MessageType.Warning); + return false; + } + + bool layerChanged = false; + + GUI.changed = false; + + DoLayeringInputGUI(); + + layerChanged |= DoMaterialReferencesGUI(materialImporter); + + for (int i = 0; i < numLayer; i++) + { + layerChanged |= DoLayerGUI(materialImporter, i); + } + + layerChanged |= GUI.changed; + GUI.changed = false; + + return layerChanged; + } + + protected override bool ShouldEmissionBeEnabled(Material material) + { + return (material.GetColor(kEmissiveColor) != Color.black) || material.GetTexture(kEmissiveColorMap); + } + + protected override void SetupMaterialKeywordsAndPassInternal(Material material) + { + SetupMaterialKeywordsAndPass(material); + } + + static public void SetupLayersMappingKeywords(Material material) + { + // object scale affect tile + CoreUtils.SetKeyword(material, "_LAYER_TILING_COUPLED_WITH_UNIFORM_OBJECT_SCALE", material.GetFloat(kObjectScaleAffectTile) > 0.0f); + + // Blend mask + UVBaseMapping UVBlendMaskMapping = (UVBaseMapping)material.GetFloat(kUVBlendMask); + CoreUtils.SetKeyword(material, "_LAYER_MAPPING_PLANAR_BLENDMASK", UVBlendMaskMapping == UVBaseMapping.Planar); + CoreUtils.SetKeyword(material, "_LAYER_MAPPING_TRIPLANAR_BLENDMASK", UVBlendMaskMapping == UVBaseMapping.Triplanar); + + int numLayer = (int)material.GetFloat(kLayerCount); + + // Layer + if (numLayer == 4) + { + CoreUtils.SetKeyword(material, "_LAYEREDLIT_4_LAYERS", true); + CoreUtils.SetKeyword(material, "_LAYEREDLIT_3_LAYERS", false); + } + else if (numLayer == 3) + { + CoreUtils.SetKeyword(material, "_LAYEREDLIT_4_LAYERS", false); + CoreUtils.SetKeyword(material, "_LAYEREDLIT_3_LAYERS", true); + } + else + { + CoreUtils.SetKeyword(material, "_LAYEREDLIT_4_LAYERS", false); + CoreUtils.SetKeyword(material, "_LAYEREDLIT_3_LAYERS", false); + } + + const string kLayerMappingPlanar = "_LAYER_MAPPING_PLANAR"; + const string kLayerMappingTriplanar = "_LAYER_MAPPING_TRIPLANAR"; + + // We have to check for each layer if the UV2 or UV3 is needed. + bool needUV3 = false; + bool needUV2 = false; + + for (int i = 0; i < numLayer; ++i) + { + string layerUVBaseParam = string.Format("{0}{1}", kUVBase, i); + UVBaseMapping layerUVBaseMapping = (UVBaseMapping)material.GetFloat(layerUVBaseParam); + string currentLayerMappingPlanar = string.Format("{0}{1}", kLayerMappingPlanar, i); + CoreUtils.SetKeyword(material, currentLayerMappingPlanar, layerUVBaseMapping == UVBaseMapping.Planar); + string currentLayerMappingTriplanar = string.Format("{0}{1}", kLayerMappingTriplanar, i); + CoreUtils.SetKeyword(material, currentLayerMappingTriplanar, layerUVBaseMapping == UVBaseMapping.Triplanar); + + string uvBase = string.Format("{0}{1}", kUVBase, i); + string uvDetail = string.Format("{0}{1}", kUVDetail, i); + + if (((UVDetailMapping)material.GetFloat(uvDetail) == UVDetailMapping.UV2) || ((UVBaseMapping)material.GetFloat(uvBase) == UVBaseMapping.UV2)) + { + needUV2 = true; + } + + if (((UVDetailMapping)material.GetFloat(uvDetail) == UVDetailMapping.UV3) || ((UVBaseMapping)material.GetFloat(uvBase) == UVBaseMapping.UV3)) + { + needUV3 = true; + break; // If we find it UV3 let's early out + } + } + + if (needUV3) + { + material.DisableKeyword("_REQUIRE_UV2"); + material.EnableKeyword("_REQUIRE_UV3"); + } + else if (needUV2) + { + material.EnableKeyword("_REQUIRE_UV2"); + material.DisableKeyword("_REQUIRE_UV3"); + } + else + { + material.DisableKeyword("_REQUIRE_UV2"); + material.DisableKeyword("_REQUIRE_UV3"); + } + } + + // All Setup Keyword functions must be static. It allow to create script to automatically update the shaders with a script if code change + static new public void SetupMaterialKeywordsAndPass(Material material) + { + SetupBaseLitKeywords(material); + SetupBaseLitMaterialPass(material); + SetupLayersMappingKeywords(material); + + for (int i = 0; i < kMaxLayerCount; ++i) + { + NormalMapSpace normalMapSpace = ((NormalMapSpace)material.GetFloat(kNormalMapSpace + i)); + + CoreUtils.SetKeyword(material, "_NORMALMAP_TANGENT_SPACE" + i, normalMapSpace == NormalMapSpace.TangentSpace); + + if (normalMapSpace == NormalMapSpace.TangentSpace) + { + CoreUtils.SetKeyword(material, "_NORMALMAP" + i, material.GetTexture(kNormalMap + i) || material.GetTexture(kDetailMap + i)); + CoreUtils.SetKeyword(material, "_BENTNORMALMAP" + i, material.GetTexture(kBentNormalMap + i)); + } + else + { + CoreUtils.SetKeyword(material, "_NORMALMAP" + i, material.GetTexture(kNormalMapOS + i) || material.GetTexture(kDetailMap + i)); + CoreUtils.SetKeyword(material, "_BENTNORMALMAP" + i, material.GetTexture(kBentNormalMapOS + i)); + } + + CoreUtils.SetKeyword(material, "_MASKMAP" + i, material.GetTexture(kMaskMap + i)); + + CoreUtils.SetKeyword(material, "_DETAIL_MAP" + i, material.GetTexture(kDetailMap + i)); + + CoreUtils.SetKeyword(material, "_HEIGHTMAP" + i, material.GetTexture(kHeightMap + i)); + + CoreUtils.SetKeyword(material, "_SUBSURFACE_MASK_MAP" + i, material.GetTexture(kSubsurfaceMaskMap + i)); + CoreUtils.SetKeyword(material, "_THICKNESSMAP" + i, material.GetTexture(kThicknessMap + i)); + } + + CoreUtils.SetKeyword(material, "_INFLUENCEMASK_MAP", material.GetTexture(kLayerInfluenceMaskMap) && material.GetFloat(kkUseMainLayerInfluence) != 0.0f); + + CoreUtils.SetKeyword(material, "_EMISSIVE_MAPPING_PLANAR", ((UVBaseMapping)material.GetFloat(kUVEmissive)) == UVBaseMapping.Planar && material.GetTexture(kEmissiveColorMap)); + CoreUtils.SetKeyword(material, "_EMISSIVE_MAPPING_TRIPLANAR", ((UVBaseMapping)material.GetFloat(kUVEmissive)) == UVBaseMapping.Triplanar && material.GetTexture(kEmissiveColorMap)); + CoreUtils.SetKeyword(material, "_EMISSIVE_COLOR_MAP", material.GetTexture(kEmissiveColorMap)); + CoreUtils.SetKeyword(material, "_ENABLESPECULAROCCLUSION", material.GetFloat(kEnableSpecularOcclusion) > 0.0f); + + CoreUtils.SetKeyword(material, "_MAIN_LAYER_INFLUENCE_MODE", material.GetFloat(kkUseMainLayerInfluence) != 0.0f); + + VertexColorMode VCMode = (VertexColorMode)material.GetFloat(kVertexColorMode); + if (VCMode == VertexColorMode.Multiply) + { + CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_MUL", true); + CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_ADD", false); + } + else if (VCMode == VertexColorMode.Add) + { + CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_MUL", false); + CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_ADD", true); + } + else + { + CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_MUL", false); + CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_ADD", false); + } + + bool useHeightBasedBlend = material.GetFloat(kUseHeightBasedBlend) != 0.0f; + CoreUtils.SetKeyword(material, "_HEIGHT_BASED_BLEND", useHeightBasedBlend); + + bool useDensityModeEnable = false; + for (int i = 0; i < material.GetInt(kLayerCount); ++i) + { + useDensityModeEnable |= material.GetFloat(kOpacityAsDensity + i) != 0.0f; + } + CoreUtils.SetKeyword(material, "_DENSITY_MODE", useDensityModeEnable); + + MaterialId materialId = (MaterialId)material.GetFloat(kMaterialID); + CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_SUBSURFACE_SCATTERING", materialId == MaterialId.LitSSS); + CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_TRANSMISSION", materialId == MaterialId.LitTranslucent || (materialId == MaterialId.LitSSS && material.GetFloat(kTransmissionEnable) > 0.0f)); + } + + public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) + { + FindBaseMaterialProperties(props); + FindMaterialProperties(props); + + m_MaterialEditor = materialEditor; + + // We should always register the key used to keep collapsable state + InitExpandableState(materialEditor); + + // We should always do this call at the beginning + m_MaterialEditor.serializedObject.Update(); + + Material material = m_MaterialEditor.target as Material; + AssetImporter materialImporter = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(material.GetInstanceID())); + + // Material importer can be null when the selected material doesn't exists as asset (Material saved inside the scene) + if (materialImporter != null) + InitializeMaterialLayers(materialImporter, ref m_MaterialLayers); + + bool optionsChanged = false; + EditorGUI.BeginChangeCheck(); + { + using (var header = new HeaderScope(StylesBaseUnlit.optionText, (uint)Expandable.Base, this)) + { + if (header.expanded) + BaseMaterialPropertiesGUI(); + } + MaterialTesselationPropertiesGUI(); + VertexAnimationPropertiesGUI(); + } + if (EditorGUI.EndChangeCheck()) + { + optionsChanged = true; + } + + // In case of pixel displacement and layered shader, all layers must used the same texture mapping for layer that have a heightmap + // (Else the algorithm will not work correctly) + if ((DisplacementMode)displacementMode.floatValue == DisplacementMode.Pixel) + { + float compareValue = -1.0f; + bool match = true; + + if (material.GetTexture(kHeightMap + 0)) + { + compareValue = UVBase[0].floatValue; + } + if (material.GetTexture(kHeightMap + 1)) + { + if (compareValue == -1.0f) + compareValue = UVBase[1].floatValue; + else if (compareValue != UVBase[1].floatValue) + match = false; + } + if (material.GetTexture(kHeightMap + 2)) + { + if (compareValue == -1.0f) + compareValue = UVBase[2].floatValue; + else if (compareValue != UVBase[2].floatValue) + match = false; + } + if (material.GetTexture(kHeightMap + 3)) + { + if (compareValue == -1.0f) + compareValue = UVBase[3].floatValue; + else if (compareValue != UVBase[3].floatValue) + match = false; + } + + if (!match) + { + EditorGUILayout.HelpBox(styles.perPixelDisplacementLayersWarning.text, MessageType.Warning); + } + } + + + bool layerChanged = DoLayersGUI(materialImporter); + EditorGUI.BeginChangeCheck(); + { + DoEmissiveGUI(material); + } + if (EditorGUI.EndChangeCheck()) + { + optionsChanged = true; + } + + using (var header = new HeaderScope(StylesBaseUnlit.advancedText, (uint)Expandable.Advance, this)) + { + if (header.expanded) + { + // NB RenderQueue editor is not shown on purpose: we want to override it based on blend mode + m_MaterialEditor.EnableInstancingField(); + m_MaterialEditor.ShaderProperty(enableSpecularOcclusion, Styles.enableSpecularOcclusionText); + +#if ENABLE_VIRTUALTEXTURES + if (virtualTexturing != null) + { + m_MaterialEditor.ShaderProperty(virtualTexturing, StylesBaseLit.enableVirtualTextureText); + } +#endif + } + } + + if (layerChanged || optionsChanged) + { + foreach (var obj in m_MaterialEditor.targets) + { + SetupMaterialKeywordsAndPassInternal((Material)obj); + } + + // SaveAssetsProcessor the referenced material in the users data + if (materialImporter != null) + SaveMaterialLayers(materialImporter); + } + + // We should always do this call at the end + m_MaterialEditor.serializedObject.ApplyModifiedProperties(); + } + } +} // namespace UnityEditor diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader index 1c572fafed0..7e5456ad364 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader @@ -364,11 +364,17 @@ Shader "HDRP/LayeredLit" [ToggleUI] _SupportDecals("Support Decals", Float) = 1.0 [ToggleUI] _ReceivesSSR("Receives SSR", Float) = 1.0 + + [Toggle] _VirtualTexturing("Virtual Texturing", Float) = 0.0 + _TextureStack0("_TextureStack0", Stack) = { _BaseColorMap0 _MaskMap0 _NormalMap0 } + _TextureStack1("_TextureStack1", Stack) = { _BaseColorMap1 _MaskMap1 _NormalMap1 } + _TextureStack2("_TextureStack2", Stack) = { _BaseColorMap2 _MaskMap2 _NormalMap2 } + _TextureStack3("_TextureStack3", Stack) = { _BaseColorMap3 _MaskMap3 _NormalMap3 } } HLSLINCLUDE - #pragma target 4.5 + #pragma target 5.0 #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch #pragma shader_feature_local _ALPHATEST_ON @@ -638,7 +644,7 @@ Shader "HDRP/LayeredLit" HLSLPROGRAM #pragma multi_compile _ WRITE_NORMAL_BUFFER #pragma multi_compile _ WRITE_MSAA_DEPTH - + #define SHADERPASS SHADERPASS_MOTION_VECTORS #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" #ifdef WRITE_NORMAL_BUFFER // If enabled we need all regular interpolator @@ -753,7 +759,7 @@ Shader "HDRP/LayeredLit" #pragma multi_compile _ SHADOWS_SHADOWMASK // Setup DECALS_OFF so the shader stripper can remove variants #pragma multi_compile DECALS_OFF DECALS_3RT DECALS_4RT - + // Supported shadow modes per light type #pragma multi_compile SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index adf15457492..efbb2aedf50 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -9,74 +9,78 @@ // Number of sampler are limited, we need to share sampler as much as possible with lit material // for this we put the constraint that the sampler are the same in a layered material for all textures of the same type // then we take the sampler matching the first textures use of this type -#if defined(_NORMALMAP0) - #if defined(_NORMALMAP_TANGENT_SPACE0) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap0 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS0 - #endif -#elif defined(_NORMALMAP1) - #if defined(_NORMALMAP_TANGENT_SPACE1) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap1 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS1 - #endif -#elif defined(_NORMALMAP2) - #if defined(_NORMALMAP_TANGENT_SPACE2) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap2 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS2 - #endif -#elif defined(_NORMALMAP3) - #if defined(_NORMALMAP_TANGENT_SPACE3) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap3 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS3 - #endif -#elif defined(_BENTNORMALMAP0) - #if defined(_NORMALMAP_TANGENT_SPACE0) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap0 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS0 - #endif -#elif defined(_BENTNORMALMAP1) - #if defined(_NORMALMAP_TANGENT_SPACE1) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap1 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS1 - #endif -#elif defined(_BENTNORMALMAP2) - #if defined(_NORMALMAP_TANGENT_SPACE2) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap2 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS2 - #endif -#else - #if defined(_NORMALMAP_TANGENT_SPACE3) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap3 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS3 - #endif +#if !VIRTUAL_TEXTURES_ACTIVE + #if defined(_NORMALMAP0) + #if defined(_NORMALMAP_TANGENT_SPACE0) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap0 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS0 + #endif + #elif defined(_NORMALMAP1) + #if defined(_NORMALMAP_TANGENT_SPACE1) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap1 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS1 + #endif + #elif defined(_NORMALMAP2) + #if defined(_NORMALMAP_TANGENT_SPACE2) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap2 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS2 + #endif + #elif defined(_NORMALMAP3) + #if defined(_NORMALMAP_TANGENT_SPACE3) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap3 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS3 + #endif + #elif defined(_BENTNORMALMAP0) + #if defined(_NORMALMAP_TANGENT_SPACE0) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap0 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS0 + #endif + #elif defined(_BENTNORMALMAP1) + #if defined(_NORMALMAP_TANGENT_SPACE1) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap1 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS1 + #endif + #elif defined(_BENTNORMALMAP2) + #if defined(_NORMALMAP_TANGENT_SPACE2) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap2 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS2 + #endif + #else + #if defined(_NORMALMAP_TANGENT_SPACE3) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap3 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS3 + #endif + #endif #endif #if defined(_DETAIL_MAP0) #define SAMPLER_DETAILMAP_IDX sampler_DetailMap0 #elif defined(_DETAIL_MAP1) #define SAMPLER_DETAILMAP_IDX sampler_DetailMap1 -#elif defined(_DETAIL_MAP2) +#elif defined(_DETAIL_MAP2) #define SAMPLER_DETAILMAP_IDX sampler_DetailMap2 #else #define SAMPLER_DETAILMAP_IDX sampler_DetailMap3 #endif -#if defined(_MASKMAP0) -#define SAMPLER_MASKMAP_IDX sampler_MaskMap0 -#elif defined(_MASKMAP1) -#define SAMPLER_MASKMAP_IDX sampler_MaskMap1 -#elif defined(_MASKMAP2) -#define SAMPLER_MASKMAP_IDX sampler_MaskMap2 -#else -#define SAMPLER_MASKMAP_IDX sampler_MaskMap3 +#if !VIRTUAL_TEXTURES_ACTIVE + #if defined(_MASKMAP0) + #define SAMPLER_MASKMAP_IDX sampler_MaskMap0 + #elif defined(_MASKMAP1) + #define SAMPLER_MASKMAP_IDX sampler_MaskMap1 + #elif defined(_MASKMAP2) + #define SAMPLER_MASKMAP_IDX sampler_MaskMap2 + #else + #define SAMPLER_MASKMAP_IDX sampler_MaskMap3 + #endif #endif #if defined(_HEIGHTMAP0) @@ -148,6 +152,12 @@ #undef _MASKMAP_IDX #undef _BENTNORMALMAP_IDX +//#if VIRTUAL_TEXTURES_ACTIVE +//#define VT_WAS_ACTIVE 1 +//#endif +//#undef VIRTUAL_TEXTURES_ACTIVE +//#define VIRTUAL_TEXTURES_ACTIVE 0 + #define LAYER_INDEX 1 #define ADD_IDX(Name) Name##1 #ifdef _NORMALMAP1 @@ -250,6 +260,11 @@ #undef _MASKMAP_IDX #undef _BENTNORMALMAP_IDX +//#if defined(VT_WAS_ACTIVE) && VT_WAS_ACTIVE > 0 +//#undef VIRTUAL_TEXTURES_ACTIVE +//#define VIRTUAL_TEXTURES_ACTIVE 1 +//#endif + float3 BlendLayeredVector3(float3 x0, float3 x1, float3 x2, float3 x3, float weight[4]) { float3 result = float3(0.0, 0.0, 0.0); @@ -628,12 +643,28 @@ float3 ComputeMainBaseColorInfluence(float influenceMask, float3 baseColor0, flo // We want to calculate the mean color of the texture. For this we will sample a low mipmap float textureBias = 15.0; // Use maximum bias - float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; + +#if VIRTUAL_TEXTURES_ACTIVE && 0 + // Prepare the VT stack for sampling + StackInfo stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base0), _TextureStack0); + float3 baseMeanColor0 = SampleStack(stackInfo, _BaseColorMap0).rgb; + + stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base1), _TextureStack1); + float3 baseMeanColor1 = SampleStack(stackInfo, _BaseColorMap1).rgb; + + stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base2), _TextureStack2); + float3 baseMeanColor2 = SampleStack(stackInfo, _BaseColorMap2).rgb; + + stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base3), _TextureStack3); + float3 baseMeanColor3 = SampleStack(stackInfo, _BaseColorMap3).rgb; +#else + float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_BaseColorMap0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb; float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_BaseColorMap0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb; +#endif - float3 meanColor = BlendLayeredVector3(baseMeanColor0, baseMeanColor1, baseMeanColor2, baseMeanColor3, weights); + float3 meanColor = BlendLayeredVector3(baseMeanColor0, baseMeanColor1, baseMeanColor2, baseMeanColor3, weights); // If we inherit from base layer, we will add a bit of it // We add variance of current visible level and the base color 0 or mean (to retrieve initial color) depends on influence diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index 9fa1d73f9b7..527ab7a1baa 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -107,10 +107,10 @@ Shader "HDRP/Lit" _DistortionBlurRemapMin("DistortionBlurRemapMin", Float) = 0.0 _DistortionBlurRemapMax("DistortionBlurRemapMax", Float) = 1.0 - + [ToggleUI] _UseShadowThreshold("_UseShadowThreshold", Float) = 0.0 [ToggleUI] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0 - _AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 + _AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 _AlphaCutoffShadow("_AlphaCutoffShadow", Range(0.0, 1.0)) = 0.5 _AlphaCutoffPrepass("_AlphaCutoffPrepass", Range(0.0, 1.0)) = 0.5 _AlphaCutoffPostpass("_AlphaCutoffPostpass", Range(0.0, 1.0)) = 0.5 @@ -541,7 +541,7 @@ Shader "HDRP/Lit" HLSLPROGRAM #pragma multi_compile _ WRITE_NORMAL_BUFFER #pragma multi_compile _ WRITE_MSAA_DEPTH - + #define SHADERPASS SHADERPASS_MOTION_VECTORS #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" @@ -639,7 +639,7 @@ Shader "HDRP/Lit" #pragma multi_compile _ SHADOWS_SHADOWMASK // Setup DECALS_OFF so the shader stripper can remove variants #pragma multi_compile DECALS_OFF DECALS_3RT DECALS_4RT - + // Supported shadow modes per light type #pragma multi_compile SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH @@ -705,7 +705,7 @@ Shader "HDRP/Lit" #pragma multi_compile _ SHADOWS_SHADOWMASK // Setup DECALS_OFF so the shader stripper can remove variants #pragma multi_compile DECALS_OFF DECALS_3RT DECALS_4RT - + // Supported shadow modes per light type #pragma multi_compile SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH @@ -781,17 +781,17 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma raytracing test + #pragma raytracing test #pragma multi_compile _ DEBUG_DISPLAY #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ DYNAMICLIGHTMAP_ON - + #define SHADERPASS SHADERPASS_RAYTRACING_INDIRECT #define SKIP_RASTERIZED_SHADOWS - // multi compile that allows us to + // multi compile that allows us to #pragma multi_compile _ DIFFUSE_LIGHTING_ONLY // We use the low shadow maps for raytracing @@ -803,9 +803,9 @@ Shader "HDRP/Lit" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl" - + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl" - + #include "Packages/com.unity.render-pipelines.high-definition\Runtime\Lighting\LightLoop\LightLoopDef.hlsl" #define HAS_LIGHTLOOP #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" @@ -824,13 +824,13 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma raytracing test + #pragma raytracing test #pragma multi_compile _ DEBUG_DISPLAY #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ DYNAMICLIGHTMAP_ON - + #define SHADERPASS SHADERPASS_RAYTRACING_FORWARD #define SKIP_RASTERIZED_SHADOWS @@ -843,9 +843,9 @@ Shader "HDRP/Lit" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl" - + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl" - + #include "Packages/com.unity.render-pipelines.high-definition\Runtime\Lighting\LightLoop\LightLoopDef.hlsl" #define HAS_LIGHTLOOP #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 1cbc7e146a2..7368067c4b1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -1,3 +1,11 @@ +#undef VIRTUAL_TEXTURES_ACTIVE_ON_LAYER + +#if (!defined(LAYER_INDEX) || (LAYER_INDEX <= 1)) && (VIRTUAL_TEXTURES_ACTIVE > 0) +#define VIRTUAL_TEXTURES_ACTIVE_ON_LAYER 1 +#else +#define VIRTUAL_TEXTURES_ACTIVE_ON_LAYER 0 +#endif + void ADD_IDX(ComputeLayerTexCoord)( // Uv related parameters float2 texCoord0, float2 texCoord1, float2 texCoord2, float2 texCoord3, float4 uvMappingMask, float4 uvMappingMaskDetails, // scale and bias for base and detail + global tiling factor (for layered lit only) @@ -104,10 +112,10 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float #ifdef _NORMALMAP_IDX #ifdef _NORMALMAP_TANGENT_SPACE_IDX //TODO(ddebaets) VT does not handle full range of normal map sampling/reconstruction so special case here... -#if VIRTUAL_TEXTURES_ACTIVE - normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); +#if VIRTUAL_TEXTURES_ACTIVE_ON_LAYER + normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); #else - normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), SAMPLER_NORMALMAP_IDX, ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); + normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), ADD_IDX(sampler_NormalMap), ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); #endif #else // Object space // We forbid scale in case of object space as it make no sense @@ -183,13 +191,15 @@ float3 ADD_IDX(GetBentNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, f // Return opacity float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out SurfaceData surfaceData, out float3 normalTS, out float3 bentNormalTS) { - // Prepare the VT stack for sampling - StackInfo stackInfo = PrepareStack(UVMappingTo2D(ADD_IDX(layerTexCoord.base)), ADD_IDX(_TextureStack)); - surfaceData.VTFeedback = GetResolveOutput(stackInfo); -#if VIRTUAL_TEXTURES_ACTIVE +#if VIRTUAL_TEXTURES_ACTIVE_ON_LAYER + // Prepare the VT stack for sampling + StackInfo stackInfo = PrepareStack(UVMappingTo2D(ADD_IDX(layerTexCoord.base)), ADD_IDX(_TextureStack)); + surfaceData.VTFeedback = GetResolveOutput(stackInfo); const float4 baseColorValue = SampleStack(stackInfo, ADD_IDX(_BaseColorMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); #else const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); + surfaceData.VTFeedback = float4(1, 1, 1, 1); + StackInfo stackInfo; #endif float alpha = baseColorValue.a * ADD_IDX(_BaseColor).a; @@ -211,10 +221,10 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out #ifdef _MASKMAP_IDX -#if VIRTUAL_TEXTURES_ACTIVE - const float4 maskValue = SampleStack(stackInfo, ADD_IDX(_MaskMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).b; -#else - const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)); +#if VIRTUAL_TEXTURES_ACTIVE_ON_LAYER + const float4 maskValue = SampleStack(stackInfo, ADD_IDX(_MaskMap)); +#else + const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), ADD_IDX(sampler_MaskMap), ADD_IDX(layerTexCoord.base)); #endif #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index c2ab68172e9..c00fb44d7ea 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -80,11 +80,39 @@ SAMPLER(sampler_CoatMaskMap); TEXTURE2D(MERGE_NAME(name, 3)); \ SAMPLER(MERGE_NAME(MERGE_NAME(sampler, name), 3)) +#if VIRTUAL_TEXTURES_ACTIVE +TEXTURE2D(_BaseColorMap0); +TEXTURE2D(_BaseColorMap1); +TEXTURE2D(_BaseColorMap2); +TEXTURE2D(_BaseColorMap3); +SAMPLER(sampler_BaseColorMap0); + +//SAMPLER(sampler_BaseColorMap2); +//SAMPLER(sampler_BaseColorMap3); + +TEXTURE2D(_MaskMap0); +TEXTURE2D(_MaskMap1); +TEXTURE2D(_MaskMap2); +TEXTURE2D(_MaskMap3); + +SAMPLER(sampler_MaskMap2); +SAMPLER(sampler_MaskMap3); + +TEXTURE2D(_NormalMap0); +TEXTURE2D(_NormalMap1); +TEXTURE2D(_NormalMap2); +TEXTURE2D(_NormalMap3); + +SAMPLER(sampler_NormalMap2); +SAMPLER(sampler_NormalMap3); +#else PROP_DECL_TEX2D(_BaseColorMap); PROP_DECL_TEX2D(_MaskMap); -PROP_DECL_TEX2D(_BentNormalMap); PROP_DECL_TEX2D(_NormalMap); +#endif + +PROP_DECL_TEX2D(_BentNormalMap); PROP_DECL_TEX2D(_NormalMapOS); PROP_DECL_TEX2D(_DetailMap); PROP_DECL_TEX2D(_HeightMap); @@ -154,7 +182,14 @@ float _EnableGeometricSpecularAA; float _SpecularAAScreenSpaceVariance; float _SpecularAAThreshold; +#ifndef LAYERED_LIT_SHADER DECLARE_STACK_CB(_TextureStack); +#else +DECLARE_STACK_CB(_TextureStack0); +DECLARE_STACK_CB(_TextureStack1); +DECLARE_STACK_CB(_TextureStack2); +DECLARE_STACK_CB(_TextureStack3); +#endif #ifndef LAYERED_LIT_SHADER @@ -293,4 +328,11 @@ int _PassValue; CBUFFER_END +#ifndef LAYERED_LIT_SHADER DECLARE_STACK3(_TextureStack, _BaseColorMap, _MaskMap, _NormalMap); +#else +DECLARE_STACK3(_TextureStack0, _BaseColorMap0, _MaskMap0, _NormalMap0); +DECLARE_STACK3(_TextureStack1, _BaseColorMap1, _MaskMap1, _NormalMap1); +DECLARE_STACK3(_TextureStack2, _BaseColorMap2, _MaskMap2, _NormalMap2); +DECLARE_STACK3(_TextureStack3, _BaseColorMap3, _MaskMap3, _NormalMap3); +#endif From c29f16b8f677b61d5460f4a3ea3e7eeea14fc8d7 Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Wed, 3 Jul 2019 16:05:57 +0200 Subject: [PATCH 024/143] Get something working for two layers --- .../Material/LayeredLit/LayeredLitData.hlsl | 18 ++++++++++++------ .../Material/Lit/LitDataIndividualLayer.hlsl | 3 ++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index efbb2aedf50..60bf607dc1e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -644,7 +644,7 @@ float3 ComputeMainBaseColorInfluence(float influenceMask, float3 baseColor0, flo // We want to calculate the mean color of the texture. For this we will sample a low mipmap float textureBias = 15.0; // Use maximum bias -#if VIRTUAL_TEXTURES_ACTIVE && 0 +#if VIRTUAL_TEXTURES_ACTIVE // Prepare the VT stack for sampling StackInfo stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base0), _TextureStack0); float3 baseMeanColor0 = SampleStack(stackInfo, _BaseColorMap0).rgb; @@ -652,13 +652,19 @@ float3 ComputeMainBaseColorInfluence(float influenceMask, float3 baseColor0, flo stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base1), _TextureStack1); float3 baseMeanColor1 = SampleStack(stackInfo, _BaseColorMap1).rgb; - stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base2), _TextureStack2); - float3 baseMeanColor2 = SampleStack(stackInfo, _BaseColorMap2).rgb; + //stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base2), _TextureStack2); + //float3 baseMeanColor2 = SampleStack(stackInfo, _BaseColorMap2).rgb; - stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base3), _TextureStack3); - float3 baseMeanColor3 = SampleStack(stackInfo, _BaseColorMap3).rgb; + //stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base3), _TextureStack3); + //float3 baseMeanColor3 = SampleStack(stackInfo, _BaseColorMap3).rgb; + + // For now, use "normal" mode for the 2 last layers ... (doens't seem to work like that? seems to be reddish?) + float3 uselessBaseMeanColor = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb * 0.00001; + float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb + uselessBaseMeanColor; + float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_BaseColorMap0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb + uselessBaseMeanColor; #else - float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; + float3 uselessBaseMeanColor = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb; + float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb + 0.00001 * uselessBaseMeanColor; float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_BaseColorMap0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb; float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_BaseColorMap0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 7368067c4b1..b0b49c4656a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -197,7 +197,8 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out surfaceData.VTFeedback = GetResolveOutput(stackInfo); const float4 baseColorValue = SampleStack(stackInfo, ADD_IDX(_BaseColorMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); #else - const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); + const float4 uselessColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_ZERO_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); + const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)) + 0.00001 * uselessColorValue; surfaceData.VTFeedback = float4(1, 1, 1, 1); StackInfo stackInfo; #endif From d8800103b677e6fb271f8e1f9c3c7b103d53a65a Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Wed, 3 Jul 2019 16:45:42 +0200 Subject: [PATCH 025/143] Get it "working" for 3 layers To get it working, I had to drop the sampler_LayerMaskMap and sampler_LayerInfluenceMaskMap and replace them by the samplerBaseColorMap0 ... Probably not okay! --- .../Material/LayeredLit/LayeredLitData.hlsl | 15 ++++++----- .../Material/Lit/LitDataIndividualLayer.hlsl | 2 +- .../Runtime/Material/Lit/LitProperties.hlsl | 26 +++++-------------- 3 files changed, 16 insertions(+), 27 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index 60bf607dc1e..33dda08a161 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -502,7 +502,10 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod // Blend mask are Main Layer A - Layer 1 R - Layer 2 G - Layer 3 B // Value for main layer is not use for blending itself but for alternate weighting like density. // Settings this specific Main layer blend mask in alpha allow to be transparent in case we don't use it and 1 is provide by default. - float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask); + //float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask); + float4 uselessValue = SAMPLE_UVMAPPING_TEXTURE2D_LOD(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.blendMask, lod); + float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_BaseColorMap0, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_BaseColorMap0, layerTexCoord.blendMask); + blendMasks += 0.00001 * uselessValue; // Wind uses vertex alpha as an intensity parameter. // So in case Layered shader uses wind, we need to hardcode the alpha here so that the main layer can be visible without affecting wind intensity. @@ -520,7 +523,8 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod float GetInfluenceMask(LayerTexCoord layerTexCoord, bool useLodSampling = false, float lod = 0) { // Sample influence mask with same mapping as Main layer - return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0).r; + //return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0).r; + return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_BaseColorMap0, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_BaseColorMap0, layerTexCoord.base0).r; } float GetMaxHeight(float4 heights) @@ -652,15 +656,14 @@ float3 ComputeMainBaseColorInfluence(float influenceMask, float3 baseColor0, flo stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base1), _TextureStack1); float3 baseMeanColor1 = SampleStack(stackInfo, _BaseColorMap1).rgb; - //stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base2), _TextureStack2); - //float3 baseMeanColor2 = SampleStack(stackInfo, _BaseColorMap2).rgb; + stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base2), _TextureStack2); + float3 baseMeanColor2 = SampleStack(stackInfo, _BaseColorMap2).rgb; //stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base3), _TextureStack3); //float3 baseMeanColor3 = SampleStack(stackInfo, _BaseColorMap3).rgb; - // For now, use "normal" mode for the 2 last layers ... (doens't seem to work like that? seems to be reddish?) + // For now, use "normal" mode for the last layer ... (doens't seem to work like that? seems to be reddish?) float3 uselessBaseMeanColor = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb * 0.00001; - float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb + uselessBaseMeanColor; float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_BaseColorMap0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb + uselessBaseMeanColor; #else float3 uselessBaseMeanColor = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index b0b49c4656a..01d4cabffc9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -1,6 +1,6 @@ #undef VIRTUAL_TEXTURES_ACTIVE_ON_LAYER -#if (!defined(LAYER_INDEX) || (LAYER_INDEX <= 1)) && (VIRTUAL_TEXTURES_ACTIVE > 0) +#if (!defined(LAYER_INDEX) || (LAYER_INDEX <= 2)) && (VIRTUAL_TEXTURES_ACTIVE > 0) #define VIRTUAL_TEXTURES_ACTIVE_ON_LAYER 1 #else #define VIRTUAL_TEXTURES_ACTIVE_ON_LAYER 0 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index c00fb44d7ea..1dcf1517194 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -83,47 +83,33 @@ SAMPLER(sampler_CoatMaskMap); #if VIRTUAL_TEXTURES_ACTIVE TEXTURE2D(_BaseColorMap0); -TEXTURE2D(_BaseColorMap1); -TEXTURE2D(_BaseColorMap2); TEXTURE2D(_BaseColorMap3); SAMPLER(sampler_BaseColorMap0); -//SAMPLER(sampler_BaseColorMap2); -//SAMPLER(sampler_BaseColorMap3); - -TEXTURE2D(_MaskMap0); -TEXTURE2D(_MaskMap1); -TEXTURE2D(_MaskMap2); TEXTURE2D(_MaskMap3); - -SAMPLER(sampler_MaskMap2); SAMPLER(sampler_MaskMap3); -TEXTURE2D(_NormalMap0); -TEXTURE2D(_NormalMap1); -TEXTURE2D(_NormalMap2); TEXTURE2D(_NormalMap3); - -SAMPLER(sampler_NormalMap2); SAMPLER(sampler_NormalMap3); + #else PROP_DECL_TEX2D(_BaseColorMap); PROP_DECL_TEX2D(_MaskMap); PROP_DECL_TEX2D(_NormalMap); #endif -PROP_DECL_TEX2D(_BentNormalMap); -PROP_DECL_TEX2D(_NormalMapOS); +//PROP_DECL_TEX2D(_BentNormalMap); +//PROP_DECL_TEX2D(_NormalMapOS); PROP_DECL_TEX2D(_DetailMap); PROP_DECL_TEX2D(_HeightMap); -PROP_DECL_TEX2D(_SubsurfaceMaskMap); +//PROP_DECL_TEX2D(_SubsurfaceMaskMap); PROP_DECL_TEX2D(_ThicknessMap); TEXTURE2D(_LayerMaskMap); -SAMPLER(sampler_LayerMaskMap); +//SAMPLER(sampler_LayerMaskMap); TEXTURE2D(_LayerInfluenceMaskMap); -SAMPLER(sampler_LayerInfluenceMaskMap); +//SAMPLER(sampler_LayerInfluenceMaskMap); #endif From 7e4c58dd6a9896aca1c2ff0aa8fa5424008e901c Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Wed, 3 Jul 2019 17:04:34 +0200 Subject: [PATCH 026/143] Get it "working" for 4 layers At least it is not complaining ... Still the reddish color. One obvious suspect: we're sampling "without VT" for the weights, is that correct?? --- .../Material/LayeredLit/LayeredLitData.hlsl | 24 +++++++++--------- .../Material/Lit/LitDataIndividualLayer.hlsl | 2 +- .../Runtime/Material/Lit/LitProperties.hlsl | 25 ++++++------------- 3 files changed, 20 insertions(+), 31 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index 33dda08a161..e6aea9b9361 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -502,10 +502,11 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod // Blend mask are Main Layer A - Layer 1 R - Layer 2 G - Layer 3 B // Value for main layer is not use for blending itself but for alternate weighting like density. // Settings this specific Main layer blend mask in alpha allow to be transparent in case we don't use it and 1 is provide by default. - //float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask); - float4 uselessValue = SAMPLE_UVMAPPING_TEXTURE2D_LOD(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.blendMask, lod); - float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_BaseColorMap0, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_BaseColorMap0, layerTexCoord.blendMask); - blendMasks += 0.00001 * uselessValue; +#if VIRTUAL_TEXTURES_ACTIVE + float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_TextureStack0_c0, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_TextureStack0_c0, layerTexCoord.blendMask); +#else + float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask); +#endif // Wind uses vertex alpha as an intensity parameter. // So in case Layered shader uses wind, we need to hardcode the alpha here so that the main layer can be visible without affecting wind intensity. @@ -523,8 +524,11 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod float GetInfluenceMask(LayerTexCoord layerTexCoord, bool useLodSampling = false, float lod = 0) { // Sample influence mask with same mapping as Main layer - //return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0).r; - return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_BaseColorMap0, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_BaseColorMap0, layerTexCoord.base0).r; +#if VIRTUAL_TEXTURES_ACTIVE + return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_TextureStack0_c0, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_TextureStack0_c0, layerTexCoord.base0).r; +#else + return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0).r; +#endif } float GetMaxHeight(float4 heights) @@ -659,12 +663,8 @@ float3 ComputeMainBaseColorInfluence(float influenceMask, float3 baseColor0, flo stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base2), _TextureStack2); float3 baseMeanColor2 = SampleStack(stackInfo, _BaseColorMap2).rgb; - //stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base3), _TextureStack3); - //float3 baseMeanColor3 = SampleStack(stackInfo, _BaseColorMap3).rgb; - - // For now, use "normal" mode for the last layer ... (doens't seem to work like that? seems to be reddish?) - float3 uselessBaseMeanColor = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb * 0.00001; - float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_BaseColorMap0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb + uselessBaseMeanColor; + stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base3), _TextureStack3); + float3 baseMeanColor3 = SampleStack(stackInfo, _BaseColorMap3).rgb; #else float3 uselessBaseMeanColor = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb; float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb + 0.00001 * uselessBaseMeanColor; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 01d4cabffc9..a55a48f4257 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -1,6 +1,6 @@ #undef VIRTUAL_TEXTURES_ACTIVE_ON_LAYER -#if (!defined(LAYER_INDEX) || (LAYER_INDEX <= 2)) && (VIRTUAL_TEXTURES_ACTIVE > 0) +#if (!defined(LAYER_INDEX) || (LAYER_INDEX <= 3)) && (VIRTUAL_TEXTURES_ACTIVE > 0) #define VIRTUAL_TEXTURES_ACTIVE_ON_LAYER 1 #else #define VIRTUAL_TEXTURES_ACTIVE_ON_LAYER 0 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index 1dcf1517194..b071ae25477 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -80,36 +80,25 @@ SAMPLER(sampler_CoatMaskMap); TEXTURE2D(MERGE_NAME(name, 3)); \ SAMPLER(MERGE_NAME(MERGE_NAME(sampler, name), 3)) -#if VIRTUAL_TEXTURES_ACTIVE - -TEXTURE2D(_BaseColorMap0); -TEXTURE2D(_BaseColorMap3); -SAMPLER(sampler_BaseColorMap0); - -TEXTURE2D(_MaskMap3); -SAMPLER(sampler_MaskMap3); - -TEXTURE2D(_NormalMap3); -SAMPLER(sampler_NormalMap3); - -#else +#if !VIRTUAL_TEXTURES_ACTIVE PROP_DECL_TEX2D(_BaseColorMap); PROP_DECL_TEX2D(_MaskMap); PROP_DECL_TEX2D(_NormalMap); + +SAMPLER(sampler_LayerMaskMap); +SAMPLER(sampler_LayerInfluenceMaskMap); #endif -//PROP_DECL_TEX2D(_BentNormalMap); -//PROP_DECL_TEX2D(_NormalMapOS); +PROP_DECL_TEX2D(_BentNormalMap); +PROP_DECL_TEX2D(_NormalMapOS); PROP_DECL_TEX2D(_DetailMap); PROP_DECL_TEX2D(_HeightMap); -//PROP_DECL_TEX2D(_SubsurfaceMaskMap); +PROP_DECL_TEX2D(_SubsurfaceMaskMap); PROP_DECL_TEX2D(_ThicknessMap); TEXTURE2D(_LayerMaskMap); -//SAMPLER(sampler_LayerMaskMap); TEXTURE2D(_LayerInfluenceMaskMap); -//SAMPLER(sampler_LayerInfluenceMaskMap); #endif From d148a6f97462c2baf338712fe51937c8b29f7e12 Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Thu, 4 Jul 2019 10:55:04 +0200 Subject: [PATCH 027/143] Cleanup of the unused samplers If we need the "dummy" texture again, we'll need to find a proper implementation! --- .../Runtime/Material/LayeredLit/LayeredLitData.hlsl | 3 +-- .../Runtime/Material/Lit/LitDataIndividualLayer.hlsl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index e6aea9b9361..8f76a853b00 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -666,8 +666,7 @@ float3 ComputeMainBaseColorInfluence(float influenceMask, float3 baseColor0, flo stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base3), _TextureStack3); float3 baseMeanColor3 = SampleStack(stackInfo, _BaseColorMap3).rgb; #else - float3 uselessBaseMeanColor = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb; - float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb + 0.00001 * uselessBaseMeanColor; + float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_BaseColorMap0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb; float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_BaseColorMap0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index a55a48f4257..4fee719631b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -197,8 +197,7 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out surfaceData.VTFeedback = GetResolveOutput(stackInfo); const float4 baseColorValue = SampleStack(stackInfo, ADD_IDX(_BaseColorMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); #else - const float4 uselessColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_ZERO_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); - const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)) + 0.00001 * uselessColorValue; + const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); surfaceData.VTFeedback = float4(1, 1, 1, 1); StackInfo stackInfo; #endif From 36d4d8744983bffccad0940fab6f352009bb8943 Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Thu, 4 Jul 2019 13:41:17 +0200 Subject: [PATCH 028/143] Allow for changing layers without sampler issues --- .../Runtime/Material/Lit/LitDataIndividualLayer.hlsl | 8 ++++++++ .../Runtime/Material/Lit/LitProperties.hlsl | 12 ++++++++++++ .../Runtime/Material/TerrainLit/TerrainLitData.hlsl | 2 ++ 3 files changed, 22 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 4fee719631b..33ca426a391 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -114,6 +114,8 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float //TODO(ddebaets) VT does not handle full range of normal map sampling/reconstruction so special case here... #if VIRTUAL_TEXTURES_ACTIVE_ON_LAYER normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); +#elif VIRTUAL_TEXTURES_ACTIVE + normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), sampler_TextureStack0_c2, ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); #else normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), ADD_IDX(sampler_NormalMap), ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); #endif @@ -196,6 +198,10 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out StackInfo stackInfo = PrepareStack(UVMappingTo2D(ADD_IDX(layerTexCoord.base)), ADD_IDX(_TextureStack)); surfaceData.VTFeedback = GetResolveOutput(stackInfo); const float4 baseColorValue = SampleStack(stackInfo, ADD_IDX(_BaseColorMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); +#elif VIRTUAL_TEXTURES_ACTIVE + const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), sampler_TextureStack0_c0, ADD_IDX(layerTexCoord.base)); + surfaceData.VTFeedback = float4(1, 1, 1, 1); + StackInfo stackInfo; #else const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); surfaceData.VTFeedback = float4(1, 1, 1, 1); @@ -223,6 +229,8 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out #ifdef _MASKMAP_IDX #if VIRTUAL_TEXTURES_ACTIVE_ON_LAYER const float4 maskValue = SampleStack(stackInfo, ADD_IDX(_MaskMap)); +#elif VIRTUAL_TEXTURES_ACTIVE + const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), sampler_TextureStack0_c0, ADD_IDX(layerTexCoord.base)); #else const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), ADD_IDX(sampler_MaskMap), ADD_IDX(layerTexCoord.base)); #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index b071ae25477..10fa58af9ee 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -87,6 +87,18 @@ PROP_DECL_TEX2D(_NormalMap); SAMPLER(sampler_LayerMaskMap); SAMPLER(sampler_LayerInfluenceMaskMap); +#else +TEXTURE2D(_BaseColorMap1); +TEXTURE2D(_MaskMap1); +TEXTURE2D(_NormalMap1); + +TEXTURE2D(_BaseColorMap2); +TEXTURE2D(_MaskMap2); +TEXTURE2D(_NormalMap2); + +TEXTURE2D(_BaseColorMap3); +TEXTURE2D(_MaskMap3); +TEXTURE2D(_NormalMap3); #endif PROP_DECL_TEX2D(_BentNormalMap); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl index a7219702ab8..1332e0b2fac 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl @@ -224,5 +224,7 @@ void GetSurfaceAndBuiltinData(inout FragInputs input, float3 V, inout PositionIn ApplyDebugToSurfaceData(input.tangentToWorld, surfaceData); #endif + surfaceData.VTFeedback = float4(1, 1, 1, 1); + GetBuiltinData(input, V, posInput, surfaceData, 1, bentNormalWS, 0, builtinData); } From d5b864f71a28107a404936c69739a05024044d00 Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Mon, 8 Jul 2019 17:22:52 +0200 Subject: [PATCH 029/143] Get normals to work in one case Note, this required a change in the GTS builder as well, which needs to be fixed as well! --- .../Material/Lit/LitDataIndividualLayer.hlsl | 18 ++++++++++++++++++ .../Runtime/Material/Lit/LitProperties.hlsl | 8 +++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 33ca426a391..8b7cb6d078f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -113,7 +113,25 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float #ifdef _NORMALMAP_TANGENT_SPACE_IDX //TODO(ddebaets) VT does not handle full range of normal map sampling/reconstruction so special case here... #if VIRTUAL_TEXTURES_ACTIVE_ON_LAYER + + #ifdef SURFACE_GRADIENT + real4 packedNormal = SampleStack(stackInfo, ADD_IDX(_NormalMap)); + if(ADD_IDX(layerTexCoord.base).mappingType != UV_MAPPING_TRIPLANAR && ADD_IDX(layerTexCoord.base).mappingType != UV_MAPPING_PLANAR) + { + packedNormal.a *= packedNormal.r; + real2 vT = packedNormal.ag * 2.0 - 1.0; + real rcpZ = rsqrt(max(1 - Sq(vT.x) - Sq(vT.y), Sq(FLT_EPS))); + real2 deriv = ConvertTangentSpaceNormalToHeightMapGradient(vT.xy, rcpZ, ADD_IDX(_NormalScale)); + normalTS = SurfaceGradientFromTBN(deriv, ADD_IDX(layerTexCoord.base).tangentWS, ADD_IDX(layerTexCoord.base).bitangentWS); + } + else + { + // skip VT for now + normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), ADD_IDX(sampler_NormalMap), ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); + } + #else // NO SURFACE_GRADIENT normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); + #endif #elif VIRTUAL_TEXTURES_ACTIVE normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), sampler_TextureStack0_c2, ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); #else diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index 10fa58af9ee..4573d7a7105 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -88,17 +88,19 @@ PROP_DECL_TEX2D(_NormalMap); SAMPLER(sampler_LayerMaskMap); SAMPLER(sampler_LayerInfluenceMaskMap); #else +PROP_DECL_TEX2D(_NormalMap); // have the _NormalMaps *with* their samplers for now, to catch unsupported normal map usage + TEXTURE2D(_BaseColorMap1); TEXTURE2D(_MaskMap1); -TEXTURE2D(_NormalMap1); +//TEXTURE2D(_NormalMap1); TEXTURE2D(_BaseColorMap2); TEXTURE2D(_MaskMap2); -TEXTURE2D(_NormalMap2); +//TEXTURE2D(_NormalMap2); TEXTURE2D(_BaseColorMap3); TEXTURE2D(_MaskMap3); -TEXTURE2D(_NormalMap3); +//TEXTURE2D(_NormalMap3); #endif PROP_DECL_TEX2D(_BentNormalMap); From fdbfdd5cc22ab5dbfaeedb1a5ce1366ff9d93f48 Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Wed, 10 Jul 2019 12:52:33 +0200 Subject: [PATCH 030/143] Get planar mapping working properly This is probably a two-step fix: the planar itself probably just needed some recalculations, but stuff went wrong elsewhere. We basically just had bad luck that the planar was not "layer 0" as it is layer 0 that was being resolved. I.e., there were two issues playing here. To be verified what is still going wrong. --- .../Material/LayeredLit/LayeredLitData.hlsl | 7 ++++- .../Material/Lit/LitDataIndividualLayer.hlsl | 28 +++++++++++++------ 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index 8f76a853b00..ddfeb6dd17a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -776,7 +776,12 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p // VT Feedback // TODO: properly - surfaceData.VTFeedback = surfaceData0.VTFeedback; + float4 _FeedbackAggregate[4]; + _FeedbackAggregate[0] = surfaceData0.VTFeedback; + _FeedbackAggregate[1] = surfaceData1.VTFeedback; + _FeedbackAggregate[2] = surfaceData2.VTFeedback; + _FeedbackAggregate[3] = surfaceData3.VTFeedback; + surfaceData.VTFeedback = _FeedbackAggregate[input.positionSS.x%4]; // Init other parameters surfaceData.anisotropy = 0.0; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 8b7cb6d078f..64b1e0ad07e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -116,22 +116,34 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float #ifdef SURFACE_GRADIENT real4 packedNormal = SampleStack(stackInfo, ADD_IDX(_NormalMap)); - if(ADD_IDX(layerTexCoord.base).mappingType != UV_MAPPING_TRIPLANAR && ADD_IDX(layerTexCoord.base).mappingType != UV_MAPPING_PLANAR) + if(ADD_IDX(layerTexCoord.base).mappingType == UV_MAPPING_TRIPLANAR) + { + // Skip VT + normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), ADD_IDX(sampler_NormalMap), ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); + } + else if(ADD_IDX(layerTexCoord.base).mappingType == UV_MAPPING_PLANAR) + { + float4 packedNormal = SampleStack(stackInfo, ADD_IDX(_NormalMap)); + packedNormal.a *= packedNormal.r; + real2 vTGranite = packedNormal.ag * 2.0 - 1.0; + real rcpZGranite = rsqrt(max(1 - Sq(vTGranite.x) - Sq(vTGranite.y), Sq(FLT_EPS))); + real2 derivYPlaneGranite = ConvertTangentSpaceNormalToHeightMapGradient(vTGranite.xy, rcpZGranite, ADD_IDX(_NormalScale)); + + real3 volumeGradGranite = real3(derivYPlaneGranite.x, 0.0, derivYPlaneGranite.y); + normalTS = SurfaceGradientFromVolumeGradient(ADD_IDX(layerTexCoord.base).normalWS, volumeGradGranite); + } + else { packedNormal.a *= packedNormal.r; real2 vT = packedNormal.ag * 2.0 - 1.0; real rcpZ = rsqrt(max(1 - Sq(vT.x) - Sq(vT.y), Sq(FLT_EPS))); real2 deriv = ConvertTangentSpaceNormalToHeightMapGradient(vT.xy, rcpZ, ADD_IDX(_NormalScale)); + normalTS = SurfaceGradientFromTBN(deriv, ADD_IDX(layerTexCoord.base).tangentWS, ADD_IDX(layerTexCoord.base).bitangentWS); } - else - { - // skip VT for now - normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), ADD_IDX(sampler_NormalMap), ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); - } - #else // NO SURFACE_GRADIENT + #else // NO SURFACE_GRADIENT normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); - #endif + #endif #elif VIRTUAL_TEXTURES_ACTIVE normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), sampler_TextureStack0_c2, ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); #else From 50a5d2f5c1cba76a1971a94ef1ee2f32c80c8e4d Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Thu, 11 Jul 2019 13:49:30 +0200 Subject: [PATCH 031/143] Use non-VT sampling for layer mixing We need the average pixel color, which is not evident using the granite VT system. --- .../Material/LayeredLit/LayeredLitData.hlsl | 18 ++++++------------ .../Runtime/Material/Lit/LitProperties.hlsl | 2 ++ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index ddfeb6dd17a..76b0da01751 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -653,18 +653,12 @@ float3 ComputeMainBaseColorInfluence(float influenceMask, float3 baseColor0, flo float textureBias = 15.0; // Use maximum bias #if VIRTUAL_TEXTURES_ACTIVE - // Prepare the VT stack for sampling - StackInfo stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base0), _TextureStack0); - float3 baseMeanColor0 = SampleStack(stackInfo, _BaseColorMap0).rgb; - - stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base1), _TextureStack1); - float3 baseMeanColor1 = SampleStack(stackInfo, _BaseColorMap1).rgb; - - stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base2), _TextureStack2); - float3 baseMeanColor2 = SampleStack(stackInfo, _BaseColorMap2).rgb; - - stackInfo = PrepareStack(UVMappingTo2D(layerTexCoord.base3), _TextureStack3); - float3 baseMeanColor3 = SampleStack(stackInfo, _BaseColorMap3).rgb; + // TODO here we still do non-VT sampling to get the mean colors, instead of PrepareStack() followed by SampleStack(); ideally we have a PrepareStack_Bias() and/or a SampleStack_Bias() + // which takes an additional argument to bias the sampled LOD. This approach doesn't work here as the VT system is designed to sample a single *tile* at the lowest resolution. + float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_TextureStack0_c0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; + float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_TextureStack0_c0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; + float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_TextureStack0_c0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb; + float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_TextureStack0_c0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb; #else float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_BaseColorMap0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index 4573d7a7105..85ad1c8cd80 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -90,6 +90,8 @@ SAMPLER(sampler_LayerInfluenceMaskMap); #else PROP_DECL_TEX2D(_NormalMap); // have the _NormalMaps *with* their samplers for now, to catch unsupported normal map usage +TEXTURE2D(_BaseColorMap0); + TEXTURE2D(_BaseColorMap1); TEXTURE2D(_MaskMap1); //TEXTURE2D(_NormalMap1); From a164b99c5dcfcd11309ab721640180840024fb52 Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Fri, 12 Jul 2019 14:16:24 +0200 Subject: [PATCH 032/143] Revert "Version Nico" This reverts commit 9e90d30b500a11e50457163e841ffeb73d2d648a. --- .../1601_TerrainLit/New Terrain.asset | Bin 5494883 -> 5494916 bytes .../2301_Shadow_Mask/LightingData.asset | Bin 1610609 -> 1610660 bytes .../LightingData.asset | Bin 1052008 -> 1052012 bytes .../LightingData.asset | Bin 35567 -> 35568 bytes .../New Terrain.asset | Bin 2922573 -> 2922580 bytes .../LightingData.asset | Bin 35567 -> 35568 bytes .../ProjectSettings/AudioManager.asset | 34 +- .../ProjectSettings/ClusterInputManager.asset | 12 +- .../ProjectSettings/DynamicsManager.asset | 58 +- .../ProjectSettings/InputManager.asset | 590 +++++++++--------- .../ProjectSettings/NavMeshAreas.asset | 182 +++--- .../ProjectSettings/NetworkManager.asset | 16 +- .../ProjectSettings/Physics2DSettings.asset | 74 +-- .../ProjectSettings/PresetManager.asset | 54 +- .../ProjectSettings/QualitySettings.asset | 380 +++++------ .../ProjectSettings/TagManager.asset | 86 +-- .../ProjectSettings/TimeManager.asset | 18 +- .../UnityConnectSettings.asset | 68 +- .../Core/CoreResources/GPUCopy.compute | 4 +- .../Runtime/Debug/DebugLightVolumes.compute | 4 +- .../LightLoop/builddispatchindirect.compute | 10 +- .../ScreenSpaceReflections.compute | 18 +- .../RenderPass/DepthPyramid.compute | 4 +- .../Foliage Diffusion Profile.asset | 4 +- .../Mesh/Cylinder.fbx.meta | 8 +- .../Mesh/Disc.FBX.meta | 51 +- .../Mesh/Quad.FBX.meta | 51 +- .../Mesh/Sphere.FBX.meta | 51 +- .../AutodeskInteractive.ShaderGraph.meta | 4 +- ...AutodeskInteractiveMasked.ShaderGraph.meta | 4 +- ...eskInteractiveTransparent.ShaderGraph.meta | 4 +- .../Skin Diffusion Profile.asset | 4 +- .../defaultDiffusionProfile.asset | 4 +- 33 files changed, 870 insertions(+), 927 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1601_TerrainLit/New Terrain.asset b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1601_TerrainLit/New Terrain.asset index 133a33bdd1e7d02ce1790e15bd48fc254828d5fe..edbbd6bedc4c0b80b9e4c980e389b618d286bb87 100644 GIT binary patch delta 543 zcmWm8Pb`~Z9Ki9sHQKj*ORJ;BOUsNJqccjCvH4fU);Z~Eb9s|lEWOAs4jQjmM8c7q zxDXE7AkVcIvx~I1B@zi)GCfGf#Z9_zllPPFli&M1Po6)Cv_Vg%4U4*@8}tJGiC(A| z>BeKzc}}v5^PDM|p{9&{V5CRCWz|K~|Kyo%>f10^nrL{_eA_5lSNtin@TV-DUS?mj zmR$bK?46~co6dQau#bvq#pk9s-<5}cdMT8{{GDqV<)TfpE^BbUftmbZk3DzOXkcKNV5A%(}-~OO^>OSzh&n z|M7tH%uhoxXV6ZU;?C4JI(X;u7Ob!Bd@AOZ)$Ar3l0nZoC^y@1U_nQ8YDk!&)jmjqD8o(3wW^9)V0)Dy3nb{vFs5O zKKxFJJ}0i0#p?)8A%3^uOII3tdPH-5p=$m2x*$%02dVTKQ31rR#Y3d_LN);+EEKSwqy9T=1^zk!li?IxsRRP&$rmc13bvL z`3}3;!$W+R@9{9-=Mna@kNrH#5BMPmc#I$MI0yMLhxiGHd4ePSl%Mf)p5zxi#ZiuN YoToX#GyIZY@oRp=Nq&pM<-3#P|Fj|Q0ssI2 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2301_Shadow_Mask/LightingData.asset b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2301_Shadow_Mask/LightingData.asset index e9b3e26104d4ef0437247d3e4eb69c9b245bff14..40dbfeeaf9bb8ae3405fcb02b80a5dbbe02939df 100644 GIT binary patch delta 532 zcmeykENRK|q=qew3xybYrvnMU?eBybo4pu$w-?4To|XpEd{Ke#VAv`xzT{^L0QM0NG9Lt*_aEm;;D8ftU-3xq+Amh2eK*9qiv0NpIG9RvmQlz^7h-4xsb^7U&OF<-{*&EEwt%5m{>IWRCV^s+IqPycTt z7T>-{OlbQaG2s_wXii_kxIMdH*trO(9q0iKexN--x3AycDk$Os^*}hn>Dz%$*D(UB z!R6|Il5qEK2fBAQ(5cgb4n5M|eqUsJ`+d>l3XHs4{lw-%oy!m8w*Rsb+y2W&JRuqA KhNuPN;-3L$Qn0cB delta 492 zcmZ3oJn7@Iq=qew3x%dH5@Ph*{!xgr$!j_%3$yq3{jrP<(%T&>8D}wVzg^9kYPa2S z7o&gj_KC7g<`m>_wrty@ZP~Z3Z3l9Jm;;D8ftU-3xq+Amhvvny#D5uejYm zm48|B_HQ@%-TAlMz2N^Hzun41z(RVucc+NY_5;ZR5A~-X-7TUh$HfYSLK7Gg{`2zk z3JbGyiwp6y@$qqSvGZ}Uac^heBl41Q``M`iLK4#-tQGLzZm>?^4@bN1c7g4>+XeHK zrq+q2Y`Y~GBC}maR?L@i`=alH7v(s)92giFdf6D*ryJUe#kb!P6WV@9O!!3^it`pT zZtv?Cb}pI@bmZynbD2b9`KAM1x_!W=HBg(uZi$+Ob0srNc*5HoFG`H*?~sqKzySnQ?R8;`MUZ#>4DeYO4VY&IZf d2VxE&<^*CcAm#>Q9w6ogV!rKfXYM1)sZge)MPyRgX$g1^Og zxf~A1dpyMl`l!8a*1d4Qm@L|bsEmTAhMGSEykVFdq zP8u0xk(1U!-|X1C-1YU94cE-0fFepLqk<}GsKY=5O|;NP2VL~g#{ff&FvbK^%%p41 G&)Xl*hE%lx delta 215 zcmWN=xe9`C0Kj3)wEHrIu;OHy2+y3*HhB2N;L7kj(nzLE9N@qe=LfAQ1Wu}y_46HGG2G&9UH$2(5m>A9{tw86Rb>DG diff --git a/TestProjects/LWGraphicsTest/Assets/Scenes/049_Lighting_Mixed_Subtractive/LightingData.asset b/TestProjects/LWGraphicsTest/Assets/Scenes/049_Lighting_Mixed_Subtractive/LightingData.asset index d8487f1a5f34174f2bb6cfe82b36944d9c501d92..b2043e9a7eeca10e8b0e973f01dc4141e593ff52 100644 GIT binary patch delta 16 XcmaDqmFdG&rVXhTjJ%suE4qXLK|BW4 delta 14 Vcmew`mFfLdrVXhTo6{<~ga9|V2FL&a diff --git a/TestProjects/ShaderGraph/ProjectSettings/AudioManager.asset b/TestProjects/ShaderGraph/ProjectSettings/AudioManager.asset index 4f31e74482c..304925ebde5 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/AudioManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/AudioManager.asset @@ -1,17 +1,17 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!11 &1 -AudioManager: - m_ObjectHideFlags: 0 - m_Volume: 1 - Rolloff Scale: 1 - Doppler Factor: 1 - Default Speaker Mode: 2 - m_SampleRate: 0 - m_DSPBufferSize: 1024 - m_VirtualVoiceCount: 512 - m_RealVoiceCount: 32 - m_SpatializerPlugin: - m_AmbisonicDecoderPlugin: - m_DisableAudio: 0 - m_VirtualizeEffects: 1 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!11 &1 +AudioManager: + m_ObjectHideFlags: 0 + m_Volume: 1 + Rolloff Scale: 1 + Doppler Factor: 1 + Default Speaker Mode: 2 + m_SampleRate: 0 + m_DSPBufferSize: 1024 + m_VirtualVoiceCount: 512 + m_RealVoiceCount: 32 + m_SpatializerPlugin: + m_AmbisonicDecoderPlugin: + m_DisableAudio: 0 + m_VirtualizeEffects: 1 diff --git a/TestProjects/ShaderGraph/ProjectSettings/ClusterInputManager.asset b/TestProjects/ShaderGraph/ProjectSettings/ClusterInputManager.asset index e7886b266a0..a84cf4e6fe7 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/ClusterInputManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/ClusterInputManager.asset @@ -1,6 +1,6 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!236 &1 -ClusterInputManager: - m_ObjectHideFlags: 0 - m_Inputs: [] +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!236 &1 +ClusterInputManager: + m_ObjectHideFlags: 0 + m_Inputs: [] diff --git a/TestProjects/ShaderGraph/ProjectSettings/DynamicsManager.asset b/TestProjects/ShaderGraph/ProjectSettings/DynamicsManager.asset index 78992f08c7a..d2855a33d74 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/DynamicsManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/DynamicsManager.asset @@ -1,29 +1,29 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!55 &1 -PhysicsManager: - m_ObjectHideFlags: 0 - serializedVersion: 7 - m_Gravity: {x: 0, y: -9.81, z: 0} - m_DefaultMaterial: {fileID: 0} - m_BounceThreshold: 2 - m_SleepThreshold: 0.005 - m_DefaultContactOffset: 0.01 - m_DefaultSolverIterations: 6 - m_DefaultSolverVelocityIterations: 1 - m_QueriesHitBackfaces: 0 - m_QueriesHitTriggers: 1 - m_EnableAdaptiveForce: 0 - m_ClothInterCollisionDistance: 0 - m_ClothInterCollisionStiffness: 0 - m_ContactsGeneration: 1 - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - m_AutoSimulation: 1 - m_AutoSyncTransforms: 1 - m_ClothInterCollisionSettingsToggle: 0 - m_ContactPairsMode: 0 - m_BroadphaseType: 0 - m_WorldBounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 250, y: 250, z: 250} - m_WorldSubdivisions: 8 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!55 &1 +PhysicsManager: + m_ObjectHideFlags: 0 + serializedVersion: 7 + m_Gravity: {x: 0, y: -9.81, z: 0} + m_DefaultMaterial: {fileID: 0} + m_BounceThreshold: 2 + m_SleepThreshold: 0.005 + m_DefaultContactOffset: 0.01 + m_DefaultSolverIterations: 6 + m_DefaultSolverVelocityIterations: 1 + m_QueriesHitBackfaces: 0 + m_QueriesHitTriggers: 1 + m_EnableAdaptiveForce: 0 + m_ClothInterCollisionDistance: 0 + m_ClothInterCollisionStiffness: 0 + m_ContactsGeneration: 1 + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_AutoSimulation: 1 + m_AutoSyncTransforms: 1 + m_ClothInterCollisionSettingsToggle: 0 + m_ContactPairsMode: 0 + m_BroadphaseType: 0 + m_WorldBounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 250, y: 250, z: 250} + m_WorldSubdivisions: 8 diff --git a/TestProjects/ShaderGraph/ProjectSettings/InputManager.asset b/TestProjects/ShaderGraph/ProjectSettings/InputManager.asset index 17c8f538e21..25966468fff 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/InputManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/InputManager.asset @@ -1,295 +1,295 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!13 &1 -InputManager: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Axes: - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: left - positiveButton: right - altNegativeButton: a - altPositiveButton: d - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: down - positiveButton: up - altNegativeButton: s - altPositiveButton: w - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left ctrl - altNegativeButton: - altPositiveButton: mouse 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left alt - altNegativeButton: - altPositiveButton: mouse 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left shift - altNegativeButton: - altPositiveButton: mouse 2 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: space - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse X - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse Y - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse ScrollWheel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 2 - joyNum: 0 - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 0 - type: 2 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 1 - type: 2 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 0 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 1 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 2 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 3 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: return - altNegativeButton: - altPositiveButton: joystick button 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: enter - altNegativeButton: - altPositiveButton: space - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Cancel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: escape - altNegativeButton: - altPositiveButton: joystick button 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!13 &1 +InputManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Axes: + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: a + altPositiveButton: d + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: s + altPositiveButton: w + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left ctrl + altNegativeButton: + altPositiveButton: mouse 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left alt + altNegativeButton: + altPositiveButton: mouse 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left shift + altNegativeButton: + altPositiveButton: mouse 2 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse X + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse Y + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse ScrollWheel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 2 + joyNum: 0 + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 1 + type: 2 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 0 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 1 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 2 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 3 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: return + altNegativeButton: + altPositiveButton: joystick button 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: enter + altNegativeButton: + altPositiveButton: space + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Cancel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: escape + altNegativeButton: + altPositiveButton: joystick button 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 diff --git a/TestProjects/ShaderGraph/ProjectSettings/NavMeshAreas.asset b/TestProjects/ShaderGraph/ProjectSettings/NavMeshAreas.asset index 3b0b7c3d183..c8fa1b5bd1e 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/NavMeshAreas.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/NavMeshAreas.asset @@ -1,91 +1,91 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!126 &1 -NavMeshProjectSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - areas: - - name: Walkable - cost: 1 - - name: Not Walkable - cost: 1 - - name: Jump - cost: 2 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - m_LastAgentTypeID: -887442657 - m_Settings: - - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.75 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_SettingNames: - - Humanoid +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!126 &1 +NavMeshProjectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + areas: + - name: Walkable + cost: 1 + - name: Not Walkable + cost: 1 + - name: Jump + cost: 2 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + m_LastAgentTypeID: -887442657 + m_Settings: + - serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.75 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_SettingNames: + - Humanoid diff --git a/TestProjects/ShaderGraph/ProjectSettings/NetworkManager.asset b/TestProjects/ShaderGraph/ProjectSettings/NetworkManager.asset index 5dc6a831d9f..e9cd5781b1a 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/NetworkManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/NetworkManager.asset @@ -1,8 +1,8 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!149 &1 -NetworkManager: - m_ObjectHideFlags: 0 - m_DebugLevel: 0 - m_Sendrate: 15 - m_AssetToPrefab: {} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!149 &1 +NetworkManager: + m_ObjectHideFlags: 0 + m_DebugLevel: 0 + m_Sendrate: 15 + m_AssetToPrefab: {} diff --git a/TestProjects/ShaderGraph/ProjectSettings/Physics2DSettings.asset b/TestProjects/ShaderGraph/ProjectSettings/Physics2DSettings.asset index 132ee6bc868..2446c25ee2c 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/Physics2DSettings.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/Physics2DSettings.asset @@ -1,37 +1,37 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!19 &1 -Physics2DSettings: - m_ObjectHideFlags: 0 - serializedVersion: 3 - m_Gravity: {x: 0, y: -9.81} - m_DefaultMaterial: {fileID: 0} - m_VelocityIterations: 8 - m_PositionIterations: 3 - m_VelocityThreshold: 1 - m_MaxLinearCorrection: 0.2 - m_MaxAngularCorrection: 8 - m_MaxTranslationSpeed: 100 - m_MaxRotationSpeed: 360 - m_BaumgarteScale: 0.2 - m_BaumgarteTimeOfImpactScale: 0.75 - m_TimeToSleep: 0.5 - m_LinearSleepTolerance: 0.01 - m_AngularSleepTolerance: 2 - m_DefaultContactOffset: 0.01 - m_AutoSimulation: 1 - m_QueriesHitTriggers: 1 - m_QueriesStartInColliders: 1 - m_ChangeStopsCallbacks: 0 - m_CallbacksOnDisable: 1 - m_AutoSyncTransforms: 1 - m_AlwaysShowColliders: 0 - m_ShowColliderSleep: 1 - m_ShowColliderContacts: 0 - m_ShowColliderAABB: 0 - m_ContactArrowScale: 0.2 - m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} - m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} - m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} - m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!19 &1 +Physics2DSettings: + m_ObjectHideFlags: 0 + serializedVersion: 3 + m_Gravity: {x: 0, y: -9.81} + m_DefaultMaterial: {fileID: 0} + m_VelocityIterations: 8 + m_PositionIterations: 3 + m_VelocityThreshold: 1 + m_MaxLinearCorrection: 0.2 + m_MaxAngularCorrection: 8 + m_MaxTranslationSpeed: 100 + m_MaxRotationSpeed: 360 + m_BaumgarteScale: 0.2 + m_BaumgarteTimeOfImpactScale: 0.75 + m_TimeToSleep: 0.5 + m_LinearSleepTolerance: 0.01 + m_AngularSleepTolerance: 2 + m_DefaultContactOffset: 0.01 + m_AutoSimulation: 1 + m_QueriesHitTriggers: 1 + m_QueriesStartInColliders: 1 + m_ChangeStopsCallbacks: 0 + m_CallbacksOnDisable: 1 + m_AutoSyncTransforms: 1 + m_AlwaysShowColliders: 0 + m_ShowColliderSleep: 1 + m_ShowColliderContacts: 0 + m_ShowColliderAABB: 0 + m_ContactArrowScale: 0.2 + m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} + m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} + m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} + m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/TestProjects/ShaderGraph/ProjectSettings/PresetManager.asset b/TestProjects/ShaderGraph/ProjectSettings/PresetManager.asset index 820e662d557..b43eac1dd54 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/PresetManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/PresetManager.asset @@ -1,27 +1,27 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1386491679 &1 -PresetManager: - m_ObjectHideFlags: 0 - m_DefaultList: - - type: - m_NativeTypeID: 108 - m_ManagedTypePPtr: {fileID: 0} - m_ManagedTypeFallback: - defaultPresets: - - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, - type: 2} - - type: - m_NativeTypeID: 1020 - m_ManagedTypePPtr: {fileID: 0} - m_ManagedTypeFallback: - defaultPresets: - - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, - type: 2} - - type: - m_NativeTypeID: 1006 - m_ManagedTypePPtr: {fileID: 0} - m_ManagedTypeFallback: - defaultPresets: - - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, - type: 2} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + m_DefaultList: + - type: + m_NativeTypeID: 108 + m_ManagedTypePPtr: {fileID: 0} + m_ManagedTypeFallback: + defaultPresets: + - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, + type: 2} + - type: + m_NativeTypeID: 1020 + m_ManagedTypePPtr: {fileID: 0} + m_ManagedTypeFallback: + defaultPresets: + - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, + type: 2} + - type: + m_NativeTypeID: 1006 + m_ManagedTypePPtr: {fileID: 0} + m_ManagedTypeFallback: + defaultPresets: + - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, + type: 2} diff --git a/TestProjects/ShaderGraph/ProjectSettings/QualitySettings.asset b/TestProjects/ShaderGraph/ProjectSettings/QualitySettings.asset index b9320b34224..ddad6fe8b12 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/QualitySettings.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/QualitySettings.asset @@ -1,190 +1,190 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!47 &1 -QualitySettings: - m_ObjectHideFlags: 0 - serializedVersion: 5 - m_CurrentQuality: 4 - m_QualitySettings: - - serializedVersion: 2 - name: Very Low - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 15 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - blendWeights: 1 - textureQuality: 1 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.3 - maximumLODLevel: 0 - particleRaycastBudget: 4 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Low - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.4 - maximumLODLevel: 0 - particleRaycastBudget: 16 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Medium - pixelLightCount: 1 - shadows: 1 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 1 - lodBias: 0.7 - maximumLODLevel: 0 - particleRaycastBudget: 64 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: High - pixelLightCount: 2 - shadows: 2 - shadowResolution: 1 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 40 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 2 - softParticles: 0 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1 - maximumLODLevel: 0 - particleRaycastBudget: 256 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Very High - pixelLightCount: 3 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 40 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - blendWeights: 4 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 4 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1.5 - maximumLODLevel: 0 - particleRaycastBudget: 1024 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Ultra - pixelLightCount: 4 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 4 - shadowDistance: 150 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - blendWeights: 4 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 4 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 2 - maximumLODLevel: 0 - particleRaycastBudget: 4096 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - m_PerPlatformDefaultQuality: - Android: 2 - Nintendo 3DS: 5 - Nintendo Switch: 5 - PS4: 5 - PSP2: 2 - Standalone: 5 - Tizen: 2 - WebGL: 3 - WiiU: 5 - Windows Store Apps: 5 - XboxOne: 5 - iPhone: 2 - tvOS: 2 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!47 &1 +QualitySettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_CurrentQuality: 4 + m_QualitySettings: + - serializedVersion: 2 + name: Very Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 15 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 1 + textureQuality: 1 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.3 + maximumLODLevel: 0 + particleRaycastBudget: 4 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.4 + maximumLODLevel: 0 + particleRaycastBudget: 16 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Medium + pixelLightCount: 1 + shadows: 1 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 1 + lodBias: 0.7 + maximumLODLevel: 0 + particleRaycastBudget: 64 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: High + pixelLightCount: 2 + shadows: 2 + shadowResolution: 1 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 2 + softParticles: 0 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1 + maximumLODLevel: 0 + particleRaycastBudget: 256 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Very High + pixelLightCount: 3 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 4 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1.5 + maximumLODLevel: 0 + particleRaycastBudget: 1024 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Ultra + pixelLightCount: 4 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 4 + shadowDistance: 150 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 4 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 2 + maximumLODLevel: 0 + particleRaycastBudget: 4096 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 4 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + m_PerPlatformDefaultQuality: + Android: 2 + Nintendo 3DS: 5 + Nintendo Switch: 5 + PS4: 5 + PSP2: 2 + Standalone: 5 + Tizen: 2 + WebGL: 3 + WiiU: 5 + Windows Store Apps: 5 + XboxOne: 5 + iPhone: 2 + tvOS: 2 diff --git a/TestProjects/ShaderGraph/ProjectSettings/TagManager.asset b/TestProjects/ShaderGraph/ProjectSettings/TagManager.asset index 17cb8036c53..5ce97fb0cb9 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/TagManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/TagManager.asset @@ -1,43 +1,43 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!78 &1 -TagManager: - serializedVersion: 2 - tags: [] - layers: - - Default - - TransparentFX - - Ignore Raycast - - - - Water - - UI - - - - - - PostProcessing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m_SortingLayers: - - name: Default - uniqueID: 0 - locked: 0 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!78 &1 +TagManager: + serializedVersion: 2 + tags: [] + layers: + - Default + - TransparentFX + - Ignore Raycast + - + - Water + - UI + - + - + - PostProcessing + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + m_SortingLayers: + - name: Default + uniqueID: 0 + locked: 0 diff --git a/TestProjects/ShaderGraph/ProjectSettings/TimeManager.asset b/TestProjects/ShaderGraph/ProjectSettings/TimeManager.asset index 035ddcaa934..6beec3dff01 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/TimeManager.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/TimeManager.asset @@ -1,9 +1,9 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!5 &1 -TimeManager: - m_ObjectHideFlags: 0 - Fixed Timestep: 0.0167 - Maximum Allowed Timestep: 0.1 - m_TimeScale: 1 - Maximum Particle Timestep: 0.03 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!5 &1 +TimeManager: + m_ObjectHideFlags: 0 + Fixed Timestep: 0.0167 + Maximum Allowed Timestep: 0.1 + m_TimeScale: 1 + Maximum Particle Timestep: 0.03 diff --git a/TestProjects/ShaderGraph/ProjectSettings/UnityConnectSettings.asset b/TestProjects/ShaderGraph/ProjectSettings/UnityConnectSettings.asset index f327fe1484a..9b1020b1d93 100644 --- a/TestProjects/ShaderGraph/ProjectSettings/UnityConnectSettings.asset +++ b/TestProjects/ShaderGraph/ProjectSettings/UnityConnectSettings.asset @@ -1,34 +1,34 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!310 &1 -UnityConnectSettings: - m_ObjectHideFlags: 0 - m_Enabled: 0 - m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: - m_TestInitMode: 0 - CrashReportingSettings: - m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes - m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate - m_Enabled: 0 - m_CaptureEditorExceptions: 1 - UnityPurchasingSettings: - m_Enabled: 0 - m_TestMode: 0 - UnityAnalyticsSettings: - m_Enabled: 1 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: - UnityAdsSettings: - m_Enabled: 0 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_IosGameId: - m_AndroidGameId: - m_GameIds: {} - m_GameId: - PerformanceReportingSettings: - m_Enabled: 0 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + m_Enabled: 0 + m_TestMode: 0 + m_TestEventUrl: + m_TestConfigUrl: + m_TestInitMode: 0 + CrashReportingSettings: + m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes + m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate + m_Enabled: 0 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 1 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_TestEventUrl: + m_TestConfigUrl: + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute b/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute index 31fc18e932f..eab274bedcc 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute @@ -1,7 +1,7 @@ #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" CBUFFER_START (UnityCBuffer) uint2 _RectOffset; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute index b9a2dd621e4..febb65a0ab7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute @@ -2,8 +2,8 @@ #pragma kernel LightVolumeColors -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" // Tile size of this compute #define DEBUG_LIGHT_VOLUME_TILE_SIZE 8 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute index d5e85c210e7..57aacfd90d4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute @@ -2,13 +2,13 @@ #pragma kernel BuildDrawInstancedIndirect BUILDINDIRECT=BuildDrawInstancedIndirect IS_DRAWINSTANCEDINDIRECT=1 #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" #ifdef PLATFORM_LANE_COUNT // We can infer the size of a wave. This is currently not possible on non-consoles, so we have to fallback to a sensible default in those cases. #define NR_THREADS PLATFORM_LANE_COUNT diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute index ff005e6bb30..23bad0742d1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute @@ -19,19 +19,19 @@ // Included headers //-------------------------------------------------------------------------------------------------- -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceLighting.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceLighting.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" #ifdef DEBUG_DISPLAY - #include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Debug.hlsl" - #include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Debug.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" #endif -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl" //-------------------------------------------------------------------------------------------------- // Inputs & outputs @@ -352,7 +352,7 @@ void ScreenSpaceReflectionsReprojection(uint3 dispatchThreadId : SV_DispatchThre // Inverse pre-exposure float prevExposure = GetPreviousExposureMultiplier(); color /= prevExposure + (prevExposure == 0.0); // zero-div guard - + // Disable SSR for negative, infinite and NaN history values. uint3 intCol = asuint(color); bool isPosFin = Max3(intCol.r, intCol.g, intCol.b) < 0x7F800000; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute index 6d0a23bbeae..22b26725b25 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute @@ -1,5 +1,5 @@ -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "../../ScriptableRenderPipeline/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Foliage Diffusion Profile.asset b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Foliage Diffusion Profile.asset index 9b6e603a98a..1e0cf48c755 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Foliage Diffusion Profile.asset +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Foliage Diffusion Profile.asset @@ -12,8 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} m_Name: Foliage Diffusion Profile m_EditorClassIdentifier: - m_Version: 1 - profiles: [] profile: name: Foliage scatteringDistance: {r: 0.7568628, g: 0.7019608, b: 0.24313727, a: 1} @@ -24,3 +22,5 @@ MonoBehaviour: worldScale: 1 ior: 1.4 hash: 1081692787 + m_Version: 1 + profiles: [] diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Cylinder.fbx.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Cylinder.fbx.meta index 59416a9938b..e7ae66cd8ae 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Cylinder.fbx.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Cylinder.fbx.meta @@ -1,13 +1,13 @@ fileFormatVersion: 2 guid: accb6d90f0d50fe4ca0f68159b4323de ModelImporter: - serializedVersion: 27 + serializedVersion: 26 internalIDToNameTable: [] externalObjects: {} materials: importMaterials: 1 - materialName: 1 - materialSearch: 2 + materialName: 0 + materialSearch: 1 materialLocation: 1 animations: legacyGenerateAnimations: 4 @@ -69,6 +69,7 @@ ModelImporter: normalSmoothingSource: 0 referencedClips: [] importAnimation: 1 + copyAvatar: 0 humanDescription: serializedVersion: 3 human: [] @@ -88,7 +89,6 @@ ModelImporter: lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 humanoidOversampling: 1 - avatarSetup: 0 additionalBone: 0 userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Disc.FBX.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Disc.FBX.meta index 66881fb78bf..1d31e4f41f7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Disc.FBX.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Disc.FBX.meta @@ -1,31 +1,19 @@ fileFormatVersion: 2 guid: aa0197e8182e0924897ca6c14966b2d0 ModelImporter: - serializedVersion: 27 - internalIDToNameTable: - - first: - 1: 100000 - second: //RootNode - - first: - 4: 400000 - second: //RootNode - - first: - 21: 2100000 - second: No Name - - first: - 23: 2300000 - second: //RootNode - - first: - 33: 3300000 - second: //RootNode - - first: - 43: 4300000 - second: Circle + serializedVersion: 23 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2100000: No Name + 2300000: //RootNode + 3300000: //RootNode + 4300000: Circle externalObjects: {} materials: importMaterials: 1 - materialName: 1 - materialSearch: 2 + materialName: 0 + materialSearch: 1 materialLocation: 1 animations: legacyGenerateAnimations: 4 @@ -55,8 +43,6 @@ ModelImporter: globalScale: 1 meshCompression: 0 addColliders: 0 - useSRGBMaterialColor: 1 - sortHierarchyByName: 1 importVisibility: 1 importBlendShapes: 1 importCameras: 1 @@ -64,31 +50,27 @@ ModelImporter: swapUVChannels: 0 generateSecondaryUV: 0 useFileUnits: 1 + optimizeMeshForGPU: 1 keepQuads: 0 weldVertices: 1 preserveHierarchy: 0 - skinWeightsMode: 0 - maxBonesPerVertex: 4 - minBoneWeight: 0.001 - meshOptimizationFlags: -1 indexFormat: 0 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 secondaryUVPackMargin: 4 useFileScale: 1 + previousCalculatedGlobalScale: 1 + hasPreviousCalculatedGlobalScale: 0 tangentSpace: normalSmoothAngle: 60 normalImportMode: 0 tangentImportMode: 3 normalCalculationMode: 4 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - referencedClips: [] importAnimation: 1 + copyAvatar: 0 humanDescription: - serializedVersion: 3 + serializedVersion: 2 human: [] skeleton: [] armTwist: 0.5 @@ -98,15 +80,14 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 - globalScale: 1 rootMotionBoneName: + rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} hasTranslationDoF: 0 hasExtraRoot: 0 skeletonHasParents: 1 lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 humanoidOversampling: 1 - avatarSetup: 0 additionalBone: 0 userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Quad.FBX.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Quad.FBX.meta index 39fc5db748d..a4ad266dd17 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Quad.FBX.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Quad.FBX.meta @@ -1,31 +1,19 @@ fileFormatVersion: 2 guid: 1d5a8595286f94f4bb54171d49f473c3 ModelImporter: - serializedVersion: 27 - internalIDToNameTable: - - first: - 1: 100000 - second: //RootNode - - first: - 4: 400000 - second: //RootNode - - first: - 21: 2100000 - second: No Name - - first: - 23: 2300000 - second: //RootNode - - first: - 33: 3300000 - second: //RootNode - - first: - 43: 4300000 - second: Rectangle + serializedVersion: 23 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2100000: No Name + 2300000: //RootNode + 3300000: //RootNode + 4300000: Rectangle externalObjects: {} materials: importMaterials: 1 - materialName: 1 - materialSearch: 2 + materialName: 0 + materialSearch: 1 materialLocation: 1 animations: legacyGenerateAnimations: 4 @@ -55,8 +43,6 @@ ModelImporter: globalScale: 1 meshCompression: 0 addColliders: 0 - useSRGBMaterialColor: 1 - sortHierarchyByName: 1 importVisibility: 1 importBlendShapes: 1 importCameras: 1 @@ -64,31 +50,27 @@ ModelImporter: swapUVChannels: 0 generateSecondaryUV: 0 useFileUnits: 1 + optimizeMeshForGPU: 1 keepQuads: 0 weldVertices: 1 preserveHierarchy: 0 - skinWeightsMode: 0 - maxBonesPerVertex: 4 - minBoneWeight: 0.001 - meshOptimizationFlags: -1 indexFormat: 0 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 secondaryUVPackMargin: 4 useFileScale: 1 + previousCalculatedGlobalScale: 1 + hasPreviousCalculatedGlobalScale: 0 tangentSpace: normalSmoothAngle: 60 normalImportMode: 0 tangentImportMode: 3 normalCalculationMode: 4 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - referencedClips: [] importAnimation: 1 + copyAvatar: 0 humanDescription: - serializedVersion: 3 + serializedVersion: 2 human: [] skeleton: [] armTwist: 0.5 @@ -98,15 +80,14 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 - globalScale: 1 rootMotionBoneName: + rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} hasTranslationDoF: 0 hasExtraRoot: 0 skeletonHasParents: 1 lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 humanoidOversampling: 1 - avatarSetup: 0 additionalBone: 0 userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Sphere.FBX.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Sphere.FBX.meta index 024976afef9..fb87f7716b2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Sphere.FBX.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/Sphere.FBX.meta @@ -1,31 +1,19 @@ fileFormatVersion: 2 guid: 9e0af751bc36ea146940ba245193e28c ModelImporter: - serializedVersion: 27 - internalIDToNameTable: - - first: - 1: 100000 - second: //RootNode - - first: - 4: 400000 - second: //RootNode - - first: - 21: 2100000 - second: No Name - - first: - 23: 2300000 - second: //RootNode - - first: - 33: 3300000 - second: //RootNode - - first: - 43: 4300000 - second: Sphere + serializedVersion: 23 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2100000: No Name + 2300000: //RootNode + 3300000: //RootNode + 4300000: Sphere externalObjects: {} materials: importMaterials: 1 - materialName: 1 - materialSearch: 2 + materialName: 0 + materialSearch: 1 materialLocation: 1 animations: legacyGenerateAnimations: 4 @@ -55,8 +43,6 @@ ModelImporter: globalScale: 1 meshCompression: 0 addColliders: 0 - useSRGBMaterialColor: 1 - sortHierarchyByName: 1 importVisibility: 1 importBlendShapes: 1 importCameras: 1 @@ -64,31 +50,27 @@ ModelImporter: swapUVChannels: 0 generateSecondaryUV: 0 useFileUnits: 1 + optimizeMeshForGPU: 1 keepQuads: 0 weldVertices: 1 preserveHierarchy: 0 - skinWeightsMode: 0 - maxBonesPerVertex: 4 - minBoneWeight: 0.001 - meshOptimizationFlags: -1 indexFormat: 0 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 secondaryUVPackMargin: 4 useFileScale: 1 + previousCalculatedGlobalScale: 1 + hasPreviousCalculatedGlobalScale: 0 tangentSpace: normalSmoothAngle: 60 normalImportMode: 0 tangentImportMode: 3 normalCalculationMode: 4 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - referencedClips: [] importAnimation: 1 + copyAvatar: 0 humanDescription: - serializedVersion: 3 + serializedVersion: 2 human: [] skeleton: [] armTwist: 0.5 @@ -98,15 +80,14 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 - globalScale: 1 rootMotionBoneName: + rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} hasTranslationDoF: 0 hasExtraRoot: 0 skeletonHasParents: 1 lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 humanoidOversampling: 1 - avatarSetup: 0 additionalBone: 0 userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractive.ShaderGraph.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractive.ShaderGraph.meta index bf1787d41a7..a3d5fee3b53 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractive.ShaderGraph.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractive.ShaderGraph.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 7252379db4c18b641b517f2c91bb57e1 ScriptedImporter: - internalIDToNameTable: [] + fileIDToRecycleName: + 4800000: MainAsset externalObjects: {} - serializedVersion: 2 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveMasked.ShaderGraph.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveMasked.ShaderGraph.meta index bfb4c1f3edd..03b365c7d9b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveMasked.ShaderGraph.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveMasked.ShaderGraph.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 29c4adff654862b40a2e9fb2015a42c3 ScriptedImporter: - internalIDToNameTable: [] + fileIDToRecycleName: + 4800000: MainAsset externalObjects: {} - serializedVersion: 2 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveTransparent.ShaderGraph.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveTransparent.ShaderGraph.meta index f91b0e7bd30..0d09c35b9ee 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveTransparent.ShaderGraph.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractiveTransparent.ShaderGraph.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: ee2ce0be66f45d9449d71ba9b49c2acd ScriptedImporter: - internalIDToNameTable: [] + fileIDToRecycleName: + 4800000: MainAsset externalObjects: {} - serializedVersion: 2 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Skin Diffusion Profile.asset b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Skin Diffusion Profile.asset index dc5bc11c19e..295a25cebbe 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Skin Diffusion Profile.asset +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Skin Diffusion Profile.asset @@ -12,8 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} m_Name: Skin Diffusion Profile m_EditorClassIdentifier: - m_Version: 1 - profiles: [] profile: name: Skin scatteringDistance: {r: 0.7568628, g: 0.32156864, b: 0.20000002, a: 1} @@ -24,3 +22,5 @@ MonoBehaviour: worldScale: 1 ior: 1.4 hash: 1075477546 + m_Version: 1 + profiles: [] diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/defaultDiffusionProfile.asset b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/defaultDiffusionProfile.asset index c1dee6ca0a8..7d075add032 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/defaultDiffusionProfile.asset +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/defaultDiffusionProfile.asset @@ -12,8 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} m_Name: defaultDiffusionProfile m_EditorClassIdentifier: - m_Version: 1 - profiles: [] profile: name: Diffusion Profile scatteringDistance: {r: 0, g: 1, b: 0, a: 1} @@ -24,3 +22,5 @@ MonoBehaviour: worldScale: 1 ior: 1.4 hash: 1080714638 + m_Version: 1 + profiles: [] From d33e54c25a9484085e22627d7d85c2895e05d094 Mon Sep 17 00:00:00 2001 From: Jonas El Sayeh Khalil Date: Fri, 12 Jul 2019 14:24:49 +0200 Subject: [PATCH 033/143] Cleanup of merge --- .../Material/LayeredLit/LayeredLitUI.cs | 892 ------------------ .../Material/LayeredLit/LayeredLit.shader | 14 +- .../Material/LayeredLit/LayeredLitData.hlsl | 147 ++- .../Runtime/Material/Lit/Lit.shader | 28 +- .../Material/Lit/LitDataIndividualLayer.hlsl | 115 ++- .../Runtime/Material/Lit/LitProperties.hlsl | 14 +- 6 files changed, 147 insertions(+), 1063 deletions(-) delete mode 100644 com.unity.render-pipelines.high-definition/Editor/Material/LayeredLit/LayeredLitUI.cs diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/LayeredLit/LayeredLitUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/LayeredLit/LayeredLitUI.cs deleted file mode 100644 index a76ac7310e6..00000000000 --- a/com.unity.render-pipelines.high-definition/Editor/Material/LayeredLit/LayeredLitUI.cs +++ /dev/null @@ -1,892 +0,0 @@ -using System; -using UnityEngine; -using System.Linq; -using UnityEditor.Rendering; -using UnityEngine.Rendering; - -namespace UnityEditor.Experimental.Rendering.HDPipeline -{ - class LayeredLitGUI : LitGUI - { - //Be sure to start after last BaseUnlitGUI.Expandable - [Flags] - protected enum LayerExpandable : uint - { - MainLayer = 1 << 11, - Layer1 = 1 << 12, - Layer2 = 1 << 13, - Layer3 = 1 << 14, - LayeringOptionMain = 1 << 15, - ShowLayer1 = 1 << 16, - ShowLayer2 = 1 << 17, - ShowLayer3 = 1 << 18, - MaterialReferences = 1 << 19, - MainInput = 1 << 20, - Layer1Input = 1 << 21, - Layer2Input = 1 << 22, - Layer3Input = 1 << 23, - MainDetail = 1 << 24, - Layer1Detail = 1 << 25, - Layer2Detail = 1 << 26, - Layer3Detail = 1 << 27, - LayeringOption1 = 1 << 28, - LayeringOption2 = 1 << 29, - LayeringOption3 = 1 << 30 - } - - protected override uint defaultExpandedState { get { return (uint)(Expandable.Base | Expandable.Input | Expandable.VertexAnimation | Expandable.Detail | Expandable.Emissive | Expandable.Transparency | Expandable.Other | Expandable.Tesselation) + (uint)(LayerExpandable.MaterialReferences | LayerExpandable.MainInput | LayerExpandable.MainDetail | LayerExpandable.Layer1 | LayerExpandable.Layer2 | LayerExpandable.Layer3); } } - - public enum VertexColorMode - { - None, - Multiply, - Add - } - - private class StylesLayer - { - public readonly Color[] layerColors = - { - Color.white, - Color.red, - Color.green, - Color.blue - }; - - public readonly GUIContent[] layerLabels = - { - new GUIContent("Main layer"), - new GUIContent("Layer 1"), - new GUIContent("Layer 2"), - new GUIContent("Layer 3"), - }; - - public readonly GUIStyle[] layerLabelColors = - { - new GUIStyle(EditorStyles.foldout), - new GUIStyle(EditorStyles.foldout), - new GUIStyle(EditorStyles.foldout), - new GUIStyle(EditorStyles.foldout) - }; - - public readonly GUIContent layerNameHeader = EditorGUIUtility.TrTextContent("Layer name"); - public readonly GUIContent materialToCopyHeader = EditorGUIUtility.TrTextContent("Material to copy"); - - public readonly GUIContent uvHeader = EditorGUIUtility.TrTextContent("UV", "Also copy UV."); - public readonly GUIContent copyButtonIcon = EditorGUIUtility.IconContent("d_UnityEditor.ConsoleWindow", "Copy Material parameters to layer. If UV is disabled, this will not copy UV."); - public readonly GUIContent layersText = EditorGUIUtility.TrTextContent("Surface Inputs"); - public readonly GUIContent emissiveText = EditorGUIUtility.TrTextContent("Emissive"); - public readonly GUIContent layerMapMaskText = EditorGUIUtility.TrTextContent("Layer Mask", "Specifies the Layer Mask for this Material"); - public readonly GUIContent layerInfluenceMapMaskText = EditorGUIUtility.TrTextContent("Layer Influence Mask", "Specifies the Layer Influence Mask for this Material."); - public readonly GUIContent vertexColorModeText = EditorGUIUtility.TrTextContent("Vertex Color Mode", "Specifies the method HDRP uses to color vertices.\nMultiply: Multiplies vertex color with the mask.\nAdditive: Remaps vertex color values between [-1, 1] and adds them to the mask (neutral value is 0.5 vertex color)."); - public readonly GUIContent layerCountText = EditorGUIUtility.TrTextContent("Layer Count", "Controls the number of layers for this Material."); - public readonly GUIContent objectScaleAffectTileText = EditorGUIUtility.TrTextContent("Lock layers 0123 tiling with object Scale", "When enabled, tiling of each layer is affected by the Transform's Scale."); - public readonly GUIContent objectScaleAffectTileText2 = EditorGUIUtility.TrTextContent("Lock layers 123 tiling with object Scale", "When enabled, tiling of each influenced layer (except the main layer) is affected by the Transform's Scale."); - - public readonly GUIContent layerTexWorldScaleText = EditorGUIUtility.TrTextContent("World Scale", "Sets the tiling factor of the Planar/Trilinear mapping."); - public readonly GUIContent UVBlendMaskText = EditorGUIUtility.TrTextContent("BlendMask UV Mapping", "Specifies the UV Mapping mode of the layer."); - - - public readonly GUIContent layeringOptionText = EditorGUIUtility.TrTextContent("Layering Options"); - - public readonly GUIContent useHeightBasedBlendText = EditorGUIUtility.TrTextContent("Use Height Based Blend", "When enabled, HDRP blends the layer with the underlying layer based on the height."); - public readonly GUIContent useMainLayerInfluenceModeText = EditorGUIUtility.TrTextContent("Main Layer Influence", "Switches between regular layers mode and base/layers mode."); - - public readonly GUIContent opacityAsDensityText = EditorGUIUtility.TrTextContent("Use Opacity map as Density map", "When enabled, HDRP uses the opacity map (alpha channel of Base Color) as the Density map."); - public readonly GUIContent inheritBaseNormalText = EditorGUIUtility.TrTextContent("Normal influence", "Controls the strength of the normals inherited from the base layer."); - public readonly GUIContent inheritBaseHeightText = EditorGUIUtility.TrTextContent("Heightmap influence", "Controls the strength of the height map inherited from the base layer."); - public readonly GUIContent inheritBaseColorText = EditorGUIUtility.TrTextContent("BaseColor influence", "Controls the strength of the Base Color inherited from the base layer."); - public readonly GUIContent heightTransition = EditorGUIUtility.TrTextContent("Height Transition", "Sets the size, in world units, of the smooth transition between layers."); - - public readonly GUIContent perPixelDisplacementLayersWarning = EditorGUIUtility.TrTextContent("For pixel displacement to work correctly, all layers with a heightmap must use the same UV mapping."); - - - public readonly GUIContent materialReferencesText = EditorGUIUtility.TrTextContent("Material To Copy"); - - public readonly string materialImporterNotAvailable = "Can't display material layer options because the material is not an asset"; - - public StylesLayer() - { - layerLabelColors[0].normal.textColor = layerColors[0]; - layerLabelColors[1].normal.textColor = layerColors[1]; - layerLabelColors[2].normal.textColor = layerColors[2]; - layerLabelColors[3].normal.textColor = layerColors[3]; - } - } - - static StylesLayer s_Styles = null; - private static StylesLayer styles { get { if (s_Styles == null) s_Styles = new StylesLayer(); return s_Styles; } } - - // Needed for json serialization to work - [Serializable] - internal struct SerializeableGUIDs - { - public string[] GUIDArray; - } - - const int kSyncButtonWidth = 58; - - bool[] m_WithUV; - - public LayeredLitGUI() - { - m_LayerCount = 4; - m_PropertySuffixes[0] = "0"; - m_PropertySuffixes[1] = "1"; - m_PropertySuffixes[2] = "2"; - m_PropertySuffixes[3] = "3"; - - m_WithUV = new bool[]{ true, true, true, true }; - } - - Material[] m_MaterialLayers = new Material[kMaxLayerCount]; - - // Layer options - MaterialProperty layerCount = null; - const string kLayerCount = "_LayerCount"; - MaterialProperty layerMaskMap = null; - const string kLayerMaskMap = "_LayerMaskMap"; - MaterialProperty layerInfluenceMaskMap = null; - const string kLayerInfluenceMaskMap = "_LayerInfluenceMaskMap"; - MaterialProperty vertexColorMode = null; - const string kVertexColorMode = "_VertexColorMode"; - MaterialProperty objectScaleAffectTile = null; - const string kObjectScaleAffectTile = "_ObjectScaleAffectTile"; - MaterialProperty UVBlendMask = null; - const string kUVBlendMask = "_UVBlendMask"; - MaterialProperty UVMappingMaskBlendMask = null; - const string kUVMappingMaskBlendMask = "_UVMappingMaskBlendMask"; - MaterialProperty texWorldScaleBlendMask = null; - const string kTexWorldScaleBlendMask = "_TexWorldScaleBlendMask"; - MaterialProperty useMainLayerInfluence = null; - const string kkUseMainLayerInfluence = "_UseMainLayerInfluence"; - MaterialProperty useHeightBasedBlend = null; - const string kUseHeightBasedBlend = "_UseHeightBasedBlend"; - - // Density/opacity mode - MaterialProperty[] opacityAsDensity = new MaterialProperty[kMaxLayerCount]; - const string kOpacityAsDensity = "_OpacityAsDensity"; - - // Influence - MaterialProperty[] inheritBaseNormal = new MaterialProperty[kMaxLayerCount - 1]; - const string kInheritBaseNormal = "_InheritBaseNormal"; - MaterialProperty[] inheritBaseHeight = new MaterialProperty[kMaxLayerCount - 1]; - const string kInheritBaseHeight = "_InheritBaseHeight"; - MaterialProperty[] inheritBaseColor = new MaterialProperty[kMaxLayerCount - 1]; - const string kInheritBaseColor = "_InheritBaseColor"; - - // Height blend - MaterialProperty heightTransition = null; - const string kHeightTransition = "_HeightTransition"; - - bool m_UseHeightBasedBlend; - - protected override void FindMaterialProperties(MaterialProperty[] props) - { - base.FindMaterialLayerProperties(props); - base.FindMaterialEmissiveProperties(props); - - layerCount = FindProperty(kLayerCount, props); - layerMaskMap = FindProperty(kLayerMaskMap, props); - layerInfluenceMaskMap = FindProperty(kLayerInfluenceMaskMap, props); - vertexColorMode = FindProperty(kVertexColorMode, props); - objectScaleAffectTile = FindProperty(kObjectScaleAffectTile, props); - UVBlendMask = FindProperty(kUVBlendMask, props); - UVMappingMaskBlendMask = FindProperty(kUVMappingMaskBlendMask, props); - texWorldScaleBlendMask = FindProperty(kTexWorldScaleBlendMask, props); - - useMainLayerInfluence = FindProperty(kkUseMainLayerInfluence, props); - useHeightBasedBlend = FindProperty(kUseHeightBasedBlend, props); - heightTransition = FindProperty(kHeightTransition, props); - - for (int i = 0; i < kMaxLayerCount; ++i) - { - // Density/opacity mode - opacityAsDensity[i] = FindProperty(string.Format("{0}{1}", kOpacityAsDensity, i), props); - - if (i != 0) - { - // Influence - inheritBaseNormal[i - 1] = FindProperty(string.Format("{0}{1}", kInheritBaseNormal, i), props); - inheritBaseHeight[i - 1] = FindProperty(string.Format("{0}{1}", kInheritBaseHeight, i), props); - inheritBaseColor[i - 1] = FindProperty(string.Format("{0}{1}", kInheritBaseColor, i), props); - } - } - - UpdateEditorExpended((int)layerCount.floatValue); - } - - void UpdateEditorExpended(int layerNumber) - { - if (layerNumber == 4) - { - SetExpandedAreas((uint)LayerExpandable.ShowLayer3, true); - } - if (layerNumber >= 3) - { - SetExpandedAreas((uint)LayerExpandable.ShowLayer2, true); - } - SetExpandedAreas((uint)LayerExpandable.ShowLayer1, true); - } - - int numLayer - { - get { return (int)layerCount.floatValue; } - set - { - layerCount.floatValue = (float)value; - UpdateEditorExpended(value); - } - } - - // This function is call by a script to help artists to ahve up to date material - // that why it is static - public static void SynchronizeAllLayers(Material material) - { - int layerCount = (int)material.GetFloat(kLayerCount); - AssetImporter materialImporter = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(material.GetInstanceID())); - - Material[] layers = null; - - // Material importer can be null when the selected material doesn't exists as asset (Material saved inside the scene) - if (materialImporter != null) - InitializeMaterialLayers(materialImporter, ref layers); - - // We could have no userData in the assets, so test if we have load something - if (layers != null) - { - for (int i = 0; i < layerCount; ++i) - { - SynchronizeLayerProperties(material, layers, i, true); - } - } - } - - void SynchronizeAllLayersProperties(bool excludeUVMappingProperties) - { - for (int i = 0; i < numLayer; ++i) - { - SynchronizeLayerProperties(m_MaterialEditor.target as Material, m_MaterialLayers, i, excludeUVMappingProperties); - } - } - - // This function will look for all referenced lit material, and assign value from Lit to layered lit layers. - // This is based on the naming of the variables, i.E BaseColor will match BaseColor0, if a properties shouldn't be override - // put the name in the exclusionList below - static void SynchronizeLayerProperties(Material material, Material[] layers, int layerIndex, bool excludeUVMappingProperties) - { - Material layerMaterial = layers[layerIndex]; - string[] exclusionList = { kTexWorldScale, kUVBase, kUVMappingMask, kUVDetail, kUVDetailsMappingMask }; - - if (layerMaterial != null) - { - Shader layerShader = layerMaterial.shader; - int propertyCount = ShaderUtil.GetPropertyCount(layerShader); - for (int i = 0; i < propertyCount; ++i) - { - string propertyName = ShaderUtil.GetPropertyName(layerShader, i); - string layerPropertyName = propertyName + layerIndex; - - if (!exclusionList.Contains(propertyName) || !excludeUVMappingProperties) - { - if (material.HasProperty(layerPropertyName)) - { - ShaderUtil.ShaderPropertyType type = ShaderUtil.GetPropertyType(layerShader, i); - switch (type) - { - case ShaderUtil.ShaderPropertyType.Color: - { - material.SetColor(layerPropertyName, layerMaterial.GetColor(propertyName)); - break; - } - case ShaderUtil.ShaderPropertyType.Float: - case ShaderUtil.ShaderPropertyType.Range: - { - material.SetFloat(layerPropertyName, layerMaterial.GetFloat(propertyName)); - break; - } - case ShaderUtil.ShaderPropertyType.Vector: - { - material.SetVector(layerPropertyName, layerMaterial.GetVector(propertyName)); - break; - } - case ShaderUtil.ShaderPropertyType.TexEnv: - { - material.SetTexture(layerPropertyName, layerMaterial.GetTexture(propertyName)); - if (!excludeUVMappingProperties) - { - material.SetTextureOffset(layerPropertyName, layerMaterial.GetTextureOffset(propertyName)); - material.SetTextureScale(layerPropertyName, layerMaterial.GetTextureScale(propertyName)); - } - break; - } - } - } - } - } - } - } - - // We use the user data to save a string that represent the referenced lit material - // so we can keep reference during serialization - static void InitializeMaterialLayers(AssetImporter materialImporter, ref Material[] layers) - { - if (materialImporter.userData != string.Empty) - { - SerializeableGUIDs layersGUID = JsonUtility.FromJson(materialImporter.userData); - if (layersGUID.GUIDArray.Length > 0) - { - layers = new Material[layersGUID.GUIDArray.Length]; - for (int i = 0; i < layersGUID.GUIDArray.Length; ++i) - { - layers[i] = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(layersGUID.GUIDArray[i]), typeof(Material)) as Material; - } - } - } - } - - void SaveMaterialLayers(AssetImporter materialImporter) - { - SerializeableGUIDs layersGUID; - layersGUID.GUIDArray = new string[m_MaterialLayers.Length]; - for (int i = 0; i < m_MaterialLayers.Length; ++i) - { - if (m_MaterialLayers[i] != null) - layersGUID.GUIDArray[i] = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_MaterialLayers[i].GetInstanceID())); - } - - materialImporter.userData = JsonUtility.ToJson(layersGUID); - } - - void DrawLayeringOptions(bool mainLayerInfluenceEnable, uint expended, int layerIndex) - { - // do layering option (if main layer (0) check if there is any content before drawing the foldout) - if (layerIndex > 0 || layerIndex == 0 && !useMainLayerInfluence.hasMixedValue && useMainLayerInfluence.floatValue != 0.0f) - { - using (var header = new HeaderScope(styles.layeringOptionText.text, expended, this, colorDot: s_Styles.layerColors[layerIndex], subHeader: true)) - { - if (header.expanded) - { - // Main layer does not have any options but height base blend. - if (layerIndex > 0) - { - m_MaterialEditor.ShaderProperty(opacityAsDensity[layerIndex], styles.opacityAsDensityText); - - if (mainLayerInfluenceEnable) - { - m_MaterialEditor.ShaderProperty(inheritBaseColor[layerIndex - 1], styles.inheritBaseColorText); - m_MaterialEditor.ShaderProperty(inheritBaseNormal[layerIndex - 1], styles.inheritBaseNormalText); - // Main height influence is only available if the shader use the heightmap for displacement (per vertex or per level) - // We always display it as it can be tricky to know when per pixel displacement is enabled or not - m_MaterialEditor.ShaderProperty(inheritBaseHeight[layerIndex - 1], styles.inheritBaseHeightText); - } - } - else - { - m_MaterialEditor.TexturePropertySingleLine(styles.layerInfluenceMapMaskText, layerInfluenceMaskMap); - } - } - } - } - } - - bool DoLayerGUI(AssetImporter materialImporter, int layerIndex) - { - bool result = false; - - Array values = Enum.GetValues(typeof(LayerExpandable)); - if (layerIndex > 1) //main layer (0) and layer 1 always here - { - int startShowVal = Array.IndexOf(values, LayerExpandable.ShowLayer1); - if (!GetExpandedAreas((uint)values.GetValue(startShowVal + layerIndex))) - { - return false; - } - } - - Material material = m_MaterialEditor.target as Material; - - bool mainLayerInfluenceEnable = useMainLayerInfluence.floatValue > 0.0f; - - int startLayer = Array.IndexOf(values, LayerExpandable.MainLayer); - using (var layerHeader = new HeaderScope(s_Styles.layerLabels[layerIndex].text, (uint)values.GetValue(startLayer + layerIndex), this, false, s_Styles.layerColors[layerIndex])) - { - if (layerHeader.expanded) - { - //Note LayeringOptionMain do not preced LayeringOption1 - int startLayeringOptionValue = Array.IndexOf(values, LayerExpandable.LayeringOption1); - var layeringOptionValue = layerIndex == 0 ? LayerExpandable.LayeringOptionMain : (LayerExpandable)values.GetValue(startLayeringOptionValue + layerIndex - 1); - DrawLayeringOptions(mainLayerInfluenceEnable, (uint)layeringOptionValue, layerIndex); - - int startInputValue = Array.IndexOf(values, LayerExpandable.MainInput); - var inputValue = (LayerExpandable)values.GetValue(startInputValue + layerIndex); - int startDetailValue = Array.IndexOf(values, LayerExpandable.MainDetail); - var detailValue = (LayerExpandable)values.GetValue(startDetailValue + layerIndex); - DoLayerGUI(material, layerIndex, true, m_UseHeightBasedBlend, (uint)inputValue, (uint)detailValue, colorDot: s_Styles.layerColors[layerIndex], subHeader: true); - - if (!GetExpandedAreas((uint)detailValue)) - EditorGUILayout.Space(); - } - } - return result; - } - - void DoLayeringInputGUI() - { - using (var header = new HeaderScope(styles.layersText.text, (uint)Expandable.Input, this)) - { - if (header.expanded) - { - EditorGUI.showMixedValue = layerCount.hasMixedValue; - EditorGUI.BeginChangeCheck(); - int newLayerCount = EditorGUILayout.IntSlider(styles.layerCountText, (int)layerCount.floatValue, 2, 4); - if (EditorGUI.EndChangeCheck()) - { - Material material = m_MaterialEditor.target as Material; - Undo.RecordObject(material, "Change layer count"); - numLayer = newLayerCount; - } - - m_MaterialEditor.TexturePropertySingleLine(styles.layerMapMaskText, layerMaskMap); - - EditorGUI.indentLevel++; - m_MaterialEditor.ShaderProperty(UVBlendMask, styles.UVBlendMaskText); - UVBaseMapping uvBlendMask = (UVBaseMapping)UVBlendMask.floatValue; - - float X, Y, Z, W; - X = (uvBlendMask == UVBaseMapping.UV0) ? 1.0f : 0.0f; - Y = (uvBlendMask == UVBaseMapping.UV1) ? 1.0f : 0.0f; - Z = (uvBlendMask == UVBaseMapping.UV2) ? 1.0f : 0.0f; - W = (uvBlendMask == UVBaseMapping.UV3) ? 1.0f : 0.0f; - - UVMappingMaskBlendMask.colorValue = new Color(X, Y, Z, W); - - if (((UVBaseMapping)UVBlendMask.floatValue == UVBaseMapping.Planar) || - ((UVBaseMapping)UVBlendMask.floatValue == UVBaseMapping.Triplanar)) - { - m_MaterialEditor.ShaderProperty(texWorldScaleBlendMask, styles.layerTexWorldScaleText); - } - m_MaterialEditor.TextureScaleOffsetProperty(layerMaskMap); - EditorGUI.indentLevel--; - - m_MaterialEditor.ShaderProperty(vertexColorMode, styles.vertexColorModeText); - - EditorGUI.BeginChangeCheck(); - EditorGUI.showMixedValue = useMainLayerInfluence.hasMixedValue; - bool mainLayerModeInfluenceEnable = EditorGUILayout.Toggle(styles.useMainLayerInfluenceModeText, useMainLayerInfluence.floatValue > 0.0f); - if (EditorGUI.EndChangeCheck()) - { - useMainLayerInfluence.floatValue = mainLayerModeInfluenceEnable ? 1.0f : 0.0f; - } - - EditorGUI.BeginChangeCheck(); - EditorGUI.showMixedValue = useHeightBasedBlend.hasMixedValue; - m_UseHeightBasedBlend = EditorGUILayout.Toggle(styles.useHeightBasedBlendText, useHeightBasedBlend.floatValue > 0.0f); - if (EditorGUI.EndChangeCheck()) - { - useHeightBasedBlend.floatValue = m_UseHeightBasedBlend ? 1.0f : 0.0f; - } - - if (m_UseHeightBasedBlend) - { - EditorGUI.indentLevel++; - m_MaterialEditor.ShaderProperty(heightTransition, styles.heightTransition); - EditorGUI.indentLevel--; - } - - m_MaterialEditor.ShaderProperty(objectScaleAffectTile, mainLayerModeInfluenceEnable ? styles.objectScaleAffectTileText2 : styles.objectScaleAffectTileText); - } - } - } - - bool DoMaterialReferencesGUI(AssetImporter materialImporter) - { - bool layersChanged = false; - - using (var header = new HeaderScope(styles.materialReferencesText.text, (uint)LayerExpandable.MaterialReferences, this)) - { - if (header.expanded) - { - var width = EditorGUIUtility.labelWidth; - EditorGUIUtility.labelWidth = 90; - - Material material = m_MaterialEditor.target as Material; - - Color originalContentColor = GUI.contentColor; - - float indentOffset = EditorGUI.indentLevel * 15f; - float colorWidth = 14; - float UVWidth = 30; - float copyButtonWidth = EditorGUIUtility.singleLineHeight; - float endOffset = 5f; - - Rect headerLineRect = GUILayoutUtility.GetRect(1, EditorGUIUtility.singleLineHeight); - Rect headerLabelRect = new Rect(headerLineRect.x, headerLineRect.y, EditorGUIUtility.labelWidth - indentOffset, headerLineRect.height); - Rect headerUVRect = new Rect(headerLineRect.x + headerLineRect.width - 48 - endOffset, headerLineRect.y, UVWidth + 5, headerLineRect.height); - Rect headerMaterialDropRect = new Rect(headerLineRect.x + headerLabelRect.width, headerLineRect.y, headerLineRect.width - headerLabelRect.width - headerUVRect.width, headerLineRect.height); - - EditorGUI.LabelField(headerLabelRect, styles.layerNameHeader, EditorStyles.centeredGreyMiniLabel); - EditorGUI.LabelField(headerMaterialDropRect, styles.materialToCopyHeader, EditorStyles.centeredGreyMiniLabel); - EditorGUI.LabelField(headerUVRect, styles.uvHeader, EditorStyles.centeredGreyMiniLabel); - - for (int layerIndex = 0; layerIndex < numLayer; ++layerIndex) - { - using (new EditorGUILayout.HorizontalScope()) - { - EditorGUI.BeginChangeCheck(); - - Rect lineRect = GUILayoutUtility.GetRect(1, EditorGUIUtility.singleLineHeight); - Rect colorRect = new Rect(lineRect.x, lineRect.y, colorWidth, lineRect.height); - Rect materialRect = new Rect(lineRect.x + colorRect.width, lineRect.y, lineRect.width - UVWidth - colorWidth - copyButtonWidth + endOffset, lineRect.height); - Rect uvRect = new Rect(lineRect.x + lineRect.width - copyButtonWidth - UVWidth - endOffset, lineRect.y, UVWidth, lineRect.height); - Rect copyRect = new Rect(lineRect.x + lineRect.width - copyButtonWidth - endOffset, lineRect.y, copyButtonWidth, lineRect.height); - - m_MaterialLayers[layerIndex] = EditorGUI.ObjectField(materialRect, styles.layerLabels[layerIndex], m_MaterialLayers[layerIndex], typeof(Material), true) as Material; - if (EditorGUI.EndChangeCheck()) - { - Undo.RecordObject(materialImporter, "Change layer material"); - SynchronizeLayerProperties(material, m_MaterialLayers, layerIndex, true); - layersChanged = true; - } - - - colorRect.width = 30f; - GUI.contentColor = styles.layerColors[layerIndex]; - EditorGUI.LabelField(colorRect, "■"); - GUI.contentColor = originalContentColor; - - m_WithUV[layerIndex] = EditorGUI.Toggle(uvRect, m_WithUV[layerIndex]); - - if (GUI.Button(copyRect, GUIContent.none)) - { - SynchronizeLayerProperties(material, m_MaterialLayers, layerIndex, !m_WithUV[layerIndex]); - layersChanged = true; - } - - //fake the icon with two Console icon - //Rect copyRect = GUILayoutUtility.GetLastRect(); - copyRect.x -= 16; - copyRect.width = 40; - EditorGUI.LabelField(copyRect, styles.copyButtonIcon); - copyRect.x -= 3; - copyRect.y += 3; - EditorGUI.LabelField(copyRect, styles.copyButtonIcon); - } - } - - EditorGUIUtility.labelWidth = width; - } - } - - return layersChanged; - } - - bool DoLayersGUI(AssetImporter materialImporter) - { - if (materialImporter == null) - { - EditorGUILayout.HelpBox(styles.materialImporterNotAvailable, MessageType.Warning); - return false; - } - - bool layerChanged = false; - - GUI.changed = false; - - DoLayeringInputGUI(); - - layerChanged |= DoMaterialReferencesGUI(materialImporter); - - for (int i = 0; i < numLayer; i++) - { - layerChanged |= DoLayerGUI(materialImporter, i); - } - - layerChanged |= GUI.changed; - GUI.changed = false; - - return layerChanged; - } - - protected override bool ShouldEmissionBeEnabled(Material material) - { - return (material.GetColor(kEmissiveColor) != Color.black) || material.GetTexture(kEmissiveColorMap); - } - - protected override void SetupMaterialKeywordsAndPassInternal(Material material) - { - SetupMaterialKeywordsAndPass(material); - } - - static public void SetupLayersMappingKeywords(Material material) - { - // object scale affect tile - CoreUtils.SetKeyword(material, "_LAYER_TILING_COUPLED_WITH_UNIFORM_OBJECT_SCALE", material.GetFloat(kObjectScaleAffectTile) > 0.0f); - - // Blend mask - UVBaseMapping UVBlendMaskMapping = (UVBaseMapping)material.GetFloat(kUVBlendMask); - CoreUtils.SetKeyword(material, "_LAYER_MAPPING_PLANAR_BLENDMASK", UVBlendMaskMapping == UVBaseMapping.Planar); - CoreUtils.SetKeyword(material, "_LAYER_MAPPING_TRIPLANAR_BLENDMASK", UVBlendMaskMapping == UVBaseMapping.Triplanar); - - int numLayer = (int)material.GetFloat(kLayerCount); - - // Layer - if (numLayer == 4) - { - CoreUtils.SetKeyword(material, "_LAYEREDLIT_4_LAYERS", true); - CoreUtils.SetKeyword(material, "_LAYEREDLIT_3_LAYERS", false); - } - else if (numLayer == 3) - { - CoreUtils.SetKeyword(material, "_LAYEREDLIT_4_LAYERS", false); - CoreUtils.SetKeyword(material, "_LAYEREDLIT_3_LAYERS", true); - } - else - { - CoreUtils.SetKeyword(material, "_LAYEREDLIT_4_LAYERS", false); - CoreUtils.SetKeyword(material, "_LAYEREDLIT_3_LAYERS", false); - } - - const string kLayerMappingPlanar = "_LAYER_MAPPING_PLANAR"; - const string kLayerMappingTriplanar = "_LAYER_MAPPING_TRIPLANAR"; - - // We have to check for each layer if the UV2 or UV3 is needed. - bool needUV3 = false; - bool needUV2 = false; - - for (int i = 0; i < numLayer; ++i) - { - string layerUVBaseParam = string.Format("{0}{1}", kUVBase, i); - UVBaseMapping layerUVBaseMapping = (UVBaseMapping)material.GetFloat(layerUVBaseParam); - string currentLayerMappingPlanar = string.Format("{0}{1}", kLayerMappingPlanar, i); - CoreUtils.SetKeyword(material, currentLayerMappingPlanar, layerUVBaseMapping == UVBaseMapping.Planar); - string currentLayerMappingTriplanar = string.Format("{0}{1}", kLayerMappingTriplanar, i); - CoreUtils.SetKeyword(material, currentLayerMappingTriplanar, layerUVBaseMapping == UVBaseMapping.Triplanar); - - string uvBase = string.Format("{0}{1}", kUVBase, i); - string uvDetail = string.Format("{0}{1}", kUVDetail, i); - - if (((UVDetailMapping)material.GetFloat(uvDetail) == UVDetailMapping.UV2) || ((UVBaseMapping)material.GetFloat(uvBase) == UVBaseMapping.UV2)) - { - needUV2 = true; - } - - if (((UVDetailMapping)material.GetFloat(uvDetail) == UVDetailMapping.UV3) || ((UVBaseMapping)material.GetFloat(uvBase) == UVBaseMapping.UV3)) - { - needUV3 = true; - break; // If we find it UV3 let's early out - } - } - - if (needUV3) - { - material.DisableKeyword("_REQUIRE_UV2"); - material.EnableKeyword("_REQUIRE_UV3"); - } - else if (needUV2) - { - material.EnableKeyword("_REQUIRE_UV2"); - material.DisableKeyword("_REQUIRE_UV3"); - } - else - { - material.DisableKeyword("_REQUIRE_UV2"); - material.DisableKeyword("_REQUIRE_UV3"); - } - } - - // All Setup Keyword functions must be static. It allow to create script to automatically update the shaders with a script if code change - static new public void SetupMaterialKeywordsAndPass(Material material) - { - SetupBaseLitKeywords(material); - SetupBaseLitMaterialPass(material); - SetupLayersMappingKeywords(material); - - for (int i = 0; i < kMaxLayerCount; ++i) - { - NormalMapSpace normalMapSpace = ((NormalMapSpace)material.GetFloat(kNormalMapSpace + i)); - - CoreUtils.SetKeyword(material, "_NORMALMAP_TANGENT_SPACE" + i, normalMapSpace == NormalMapSpace.TangentSpace); - - if (normalMapSpace == NormalMapSpace.TangentSpace) - { - CoreUtils.SetKeyword(material, "_NORMALMAP" + i, material.GetTexture(kNormalMap + i) || material.GetTexture(kDetailMap + i)); - CoreUtils.SetKeyword(material, "_BENTNORMALMAP" + i, material.GetTexture(kBentNormalMap + i)); - } - else - { - CoreUtils.SetKeyword(material, "_NORMALMAP" + i, material.GetTexture(kNormalMapOS + i) || material.GetTexture(kDetailMap + i)); - CoreUtils.SetKeyword(material, "_BENTNORMALMAP" + i, material.GetTexture(kBentNormalMapOS + i)); - } - - CoreUtils.SetKeyword(material, "_MASKMAP" + i, material.GetTexture(kMaskMap + i)); - - CoreUtils.SetKeyword(material, "_DETAIL_MAP" + i, material.GetTexture(kDetailMap + i)); - - CoreUtils.SetKeyword(material, "_HEIGHTMAP" + i, material.GetTexture(kHeightMap + i)); - - CoreUtils.SetKeyword(material, "_SUBSURFACE_MASK_MAP" + i, material.GetTexture(kSubsurfaceMaskMap + i)); - CoreUtils.SetKeyword(material, "_THICKNESSMAP" + i, material.GetTexture(kThicknessMap + i)); - } - - CoreUtils.SetKeyword(material, "_INFLUENCEMASK_MAP", material.GetTexture(kLayerInfluenceMaskMap) && material.GetFloat(kkUseMainLayerInfluence) != 0.0f); - - CoreUtils.SetKeyword(material, "_EMISSIVE_MAPPING_PLANAR", ((UVBaseMapping)material.GetFloat(kUVEmissive)) == UVBaseMapping.Planar && material.GetTexture(kEmissiveColorMap)); - CoreUtils.SetKeyword(material, "_EMISSIVE_MAPPING_TRIPLANAR", ((UVBaseMapping)material.GetFloat(kUVEmissive)) == UVBaseMapping.Triplanar && material.GetTexture(kEmissiveColorMap)); - CoreUtils.SetKeyword(material, "_EMISSIVE_COLOR_MAP", material.GetTexture(kEmissiveColorMap)); - CoreUtils.SetKeyword(material, "_ENABLESPECULAROCCLUSION", material.GetFloat(kEnableSpecularOcclusion) > 0.0f); - - CoreUtils.SetKeyword(material, "_MAIN_LAYER_INFLUENCE_MODE", material.GetFloat(kkUseMainLayerInfluence) != 0.0f); - - VertexColorMode VCMode = (VertexColorMode)material.GetFloat(kVertexColorMode); - if (VCMode == VertexColorMode.Multiply) - { - CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_MUL", true); - CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_ADD", false); - } - else if (VCMode == VertexColorMode.Add) - { - CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_MUL", false); - CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_ADD", true); - } - else - { - CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_MUL", false); - CoreUtils.SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR_ADD", false); - } - - bool useHeightBasedBlend = material.GetFloat(kUseHeightBasedBlend) != 0.0f; - CoreUtils.SetKeyword(material, "_HEIGHT_BASED_BLEND", useHeightBasedBlend); - - bool useDensityModeEnable = false; - for (int i = 0; i < material.GetInt(kLayerCount); ++i) - { - useDensityModeEnable |= material.GetFloat(kOpacityAsDensity + i) != 0.0f; - } - CoreUtils.SetKeyword(material, "_DENSITY_MODE", useDensityModeEnable); - - MaterialId materialId = (MaterialId)material.GetFloat(kMaterialID); - CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_SUBSURFACE_SCATTERING", materialId == MaterialId.LitSSS); - CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_TRANSMISSION", materialId == MaterialId.LitTranslucent || (materialId == MaterialId.LitSSS && material.GetFloat(kTransmissionEnable) > 0.0f)); - } - - public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) - { - FindBaseMaterialProperties(props); - FindMaterialProperties(props); - - m_MaterialEditor = materialEditor; - - // We should always register the key used to keep collapsable state - InitExpandableState(materialEditor); - - // We should always do this call at the beginning - m_MaterialEditor.serializedObject.Update(); - - Material material = m_MaterialEditor.target as Material; - AssetImporter materialImporter = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(material.GetInstanceID())); - - // Material importer can be null when the selected material doesn't exists as asset (Material saved inside the scene) - if (materialImporter != null) - InitializeMaterialLayers(materialImporter, ref m_MaterialLayers); - - bool optionsChanged = false; - EditorGUI.BeginChangeCheck(); - { - using (var header = new HeaderScope(StylesBaseUnlit.optionText, (uint)Expandable.Base, this)) - { - if (header.expanded) - BaseMaterialPropertiesGUI(); - } - MaterialTesselationPropertiesGUI(); - VertexAnimationPropertiesGUI(); - } - if (EditorGUI.EndChangeCheck()) - { - optionsChanged = true; - } - - // In case of pixel displacement and layered shader, all layers must used the same texture mapping for layer that have a heightmap - // (Else the algorithm will not work correctly) - if ((DisplacementMode)displacementMode.floatValue == DisplacementMode.Pixel) - { - float compareValue = -1.0f; - bool match = true; - - if (material.GetTexture(kHeightMap + 0)) - { - compareValue = UVBase[0].floatValue; - } - if (material.GetTexture(kHeightMap + 1)) - { - if (compareValue == -1.0f) - compareValue = UVBase[1].floatValue; - else if (compareValue != UVBase[1].floatValue) - match = false; - } - if (material.GetTexture(kHeightMap + 2)) - { - if (compareValue == -1.0f) - compareValue = UVBase[2].floatValue; - else if (compareValue != UVBase[2].floatValue) - match = false; - } - if (material.GetTexture(kHeightMap + 3)) - { - if (compareValue == -1.0f) - compareValue = UVBase[3].floatValue; - else if (compareValue != UVBase[3].floatValue) - match = false; - } - - if (!match) - { - EditorGUILayout.HelpBox(styles.perPixelDisplacementLayersWarning.text, MessageType.Warning); - } - } - - - bool layerChanged = DoLayersGUI(materialImporter); - EditorGUI.BeginChangeCheck(); - { - DoEmissiveGUI(material); - } - if (EditorGUI.EndChangeCheck()) - { - optionsChanged = true; - } - - using (var header = new HeaderScope(StylesBaseUnlit.advancedText, (uint)Expandable.Advance, this)) - { - if (header.expanded) - { - // NB RenderQueue editor is not shown on purpose: we want to override it based on blend mode - m_MaterialEditor.EnableInstancingField(); - m_MaterialEditor.ShaderProperty(enableSpecularOcclusion, Styles.enableSpecularOcclusionText); - -#if ENABLE_VIRTUALTEXTURES - if (virtualTexturing != null) - { - m_MaterialEditor.ShaderProperty(virtualTexturing, StylesBaseLit.enableVirtualTextureText); - } -#endif - } - } - - if (layerChanged || optionsChanged) - { - foreach (var obj in m_MaterialEditor.targets) - { - SetupMaterialKeywordsAndPassInternal((Material)obj); - } - - // SaveAssetsProcessor the referenced material in the users data - if (materialImporter != null) - SaveMaterialLayers(materialImporter); - } - - // We should always do this call at the end - m_MaterialEditor.serializedObject.ApplyModifiedProperties(); - } - } -} // namespace UnityEditor diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader index 7e5456ad364..08ff3c5e020 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader @@ -366,15 +366,15 @@ Shader "HDRP/LayeredLit" [ToggleUI] _ReceivesSSR("Receives SSR", Float) = 1.0 [Toggle] _VirtualTexturing("Virtual Texturing", Float) = 0.0 - _TextureStack0("_TextureStack0", Stack) = { _BaseColorMap0 _MaskMap0 _NormalMap0 } - _TextureStack1("_TextureStack1", Stack) = { _BaseColorMap1 _MaskMap1 _NormalMap1 } - _TextureStack2("_TextureStack2", Stack) = { _BaseColorMap2 _MaskMap2 _NormalMap2 } - _TextureStack3("_TextureStack3", Stack) = { _BaseColorMap3 _MaskMap3 _NormalMap3 } + _TextureStack0("_TextureStack0", TextureStack) = { _BaseColorMap0 _MaskMap0 _NormalMap0 } + _TextureStack1("_TextureStack1", TextureStack) = { _BaseColorMap1 _MaskMap1 _NormalMap1 } + _TextureStack2("_TextureStack2", TextureStack) = { _BaseColorMap2 _MaskMap2 _NormalMap2 } + _TextureStack3("_TextureStack3", TextureStack) = { _BaseColorMap3 _MaskMap3 _NormalMap3 } } HLSLINCLUDE - #pragma target 5.0 + #pragma target 4.5 #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch #pragma shader_feature_local _ALPHATEST_ON @@ -644,7 +644,7 @@ Shader "HDRP/LayeredLit" HLSLPROGRAM #pragma multi_compile _ WRITE_NORMAL_BUFFER #pragma multi_compile _ WRITE_MSAA_DEPTH - + #define SHADERPASS SHADERPASS_MOTION_VECTORS #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" #ifdef WRITE_NORMAL_BUFFER // If enabled we need all regular interpolator @@ -759,7 +759,7 @@ Shader "HDRP/LayeredLit" #pragma multi_compile _ SHADOWS_SHADOWMASK // Setup DECALS_OFF so the shader stripper can remove variants #pragma multi_compile DECALS_OFF DECALS_3RT DECALS_4RT - + // Supported shadow modes per light type #pragma multi_compile SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index 76b0da01751..a2e26f8ae5a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -10,77 +10,77 @@ // for this we put the constraint that the sampler are the same in a layered material for all textures of the same type // then we take the sampler matching the first textures use of this type #if !VIRTUAL_TEXTURES_ACTIVE - #if defined(_NORMALMAP0) - #if defined(_NORMALMAP_TANGENT_SPACE0) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap0 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS0 - #endif - #elif defined(_NORMALMAP1) - #if defined(_NORMALMAP_TANGENT_SPACE1) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap1 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS1 - #endif - #elif defined(_NORMALMAP2) - #if defined(_NORMALMAP_TANGENT_SPACE2) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap2 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS2 - #endif - #elif defined(_NORMALMAP3) - #if defined(_NORMALMAP_TANGENT_SPACE3) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap3 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS3 - #endif - #elif defined(_BENTNORMALMAP0) - #if defined(_NORMALMAP_TANGENT_SPACE0) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap0 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS0 - #endif - #elif defined(_BENTNORMALMAP1) - #if defined(_NORMALMAP_TANGENT_SPACE1) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap1 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS1 - #endif - #elif defined(_BENTNORMALMAP2) - #if defined(_NORMALMAP_TANGENT_SPACE2) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap2 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS2 - #endif - #else - #if defined(_NORMALMAP_TANGENT_SPACE3) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap3 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS3 - #endif - #endif + #if defined(_NORMALMAP0) + #if defined(_NORMALMAP_TANGENT_SPACE0) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap0 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS0 + #endif + #elif defined(_NORMALMAP1) + #if defined(_NORMALMAP_TANGENT_SPACE1) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap1 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS1 + #endif + #elif defined(_NORMALMAP2) + #if defined(_NORMALMAP_TANGENT_SPACE2) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap2 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS2 + #endif + #elif defined(_NORMALMAP3) + #if defined(_NORMALMAP_TANGENT_SPACE3) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap3 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS3 + #endif + #elif defined(_BENTNORMALMAP0) + #if defined(_NORMALMAP_TANGENT_SPACE0) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap0 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS0 + #endif + #elif defined(_BENTNORMALMAP1) + #if defined(_NORMALMAP_TANGENT_SPACE1) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap1 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS1 + #endif + #elif defined(_BENTNORMALMAP2) + #if defined(_NORMALMAP_TANGENT_SPACE2) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap2 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS2 + #endif + #else + #if defined(_NORMALMAP_TANGENT_SPACE3) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap3 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS3 + #endif + #endif #endif #if defined(_DETAIL_MAP0) #define SAMPLER_DETAILMAP_IDX sampler_DetailMap0 #elif defined(_DETAIL_MAP1) #define SAMPLER_DETAILMAP_IDX sampler_DetailMap1 -#elif defined(_DETAIL_MAP2) +#elif defined(_DETAIL_MAP2) #define SAMPLER_DETAILMAP_IDX sampler_DetailMap2 #else #define SAMPLER_DETAILMAP_IDX sampler_DetailMap3 #endif #if !VIRTUAL_TEXTURES_ACTIVE - #if defined(_MASKMAP0) - #define SAMPLER_MASKMAP_IDX sampler_MaskMap0 - #elif defined(_MASKMAP1) - #define SAMPLER_MASKMAP_IDX sampler_MaskMap1 - #elif defined(_MASKMAP2) - #define SAMPLER_MASKMAP_IDX sampler_MaskMap2 - #else - #define SAMPLER_MASKMAP_IDX sampler_MaskMap3 - #endif + #if defined(_MASKMAP0) + #define SAMPLER_MASKMAP_IDX sampler_MaskMap0 + #elif defined(_MASKMAP1) + #define SAMPLER_MASKMAP_IDX sampler_MaskMap1 + #elif defined(_MASKMAP2) + #define SAMPLER_MASKMAP_IDX sampler_MaskMap2 + #else + #define SAMPLER_MASKMAP_IDX sampler_MaskMap3 + #endif #endif #if defined(_HEIGHTMAP0) @@ -152,12 +152,6 @@ #undef _MASKMAP_IDX #undef _BENTNORMALMAP_IDX -//#if VIRTUAL_TEXTURES_ACTIVE -//#define VT_WAS_ACTIVE 1 -//#endif -//#undef VIRTUAL_TEXTURES_ACTIVE -//#define VIRTUAL_TEXTURES_ACTIVE 0 - #define LAYER_INDEX 1 #define ADD_IDX(Name) Name##1 #ifdef _NORMALMAP1 @@ -260,11 +254,6 @@ #undef _MASKMAP_IDX #undef _BENTNORMALMAP_IDX -//#if defined(VT_WAS_ACTIVE) && VT_WAS_ACTIVE > 0 -//#undef VIRTUAL_TEXTURES_ACTIVE -//#define VIRTUAL_TEXTURES_ACTIVE 1 -//#endif - float3 BlendLayeredVector3(float3 x0, float3 x1, float3 x2, float3 x3, float weight[4]) { float3 result = float3(0.0, 0.0, 0.0); @@ -503,6 +492,7 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod // Value for main layer is not use for blending itself but for alternate weighting like density. // Settings this specific Main layer blend mask in alpha allow to be transparent in case we don't use it and 1 is provide by default. #if VIRTUAL_TEXTURES_ACTIVE + // If VT is active, we sample using the sampler of the _BaseColor (_c0) of layer 0 (TextureStack0); we do this because we have no capacity left to create a sampler for the _LayerMaskMap float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_TextureStack0_c0, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_TextureStack0_c0, layerTexCoord.blendMask); #else float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask); @@ -525,6 +515,7 @@ float GetInfluenceMask(LayerTexCoord layerTexCoord, bool useLodSampling = false, { // Sample influence mask with same mapping as Main layer #if VIRTUAL_TEXTURES_ACTIVE + // If VT is active, we sample using the sampler of the _BaseColor (_c0) of layer 0 (TextureStack0); we do this because we have no capacity left to create a sampler for the _LayerInfluenceMaskMap return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_TextureStack0_c0, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_TextureStack0_c0, layerTexCoord.base0).r; #else return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0).r; @@ -653,20 +644,20 @@ float3 ComputeMainBaseColorInfluence(float influenceMask, float3 baseColor0, flo float textureBias = 15.0; // Use maximum bias #if VIRTUAL_TEXTURES_ACTIVE - // TODO here we still do non-VT sampling to get the mean colors, instead of PrepareStack() followed by SampleStack(); ideally we have a PrepareStack_Bias() and/or a SampleStack_Bias() - // which takes an additional argument to bias the sampled LOD. This approach doesn't work here as the VT system is designed to sample a single *tile* at the lowest resolution. - float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_TextureStack0_c0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; - float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_TextureStack0_c0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; - float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_TextureStack0_c0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb; - float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_TextureStack0_c0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb; + // TODO here we still do non-VT sampling to get the mean colors, instead of PrepareStack() followed by SampleStack(); ideally we have a PrepareStack_Bias() and/or a SampleStack_Bias() + // which takes an additional argument to bias the sampled LOD. This approach doesn't work here as the VT system is designed to sample a single *tile* at the lowest resolution. + float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_TextureStack0_c0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; + float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_TextureStack0_c0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; + float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_TextureStack0_c0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb; + float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_TextureStack0_c0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb; #else - float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; + float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_BaseColorMap0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb; float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_BaseColorMap0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb; #endif - float3 meanColor = BlendLayeredVector3(baseMeanColor0, baseMeanColor1, baseMeanColor2, baseMeanColor3, weights); + float3 meanColor = BlendLayeredVector3(baseMeanColor0, baseMeanColor1, baseMeanColor2, baseMeanColor3, weights); // If we inherit from base layer, we will add a bit of it // We add variance of current visible level and the base color 0 or mean (to retrieve initial color) depends on influence diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index 527ab7a1baa..9fa1d73f9b7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -107,10 +107,10 @@ Shader "HDRP/Lit" _DistortionBlurRemapMin("DistortionBlurRemapMin", Float) = 0.0 _DistortionBlurRemapMax("DistortionBlurRemapMax", Float) = 1.0 - + [ToggleUI] _UseShadowThreshold("_UseShadowThreshold", Float) = 0.0 [ToggleUI] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0 - _AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 + _AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 _AlphaCutoffShadow("_AlphaCutoffShadow", Range(0.0, 1.0)) = 0.5 _AlphaCutoffPrepass("_AlphaCutoffPrepass", Range(0.0, 1.0)) = 0.5 _AlphaCutoffPostpass("_AlphaCutoffPostpass", Range(0.0, 1.0)) = 0.5 @@ -541,7 +541,7 @@ Shader "HDRP/Lit" HLSLPROGRAM #pragma multi_compile _ WRITE_NORMAL_BUFFER #pragma multi_compile _ WRITE_MSAA_DEPTH - + #define SHADERPASS SHADERPASS_MOTION_VECTORS #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" @@ -639,7 +639,7 @@ Shader "HDRP/Lit" #pragma multi_compile _ SHADOWS_SHADOWMASK // Setup DECALS_OFF so the shader stripper can remove variants #pragma multi_compile DECALS_OFF DECALS_3RT DECALS_4RT - + // Supported shadow modes per light type #pragma multi_compile SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH @@ -705,7 +705,7 @@ Shader "HDRP/Lit" #pragma multi_compile _ SHADOWS_SHADOWMASK // Setup DECALS_OFF so the shader stripper can remove variants #pragma multi_compile DECALS_OFF DECALS_3RT DECALS_4RT - + // Supported shadow modes per light type #pragma multi_compile SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH @@ -781,17 +781,17 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma raytracing test + #pragma raytracing test #pragma multi_compile _ DEBUG_DISPLAY #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ DYNAMICLIGHTMAP_ON - + #define SHADERPASS SHADERPASS_RAYTRACING_INDIRECT #define SKIP_RASTERIZED_SHADOWS - // multi compile that allows us to + // multi compile that allows us to #pragma multi_compile _ DIFFUSE_LIGHTING_ONLY // We use the low shadow maps for raytracing @@ -803,9 +803,9 @@ Shader "HDRP/Lit" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl" - + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl" - + #include "Packages/com.unity.render-pipelines.high-definition\Runtime\Lighting\LightLoop\LightLoopDef.hlsl" #define HAS_LIGHTLOOP #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" @@ -824,13 +824,13 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma raytracing test + #pragma raytracing test #pragma multi_compile _ DEBUG_DISPLAY #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ DYNAMICLIGHTMAP_ON - + #define SHADERPASS SHADERPASS_RAYTRACING_FORWARD #define SKIP_RASTERIZED_SHADOWS @@ -843,9 +843,9 @@ Shader "HDRP/Lit" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl" - + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl" - + #include "Packages/com.unity.render-pipelines.high-definition\Runtime\Lighting\LightLoop\LightLoopDef.hlsl" #define HAS_LIGHTLOOP #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 64b1e0ad07e..006d051c993 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -1,11 +1,3 @@ -#undef VIRTUAL_TEXTURES_ACTIVE_ON_LAYER - -#if (!defined(LAYER_INDEX) || (LAYER_INDEX <= 3)) && (VIRTUAL_TEXTURES_ACTIVE > 0) -#define VIRTUAL_TEXTURES_ACTIVE_ON_LAYER 1 -#else -#define VIRTUAL_TEXTURES_ACTIVE_ON_LAYER 0 -#endif - void ADD_IDX(ComputeLayerTexCoord)( // Uv related parameters float2 texCoord0, float2 texCoord1, float2 texCoord2, float2 texCoord3, float4 uvMappingMask, float4 uvMappingMaskDetails, // scale and bias for base and detail + global tiling factor (for layered lit only) @@ -111,45 +103,48 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float #ifdef _NORMALMAP_IDX #ifdef _NORMALMAP_TANGENT_SPACE_IDX - //TODO(ddebaets) VT does not handle full range of normal map sampling/reconstruction so special case here... -#if VIRTUAL_TEXTURES_ACTIVE_ON_LAYER - - #ifdef SURFACE_GRADIENT - real4 packedNormal = SampleStack(stackInfo, ADD_IDX(_NormalMap)); - if(ADD_IDX(layerTexCoord.base).mappingType == UV_MAPPING_TRIPLANAR) - { - // Skip VT - normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), ADD_IDX(sampler_NormalMap), ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); - } - else if(ADD_IDX(layerTexCoord.base).mappingType == UV_MAPPING_PLANAR) - { - float4 packedNormal = SampleStack(stackInfo, ADD_IDX(_NormalMap)); - packedNormal.a *= packedNormal.r; - real2 vTGranite = packedNormal.ag * 2.0 - 1.0; - real rcpZGranite = rsqrt(max(1 - Sq(vTGranite.x) - Sq(vTGranite.y), Sq(FLT_EPS))); - real2 derivYPlaneGranite = ConvertTangentSpaceNormalToHeightMapGradient(vTGranite.xy, rcpZGranite, ADD_IDX(_NormalScale)); - - real3 volumeGradGranite = real3(derivYPlaneGranite.x, 0.0, derivYPlaneGranite.y); - normalTS = SurfaceGradientFromVolumeGradient(ADD_IDX(layerTexCoord.base).normalWS, volumeGradGranite); - } - else - { - packedNormal.a *= packedNormal.r; - real2 vT = packedNormal.ag * 2.0 - 1.0; - real rcpZ = rsqrt(max(1 - Sq(vT.x) - Sq(vT.y), Sq(FLT_EPS))); - real2 deriv = ConvertTangentSpaceNormalToHeightMapGradient(vT.xy, rcpZ, ADD_IDX(_NormalScale)); - - normalTS = SurfaceGradientFromTBN(deriv, ADD_IDX(layerTexCoord.base).tangentWS, ADD_IDX(layerTexCoord.base).bitangentWS); - } - #else // NO SURFACE_GRADIENT - normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); - #endif -#elif VIRTUAL_TEXTURES_ACTIVE - normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), sampler_TextureStack0_c2, ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); + +#if VIRTUAL_TEXTURES_ACTIVE + //TODO VT does not handle full range of normal map sampling/reconstruction so special cases are considered here... + // - Triplanar mapping is unsupported + // - TODO @jelsayeh verify with "UNITY_NO_DXT5nm" defined + #ifdef SURFACE_GRADIENT + if(ADD_IDX(layerTexCoord.base).mappingType == UV_MAPPING_TRIPLANAR) + { + // Skip VT + normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), ADD_IDX(sampler_NormalMap), ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); + } + else if(ADD_IDX(layerTexCoord.base).mappingType == UV_MAPPING_PLANAR) + { + float4 packedNormal = SampleStack(stackInfo, ADD_IDX(_NormalMap)); + packedNormal.a *= packedNormal.r; + real2 vTGranite = packedNormal.ag * 2.0 - 1.0; + real rcpZGranite = rsqrt(max(1 - Sq(vTGranite.x) - Sq(vTGranite.y), Sq(FLT_EPS))); + real2 derivYPlaneGranite = ConvertTangentSpaceNormalToHeightMapGradient(vTGranite.xy, rcpZGranite, ADD_IDX(_NormalScale)); + + real3 volumeGradGranite = real3(derivYPlaneGranite.x, 0.0, derivYPlaneGranite.y); + normalTS = SurfaceGradientFromVolumeGradient(ADD_IDX(layerTexCoord.base).normalWS, volumeGradGranite); + } + else + { + float4 packedNormal = SampleStack(stackInfo, ADD_IDX(_NormalMap)); + packedNormal.a *= packedNormal.r; + real2 vT = packedNormal.ag * 2.0 - 1.0; + real rcpZ = rsqrt(max(1 - Sq(vT.x) - Sq(vT.y), Sq(FLT_EPS))); + real2 deriv = ConvertTangentSpaceNormalToHeightMapGradient(vT.xy, rcpZ, ADD_IDX(_NormalScale)); + + normalTS = SurfaceGradientFromTBN(deriv, ADD_IDX(layerTexCoord.base).tangentWS, ADD_IDX(layerTexCoord.base).bitangentWS); + } + #else // NO SURFACE_GRADIENT + // - TODO @jelsayeh "NO_SURFACE_GRADIENT" doesn't yet differentiate between TRIPLANAR and regular + normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); + #endif #else - normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), ADD_IDX(sampler_NormalMap), ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); + normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), SAMPLER_NORMALMAP_IDX, ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); #endif + #else // Object space + // We forbid scale in case of object space as it make no sense // To be able to combine object space normal with detail map then later we will re-transform it to world space. // Note: There is no such a thing like triplanar with object space normal, so we call directly 2D function @@ -162,6 +157,7 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float float3 normalOS = UnpackNormalRGB(SAMPLE_TEXTURE2D(ADD_IDX(_NormalMapOS), SAMPLER_NORMALMAP_IDX, ADD_IDX(layerTexCoord.base).uv), 1.0); normalTS = TransformObjectToTangent(normalOS, input.tangentToWorld); #endif + #endif #ifdef _DETAIL_MAP_IDX @@ -170,13 +166,16 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float #else normalTS = lerp(normalTS, BlendNormalRNM(normalTS, detailNormalTS), detailMask); // todo: detailMask should lerp the angle of the quaternion rotation, not the normals #endif - #endif -#else + #endif // _NORMALMAP_TANGENT_SPACE_IDX + +#else // _NORMALMAP_IDX not defined + #ifdef SURFACE_GRADIENT normalTS = float3(0.0, 0.0, 0.0); // No gradient #else normalTS = float3(0.0, 0.0, 1.0); #endif + #endif return normalTS; @@ -223,19 +222,13 @@ float3 ADD_IDX(GetBentNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, f // Return opacity float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out SurfaceData surfaceData, out float3 normalTS, out float3 bentNormalTS) { -#if VIRTUAL_TEXTURES_ACTIVE_ON_LAYER - // Prepare the VT stack for sampling - StackInfo stackInfo = PrepareStack(UVMappingTo2D(ADD_IDX(layerTexCoord.base)), ADD_IDX(_TextureStack)); - surfaceData.VTFeedback = GetResolveOutput(stackInfo); + // Prepare the VT stack for sampling + StackInfo stackInfo = PrepareStack(UVMappingTo2D(ADD_IDX(layerTexCoord.base)), ADD_IDX(_TextureStack)); + surfaceData.VTFeedback = GetResolveOutput(stackInfo); +#if VIRTUAL_TEXTURES_ACTIVE const float4 baseColorValue = SampleStack(stackInfo, ADD_IDX(_BaseColorMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); -#elif VIRTUAL_TEXTURES_ACTIVE - const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), sampler_TextureStack0_c0, ADD_IDX(layerTexCoord.base)); - surfaceData.VTFeedback = float4(1, 1, 1, 1); - StackInfo stackInfo; #else const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); - surfaceData.VTFeedback = float4(1, 1, 1, 1); - StackInfo stackInfo; #endif float alpha = baseColorValue.a * ADD_IDX(_BaseColor).a; @@ -257,12 +250,10 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out #ifdef _MASKMAP_IDX -#if VIRTUAL_TEXTURES_ACTIVE_ON_LAYER - const float4 maskValue = SampleStack(stackInfo, ADD_IDX(_MaskMap)); -#elif VIRTUAL_TEXTURES_ACTIVE - const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), sampler_TextureStack0_c0, ADD_IDX(layerTexCoord.base)); -#else - const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), ADD_IDX(sampler_MaskMap), ADD_IDX(layerTexCoord.base)); +#if VIRTUAL_TEXTURES_ACTIVE + const float4 maskValue = SampleStack(stackInfo, ADD_IDX(_MaskMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).b; +#else + const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)); #endif #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index 85ad1c8cd80..6de13eba9f6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -88,21 +88,15 @@ PROP_DECL_TEX2D(_NormalMap); SAMPLER(sampler_LayerMaskMap); SAMPLER(sampler_LayerInfluenceMaskMap); #else -PROP_DECL_TEX2D(_NormalMap); // have the _NormalMaps *with* their samplers for now, to catch unsupported normal map usage +// Have the _NormalMaps *with* their samplers for now, to catch unsupported normal map usage +// TODO @jelsayeh can we do without the samplers? Look at UV_MAPPING_TRIPLANAR in GetNormalTS() (LitDataIndividualLayer.hlsl) +PROP_DECL_TEX2D(_NormalMap); +// The _BaseColorMaps are still required for sampling the mean color in ComputeMainBaseColorInfluence() (LayeredLitData.hlsl) TEXTURE2D(_BaseColorMap0); - TEXTURE2D(_BaseColorMap1); -TEXTURE2D(_MaskMap1); -//TEXTURE2D(_NormalMap1); - TEXTURE2D(_BaseColorMap2); -TEXTURE2D(_MaskMap2); -//TEXTURE2D(_NormalMap2); - TEXTURE2D(_BaseColorMap3); -TEXTURE2D(_MaskMap3); -//TEXTURE2D(_NormalMap3); #endif PROP_DECL_TEX2D(_BentNormalMap); From 3eb21e7cfd4845dc28f1ad4bb42b964d9ac26f1c Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 17 Jul 2019 12:08:09 +0200 Subject: [PATCH 034/143] Fix script compiler error when VT is desabled --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 18303744824..c43aeb63be9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -3898,6 +3898,7 @@ RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) } // GBuffer vt feedback is handled in GBufferManager +#if ENABLE_VIRTUALTEXTURES RTHandleSystem.RTHandle GetVTFeedbackBufferForForward(HDCamera hdCamera) { if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) @@ -3909,5 +3910,6 @@ RTHandleSystem.RTHandle GetVTFeedbackBufferForForward(HDCamera hdCamera) return m_GbufferManager.GetVTFeedbackBuffer(); } } +#endif } } From 17cfc745ce85d7c973c4e3cc423d91f9f8305968 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 17 Jul 2019 14:59:36 +0200 Subject: [PATCH 035/143] Renamed VTStack -> TextureStack --- .../Editor/Data/Graphs/PreviewProperty.cs | 4 ++-- .../Editor/Data/Graphs/SerializableStack.cs | 8 ++++---- com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs index 9f36a3e9bfb..61fd3ba0a7c 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs @@ -24,7 +24,7 @@ struct ClassData [FieldOffset(0)] public Gradient gradientValue; [FieldOffset(0)] - public VTStack textureStackValue; + public TextureStack textureStackValue; } [StructLayout(LayoutKind.Explicit)] @@ -110,7 +110,7 @@ public Gradient gradientValue } } - public VTStack textureStackValue + public TextureStack textureStackValue { get { diff --git a/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs b/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs index 60c0a20fc0d..e6f270f7fec 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs @@ -13,17 +13,17 @@ class SerializableStack : ISerializationCallbackReceiver string m_Guid; [NonSerialized] - VTStack m_TextureStack; + TextureStack m_TextureStack; [Serializable] class TextureStackHelper { #pragma warning disable 649 - public VTStack stack; + public TextureStack stack; #pragma warning restore 649 } - public VTStack textureStack + public TextureStack textureStack { get { @@ -37,7 +37,7 @@ public VTStack textureStack } else if (!string.IsNullOrEmpty(m_Guid) && m_TextureStack == null) { - m_TextureStack = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(m_Guid)); + m_TextureStack = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(m_Guid)); m_Guid = null; } diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs index 3e30e61cf1c..c9cd1ab801f 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs @@ -57,7 +57,7 @@ public static bool AllStacksValid(Material material) if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.Stack) { string stackPropName = ShaderUtil.GetPropertyName(shader, i); - VTStack vtStack = material.GetTextureStack(stackPropName); + TextureStack vtStack = material.GetTextureStack(stackPropName); if (vtStack != null) { From c199310bab0ac578675d1c2d38b95d7fc8fb57a3 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 19 Jul 2019 11:45:17 +0200 Subject: [PATCH 036/143] Fix c# and shaders after merge --- .../Runtime/Textures/RTHandle.cs | 2 ++ .../Runtime/Material/GBufferManager.cs | 2 +- .../Runtime/Material/Lit/Lit.hlsl | 15 +++++++++++++++ .../Runtime/Material/MaterialGBufferMacros.hlsl | 3 ++- .../Runtime/Material/StandardLit/StandardLit.hlsl | 3 +++ .../Runtime/RenderPipeline/Camera/HDCamera.cs | 10 +++++----- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 12 ++++++------ .../Editor/Data/Enumerations/PropertyType.cs | 5 +++-- .../Editor/Data/Graphs/StackShaderProperty.cs | 7 +------ 9 files changed, 38 insertions(+), 21 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs b/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs index 9b8a18c14a5..9924468a42a 100644 --- a/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs +++ b/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs @@ -26,6 +26,8 @@ public class RTHandle public RenderTargetIdentifier nameID { get { return m_NameID; } } + public bool enableMSAA { get { return m_EnableMSAA; } } + public string name { get { return m_Name; } } // Keep constructor private diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs index 0c17fc21768..14a17e04661 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs @@ -82,7 +82,7 @@ public override void BindBufferAsTextures(CommandBuffer cmd) } #if ENABLE_VIRTUALTEXTURES - public RTHandleSystem.RTHandle GetGBuffer0RT() + public RTHandle GetGBuffer0RT() { return m_RTs[0]; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index f06475dd0d1..ff077289ea2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -57,6 +57,7 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k // Definition //----------------------------------------------------------------------------- +#if defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) #define OUT_GBUFFER_LIGHT_LAYERS outGBuffer4 #define OUT_GBUFFER_SHADOWMASK outGBuffer5 #elif defined(LIGHT_LAYERS) @@ -65,6 +66,17 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k #define OUT_GBUFFER_SHADOWMASK outGBuffer4 #endif +// VT feedback goes at the back +#if VIRTUAL_TEXTURES_ENABLED +#if defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) +#define OUT_GBUFFER_VTFEEDBACK outGBuffer6 +#elif defined(LIGHT_LAYERS) || defined(SHADOWS_SHADOWMASK) +#define OUT_GBUFFER_VTFEEDBACK outGBuffer5 +#else +#define OUT_GBUFFER_VTFEEDBACK outGBuffer4 +#endif +#endif + #define HAS_REFRACTION (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE)) #define SUPPORTS_RAYTRACED_AREA_SHADOWS (SHADEROPTIONS_RAYTRACING && (SHADERPASS == SHADERPASS_DEFERRED_LIGHTING)) @@ -514,6 +526,9 @@ void EncodeIntoGBuffer( SurfaceData surfaceData #endif #if GBUFFERMATERIAL_COUNT > 6 , out GBufferType6 outGBuffer6 +#endif +#if GBUFFERMATERIAL_COUNT > 7 + , out GBufferType7 outGBuffer7 #endif ) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl index 528862c5603..51716d06179 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl @@ -11,6 +11,7 @@ #define GBufferType3 float4 #define GBufferType4 float4 #define GBufferType5 float4 +#define GBufferType6 float4 #ifdef LIGHT_LAYERS #define GBUFFERMATERIAL_LIGHT_LAYERS 1 @@ -34,7 +35,7 @@ #define GBUFFER_LIT_IRIDESCENCE 5 // TODO // Caution: This must be in sync with Lit.cs GetMaterialGBufferCount() -#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK) +#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK + VIRTUAL_TEXTURES_ENABLED) // Only one deferred layout is allowed for a HDRenderPipeline, this will be detect by the redefinition of GBUFFERMATERIAL_COUNT // If GBUFFERMATERIAL_COUNT is define two time, the shaders will not compile diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/StandardLit/StandardLit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/StandardLit/StandardLit.hlsl index 93a6762cffd..f4c963dc085 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/StandardLit/StandardLit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/StandardLit/StandardLit.hlsl @@ -10,6 +10,9 @@ void EncodeIntoStandardGBuffer( StandardBSDFData standardBSDFData #endif #if GBUFFERMATERIAL_COUNT > 5 , out GBufferType5 outGBuffer5 +#endif +#if GBUFFERMATERIAL_COUNT > 6 + , out GBufferType6 outGBuffer6 #endif ) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs index ea29a77b065..ba10427a5ad 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs @@ -216,7 +216,7 @@ public LayerMask probeLayerMask #if ENABLE_VIRTUALTEXTURES Experimental.VirtualTextureResolver resolver; - RTHandleSystem.RTHandle lowresResolver; + RTHandle lowresResolver; int resolveScale = 16; #endif @@ -367,7 +367,7 @@ public void BeginRender() } #if ENABLE_VIRTUALTEXTURES - public void ResolveVT(CommandBuffer cmd, RTHandleSystem.RTHandle primary, RTHandleSystem.RTHandle secondary, HDRenderPipelineAsset asset) + public void ResolveVT(CommandBuffer cmd, RTHandle primary, RTHandle secondary, HDRenderPipelineAsset asset) { using (new ProfilingSample(cmd, "VTFeedback Downsample", CustomSamplerId.VTFeedbackDownSample.GetSampler())) { @@ -393,7 +393,7 @@ public void ResolveVT(CommandBuffer cmd, RTHandleSystem.RTHandle primary, RTHand resolver.Process(lowresResolver.nameID, cmd);*/ } - if (secondary != null && secondary.m_EnableMSAA == false) + if (secondary != null && secondary.enableMSAA == false) { ResolveVTDispatch(cmd, secondary, asset); /*var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; @@ -412,9 +412,9 @@ public void ResolveVT(CommandBuffer cmd, RTHandleSystem.RTHandle primary, RTHand } } - private void ResolveVTDispatch(CommandBuffer cmd, RTHandleSystem.RTHandle buffer, HDRenderPipelineAsset asset) + private void ResolveVTDispatch(CommandBuffer cmd, RTHandle buffer, HDRenderPipelineAsset asset) { - string mainFunction = (buffer.m_EnableMSAA) ? "KMainMSAA" : "KMain"; + string mainFunction = (buffer.enableMSAA) ? "KMainMSAA" : "KMain"; var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; int kernel = cs.FindKernel(mainFunction); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index aef836c1ebb..8d605f30ad7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -2074,8 +2074,8 @@ void Callback() } #if ENABLE_VIRTUALTEXTURES - // Unbind the RT. TODO(ddebaets) there must be a better way right ? - HDUtils.SetRenderTarget(cmd, m_GbufferManager.GetGBuffer0RT(), m_SharedRTManager.GetDepthStencilBuffer()); + // Unbind the RT. TODO(ddebaets) there must be a better way right ? + CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetGBuffer0RT(), m_SharedRTManager.GetDepthStencilBuffer()); hdCamera.ResolveVT(cmd, m_GbufferManager.GetVTFeedbackBuffer(), m_VTFeedbackBuffer, m_Asset); Experimental.VirtualTexturing.UpdateSystem(); #endif @@ -3954,18 +3954,18 @@ void ClearBuffers(HDCamera hdCamera, CommandBuffer cmd) // Clearing VT buffers ensure we never end up thinking stale date is still relevant for the current frame. using (new ProfilingSample(cmd, "Clear VTFeedback Buffers", CustomSamplerId.VTFeedbackClear.GetSampler())) { - RTHandleSystem.RTHandle alreadyCleared = null; + RTHandle alreadyCleared = null; if (m_GbufferManager != null && m_GbufferManager.GetVTFeedbackBuffer() != null) { alreadyCleared = m_GbufferManager.GetVTFeedbackBuffer(); - HDUtils.SetRenderTarget(cmd, alreadyCleared, ClearFlag.Color, Color.white); + CoreUtils.SetRenderTarget(cmd, alreadyCleared, ClearFlag.Color, Color.white); } // If the forward buffer is different from the GBuffer clear it also if (GetVTFeedbackBufferForForward(hdCamera) != alreadyCleared) { - HDUtils.SetRenderTarget(cmd, GetVTFeedbackBufferForForward(hdCamera), ClearFlag.Color, Color.white); + CoreUtils.SetRenderTarget(cmd, GetVTFeedbackBufferForForward(hdCamera), ClearFlag.Color, Color.white); } } #endif @@ -4127,7 +4127,7 @@ RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) // GBuffer vt feedback is handled in GBufferManager #if ENABLE_VIRTUALTEXTURES - RTHandleSystem.RTHandle GetVTFeedbackBufferForForward(HDCamera hdCamera) + RTHandle GetVTFeedbackBufferForForward(HDCamera hdCamera) { if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) { diff --git a/com.unity.shadergraph/Editor/Data/Enumerations/PropertyType.cs b/com.unity.shadergraph/Editor/Data/Enumerations/PropertyType.cs index a442e1cac29..794336b88ee 100644 --- a/com.unity.shadergraph/Editor/Data/Enumerations/PropertyType.cs +++ b/com.unity.shadergraph/Editor/Data/Enumerations/PropertyType.cs @@ -1,4 +1,4 @@ -namespace UnityEditor.ShaderGraph +namespace UnityEditor.ShaderGraph { enum PropertyType { @@ -16,6 +16,7 @@ enum PropertyType Matrix2, Matrix3, Matrix4, - SamplerState + SamplerState, + TextureStack } } diff --git a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs index 216115f9881..ac5cad84fac 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs @@ -31,11 +31,6 @@ public bool modifiable set { m_Modifiable = value; } } - public override Vector4 defaultValue - { - get { return new Vector4(); } - } - public override bool isBatchable { // Note we are semi batchable, constants are but texture slots not. Need to clarify this. @@ -120,7 +115,7 @@ public override AbstractMaterialNode ToConcreteNode() return null;// new StackAssetNode { cubemap = value.stack }; } - public override AbstractShaderProperty Copy() + public override ShaderInput Copy() { var copied = new StackShaderProperty(); copied.displayName = displayName; From aeb3dd57735c7a62413dcdd15a4fc422cea45455 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 19 Jul 2019 11:45:54 +0200 Subject: [PATCH 037/143] Add getter to retrieve detailed info on the vt stack build status --- .../Editor/ShaderGUI/StackStatus.cs | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs index 3e30e61cf1c..59ede80454b 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using UnityEditor; using UnityEngine; using UnityEngine.Rendering; @@ -77,6 +78,39 @@ public static bool AllStacksValid(Material material) return true; } + public static List GetInvalidStacksInfo(Material material) + { + List result = new List(); + var shader = material.shader; + + int propCount = ShaderUtil.GetPropertyCount(shader); + for (int i = 0; i < propCount; i++) + { + if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.Stack) + { + string stackPropName = ShaderUtil.GetPropertyName(shader, i); + VTStack vtStack = material.GetTextureStack(stackPropName); + + if (vtStack != null) + { + string hash = GetStackHash(stackPropName, material); + + if (hash != vtStack.atlasName) + { + result.Add(string.Format("Mat {0}, vt stack {1} hash does not match texture hash {2}", material.name, vtStack.atlasName, hash)); + } + + } + else + { + result.Add(string.Format("Mat {0}, vt stack {1} is null", material.name, stackPropName)); + } + } + } + + return result; + } + public static string GetStackHash(string stackPropName, Material material) { // fill in a (hashed) name From 449cfe0f029b0ce8b2727e4070ce17440af197cc Mon Sep 17 00:00:00 2001 From: Paul Demeulenaere Date: Thu, 25 Jul 2019 18:30:01 +0200 Subject: [PATCH 038/143] Shorter path for spawner test log file : avoid issue on windows with too long path (#4222) --- .../AllTests/Editor/Tests/VFXSpawnerTest.cs | 17 +++++++++-------- ...ted.txt => VFXSpawnerTest_AAAA.expected.txt} | 0 ...ta => VFXSpawnerTest_AAAA.expected.txt.meta} | 2 +- ...ted.txt => VFXSpawnerTest_BCAA.expected.txt} | 0 ...ta => VFXSpawnerTest_BCAA.expected.txt.meta} | 2 +- ...ted.txt => VFXSpawnerTest_CAAA.expected.txt} | 0 ...ta => VFXSpawnerTest_CAAA.expected.txt.meta} | 2 +- ...ted.txt => VFXSpawnerTest_CACA.expected.txt} | 0 ...ta => VFXSpawnerTest_CACA.expected.txt.meta} | 2 +- ...ted.txt => VFXSpawnerTest_CCCC.expected.txt} | 0 .../Tests/VFXSpawnerTest_CCCC.expected.txt.meta | 7 +++++++ ...txt => VFXSpawnerTest_Chaining.expected.txt} | 0 .../VFXSpawnerTest_Chaining.expected.txt.meta | 7 +++++++ ...Random-DelayAfterLoop_None.expected.txt.meta | 7 ------- ...ndom-DelayAfterLoop_Random.expected.txt.meta | 7 ------- 15 files changed, 27 insertions(+), 26 deletions(-) rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Infinite-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt => VFXSpawnerTest_AAAA.expected.txt} (100%) rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_Chaining.expected.txt.meta => VFXSpawnerTest_AAAA.expected.txt.meta} (75%) rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Constant-LoopCount_Random-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt => VFXSpawnerTest_BCAA.expected.txt} (100%) rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Constant-LoopCount_Random-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta => VFXSpawnerTest_BCAA.expected.txt.meta} (75%) rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt => VFXSpawnerTest_CAAA.expected.txt} (100%) rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Infinite-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta => VFXSpawnerTest_CAAA.expected.txt.meta} (75%) rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_Random-DelayAfterLoop_None.expected.txt => VFXSpawnerTest_CACA.expected.txt} (100%) rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta => VFXSpawnerTest_CACA.expected.txt.meta} (75%) rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Random-DelayBeforeLoop_Random-DelayAfterLoop_Random.expected.txt => VFXSpawnerTest_CCCC.expected.txt} (100%) create mode 100644 TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CCCC.expected.txt.meta rename TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/{VFXSpawnerTest_CreateSpawner_Chaining.expected.txt => VFXSpawnerTest_Chaining.expected.txt} (100%) create mode 100644 TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_Chaining.expected.txt.meta delete mode 100644 TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_Random-DelayAfterLoop_None.expected.txt.meta delete mode 100644 TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Random-DelayBeforeLoop_Random-DelayAfterLoop_Random.expected.txt.meta diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest.cs b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest.cs index 28e7da9a1dd..9001dbb137c 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest.cs +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest.cs @@ -493,6 +493,7 @@ bool CompareWithExpectedLog(StringBuilder actualContent, string identifier) { var pathExpected = expectedLogFolder + identifier + ".expected.txt"; var pathActual = expectedLogFolder + identifier + ".actual.txt"; + bool success = true; IEnumerable expectedContent = Enumerable.Empty(); try @@ -501,11 +502,11 @@ bool CompareWithExpectedLog(StringBuilder actualContent, string identifier) } catch(System.Exception) { + success = false; Debug.LogErrorFormat("Can't locate file : {0}", pathExpected); } //Compare line by line to avoid carriage return differences - bool success = true; var reader = new System.IO.StringReader(actualContent.ToString()); foreach (var expectedContentLine in expectedContent) { @@ -644,7 +645,7 @@ public IEnumerator CreateSpawner_Chaining() } } - var compare = CompareWithExpectedLog(log, "CreateSpawner_Chaining"); + var compare = CompareWithExpectedLog(log, "Chaining"); Assert.IsTrue(compare); yield return null; UnityEngine.Object.DestroyImmediate(gameObj); @@ -660,11 +661,11 @@ public struct CreateSpawner_ChangeLoopMode_TestCase public override string ToString() { - return string.Format("LoopDuration_{0}-LoopCount_{1}-DelayBeforeLoop_{2}-DelayAfterLoop_{3}", - LoopDuration, - LoopCount, - DelayBeforeLoop, - DelayAfterLoop); + return string.Format("{0}{1}{2}{3}", + VFXCodeGeneratorHelper.GeneratePrefix((uint)LoopDuration), + VFXCodeGeneratorHelper.GeneratePrefix((uint)LoopCount), + VFXCodeGeneratorHelper.GeneratePrefix((uint)DelayBeforeLoop), + VFXCodeGeneratorHelper.GeneratePrefix((uint)DelayAfterLoop)).ToUpper(); } } @@ -832,7 +833,7 @@ public IEnumerator CreateSpawner_ChangeLoopMode([ValueSource("k_CreateSpawner_Ch } } - var compare = CompareWithExpectedLog(log, "CreateSpawner_ChangeLoopMode_" + testCase.ToString()); + var compare = CompareWithExpectedLog(log, testCase.ToString()); Assert.IsTrue(compare); yield return null; diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Infinite-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt similarity index 100% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Infinite-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_Chaining.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta similarity index 75% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_Chaining.expected.txt.meta rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta index 3de98c7120d..aecdd15cc17 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_Chaining.expected.txt.meta +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 915f8326cde1ce64385398000af34449 +guid: 76a87ac49925e944187033db920e8762 TextScriptImporter: externalObjects: {} userData: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Constant-LoopCount_Random-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt similarity index 100% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Constant-LoopCount_Random-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Constant-LoopCount_Random-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta similarity index 75% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Constant-LoopCount_Random-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta index 72f13d37049..b12c2cdc6a8 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Constant-LoopCount_Random-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 47868475d219fff43bbd7ae68d1b57c3 +guid: 5f1c852798932e5409de1e9f551b8bac TextScriptImporter: externalObjects: {} userData: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt similarity index 100% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Infinite-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta similarity index 75% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Infinite-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta index 7588d8296f1..299e11689ab 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Infinite-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 52e51795cb433534aba237b9827ce1e9 +guid: af45a7db96d32d3468d5d8513cd50632 TextScriptImporter: externalObjects: {} userData: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_Random-DelayAfterLoop_None.expected.txt b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt similarity index 100% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_Random-DelayAfterLoop_None.expected.txt rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta similarity index 75% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta index 958f863b5e4..4355812d755 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_None-DelayAfterLoop_None.expected.txt.meta +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6b35bfe35df63a34eb4efd0fb78e879d +guid: d68555eff73051c4fb0cae6597cceee9 TextScriptImporter: externalObjects: {} userData: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Random-DelayBeforeLoop_Random-DelayAfterLoop_Random.expected.txt b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CCCC.expected.txt similarity index 100% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Random-DelayBeforeLoop_Random-DelayAfterLoop_Random.expected.txt rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CCCC.expected.txt diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CCCC.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CCCC.expected.txt.meta new file mode 100644 index 00000000000..bd9771212b0 --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CCCC.expected.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: aa5767913725d564d8d4cd960dc9824d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_Chaining.expected.txt b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_Chaining.expected.txt similarity index 100% rename from TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_Chaining.expected.txt rename to TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_Chaining.expected.txt diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_Chaining.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_Chaining.expected.txt.meta new file mode 100644 index 00000000000..9ffd48e1383 --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_Chaining.expected.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 16a3498b43d54604196befefa7db27ee +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_Random-DelayAfterLoop_None.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_Random-DelayAfterLoop_None.expected.txt.meta deleted file mode 100644 index ef0e79ee20b..00000000000 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Infinite-DelayBeforeLoop_Random-DelayAfterLoop_None.expected.txt.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 88873ccfd8e1c2148a0edc1ad930395a -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Random-DelayBeforeLoop_Random-DelayAfterLoop_Random.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Random-DelayBeforeLoop_Random-DelayAfterLoop_Random.expected.txt.meta deleted file mode 100644 index 997750b6d0b..00000000000 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CreateSpawner_ChangeLoopMode_LoopDuration_Random-LoopCount_Random-DelayBeforeLoop_Random-DelayAfterLoop_Random.expected.txt.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: e66cfad71907a05448c618b2360d887f -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From 9125f2042910615dc2ac945b918b5b31a811d443 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Thu, 25 Jul 2019 18:39:21 +0200 Subject: [PATCH 039/143] update change log to include 7.0.1 (#4231) --- com.unity.render-pipelines.core/CHANGELOG.md | 2 ++ .../CHANGELOG.md | 5 +++++ com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 ++ com.unity.render-pipelines.lightweight/CHANGELOG.md | 5 +++++ com.unity.render-pipelines.universal/CHANGELOG.md | 2 ++ com.unity.shadergraph/CHANGELOG.md | 2 ++ com.unity.testframework.graphics/CHANGELOG.md | 5 +++++ com.unity.visualeffectgraph/CHANGELOG.md | 2 ++ 8 files changed, 25 insertions(+) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index c913058f84a..595de12665f 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [7.1.1] - 2019-XX-XX +## [7.0.1] - 2019-07-25 + ### Fixed - Fixed a precision issue with the ACES tonemapper on mobile platforms. diff --git a/com.unity.render-pipelines.high-definition-config/CHANGELOG.md b/com.unity.render-pipelines.high-definition-config/CHANGELOG.md index a289893c566..f9eb2d9f1f9 100644 --- a/com.unity.render-pipelines.high-definition-config/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition-config/CHANGELOG.md @@ -6,4 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [7.1.1] - 2019-XX-XX +## [7.0.1] - 2019-07-25 + +Version Updated +The version number for this package has increased due to a version update of a related graphics package. + Started Changelog diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ebc83fd5ef2..3b4e98e41e5 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [7.1.1] - 2019-XX-XX +## [7.0.1] - 2019-07-25 + ### Added - Added option in the config package to disable globally Area Lights and to select shadow quality settings for the deferred pipeline. - When shader log stripping is enabled, shader stripper statistics will be written at `Temp/shader-strip.json` diff --git a/com.unity.render-pipelines.lightweight/CHANGELOG.md b/com.unity.render-pipelines.lightweight/CHANGELOG.md index 93d78ba3415..ba428ad87c4 100644 --- a/com.unity.render-pipelines.lightweight/CHANGELOG.md +++ b/com.unity.render-pipelines.lightweight/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [7.1.1] - 2019-XX-XX +## [7.0.1] - 2019-07-25 + +Version Updated +The version number for this package has increased due to a version update of a related graphics package. + ## [7.0.0] - 2019-07-17 ### Changed - LWRP is being deprecated in favour of Universal Render Pipeline. See the changelog for the UniversalRP Package. diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index 29e98619fd6..57653a799e1 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [7.1.1] - 2019-XX-XX + +## [7.0.1] - 2019-07-25 - Fixed specular lighting related artifacts on Mobile [case 1143049](https://issuetracker.unity3d.com/issues/ios-lwrp-rounded-cubes-has-graphical-artifacts-when-setting-pbr-shaders-smoothness-about-to-0-dot-65-in-shadergraph) and [case 1164822](https://issuetracker.unity3d.com/issues/lwrp-specular-highlight-becomes-hard-edged-when-increasing-the-size-of-an-object). - Post-processing is no longer enabled in the previews. - Unity no longer force-enables post-processing on a camera by default. diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index 8ecd6f28007..a6a148960cd 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [7.1.1] - 2019-XX-XX + +## [7.0.1] - 2019-07-25 ### Changed - New Shader Graph windows are now docked to either existing Shader Graph windows, or to the Scene View. diff --git a/com.unity.testframework.graphics/CHANGELOG.md b/com.unity.testframework.graphics/CHANGELOG.md index 40f13f9001e..2865588f289 100644 --- a/com.unity.testframework.graphics/CHANGELOG.md +++ b/com.unity.testframework.graphics/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [7.1.1] - 2019-XX-XX +## [7.0.1] - 2019-07-25 + +Version Updated +The version number for this package has increased due to a version update of a related graphics package. + ## [7.0.0] - 2019-07-17 ## [6.7.0] - 2019-05-16 diff --git a/com.unity.visualeffectgraph/CHANGELOG.md b/com.unity.visualeffectgraph/CHANGELOG.md index 0dabc76c61e..47329dd5400 100644 --- a/com.unity.visualeffectgraph/CHANGELOG.md +++ b/com.unity.visualeffectgraph/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [7.1.1] - 2019-XX-XX + +## [7.0.1] - 2019-07-25 ### Added - Add Position depth operator along with TransformVector4 and LoadTexture2D expressions. From 5e4a4377a9d0195d25deeb9ad677892f4b1be021 Mon Sep 17 00:00:00 2001 From: sebastien lagarde Date: Thu, 25 Jul 2019 18:46:15 +0200 Subject: [PATCH 040/143] bump version and changelog to 7.0.1 --- com.unity.render-pipelines.core/CHANGELOG.md | 2 -- .../ShaderLibrary/Version.hlsl | 2 +- com.unity.render-pipelines.core/package.json | 4 ++-- .../CHANGELOG.md | 2 -- .../package.json | 4 ++-- .../CHANGELOG.md | 2 -- .../package.json | 12 ++++++------ com.unity.render-pipelines.lightweight/CHANGELOG.md | 2 -- com.unity.render-pipelines.lightweight/package.json | 6 +++--- com.unity.render-pipelines.universal/CHANGELOG.md | 2 -- com.unity.render-pipelines.universal/package.json | 8 ++++---- com.unity.shadergraph/CHANGELOG.md | 2 -- com.unity.shadergraph/package.json | 6 +++--- com.unity.testframework.graphics/CHANGELOG.md | 2 -- com.unity.testframework.graphics/package.json | 12 ++++++------ com.unity.testing.visualeffectgraph/package.json | 8 ++++---- com.unity.visualeffectgraph/CHANGELOG.md | 2 -- com.unity.visualeffectgraph/package.json | 4 ++-- 18 files changed, 33 insertions(+), 49 deletions(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 595de12665f..662a612bb2d 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [7.1.1] - 2019-XX-XX - ## [7.0.1] - 2019-07-25 ### Fixed diff --git a/com.unity.render-pipelines.core/ShaderLibrary/Version.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/Version.hlsl index 2831b9f302f..7b94e22bb0b 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/Version.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/Version.hlsl @@ -1,5 +1,5 @@ #define SHADER_LIBRARY_VERSION_MAJOR 7 -#define SHADER_LIBRARY_VERSION_MINOR 1 +#define SHADER_LIBRARY_VERSION_MINOR 0 #define VERSION_GREATER_EQUAL(major, minor) ((SHADER_LIBRARY_VERSION_MAJOR > major) || ((SHADER_LIBRARY_VERSION_MAJOR == major) && (SHADER_LIBRARY_VERSION_MINOR >= minor))) #define VERSION_LOWER(major, minor) ((SHADER_LIBRARY_VERSION_MAJOR < major) || ((SHADER_LIBRARY_VERSION_MAJOR == major) && (SHADER_LIBRARY_VERSION_MINOR < minor))) diff --git a/com.unity.render-pipelines.core/package.json b/com.unity.render-pipelines.core/package.json index d3f7bbdc681..755d11976e3 100644 --- a/com.unity.render-pipelines.core/package.json +++ b/com.unity.render-pipelines.core/package.json @@ -1,9 +1,9 @@ { "name": "com.unity.render-pipelines.core", "description": "Helper library for SRP that contains a new Shader Library, and utility functions that can be used to implement a custom SRP. This library is currently used by both the High Definition Render Pipeline and the Lightweight Render Pipeline.", - "version": "7.1.1", + "version": "7.0.1", "unity": "2019.3", - "unityRelease": "0a10", + "unityRelease": "0a12", "displayName": "Core RP Library", "dependencies": { "com.unity.ugui" : "1.0.0" diff --git a/com.unity.render-pipelines.high-definition-config/CHANGELOG.md b/com.unity.render-pipelines.high-definition-config/CHANGELOG.md index f9eb2d9f1f9..075c8ab81ce 100644 --- a/com.unity.render-pipelines.high-definition-config/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition-config/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [7.1.1] - 2019-XX-XX - ## [7.0.1] - 2019-07-25 Version Updated diff --git a/com.unity.render-pipelines.high-definition-config/package.json b/com.unity.render-pipelines.high-definition-config/package.json index 7f7e0809c6c..b147aa5550a 100644 --- a/com.unity.render-pipelines.high-definition-config/package.json +++ b/com.unity.render-pipelines.high-definition-config/package.json @@ -1,9 +1,9 @@ { "name": "com.unity.render-pipelines.high-definition-config", "description": "Configuration files for the High Definition Render Pipeline.", - "version": "7.1.1", + "version": "7.0.1", "unity": "2019.3", - "unityRelease": "0a10", + "unityRelease": "0a12", "displayName": "High Definition RP Config", "dependencies": {} } diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 3b4e98e41e5..b3deca5ce7f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [7.1.1] - 2019-XX-XX - ## [7.0.1] - 2019-07-25 ### Added diff --git a/com.unity.render-pipelines.high-definition/package.json b/com.unity.render-pipelines.high-definition/package.json index 107ce37d282..b49ed92010e 100644 --- a/com.unity.render-pipelines.high-definition/package.json +++ b/com.unity.render-pipelines.high-definition/package.json @@ -1,15 +1,15 @@ { "name": "com.unity.render-pipelines.high-definition", "description": "The High Definition Render Pipeline (HDRP) is a high-fidelity Scriptable Render Pipeline built by Unity to target modern (Compute Shader compatible) platforms. The HDRP utilizes Physically-Based Lighting techniques, linear lighting, HDR lighting and a configurable hybrid Tile/Cluster deferred/Forward lighting architecture and gives you the tools you need to create games, technical demos, animations and more to a high graphical standard.", - "version": "7.1.1", + "version": "7.0.1", "unity": "2019.3", - "unityRelease": "0a10", + "unityRelease": "0a12", "displayName": "High Definition RP", "dependencies": { - "com.unity.render-pipelines.core": "7.1.1", - "com.unity.shadergraph": "7.1.1", - "com.unity.visualeffectgraph": "7.1.1", - "com.unity.render-pipelines.high-definition-config": "7.1.1" + "com.unity.render-pipelines.core": "7.0.1", + "com.unity.shadergraph": "7.0.1", + "com.unity.visualeffectgraph": "7.0.1", + "com.unity.render-pipelines.high-definition-config": "7.0.1" }, "keywords":[ "graphics", diff --git a/com.unity.render-pipelines.lightweight/CHANGELOG.md b/com.unity.render-pipelines.lightweight/CHANGELOG.md index ba428ad87c4..b9e1717872a 100644 --- a/com.unity.render-pipelines.lightweight/CHANGELOG.md +++ b/com.unity.render-pipelines.lightweight/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [7.1.1] - 2019-XX-XX - ## [7.0.1] - 2019-07-25 Version Updated diff --git a/com.unity.render-pipelines.lightweight/package.json b/com.unity.render-pipelines.lightweight/package.json index e52e9f488d2..62b00a7c387 100644 --- a/com.unity.render-pipelines.lightweight/package.json +++ b/com.unity.render-pipelines.lightweight/package.json @@ -1,12 +1,12 @@ { "name": "com.unity.render-pipelines.lightweight", "description": "The Lightweight Render Pipeline (LWRP) is a prebuilt Scriptable Render Pipeline, made by Unity. The technology offers graphics that are scalable to mobile platforms, and you can also use it for higher-end consoles and PCs. You’re able to achieve quick rendering at a high quality without needing compute shader technology. LWRP uses simplified, physically based Lighting and Materials. The LWRP uses single-pass forward rendering. Use this pipeline to get optimized real-time performance on several platforms.", - "version": "7.1.1", + "version": "7.0.1", "unity": "2019.3", - "unityRelease": "0a10", + "unityRelease": "0a12", "displayName": "Lightweight RP", "dependencies": { - "com.unity.render-pipelines.universal": "7.1.1", + "com.unity.render-pipelines.universal": "7.0.1", "com.unity.postprocessing": "2.1.7" }, "keywords":[ diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index 57653a799e1..722bff9166e 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [7.1.1] - 2019-XX-XX - ## [7.0.1] - 2019-07-25 - Fixed specular lighting related artifacts on Mobile [case 1143049](https://issuetracker.unity3d.com/issues/ios-lwrp-rounded-cubes-has-graphical-artifacts-when-setting-pbr-shaders-smoothness-about-to-0-dot-65-in-shadergraph) and [case 1164822](https://issuetracker.unity3d.com/issues/lwrp-specular-highlight-becomes-hard-edged-when-increasing-the-size-of-an-object). - Post-processing is no longer enabled in the previews. diff --git a/com.unity.render-pipelines.universal/package.json b/com.unity.render-pipelines.universal/package.json index f911d22f900..e16614a6fcd 100644 --- a/com.unity.render-pipelines.universal/package.json +++ b/com.unity.render-pipelines.universal/package.json @@ -1,13 +1,13 @@ { "name": "com.unity.render-pipelines.universal", "description": "The Universal Render Pipeline is a prebuilt Scriptable Render Pipeline, made by Unity. The technology offers graphics that are scalable to mobile platforms, and you can also use it for higher-end consoles and PCs. You’re able to achieve quick rendering at a high quality without needing compute shader technology. The Universal Render Pipeline uses simplified, physically based Lighting and Materials. The Universal Render Pipeline uses single-pass forward rendering. Use this pipeline to get optimized real-time performance on several platforms.", - "version": "7.1.1", + "version": "7.0.1", "unity": "2019.3", - "unityRelease": "0a10", + "unityRelease": "0a12", "displayName": "Universal RP", "dependencies": { - "com.unity.render-pipelines.core": "7.1.1", - "com.unity.shadergraph": "7.1.1" + "com.unity.render-pipelines.core": "7.0.1", + "com.unity.shadergraph": "7.0.1" }, "keywords":[ "graphics", diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index a6a148960cd..bd62515a79c 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this package are documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [7.1.1] - 2019-XX-XX - ## [7.0.1] - 2019-07-25 ### Changed - New Shader Graph windows are now docked to either existing Shader Graph windows, or to the Scene View. diff --git a/com.unity.shadergraph/package.json b/com.unity.shadergraph/package.json index 9a0f5d3508f..a904df017ef 100644 --- a/com.unity.shadergraph/package.json +++ b/com.unity.shadergraph/package.json @@ -1,11 +1,11 @@ { "name": "com.unity.shadergraph", "description": "The Shader Graph package adds support for a visual shader editing tool into Unity. This tool can be used by artists to create shaders in a visual way instead of having to require code editing. Specific render pipelines can implement specific graph features. Currently the Shader Graph is supported on the High Definition Rendering Pipeline and the Lightweight Rendering Pipeline.", - "version": "7.1.1", + "version": "7.0.1", "unity": "2019.3", - "unityRelease": "0a10", + "unityRelease": "0a12", "displayName": "Shader Graph", "dependencies": { - "com.unity.render-pipelines.core": "7.1.1" + "com.unity.render-pipelines.core": "7.0.1" } } diff --git a/com.unity.testframework.graphics/CHANGELOG.md b/com.unity.testframework.graphics/CHANGELOG.md index 2865588f289..59d02052485 100644 --- a/com.unity.testframework.graphics/CHANGELOG.md +++ b/com.unity.testframework.graphics/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [7.1.1] - 2019-XX-XX - ## [7.0.1] - 2019-07-25 Version Updated diff --git a/com.unity.testframework.graphics/package.json b/com.unity.testframework.graphics/package.json index 74f4ded059f..a904df017ef 100644 --- a/com.unity.testframework.graphics/package.json +++ b/com.unity.testframework.graphics/package.json @@ -1,11 +1,11 @@ { - "name": "com.unity.testframework.graphics", - "displayName":"Graphics Tests Framework", - "version": "7.1.1", + "name": "com.unity.shadergraph", + "description": "The Shader Graph package adds support for a visual shader editing tool into Unity. This tool can be used by artists to create shaders in a visual way instead of having to require code editing. Specific render pipelines can implement specific graph features. Currently the Shader Graph is supported on the High Definition Rendering Pipeline and the Lightweight Rendering Pipeline.", + "version": "7.0.1", "unity": "2019.3", - "unityRelease": "0a10", - "description": "Provides test framework helpers for writing tests for graphics code, such as image comparison assertions and automatic management of reference images.", - "keywords": ["qa", "test", "testing", "tests", "graphics"], + "unityRelease": "0a12", + "displayName": "Shader Graph", "dependencies": { + "com.unity.render-pipelines.core": "7.0.1" } } diff --git a/com.unity.testing.visualeffectgraph/package.json b/com.unity.testing.visualeffectgraph/package.json index 5fb21263303..737d9ae9979 100644 --- a/com.unity.testing.visualeffectgraph/package.json +++ b/com.unity.testing.visualeffectgraph/package.json @@ -1,12 +1,12 @@ { "name": "com.unity.testing.visualeffectgraph", "displayName": "Visual Effect Graphic Tests", - "version": "7.1.1", + "version": "7.0.1", "unity": "2019.3", - "unityRelease": "0a10", + "unityRelease": "0a12", "description": "This package contains common graphics tests from several scriptable renderpipeline", "dependencies": { - "com.unity.visualeffectgraph": "7.1.1", - "com.unity.testframework.graphics": "7.1.1" + "com.unity.visualeffectgraph": "7.0.1", + "com.unity.testframework.graphics": "7.0.1" } } diff --git a/com.unity.visualeffectgraph/CHANGELOG.md b/com.unity.visualeffectgraph/CHANGELOG.md index 47329dd5400..90ea0a2a4e7 100644 --- a/com.unity.visualeffectgraph/CHANGELOG.md +++ b/com.unity.visualeffectgraph/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [7.1.1] - 2019-XX-XX - ## [7.0.1] - 2019-07-25 ### Added - Add Position depth operator along with TransformVector4 and LoadTexture2D expressions. diff --git a/com.unity.visualeffectgraph/package.json b/com.unity.visualeffectgraph/package.json index 820ad36d476..d79ff5cc861 100644 --- a/com.unity.visualeffectgraph/package.json +++ b/com.unity.visualeffectgraph/package.json @@ -1,9 +1,9 @@ { "name":"com.unity.visualeffectgraph", "displayName": "Visual Effect Graph", - "version":"7.1.1", + "version":"7.0.1", "unity": "2019.3", - "unityRelease": "0a10", + "unityRelease": "0a12", "description":"The Visual Effect Graph is a node based visual effect editor. It enables artists to author next generation visual effects simulated directly on GPU", "keywords":[ "vfx", From 647ad054c60f383c3da79eb3c872c31310bd7aa2 Mon Sep 17 00:00:00 2001 From: Felipe Lira Date: Thu, 25 Jul 2019 19:22:35 +0200 Subject: [PATCH 041/143] Fixed issue that caused GLES3 to render darker in GLES3 and Linear (#4226) * Fixed issue that caused GLES3 to render darker in GLES3 and Linear color space. * Update CHANGELOG.md --- .../CHANGELOG.md | 1 + .../Runtime/Passes/FinalBlitPass.cs | 16 +++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index 722bff9166e..007636c87fb 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed specular lighting related artifacts on Mobile [case 1143049](https://issuetracker.unity3d.com/issues/ios-lwrp-rounded-cubes-has-graphical-artifacts-when-setting-pbr-shaders-smoothness-about-to-0-dot-65-in-shadergraph) and [case 1164822](https://issuetracker.unity3d.com/issues/lwrp-specular-highlight-becomes-hard-edged-when-increasing-the-size-of-an-object). - Post-processing is no longer enabled in the previews. - Unity no longer force-enables post-processing on a camera by default. +- Fixed an issue that caused the Scene to render darker in GLES3 and linear color space. [case 1169789](https://issuetracker.unity3d.com/issues/lwrp-android-scene-is-rendered-darker-in-build-when-graphics-api-set-to-gles3-and-color-space-set-to-linear) ### Changed - Platform checks now provide more helpful feedback about supported features in the Inspectors. diff --git a/com.unity.render-pipelines.universal/Runtime/Passes/FinalBlitPass.cs b/com.unity.render-pipelines.universal/Runtime/Passes/FinalBlitPass.cs index 79aaeff6212..6b3a2280ba7 100644 --- a/com.unity.render-pipelines.universal/Runtime/Passes/FinalBlitPass.cs +++ b/com.unity.render-pipelines.universal/Runtime/Passes/FinalBlitPass.cs @@ -64,21 +64,19 @@ public override void Execute(ScriptableRenderContext context, ref RenderingData cmd.DisableShaderKeyword(ShaderKeywordStrings.KillAlpha); ref CameraData cameraData = ref renderingData.cameraData; + + // Use default blit for XR as we are not sure the UniversalRP blit handles stereo. + // The blit will be reworked for stereo along the XRSDK work. + Material blitMaterial = (cameraData.isStereoEnabled) ? null : m_BlitMaterial; + cmd.SetGlobalTexture("_BlitTex", m_Source.Identifier()); if (cameraData.isStereoEnabled || cameraData.isSceneViewCamera || cameraData.isDefaultViewport) { // This set render target is necessary so we change the LOAD state to DontCare. cmd.SetRenderTarget(BuiltinRenderTextureType.CameraTarget, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store); - - // Clearing render target is cost free on mobile and it avoid tile loading - if (m_IsMobileOrSwitch) - cmd.ClearRenderTarget(true, true, Color.black); - - cmd.Blit(m_Source.Identifier(), BuiltinRenderTextureType.CameraTarget); + cmd.Blit(m_Source.Identifier(), BuiltinRenderTextureType.CameraTarget, blitMaterial); } else { - cmd.SetGlobalTexture("_BlitTex", m_Source.Identifier()); - // TODO: Final blit pass should always blit to backbuffer. The first time we do we don't need to Load contents to tile. // We need to keep in the pipeline of first render pass to each render target to propertly set load/store actions. // meanwhile we set to load so split screen case works. @@ -94,7 +92,7 @@ public override void Execute(ScriptableRenderContext context, ref RenderingData Camera camera = cameraData.camera; cmd.SetViewProjectionMatrices(Matrix4x4.identity, Matrix4x4.identity); cmd.SetViewport(m_PixelRect != Rect.zero ? m_PixelRect : cameraData.camera.pixelRect); - cmd.DrawMesh(RenderingUtils.fullscreenMesh, Matrix4x4.identity, m_BlitMaterial); + cmd.DrawMesh(RenderingUtils.fullscreenMesh, Matrix4x4.identity, blitMaterial); cmd.SetViewProjectionMatrices(camera.worldToCameraMatrix, camera.projectionMatrix); } From 76e44725bf7fc51710cef30fa32231f422d72844 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Thu, 25 Jul 2019 19:24:11 +0200 Subject: [PATCH 042/143] fix issue with isolated ABV test package (#4232) --- .../package.json | 4 ++- .../Tests/Editor/DocumentationTests.cs | 27 ++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition-config/package.json b/com.unity.render-pipelines.high-definition-config/package.json index b147aa5550a..c9d50337ea6 100644 --- a/com.unity.render-pipelines.high-definition-config/package.json +++ b/com.unity.render-pipelines.high-definition-config/package.json @@ -5,5 +5,7 @@ "unity": "2019.3", "unityRelease": "0a12", "displayName": "High Definition RP Config", - "dependencies": {} + "dependencies": { + "com.unity.render-pipelines.core": "7.1.1" + } } diff --git a/com.unity.render-pipelines.high-definition/Tests/Editor/DocumentationTests.cs b/com.unity.render-pipelines.high-definition/Tests/Editor/DocumentationTests.cs index d14b21cdc98..1ff19529ef2 100644 --- a/com.unity.render-pipelines.high-definition/Tests/Editor/DocumentationTests.cs +++ b/com.unity.render-pipelines.high-definition/Tests/Editor/DocumentationTests.cs @@ -1,5 +1,8 @@ using NUnit.Framework; -using DocumentationTestLibrary = UnityEditor.Rendering.Tests.DocumentationTests; +using System.Collections.Generic; +using UnityEngine.Networking; +using System.Linq; +using UnityEngine; namespace UnityEditor.Rendering.HighDefinition.Tests { @@ -8,8 +11,26 @@ class DocumentationTests [Test] public void AllDocumentationLinksAccessible() { - foreach (var url in DocumentationTestLibrary.GetDocumentationURLsForAssembly(typeof(UnityEngine.Rendering.HighDefinition.Documentation).Assembly)) - DocumentationTestLibrary.IsLinkValid(url); + foreach (var url in GetDocumentationURLsForAssembly(typeof(UnityEngine.Rendering.HighDefinition.Documentation).Assembly)) + IsLinkValid(url); } + + public static void IsLinkValid(string url, bool shouldExist = true) + { + using (UnityWebRequest webRequest = UnityWebRequest.Get(url)) + { + var asyncOp = webRequest.SendWebRequest(); + while (!webRequest.isDone) + new WaitForEndOfFrame(); + Assert.IsTrue((webRequest.isNetworkError || webRequest.isHttpError) ^ shouldExist, $"{url}\n{webRequest.error}"); + } + } + + public static IEnumerable GetDocumentationURLsForAssembly(System.Reflection.Assembly assembly) + => TypeCache + .GetTypesWithAttribute() + .Where(x => x.Assembly == assembly) + .Select(x => (x.GetCustomAttributes(typeof(HelpURLAttribute), false).First() as HelpURLAttribute).URL) + .Distinct(); } } From 85baa51a51d72c173b19cf35a113597c4c09ae7b Mon Sep 17 00:00:00 2001 From: sebastien lagarde Date: Thu, 25 Jul 2019 19:29:55 +0200 Subject: [PATCH 043/143] update wrong package.json --- .../package.json | 2 +- com.unity.testframework.graphics/package.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition-config/package.json b/com.unity.render-pipelines.high-definition-config/package.json index c9d50337ea6..f5ccf36d50c 100644 --- a/com.unity.render-pipelines.high-definition-config/package.json +++ b/com.unity.render-pipelines.high-definition-config/package.json @@ -6,6 +6,6 @@ "unityRelease": "0a12", "displayName": "High Definition RP Config", "dependencies": { - "com.unity.render-pipelines.core": "7.1.1" + "com.unity.render-pipelines.core": "7.0.1" } } diff --git a/com.unity.testframework.graphics/package.json b/com.unity.testframework.graphics/package.json index a904df017ef..9492816e567 100644 --- a/com.unity.testframework.graphics/package.json +++ b/com.unity.testframework.graphics/package.json @@ -1,11 +1,11 @@ { - "name": "com.unity.shadergraph", - "description": "The Shader Graph package adds support for a visual shader editing tool into Unity. This tool can be used by artists to create shaders in a visual way instead of having to require code editing. Specific render pipelines can implement specific graph features. Currently the Shader Graph is supported on the High Definition Rendering Pipeline and the Lightweight Rendering Pipeline.", + "name": "com.unity.testframework.graphics", + "displayName":"Graphics Tests Framework", "version": "7.0.1", "unity": "2019.3", "unityRelease": "0a12", - "displayName": "Shader Graph", + "description": "Provides test framework helpers for writing tests for graphics code, such as image comparison assertions and automatic management of reference images.", + "keywords": ["qa", "test", "testing", "tests", "graphics"], "dependencies": { - "com.unity.render-pipelines.core": "7.0.1" } } From 55844bc30d520f9da72babeed37c00647bdfad6c Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Thu, 25 Jul 2019 21:55:45 +0200 Subject: [PATCH 044/143] Update CreateLocalPackages.cmd --- Tools/CreateLocalPackages.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/CreateLocalPackages.cmd b/Tools/CreateLocalPackages.cmd index 188619236b7..12280b66073 100644 --- a/Tools/CreateLocalPackages.cmd +++ b/Tools/CreateLocalPackages.cmd @@ -1,7 +1,7 @@ -set version=7.0.0 +set version=7.0.1 call CreateOneLocalPackage.bat com.unity.render-pipelines.core %version% call CreateOneLocalPackage.bat com.unity.render-pipelines.high-definition %version% -call CreateOneLocalPackage.bat com.unity.render-pipelines.lightweight %version% +call CreateOneLocalPackage.bat com.unity.render-pipelines.high-definition-config %version% call CreateOneLocalPackage.bat com.unity.render-pipelines.universal %version% call CreateOneLocalPackage.bat com.unity.shadergraph %version% call CreateOneLocalPackage.bat com.unity.visualeffectgraph %version% From 59ae769cd15af4a4a9fbafef508c3cf5c3a0e967 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Fri, 26 Jul 2019 15:41:24 +0200 Subject: [PATCH 045/143] Fix screenshots and test of Universal after Postprocess PR break it (#4239) * update shader graph reference screenshots * Workaround to force "renderPostProcessing" while using VFXGraphicTest --- .../WindowsEditor/Direct3D11/ArtisticNodes.png | 4 ++-- .../Direct3D11/ArtisticNodes.png.meta | 4 ++-- .../Linear/WindowsEditor/Direct3D11/MathNodes.png | 4 ++-- .../WindowsEditor/Direct3D11/MathNodes.png.meta | 4 ++-- .../WindowsEditor/Direct3D11/ProceduralNodes.png | 4 ++-- .../Direct3D11/ProceduralNodes.png.meta | 4 ++-- .../WindowsEditor/Direct3D11/TransformNode.png | 4 ++-- .../Direct3D11/TransformNode.png.meta | 4 ++-- .../Unity.Testing.VisualEffectGraph.Tests.asmdef | 14 +++++++++++--- .../Tests/Runtime/VFXGraphicsTests.cs | 8 ++++++++ 10 files changed, 35 insertions(+), 19 deletions(-) diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ArtisticNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ArtisticNodes.png index 24693a7eb86..d2770ee93a9 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ArtisticNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ArtisticNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:902b5f5839b6b3bd6a963ff8192e985ce35784bb52c77ac5b5cd7fe98446e1f3 -size 1599347 +oid sha256:76d155c9b5006cf19bae8ac58cbb19263343aec88ad1344cad241273b810c6c2 +size 1599679 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ArtisticNodes.png.meta b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ArtisticNodes.png.meta index 3a2c2e848e3..92b07deab9b 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ArtisticNodes.png.meta +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ArtisticNodes.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e15c5624a0b403c4e8f3c7fdb3e0f94e +guid: 8f3b835a6c1f4a245a5bf5a28fbceec7 TextureImporter: internalIDToNameTable: [] externalObjects: {} @@ -60,7 +60,7 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 8912 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/MathNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/MathNodes.png index bfae0038b16..61e64c927cf 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/MathNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/MathNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:17bfb549d6d7c20eced379f94e88be5e46cf453240aecba239e4ddb361941938 -size 153580 +oid sha256:24e58cdac616f0ce4c8787e92e68f2329f2510847804a15219deba43df347bc6 +size 152168 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/MathNodes.png.meta b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/MathNodes.png.meta index fa2502195aa..e092fb4f377 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/MathNodes.png.meta +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/MathNodes.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bf797b352f83b8e4581be1ba58a99797 +guid: aaca89f8847d90d4ca8b06bf163af51e TextureImporter: internalIDToNameTable: [] externalObjects: {} @@ -60,7 +60,7 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 8192 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ProceduralNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ProceduralNodes.png index b2f377322b8..fe7edd714fd 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ProceduralNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ProceduralNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a03608f5ec9ed86af8bbf69fcb8f5e205c1fee9468bdd6e3b9138a7365fb3ddd -size 35644 +oid sha256:a4ddfc4b1c5e60d2adcaf9094b24ce715c663c295c8b90589fde59a43ccc3dab +size 35844 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ProceduralNodes.png.meta b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ProceduralNodes.png.meta index e7e334c43be..87c39bbf667 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ProceduralNodes.png.meta +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/ProceduralNodes.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9e12df3784f90e045949466f104e965c +guid: 6f7a0f678a0a3ce4795195b2d2ed162d TextureImporter: internalIDToNameTable: [] externalObjects: {} @@ -60,7 +60,7 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 8192 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/TransformNode.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/TransformNode.png index db2cf269111..56bfad670d1 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/TransformNode.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/TransformNode.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:517c9e4b73de85f4ee2971247fc08c1f3ed800a372e6ab529c5c6e0627889d47 -size 135565 +oid sha256:3e6ad502b668490a72172d12c2be3639178a26be5088ffc3f50b0b52ae626656 +size 135583 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/TransformNode.png.meta b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/TransformNode.png.meta index 32131d54f66..3cc3318375f 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/TransformNode.png.meta +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/TransformNode.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0bf56b56327927e47a3050148bc328b7 +guid: 840679a11e9ee914bb6eb93e6c268fe9 TextureImporter: internalIDToNameTable: [] externalObjects: {} @@ -60,7 +60,7 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 8192 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 diff --git a/com.unity.testing.visualeffectgraph/Tests/Runtime/Unity.Testing.VisualEffectGraph.Tests.asmdef b/com.unity.testing.visualeffectgraph/Tests/Runtime/Unity.Testing.VisualEffectGraph.Tests.asmdef index 70157fb3a3e..550e0c7b8b6 100644 --- a/com.unity.testing.visualeffectgraph/Tests/Runtime/Unity.Testing.VisualEffectGraph.Tests.asmdef +++ b/com.unity.testing.visualeffectgraph/Tests/Runtime/Unity.Testing.VisualEffectGraph.Tests.asmdef @@ -3,12 +3,20 @@ "references": [ "Unity.Testing.VisualEffectGraph", "Unity.VisualEffectGraph.Editor", - "Unity.VisualEffectGraph.Runtime", - "UnityEngine.TestTools.Graphics" + "Unity.VisualEffectGraph.Runtime", + "UnityEngine.TestTools.Graphics", + "Unity.RenderPipelines.Universal.Runtime" ], "optionalUnityReferences": [ "TestAssemblies" ], "includePlatforms": [], - "excludePlatforms": [] + "excludePlatforms": [], + "versionDefines": [ + { + "name": "com.unity.render-pipelines.universal", + "expression": "1.0.0", + "define": "VFX_HAS_UNIVERSAL_RP" + } + ] } diff --git a/com.unity.testing.visualeffectgraph/Tests/Runtime/VFXGraphicsTests.cs b/com.unity.testing.visualeffectgraph/Tests/Runtime/VFXGraphicsTests.cs index 39b2e79e5a8..ea7f890dbab 100644 --- a/com.unity.testing.visualeffectgraph/Tests/Runtime/VFXGraphicsTests.cs +++ b/com.unity.testing.visualeffectgraph/Tests/Runtime/VFXGraphicsTests.cs @@ -73,6 +73,14 @@ public IEnumerator Run(GraphicsTestCase testCase) var camera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent(); if (camera) { + +#if VFX_HAS_UNIVERSAL_RP + if (!camera.gameObject.GetComponent()) + { + var cameraData = camera.gameObject.AddComponent(); + cameraData.renderPostProcessing = true; //HotFix forcing post process to be activated to cover missing clear + } +#endif var vfxComponents = Resources.FindObjectsOfTypeAll(); #if UNITY_EDITOR var vfxAssets = vfxComponents.Select(o => o.visualEffectAsset).Where(o => o != null).Distinct(); From 8785f09f015f68b294d7c1e50ef7d88354707bec Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 30 Jul 2019 15:34:19 +0200 Subject: [PATCH 046/143] Add missing file --- com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs index 6c33c1682ef..e194b1fcdda 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs @@ -89,7 +89,7 @@ public static List GetInvalidStacksInfo(Material material) if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.Stack) { string stackPropName = ShaderUtil.GetPropertyName(shader, i); - VTStack vtStack = material.GetTextureStack(stackPropName); + TextureStack vtStack = material.GetTextureStack(stackPropName); if (vtStack != null) { From 470c3a0282daadb050a2c264a1bee3df10b6ba06 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 6 Aug 2019 15:39:14 +0200 Subject: [PATCH 047/143] Update AdvancedOptionsUIBlock.cs Fix nullptr exception on materials which don't have a vt enabled property. --- .../Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs index 07a66053885..20064e8fda7 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs @@ -67,7 +67,7 @@ void DrawAdvancedOptionsGUI() materialEditor.EnableInstancingField(); if ((m_Features & Features.SpecularOcclusion) != 0) materialEditor.ShaderProperty(enableSpecularOcclusion, Styles.enableSpecularOcclusionText); - if ((m_Features & Features.VirtualTexturing) != 0) + if (((m_Features & Features.VirtualTexturing) != 0) && enableVirtualTexturing != null) materialEditor.ShaderProperty(enableVirtualTexturing, Styles.enableVirtualTexturingText); if ((m_Features & Features.AdditionalVelocity) != 0) { From fb15f57f087b4da4518a6ea7ef825e65232b15ea Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 7 Aug 2019 18:01:02 +0200 Subject: [PATCH 048/143] Remove virtual texturing setting --- .../ShaderLibrary/TextureStack.hlsl | 4 ++-- .../Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs | 4 +--- .../Editor/RenderPipeline/HDRenderPipelineUI.cs | 5 ----- .../Settings/SerializedRenderPipelineSettings.cs | 4 ---- .../Runtime/Material/LayeredLit/LayeredLit.shader | 1 - .../Runtime/Material/Lit/Lit.hlsl | 4 ++-- .../Runtime/Material/Lit/Lit.shader | 1 - .../Runtime/Material/MaterialGBufferMacros.hlsl | 2 +- .../SubsurfaceScattering/SubsurfaceScattering.hlsl | 2 +- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 4 ++-- .../Runtime/RenderPipeline/HDRenderPipelineAsset.cs | 1 - .../Settings/RenderPipelineSettings.cs | 3 --- .../RenderPipeline/ShaderPass/ShaderPassForward.hlsl | 12 ++++++------ .../ShaderPass/ShaderPassForwardUnlit.hlsl | 4 ++-- .../Data/Nodes/Input/Texture/TextureStackNode.cs | 1 - 15 files changed, 17 insertions(+), 35 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 385215863be..03f8c8dc63b 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -58,11 +58,11 @@ */ // A note about the on/off defines -// VIRTUAL_TEXTURES_ENABLED current render pipeline is configured to use VT this is something even non vt materials may need to be aware of (e.g. different gbuffer layout used etc...) +// UNITY_VIRTUAL_TEXTURING current project is configured to use VT this is something even non vt materials may need to be aware of (e.g. different gbuffer layout used etc...) // VIRTUAL_TEXTURES_BUILT valid vt data has been build for the material the material can render with VT from a data point but not nececarry rendering using VT because RP may have it disabled // VIRTUAL_TEXTURES_ACTIVE vt data is built and enabled so the current shader should actively use VT sampling -#if VIRTUAL_TEXTURES_ENABLED && VIRTUAL_TEXTURES_BUILT +#if UNITY_VIRTUAL_TEXTURING && VIRTUAL_TEXTURES_BUILT #define VIRTUAL_TEXTURES_ACTIVE 1 #else #define VIRTUAL_TEXTURES_ACTIVE 0 diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index 8fc893c48f6..8f23166bc47 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -63,7 +63,6 @@ static partial class HDRenderPipelineUI static readonly GUIContent k_SupportTransparentDepthPostpass = EditorGUIUtility.TrTextContent("Transparent Depth Postpass", "When disabled, HDRP removes all transparent depth postpass Shader variants when you build for the Unity Player. This decreases build time."); static readonly GUIContent k_SupportRaytracing = EditorGUIUtility.TrTextContent("Realtime Raytracing"); static readonly GUIContent k_RaytracingTier = EditorGUIUtility.TrTextContent("Raytracing Tier"); - static readonly GUIContent k_SupportsVirtualTexturing = EditorGUIUtility.TrTextContent("Virtual Texturing"); const string k_CacheErrorFormat = "This configuration will lead to more than 2 GB reserved for this cache at runtime! ({0} requested) Only {1} element will be reserved instead."; const string k_CacheInfoFormat = "Reserving {0} in memory at runtime."; @@ -161,8 +160,7 @@ static partial class HDRenderPipelineUI { k_SupportTransparentBackface , shaderVariantDrawback }, { k_SupportTransparentDepthPrepass , shaderVariantDrawback }, { k_SupportTransparentDepthPostpass , shaderVariantDrawback }, - { k_SupportRaytracing , string.Format("{0}, {1}", memoryDrawback, lotShaderVariantDrawback) }, - { k_SupportsVirtualTexturing , string.Format("{0}, {1}", memoryDrawback, lotShaderVariantDrawback) } + { k_SupportRaytracing , string.Format("{0}, {1}", memoryDrawback, lotShaderVariantDrawback) } }; static Dictionary k_SupportLitShaderModeDrawbacks = new Dictionary diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index 67a5df4f706..85f8ea9f52c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -590,10 +590,6 @@ static void Drawer_SectionRenderingUnsorted(SerializedHDRenderPipelineAsset seri serialized.renderPipelineSettings.supportRayTracing.boolValue = false; } - - // VT - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportsVirtualTexturing, k_SupportsVirtualTexturing ); - EditorGUILayout.Space(); //to separate with following sub sections } @@ -704,7 +700,6 @@ static void SupportedSettingsInfoSection(SerializedHDRenderPipelineAsset seriali #if REALTIME_RAYTRACING_SUPPORT AppendSupport(builder, serialized.renderPipelineSettings.supportRayTracing, k_SupportRaytracing); #endif - AppendSupport(builder, serialized.renderPipelineSettings.supportsVirtualTexturing, k_SupportsVirtualTexturing); EditorGUILayout.HelpBox(builder.ToString(), MessageType.Info, wide: true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs index 113df28e1c4..8df225a81a6 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs @@ -33,8 +33,6 @@ class SerializedRenderPipelineSettings public SerializedProperty supportTransparentBackface; public SerializedProperty supportTransparentDepthPrepass; public SerializedProperty supportTransparentDepthPostpass; - public SerializedProperty supportsVirtualTexturing; - public SerializedGlobalLightLoopSettings lightLoopSettings; public SerializedHDShadowInitParameters hdShadowInitParams; @@ -72,8 +70,6 @@ public SerializedRenderPipelineSettings(SerializedProperty root) supportRayTracing = root.Find((RenderPipelineSettings s) => s.supportRayTracing); supportedRaytracingTier = root.Find((RenderPipelineSettings s) => s.supportedRaytracingTier); - supportsVirtualTexturing = root.Find((RenderPipelineSettings s) => s.supportsVirtualTexturing); - lightLoopSettings = new SerializedGlobalLightLoopSettings(root.Find((RenderPipelineSettings s) => s.lightLoopSettings)); hdShadowInitParams = new SerializedHDShadowInitParameters(root.Find((RenderPipelineSettings s) => s.hdShadowInitParams)); decalSettings = new SerializedGlobalDecalSettings(root.Find((RenderPipelineSettings s) => s.decalSettings)); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader index df8eb9f976a..129ed670caa 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader @@ -462,7 +462,6 @@ Shader "HDRP/LayeredLit" #pragma multi_compile_instancing #pragma instancing_options renderinglayer - #pragma multi_compile _ VIRTUAL_TEXTURES_ENABLED // Is vt enabled render pipleine wide? #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT // Is VT built for this material //------------------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index ff077289ea2..11851326201 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -67,7 +67,7 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k #endif // VT feedback goes at the back -#if VIRTUAL_TEXTURES_ENABLED +#if UNITY_VIRTUAL_TEXTURING #if defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) #define OUT_GBUFFER_VTFEEDBACK outGBuffer6 #elif defined(LIGHT_LAYERS) || defined(SHADOWS_SHADOWMASK) @@ -637,7 +637,7 @@ void EncodeIntoGBuffer( SurfaceData surfaceData #if VIRTUAL_TEXTURES_ACTIVE OUT_GBUFFER_VTFEEDBACK = surfaceData.VTFeedback; -#elif VIRTUAL_TEXTURES_ENABLED +#elif UNITY_VIRTUAL_TEXTURING OUT_GBUFFER_VTFEEDBACK = float4(1,1,1,1); #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index 611a717b905..8b970a900ec 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -296,7 +296,6 @@ Shader "HDRP/Lit" #pragma multi_compile_instancing #pragma instancing_options renderinglayer - #pragma multi_compile _ VIRTUAL_TEXTURES_ENABLED // Is vt enabled render pipleine wide? dad #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT // Is vt enabled for this material? //------------------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl index 51716d06179..16ff82ced7c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl @@ -35,7 +35,7 @@ #define GBUFFER_LIT_IRIDESCENCE 5 // TODO // Caution: This must be in sync with Lit.cs GetMaterialGBufferCount() -#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK + VIRTUAL_TEXTURES_ENABLED) +#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK + UNITY_VIRTUAL_TEXTURING) // Only one deferred layout is allowed for a HDRenderPipeline, this will be detect by the redefinition of GBUFFERMATERIAL_COUNT // If GBUFFERMATERIAL_COUNT is define two time, the shaders will not compile diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl index d249c76089f..03398b4b0d1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl @@ -93,7 +93,7 @@ void DecodeFromSSSBuffer(uint2 positionSS, out SSSData sssData) // OUTPUT_SSSBUFFER start from SV_Target2 as SV_Target0 and SV_Target1 are used for lighting buffer -#if VIRTUAL_TEXTURES_ENABLED +#if UNITY_VIRTUAL_TEXTURING #define SS_BUFFER_TARGET SV_Target3 #else #define SS_BUFFER_TARGET SV_Target2 diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 3d6ed046956..538d3a69293 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -411,9 +411,9 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau m_DebugDisplaySettings.data.msaaSamples = m_MSAASamples; #if ENABLE_VIRTUALTEXTURES - Shader.EnableKeyword("VIRTUAL_TEXTURES_ENABLED"); + Debug.Log("Scriptable renderpipeline VT enabled"); #else - Shader.DisableKeyword("VIRTUAL_TEXTURES_ENABLED"); + Debug.Log("Scriptable renderpipeline VT disabled"); #endif m_MRTTransparentMotionVec = new RenderTargetIdentifier[2 + additionalVtRenderTargets]; #if ENABLE_RAYTRACING diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index 18e1f2c22e7..32fda4a1697 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -325,7 +325,6 @@ public void EvaluateSettings() defineArray.AddRange(currentDefineList.Split(';')); bool needUpdate = false; - needUpdate |= UpdateDefineList(currentPlatformRenderPipelineSettings.supportsVirtualTexturing, "ENABLE_VIRTUALTEXTURES");; #if REALTIME_RAYTRACING_SUPPORT // Update all the individual defines diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs index c80d66aab37..36568934ec5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs @@ -65,7 +65,6 @@ public enum ColorBufferFormat lowresTransparentSettings = GlobalLowResolutionTransparencySettings.@default, supportRayTracing = false, supportedRaytracingTier = RaytracingTier.Tier2, - supportsVirtualTexturing = false, }; // Lighting @@ -109,7 +108,5 @@ public bool supportMSAA public GlobalPostProcessSettings postProcessSettings; public GlobalDynamicResolutionSettings dynamicResolutionSettings; public GlobalLowResolutionTransparencySettings lowresTransparentSettings; - - public bool supportsVirtualTexturing; // Note only ever use this var in ui's. To check if VT is on or not at run time, always use the C# define ENABLE_VIRTUALTEXTURES as both may be out of sync while the compile+domain reload happen } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl index 5756c81f82c..045c674c811 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl @@ -60,7 +60,7 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/TessellationShare.hlsl" #endif -#if VIRTUAL_TEXTURES_ENABLED +#if UNITY_VIRTUAL_TEXTURING #define VT_BUFFER_TARGET SV_Target1 #define EXTRA_BUFFER_TARGET SV_Target2 #else @@ -70,16 +70,16 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) void Frag(PackedVaryingsToPS packedInput, #ifdef OUTPUT_SPLIT_LIGHTING out float4 outColor : SV_Target0, // outSpecularLighting - #if VIRTUAL_TEXTURES_ENABLED + #if UNITY_VIRTUAL_TEXTURING out float4 outVTFeedback : VT_BUFFER_TARGET, - #endif // VIRTUAL_TEXTURES_ENABLED + #endif // UNITY_VIRTUAL_TEXTURING out float4 outDiffuseLighting : EXTRA_BUFFER_TARGET, OUTPUT_SSSBUFFER(outSSSBuffer) #else out float4 outColor : SV_Target0 - #if VIRTUAL_TEXTURES_ENABLED + #if UNITY_VIRTUAL_TEXTURING , out float4 outVTFeedback : VT_BUFFER_TARGET - #endif // VIRTUAL_TEXTURES_ENABLED + #endif // UNITY_VIRTUAL_TEXTURING #ifdef _WRITE_TRANSPARENT_MOTION_VECTOR , out float4 outMotionVec : EXTRA_BUFFER_TARGET #endif // _WRITE_TRANSPARENT_MOTION_VECTOR @@ -235,7 +235,7 @@ void Frag(PackedVaryingsToPS packedInput, #if VIRTUAL_TEXTURES_ACTIVE outVTFeedback = surfaceData.VTFeedback; -#elif VIRTUAL_TEXTURES_ENABLED +#elif UNITY_VIRTUAL_TEXTURING outVTFeedback = float4(1,1,1,1); #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl index a9c32cb1c3d..5ffbe17f4ae 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl @@ -26,7 +26,7 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) void Frag(PackedVaryingsToPS packedInput, out float4 outResult : SV_Target0 -#if VIRTUAL_TEXTURES_ENABLED +#if UNITY_VIRTUAL_TEXTURING ,out float4 outVTFeedback : SV_Target1 #endif ) @@ -94,7 +94,7 @@ void Frag(PackedVaryingsToPS packedInput, outResult = outColor; #if VIRTUAL_TEXTURES_ACTIVE outVTFeedback = surfaceData.VTFeedback; -#elif VIRTUAL_TEXTURES_ENABLED +#elif UNITY_VIRTUAL_TEXTURING outVTFeedback = float4(1,1,1,1); #endif } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index d4c21fd6d7c..80263477a32 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -220,7 +220,6 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener public override void CollectShaderPragmas(PragmaCollector pragmas, GenerationMode generationMode) { - pragmas.AddShaderPragma(new MultiCompilePragma(new string[] { "_", "VIRTUAL_TEXTURES_ENABLED" })); pragmas.AddShaderPragma(new ShaderFeatureLocalPragma(new string[] { "VIRTUAL_TEXTURES_BUILT" })); } From fd0d4173357dd79817a191909b2dc0a3febf9d1e Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 7 Aug 2019 18:05:04 +0200 Subject: [PATCH 049/143] Initial experiments for stackless aproach. Breaks disabling vt when tilesets haven't been built yet. --- .../Editor/Data/Graphs/PreviewProperty.cs | 4 -- .../Editor/ShaderGUI/StackStatus.cs | 37 ++++++++++++------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs index 08c101bbfc7..c47df0f95fd 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs @@ -220,10 +220,6 @@ public void SetMaterialPropertyBlockValue(Material mat) for (int i = 0; i < 8; i++) mat.SetVector(string.Format("{0}_AlphaKey{1}", name, i), i < m_ClassData.gradientValue.alphaKeys.Length ? GradientUtil.AlphaKeyToVector(m_ClassData.gradientValue.alphaKeys[i]) : Vector2.zero); } - else if (propType == PropertyType.TextureStack) - { - mat.SetTextureStack(name, m_ClassData.textureStackValue); - } } } diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs index e194b1fcdda..4dae2d4eac2 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs @@ -50,7 +50,7 @@ public static void UpdateAllMaterials(bool forceOff = false) public static bool AllStacksValid(Material material) { - var shader = material.shader; + /*var shader = material.shader; int propCount = ShaderUtil.GetPropertyCount(shader); for (int i = 0; i < propCount; i++) @@ -74,14 +74,14 @@ public static bool AllStacksValid(Material material) } } } - + */ return true; } public static List GetInvalidStacksInfo(Material material) { List result = new List(); - var shader = material.shader; + /* var shader = material.shader; int propCount = ShaderUtil.GetPropertyCount(shader); for (int i = 0; i < propCount; i++) @@ -106,12 +106,12 @@ public static List GetInvalidStacksInfo(Material material) result.Add(string.Format("Mat {0}, vt stack {1} is null", material.name, stackPropName)); } } - } + }*/ return result; } - public static string GetStackHash(string stackPropName, Material material) + public static string GetStackHash(Material material, IEnumerable textureProperties) { // fill in a (hashed) name string texturesHash = ""; @@ -122,18 +122,15 @@ public static string GetStackHash(string stackPropName, Material material) if (material.shader == null) return texturesHash; - - string[] textureProperties = ShaderUtil.GetStackTextureProperties(material.shader, stackPropName); - TextureWrapMode wrapMode = TextureWrapMode.Clamp; TextureImporterNPOTScale textureScaling = TextureImporterNPOTScale.None; bool firstTextureAdded = false; - for (int j = 0; j < textureProperties.Length; j++) + int layer = 0; + foreach (string textureProperty in textureProperties) { - string textureProperty = textureProperties[j]; - string hash = "NO-DATA"; //TODO for empty layers the Granite layer data type is unknown. Therefor, this stack can be part of different tile sets with different layer layouts and still have the same hash + /*string hash = "NO-DATA"; //TODO for empty layers the Granite layer data type is unknown. Therefor, this stack can be part of different tile sets with different layer layouts and still have the same hash Debug.Assert(material.HasProperty(textureProperty)); @@ -168,8 +165,19 @@ public static string GetStackHash(string stackPropName, Material material) } } - texturesHash += hash; + texturesHash += hash;*/ + + // Note this is totally hacky once the old tools go away this should become something faster to calculate ideally + // always just hashes of hashes never strings + Texture2D tex2D = material.GetTexture(textureProperty) as Texture2D; + if (tex2D != null) + { + + texturesHash += "_"; + texturesHash += tex2D.imageContentsHash; + } + layer++; } String assetHash = "" + wrapMode + textureScaling; @@ -178,13 +186,15 @@ public static string GetStackHash(string stackPropName, Material material) //TileSetBuildSettings tileSetBuildSettings = new TileSetBuildSettings(ts); String settingsHash = ""; + Hash128 result = Hash128.Compute("version_1" + texturesHash); - return ("version_1_" + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); + return result.ToString();// ("version_1_" + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); } /// /// Get a string that uniquely identifies the texture on the given slot of the given material. /// +#if false public static string GetTextureHash(Texture2D texture) { if (texture == null) @@ -217,6 +227,7 @@ public static string GetTextureHash(Texture2D texture) return texture.imageContentsHash.ToString() + GetGraniteLayerDataType(textureImporter); } +#endif //returns null if no valid texture importer is passed public static string GetGraniteLayerDataType(TextureImporter textureImporter) From 2b2d0510b1f2d28b99215f4a81b24375fc5ac355 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 12 Aug 2019 16:12:38 +0200 Subject: [PATCH 050/143] - Remove per material VT toggle (vt is now enabled per project and in the material graph by using the right node). - Removes the keword and associated handling for graph generation - Removes the toggle option in the inspectors - Remove lit shader support (only exposed in graph for now) --- .../ShaderLibrary/TextureStack.hlsl | 3 +- .../Material/Lit/ShaderGraph/HDLitGUI.cs | 1 - .../Editor/Material/PBR/HDPBRLit.cs | 5 - .../UIBlocks/AdvancedOptionsUIBlock.cs | 10 +- .../Editor/Material/Unlit/BaseUnlitGUI.cs | 6 +- .../Material/Unlit/ShaderGraph/HDUnlitGUI.cs | 1 - .../Editor/Material/Unlit/UnlitGUI.cs | 2 +- .../ShaderGraph/HDSubShaderUtilities.cs | 13 - .../Material/LayeredLit/LayeredLit.shader | 7 - .../Material/LayeredLit/LayeredLitData.hlsl | 141 ++++------ .../Runtime/Material/Lit/Lit.shader | 5 - .../Material/Lit/LitDataIndividualLayer.hlsl | 84 +----- .../Runtime/Material/Lit/LitProperties.hlsl | 41 +-- .../Editor/Data/Graphs/PreviewProperty.cs | 18 -- .../Editor/Data/Graphs/SerializableStack.cs | 63 ----- .../Data/Graphs/SerializableStack.cs.meta | 11 - .../Editor/Data/Graphs/StackShaderProperty.cs | 12 +- .../Editor/Data/Nodes/AbstractMaterialNode.cs | 7 +- .../Nodes/Input/Texture/TextureStackNode.cs | 14 - .../Editor/Data/Util/GraphUtil.cs | 8 +- .../Editor/Data/Util/PragmaCollector.cs | 126 --------- .../Editor/Data/Util/PragmaCollector.cs.meta | 11 - .../Editor/Data/Util/ShaderGenerator.cs | 3 +- .../Editor/ShaderGUI/PBRMasterGUI.cs | 20 -- .../Editor/ShaderGUI/StackStatus.cs | 262 ------------------ .../Editor/ShaderGUI/StackStatus.cs.meta | 11 - .../Editor/Util/StackUtilities.cs | 38 --- .../Editor/Util/StackUtilities.cs.meta | 11 - 28 files changed, 82 insertions(+), 852 deletions(-) delete mode 100644 com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs delete mode 100644 com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs.meta delete mode 100644 com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs delete mode 100644 com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs.meta delete mode 100644 com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs delete mode 100644 com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs.meta delete mode 100644 com.unity.shadergraph/Editor/Util/StackUtilities.cs delete mode 100644 com.unity.shadergraph/Editor/Util/StackUtilities.cs.meta diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 03f8c8dc63b..3da845a4d6c 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -59,10 +59,9 @@ // A note about the on/off defines // UNITY_VIRTUAL_TEXTURING current project is configured to use VT this is something even non vt materials may need to be aware of (e.g. different gbuffer layout used etc...) -// VIRTUAL_TEXTURES_BUILT valid vt data has been build for the material the material can render with VT from a data point but not nececarry rendering using VT because RP may have it disabled // VIRTUAL_TEXTURES_ACTIVE vt data is built and enabled so the current shader should actively use VT sampling -#if UNITY_VIRTUAL_TEXTURING && VIRTUAL_TEXTURES_BUILT +#if UNITY_VIRTUAL_TEXTURING #define VIRTUAL_TEXTURES_ACTIVE 1 #else #define VIRTUAL_TEXTURES_ACTIVE 0 diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs index 436d5a934af..cd0398dc6fd 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs @@ -21,7 +21,6 @@ class HDLitGUI : HDShaderGUI { new SurfaceOptionUIBlock(MaterialUIBlock.Expandable.Base, features: surfaceOptionFeatures), new ShaderGraphUIBlock(MaterialUIBlock.Expandable.ShaderGraph), - new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.VirtualTexturing), }; public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs index 89f3816c663..176de16e2db 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs @@ -7,12 +7,7 @@ class HDPBRLitGUI : ShaderGUI { public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { - EditorGUI.BeginChangeCheck(); materialEditor.PropertiesDefaultGUI(props); - if (EditorGUI.EndChangeCheck()) - { - ShaderGraph.StackUtilities.SetMaterialKeywords(materialEditor.targets); - } if (materialEditor.EmissionEnabledProperty()) { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs index 20064e8fda7..0e7e41d5a91 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs @@ -14,9 +14,8 @@ public enum Features Instancing = 1 << 0, SpecularOcclusion = 1 << 1, AdditionalVelocity = 1 << 2, - VirtualTexturing = 1 << 3, All = ~0, - Unlit = Instancing | VirtualTexturing, + Unlit = Instancing, } public class Styles @@ -24,7 +23,6 @@ public class Styles public const string header = "Advanced Options"; public static GUIContent enableSpecularOcclusionText = new GUIContent("Specular Occlusion From Bent Normal", "Requires cosine weighted bent normal and cosine weighted ambient occlusion. Specular occlusion for Reflection Probe"); public static GUIContent additionalVelocityChangeText = new GUIContent("Additional Velocity Changes", "Requires additional per vertex velocity info"); - public static GUIContent enableVirtualTexturingText = new GUIContent("Virtual Texturing", "When enabled, use virtual texturing instead of regular textures."); } protected MaterialProperty enableSpecularOcclusion = null; @@ -33,9 +31,6 @@ public class Styles protected const string kEnableSpecularOcclusion = "_EnableSpecularOcclusion"; protected const string kAdditionalVelocityChange = HDMaterialProperties.kAdditionalVelocityChange; - protected MaterialProperty enableVirtualTexturing = null; - protected const string kEnableVirtualTexturing = "_VirtualTexturing"; - Expandable m_ExpandableBit; Features m_Features; @@ -49,7 +44,6 @@ public override void LoadMaterialProperties() { enableSpecularOcclusion = FindProperty(kEnableSpecularOcclusion); additionalVelocityChange = FindProperty(kAdditionalVelocityChange); - enableVirtualTexturing = FindProperty(kEnableVirtualTexturing); } public override void OnGUI() @@ -67,8 +61,6 @@ void DrawAdvancedOptionsGUI() materialEditor.EnableInstancingField(); if ((m_Features & Features.SpecularOcclusion) != 0) materialEditor.ShaderProperty(enableSpecularOcclusion, Styles.enableSpecularOcclusionText); - if (((m_Features & Features.VirtualTexturing) != 0) && enableVirtualTexturing != null) - materialEditor.ShaderProperty(enableVirtualTexturing, Styles.enableVirtualTexturingText); if ((m_Features & Features.AdditionalVelocity) != 0) { if ( additionalVelocityChange != null) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs index c5abcf1243a..1b953dc2bd7 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs @@ -4,7 +4,7 @@ using UnityEngine; using UnityEngine.Rendering.HighDefinition; using UnityEngine.Rendering; -using UnityEditor.ShaderGraph; //TODO(ddebaets) remove when StackStatus is in core unity +using UnityEditor.ShaderGraph; // Include material common properties names using static UnityEngine.Rendering.HighDefinition.HDMaterialProperties; @@ -196,10 +196,6 @@ public static void SetupBaseUnlitKeywords(this Material material) material.SetInt("_DistortionBlurBlendOp", (int)UnityEngine.Rendering.BlendOp.Add); break; } - -#if ENABLE_VIRTUALTEXTURES - TextureStackStatus.UpdateMaterial(material); -#endif } CullMode doubleSidedOffMode = (surfaceType == SurfaceType.Transparent) ? material.GetTransparentCullMode() : CullMode.Back; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs index 548f4d9d2f9..750439ebb6c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs @@ -22,7 +22,6 @@ class HDUnlitGUI : HDShaderGUI { new SurfaceOptionUIBlock(MaterialUIBlock.Expandable.Base, features: surfaceOptionFeatures), new ShaderGraphUIBlock(MaterialUIBlock.Expandable.ShaderGraph, ShaderGraphUIBlock.Features.Unlit), - new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.VirtualTexturing), }; public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs index ac3bd5a015c..c1cb929f572 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs @@ -18,7 +18,7 @@ class UnlitGUI : HDShaderGUI new UnlitSurfaceInputsUIBlock(MaterialUIBlock.Expandable.Input), new TransparencyUIBlock(MaterialUIBlock.Expandable.Transparency), new EmissionUIBlock(MaterialUIBlock.Expandable.Emissive), - new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.Unlit | AdvancedOptionsUIBlock.Features.AdditionalVelocity), + new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.Instancing | AdvancedOptionsUIBlock.Features.AdditionalVelocity), }; public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs index b433890ba64..16b344a9ec9 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs @@ -581,9 +581,6 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass PropertyCollector sharedProperties = new PropertyCollector(); ShaderStringBuilder shaderPropertyUniforms = new ShaderStringBuilder(1); - // pragmas generated by nodes - PragmaCollector pragmaCollector = new PragmaCollector(); - // build the graph outputs structure to hold the results of each active slots (and fill out activeFields to indicate they are active) string pixelGraphInputStructName = "SurfaceDescriptionInputs"; string pixelGraphOutputStructName = "SurfaceDescription"; @@ -604,7 +601,6 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass masterNode.owner as GraphData, pixelGraphEvalFunction, functionRegistry, - pragmaCollector, sharedProperties, pixelRequirements, // TODO : REMOVE UNUSED mode, @@ -637,7 +633,6 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass masterNode.owner as GraphData, vertexGraphEvalFunction, functionRegistry, - pragmaCollector, sharedProperties, mode, vertexNodes, @@ -712,14 +707,6 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass if (graphRequirements.requiresCameraOpaqueTexture) defines.AddShaderChunk("#define REQUIRE_OPAQUE_TEXTURE"); defines.AddGenerator(interpolatorDefines); - - - // Should we add a separate "pragmas" chunk instead of surfing along with defines? - foreach (var pragma in pragmaCollector.pragmas) - { - Debug.Log("Adding pragma: " + pragma.GetPragmaString()); - defines.AddShaderChunk(pragma.GetPragmaString()); - } } var shaderPassIncludes = new ShaderGenerator(); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader index 129ed670caa..ac32e40de62 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader @@ -366,11 +366,6 @@ Shader "HDRP/LayeredLit" [ToggleUI] _ReceivesSSR("Receives SSR", Float) = 1.0 [ToggleUI] _AddVelocityChange("EnableAdditionalVelocity", Float) = 0.0 - [Toggle] _VirtualTexturing("Virtual Texturing", Float) = 0.0 - _TextureStack0("_TextureStack0", TextureStack) = { _BaseColorMap0 _MaskMap0 _NormalMap0 } - _TextureStack1("_TextureStack1", TextureStack) = { _BaseColorMap1 _MaskMap1 _NormalMap1 } - _TextureStack2("_TextureStack2", TextureStack) = { _BaseColorMap2 _MaskMap2 _NormalMap2 } - _TextureStack3("_TextureStack3", TextureStack) = { _BaseColorMap3 _MaskMap3 _NormalMap3 } } HLSLINCLUDE @@ -462,8 +457,6 @@ Shader "HDRP/LayeredLit" #pragma multi_compile_instancing #pragma instancing_options renderinglayer - #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT // Is VT built for this material - //------------------------------------------------------------------------------------- // Define //------------------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index a2e26f8ae5a..322c603cf30 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -9,55 +9,53 @@ // Number of sampler are limited, we need to share sampler as much as possible with lit material // for this we put the constraint that the sampler are the same in a layered material for all textures of the same type // then we take the sampler matching the first textures use of this type -#if !VIRTUAL_TEXTURES_ACTIVE - #if defined(_NORMALMAP0) - #if defined(_NORMALMAP_TANGENT_SPACE0) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap0 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS0 - #endif - #elif defined(_NORMALMAP1) - #if defined(_NORMALMAP_TANGENT_SPACE1) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap1 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS1 - #endif - #elif defined(_NORMALMAP2) - #if defined(_NORMALMAP_TANGENT_SPACE2) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap2 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS2 - #endif - #elif defined(_NORMALMAP3) - #if defined(_NORMALMAP_TANGENT_SPACE3) - #define SAMPLER_NORMALMAP_IDX sampler_NormalMap3 - #else - #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS3 - #endif - #elif defined(_BENTNORMALMAP0) - #if defined(_NORMALMAP_TANGENT_SPACE0) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap0 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS0 - #endif - #elif defined(_BENTNORMALMAP1) - #if defined(_NORMALMAP_TANGENT_SPACE1) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap1 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS1 - #endif - #elif defined(_BENTNORMALMAP2) - #if defined(_NORMALMAP_TANGENT_SPACE2) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap2 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS2 - #endif +#if defined(_NORMALMAP0) + #if defined(_NORMALMAP_TANGENT_SPACE0) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap0 #else - #if defined(_NORMALMAP_TANGENT_SPACE3) - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap3 - #else - #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS3 - #endif + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS0 + #endif +#elif defined(_NORMALMAP1) + #if defined(_NORMALMAP_TANGENT_SPACE1) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap1 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS1 + #endif +#elif defined(_NORMALMAP2) + #if defined(_NORMALMAP_TANGENT_SPACE2) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap2 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS2 + #endif +#elif defined(_NORMALMAP3) + #if defined(_NORMALMAP_TANGENT_SPACE3) + #define SAMPLER_NORMALMAP_IDX sampler_NormalMap3 + #else + #define SAMPLER_NORMALMAP_IDX sampler_NormalMapOS3 + #endif +#elif defined(_BENTNORMALMAP0) + #if defined(_NORMALMAP_TANGENT_SPACE0) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap0 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS0 + #endif +#elif defined(_BENTNORMALMAP1) + #if defined(_NORMALMAP_TANGENT_SPACE1) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap1 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS1 + #endif +#elif defined(_BENTNORMALMAP2) + #if defined(_NORMALMAP_TANGENT_SPACE2) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap2 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS2 + #endif +#else + #if defined(_NORMALMAP_TANGENT_SPACE3) + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMap3 + #else + #define SAMPLER_NORMALMAP_IDX sampler_BentNormalMapOS3 #endif #endif @@ -71,16 +69,14 @@ #define SAMPLER_DETAILMAP_IDX sampler_DetailMap3 #endif -#if !VIRTUAL_TEXTURES_ACTIVE - #if defined(_MASKMAP0) - #define SAMPLER_MASKMAP_IDX sampler_MaskMap0 - #elif defined(_MASKMAP1) - #define SAMPLER_MASKMAP_IDX sampler_MaskMap1 - #elif defined(_MASKMAP2) - #define SAMPLER_MASKMAP_IDX sampler_MaskMap2 - #else - #define SAMPLER_MASKMAP_IDX sampler_MaskMap3 - #endif +#if defined(_MASKMAP0) +#define SAMPLER_MASKMAP_IDX sampler_MaskMap0 +#elif defined(_MASKMAP1) +#define SAMPLER_MASKMAP_IDX sampler_MaskMap1 +#elif defined(_MASKMAP2) +#define SAMPLER_MASKMAP_IDX sampler_MaskMap2 +#else +#define SAMPLER_MASKMAP_IDX sampler_MaskMap3 #endif #if defined(_HEIGHTMAP0) @@ -491,12 +487,7 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod // Blend mask are Main Layer A - Layer 1 R - Layer 2 G - Layer 3 B // Value for main layer is not use for blending itself but for alternate weighting like density. // Settings this specific Main layer blend mask in alpha allow to be transparent in case we don't use it and 1 is provide by default. -#if VIRTUAL_TEXTURES_ACTIVE - // If VT is active, we sample using the sampler of the _BaseColor (_c0) of layer 0 (TextureStack0); we do this because we have no capacity left to create a sampler for the _LayerMaskMap - float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_TextureStack0_c0, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_TextureStack0_c0, layerTexCoord.blendMask); -#else float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask); -#endif // Wind uses vertex alpha as an intensity parameter. // So in case Layered shader uses wind, we need to hardcode the alpha here so that the main layer can be visible without affecting wind intensity. @@ -514,12 +505,7 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod float GetInfluenceMask(LayerTexCoord layerTexCoord, bool useLodSampling = false, float lod = 0) { // Sample influence mask with same mapping as Main layer -#if VIRTUAL_TEXTURES_ACTIVE - // If VT is active, we sample using the sampler of the _BaseColor (_c0) of layer 0 (TextureStack0); we do this because we have no capacity left to create a sampler for the _LayerInfluenceMaskMap - return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_TextureStack0_c0, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_TextureStack0_c0, layerTexCoord.base0).r; -#else return useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0, lod).r : SAMPLE_UVMAPPING_TEXTURE2D(_LayerInfluenceMaskMap, sampler_LayerInfluenceMaskMap, layerTexCoord.base0).r; -#endif } float GetMaxHeight(float4 heights) @@ -642,20 +628,10 @@ float3 ComputeMainBaseColorInfluence(float influenceMask, float3 baseColor0, flo // We want to calculate the mean color of the texture. For this we will sample a low mipmap float textureBias = 15.0; // Use maximum bias - -#if VIRTUAL_TEXTURES_ACTIVE - // TODO here we still do non-VT sampling to get the mean colors, instead of PrepareStack() followed by SampleStack(); ideally we have a PrepareStack_Bias() and/or a SampleStack_Bias() - // which takes an additional argument to bias the sampled LOD. This approach doesn't work here as the VT system is designed to sample a single *tile* at the lowest resolution. - float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_TextureStack0_c0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; - float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_TextureStack0_c0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; - float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_TextureStack0_c0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb; - float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_TextureStack0_c0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb; -#else float3 baseMeanColor0 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap0, sampler_BaseColorMap0, layerTexCoord.base0, textureBias).rgb *_BaseColor0.rgb; float3 baseMeanColor1 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap1, sampler_BaseColorMap0, layerTexCoord.base1, textureBias).rgb *_BaseColor1.rgb; float3 baseMeanColor2 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap2, sampler_BaseColorMap0, layerTexCoord.base2, textureBias).rgb *_BaseColor2.rgb; float3 baseMeanColor3 = SAMPLE_UVMAPPING_TEXTURE2D_BIAS(_BaseColorMap3, sampler_BaseColorMap0, layerTexCoord.base3, textureBias).rgb *_BaseColor3.rgb; -#endif float3 meanColor = BlendLayeredVector3(baseMeanColor0, baseMeanColor1, baseMeanColor2, baseMeanColor3, weights); @@ -759,15 +735,6 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION; #endif - // VT Feedback - // TODO: properly - float4 _FeedbackAggregate[4]; - _FeedbackAggregate[0] = surfaceData0.VTFeedback; - _FeedbackAggregate[1] = surfaceData1.VTFeedback; - _FeedbackAggregate[2] = surfaceData2.VTFeedback; - _FeedbackAggregate[3] = surfaceData3.VTFeedback; - surfaceData.VTFeedback = _FeedbackAggregate[input.positionSS.x%4]; - // Init other parameters surfaceData.anisotropy = 0.0; surfaceData.specularColor = float3(0.0, 0.0, 0.0); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index 8b970a900ec..aec740db34c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -225,9 +225,6 @@ Shader "HDRP/Lit" [HideInInspector] _DiffusionProfile("Obsolete, kept for migration purpose", Int) = 0 [HideInInspector] _DiffusionProfileAsset("Diffusion Profile Asset", Vector) = (0, 0, 0, 0) [HideInInspector] _DiffusionProfileHash("Diffusion Profile Hash", Float) = 0 - - [Toggle] _VirtualTexturing("Virtual Texturing", Float) = 0.0 - _TextureStack("_TextureStack", TextureStack) = { _BaseColorMap _MaskMap _NormalMap } } HLSLINCLUDE @@ -296,8 +293,6 @@ Shader "HDRP/Lit" #pragma multi_compile_instancing #pragma instancing_options renderinglayer - #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT // Is vt enabled for this material? - //------------------------------------------------------------------------------------- // Define //------------------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 006d051c993..e2ffb4e3290 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -97,54 +97,14 @@ void ADD_IDX(ComputeLayerTexCoord)( // Uv related parameters } // Caution: Duplicate from GetBentNormalTS - keep in sync! -float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float3 detailNormalTS, float detailMask, StackInfo stackInfo) +float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float3 detailNormalTS, float detailMask) { float3 normalTS; #ifdef _NORMALMAP_IDX #ifdef _NORMALMAP_TANGENT_SPACE_IDX - -#if VIRTUAL_TEXTURES_ACTIVE - //TODO VT does not handle full range of normal map sampling/reconstruction so special cases are considered here... - // - Triplanar mapping is unsupported - // - TODO @jelsayeh verify with "UNITY_NO_DXT5nm" defined - #ifdef SURFACE_GRADIENT - if(ADD_IDX(layerTexCoord.base).mappingType == UV_MAPPING_TRIPLANAR) - { - // Skip VT - normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), ADD_IDX(sampler_NormalMap), ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); - } - else if(ADD_IDX(layerTexCoord.base).mappingType == UV_MAPPING_PLANAR) - { - float4 packedNormal = SampleStack(stackInfo, ADD_IDX(_NormalMap)); - packedNormal.a *= packedNormal.r; - real2 vTGranite = packedNormal.ag * 2.0 - 1.0; - real rcpZGranite = rsqrt(max(1 - Sq(vTGranite.x) - Sq(vTGranite.y), Sq(FLT_EPS))); - real2 derivYPlaneGranite = ConvertTangentSpaceNormalToHeightMapGradient(vTGranite.xy, rcpZGranite, ADD_IDX(_NormalScale)); - - real3 volumeGradGranite = real3(derivYPlaneGranite.x, 0.0, derivYPlaneGranite.y); - normalTS = SurfaceGradientFromVolumeGradient(ADD_IDX(layerTexCoord.base).normalWS, volumeGradGranite); - } - else - { - float4 packedNormal = SampleStack(stackInfo, ADD_IDX(_NormalMap)); - packedNormal.a *= packedNormal.r; - real2 vT = packedNormal.ag * 2.0 - 1.0; - real rcpZ = rsqrt(max(1 - Sq(vT.x) - Sq(vT.y), Sq(FLT_EPS))); - real2 deriv = ConvertTangentSpaceNormalToHeightMapGradient(vT.xy, rcpZ, ADD_IDX(_NormalScale)); - - normalTS = SurfaceGradientFromTBN(deriv, ADD_IDX(layerTexCoord.base).tangentWS, ADD_IDX(layerTexCoord.base).bitangentWS); - } - #else // NO SURFACE_GRADIENT - // - TODO @jelsayeh "NO_SURFACE_GRADIENT" doesn't yet differentiate between TRIPLANAR and regular - normalTS = SampleStack_Normal(stackInfo, ADD_IDX(_NormalMap), ADD_IDX(_NormalScale)); - #endif -#else normalTS = SAMPLE_UVMAPPING_NORMALMAP(ADD_IDX(_NormalMap), SAMPLER_NORMALMAP_IDX, ADD_IDX(layerTexCoord.base), ADD_IDX(_NormalScale)); -#endif - #else // Object space - // We forbid scale in case of object space as it make no sense // To be able to combine object space normal with detail map then later we will re-transform it to world space. // Note: There is no such a thing like triplanar with object space normal, so we call directly 2D function @@ -157,7 +117,6 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float float3 normalOS = UnpackNormalRGB(SAMPLE_TEXTURE2D(ADD_IDX(_NormalMapOS), SAMPLER_NORMALMAP_IDX, ADD_IDX(layerTexCoord.base).uv), 1.0); normalTS = TransformObjectToTangent(normalOS, input.tangentToWorld); #endif - #endif #ifdef _DETAIL_MAP_IDX @@ -166,16 +125,13 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float #else normalTS = lerp(normalTS, BlendNormalRNM(normalTS, detailNormalTS), detailMask); // todo: detailMask should lerp the angle of the quaternion rotation, not the normals #endif - #endif // _NORMALMAP_TANGENT_SPACE_IDX - -#else // _NORMALMAP_IDX not defined - + #endif +#else #ifdef SURFACE_GRADIENT normalTS = float3(0.0, 0.0, 0.0); // No gradient #else normalTS = float3(0.0, 0.0, 1.0); #endif - #endif return normalTS; @@ -222,15 +178,9 @@ float3 ADD_IDX(GetBentNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, f // Return opacity float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out SurfaceData surfaceData, out float3 normalTS, out float3 bentNormalTS) { - // Prepare the VT stack for sampling - StackInfo stackInfo = PrepareStack(UVMappingTo2D(ADD_IDX(layerTexCoord.base)), ADD_IDX(_TextureStack)); - surfaceData.VTFeedback = GetResolveOutput(stackInfo); -#if VIRTUAL_TEXTURES_ACTIVE - const float4 baseColorValue = SampleStack(stackInfo, ADD_IDX(_BaseColorMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); -#else - const float4 baseColorValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); -#endif - float alpha = baseColorValue.a * ADD_IDX(_BaseColor).a; + surfaceData.VTFeedback = float4(1,1,1,1); + + float alpha = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)).a * ADD_IDX(_BaseColor).a; // Perform alha test very early to save performance (a killed pixel will not sample textures) #if defined(_ALPHATEST_ON) && !defined(LAYERED_LIT_SHADER) @@ -248,21 +198,12 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out #endif #endif - -#ifdef _MASKMAP_IDX -#if VIRTUAL_TEXTURES_ACTIVE - const float4 maskValue = SampleStack(stackInfo, ADD_IDX(_MaskMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).b; -#else - const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)); -#endif -#endif - float3 detailNormalTS = float3(0.0, 0.0, 0.0); float detailMask = 0.0; #ifdef _DETAIL_MAP_IDX detailMask = 1.0; #ifdef _MASKMAP_IDX - detailMask = maskValue.b; + detailMask = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).b; #endif float2 detailAlbedoAndSmoothness = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_DetailMap), SAMPLER_DETAILMAP_IDX, ADD_IDX(layerTexCoord.details)).rb; float detailAlbedo = detailAlbedoAndSmoothness.r * 2.0 - 1.0; @@ -271,9 +212,8 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out // We split both call due to trilinear mapping detailNormalTS = SAMPLE_UVMAPPING_NORMALMAP_AG(ADD_IDX(_DetailMap), SAMPLER_DETAILMAP_IDX, ADD_IDX(layerTexCoord.details), ADD_IDX(_DetailNormalScale)); #endif - - surfaceData.baseColor = baseColorValue.rgb * ADD_IDX(_BaseColor).rgb; + surfaceData.baseColor = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)).rgb * ADD_IDX(_BaseColor).rgb; #ifdef _DETAIL_MAP_IDX // Goal: we want the detail albedo map to be able to darken down to black and brighten up to white the surface albedo. @@ -292,11 +232,11 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out surfaceData.normalWS = float3(0.0, 0.0, 0.0); // Need to init this to keep quiet the compiler, but this is overriden later (0, 0, 0) so if we forget to override the compiler may comply. surfaceData.geomNormalWS = float3(0.0, 0.0, 0.0); // Not used, just to keep compiler quiet. - normalTS = ADD_IDX(GetNormalTS)(input, layerTexCoord, detailNormalTS, detailMask, stackInfo); + normalTS = ADD_IDX(GetNormalTS)(input, layerTexCoord, detailNormalTS, detailMask); bentNormalTS = ADD_IDX(GetBentNormalTS)(input, layerTexCoord, normalTS, detailNormalTS, detailMask); #if defined(_MASKMAP_IDX) - surfaceData.perceptualSmoothness = maskValue.a; + surfaceData.perceptualSmoothness = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).a; surfaceData.perceptualSmoothness = lerp(ADD_IDX(_SmoothnessRemapMin), ADD_IDX(_SmoothnessRemapMax), surfaceData.perceptualSmoothness); #else surfaceData.perceptualSmoothness = ADD_IDX(_Smoothness); @@ -312,8 +252,8 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out // MaskMap is RGBA: Metallic, Ambient Occlusion (Optional), detail Mask (Optional), Smoothness #ifdef _MASKMAP_IDX - surfaceData.metallic = maskValue.r; - surfaceData.ambientOcclusion = maskValue.g; + surfaceData.metallic = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).r; + surfaceData.ambientOcclusion = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).g; surfaceData.ambientOcclusion = lerp(ADD_IDX(_AORemapMin), ADD_IDX(_AORemapMax), surfaceData.ambientOcclusion); #else surfaceData.metallic = 1.0; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index 6de13eba9f6..ca5f450cf74 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -4,8 +4,6 @@ // Otherwise those parameters are not bound correctly at runtime. // =========================================================================== -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" - TEXTURE2D(_DistortionVectorMap); SAMPLER(sampler_DistortionVectorMap); @@ -80,26 +78,11 @@ SAMPLER(sampler_CoatMaskMap); TEXTURE2D(MERGE_NAME(name, 3)); \ SAMPLER(MERGE_NAME(MERGE_NAME(sampler, name), 3)) -#if !VIRTUAL_TEXTURES_ACTIVE + PROP_DECL_TEX2D(_BaseColorMap); PROP_DECL_TEX2D(_MaskMap); -PROP_DECL_TEX2D(_NormalMap); - -SAMPLER(sampler_LayerMaskMap); -SAMPLER(sampler_LayerInfluenceMaskMap); -#else -// Have the _NormalMaps *with* their samplers for now, to catch unsupported normal map usage -// TODO @jelsayeh can we do without the samplers? Look at UV_MAPPING_TRIPLANAR in GetNormalTS() (LitDataIndividualLayer.hlsl) -PROP_DECL_TEX2D(_NormalMap); - -// The _BaseColorMaps are still required for sampling the mean color in ComputeMainBaseColorInfluence() (LayeredLitData.hlsl) -TEXTURE2D(_BaseColorMap0); -TEXTURE2D(_BaseColorMap1); -TEXTURE2D(_BaseColorMap2); -TEXTURE2D(_BaseColorMap3); -#endif - PROP_DECL_TEX2D(_BentNormalMap); +PROP_DECL_TEX2D(_NormalMap); PROP_DECL_TEX2D(_NormalMapOS); PROP_DECL_TEX2D(_DetailMap); PROP_DECL_TEX2D(_HeightMap); @@ -108,7 +91,9 @@ PROP_DECL_TEX2D(_SubsurfaceMaskMap); PROP_DECL_TEX2D(_ThicknessMap); TEXTURE2D(_LayerMaskMap); +SAMPLER(sampler_LayerMaskMap); TEXTURE2D(_LayerInfluenceMaskMap); +SAMPLER(sampler_LayerInfluenceMaskMap); #endif @@ -167,15 +152,6 @@ float _EnableGeometricSpecularAA; float _SpecularAAScreenSpaceVariance; float _SpecularAAThreshold; -#ifndef LAYERED_LIT_SHADER -DECLARE_STACK_CB(_TextureStack); -#else -DECLARE_STACK_CB(_TextureStack0); -DECLARE_STACK_CB(_TextureStack1); -DECLARE_STACK_CB(_TextureStack2); -DECLARE_STACK_CB(_TextureStack3); -#endif - #ifndef LAYERED_LIT_SHADER // Set of users variables @@ -312,12 +288,3 @@ int _ObjectId; int _PassValue; CBUFFER_END - -#ifndef LAYERED_LIT_SHADER -DECLARE_STACK3(_TextureStack, _BaseColorMap, _MaskMap, _NormalMap); -#else -DECLARE_STACK3(_TextureStack0, _BaseColorMap0, _MaskMap0, _NormalMap0); -DECLARE_STACK3(_TextureStack1, _BaseColorMap1, _MaskMap1, _NormalMap1); -DECLARE_STACK3(_TextureStack2, _BaseColorMap2, _MaskMap2, _NormalMap2); -DECLARE_STACK3(_TextureStack3, _BaseColorMap3, _MaskMap3, _NormalMap3); -#endif diff --git a/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs index c47df0f95fd..db0da7e06a1 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs @@ -23,8 +23,6 @@ struct ClassData public Cubemap cubemapValue; [FieldOffset(0)] public Gradient gradientValue; - [FieldOffset(0)] - public TextureStack textureStackValue; } [StructLayout(LayoutKind.Explicit)] @@ -110,22 +108,6 @@ public Gradient gradientValue } } - public TextureStack textureStackValue - { - get - { - if (propType != PropertyType.TextureStack) - throw new ArgumentException(string.Format(k_GetErrorMessage, PropertyType.TextureStack, propType)); - return m_ClassData.textureStackValue; - } - set - { - if (propType != PropertyType.TextureStack) - throw new ArgumentException(string.Format(k_SetErrorMessage, PropertyType.TextureStack, propType)); - m_ClassData.textureStackValue = value; - } - } - public Vector4 vector4Value { get diff --git a/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs b/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs deleted file mode 100644 index e6f270f7fec..00000000000 --- a/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityEditor.ShaderGraph -{ - [Serializable] - class SerializableStack : ISerializationCallbackReceiver - { - [SerializeField] - string m_SerializedTextureStack; - - [SerializeField] - string m_Guid; - - [NonSerialized] - TextureStack m_TextureStack; - - [Serializable] - class TextureStackHelper - { -#pragma warning disable 649 - public TextureStack stack; -#pragma warning restore 649 - } - - public TextureStack textureStack - { - get - { - if (!string.IsNullOrEmpty(m_SerializedTextureStack)) - { - var textureStackHelper = new TextureStackHelper(); - EditorJsonUtility.FromJsonOverwrite(m_SerializedTextureStack, textureStackHelper); - m_SerializedTextureStack = null; - m_Guid = null; - m_TextureStack = textureStackHelper.stack; - } - else if (!string.IsNullOrEmpty(m_Guid) && m_TextureStack == null) - { - m_TextureStack = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(m_Guid)); - m_Guid = null; - } - - return m_TextureStack; - } - set - { - m_TextureStack = value; - m_Guid = null; - m_SerializedTextureStack = null; - } - } - - public void OnBeforeSerialize() - { - m_SerializedTextureStack = EditorJsonUtility.ToJson(new TextureStackHelper { stack = textureStack }, false); - } - - public void OnAfterDeserialize() - { - } - } -} diff --git a/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs.meta b/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs.meta deleted file mode 100644 index c298aec8d1e..00000000000 --- a/com.unity.shadergraph/Editor/Data/Graphs/SerializableStack.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 85d73c3dc97255f4fa5a4a893b0b0b6d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs index ac5cad84fac..6423259db3f 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs @@ -7,14 +7,14 @@ namespace UnityEditor.ShaderGraph { [Serializable] - class StackShaderProperty : AbstractShaderProperty + // Node a StackShaderProperty has no user settable values it is only used to ensure correct data is emitted into the shader. So we use a dummy value of "int" type. + class StackShaderProperty : AbstractShaderProperty { [SerializeField] - private bool m_Modifiable = true; + private bool m_Modifiable = false; public StackShaderProperty() { - value = new SerializableStack(); displayName = "Stack"; slotNames = new List(); slotNames.Add("Dummy"); @@ -98,21 +98,19 @@ public override string GetPropertyBlockString() public override string GetPropertyAsArgumentString() { throw new NotImplementedException(); - //return string.Format("TEXTURECUBE_PARAM({0}, sampler{0})", referenceName); } public override PreviewProperty GetPreviewMaterialProperty() { return new PreviewProperty(PropertyType.TextureStack) { - name = referenceName, - textureStackValue = value.textureStack + name = referenceName }; } public override AbstractMaterialNode ToConcreteNode() { - return null;// new StackAssetNode { cubemap = value.stack }; + return null; } public override ShaderInput Copy() diff --git a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs index 6c6d76e037e..5370f705d90 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs @@ -290,12 +290,7 @@ public string GetSlotValue(int inputSlotId, GenerationMode generationMode) return inputSlot.GetDefaultValue(generationMode); } - - public virtual void CollectShaderPragmas(PragmaCollector pragmas, GenerationMode generationMode) - { - // None by default - } - + public static ConcreteSlotValueType ConvertDynamicVectorInputTypeToConcrete(IEnumerable inputTypes) { var concreteSlotValueTypes = inputTypes as IList ?? inputTypes.ToList(); diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 80263477a32..6be81ac129a 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -207,20 +207,6 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener modifiable = false, slotNames = slotNames }); - - // If the property already exists additional calls will be ignored so we just try to add this on every VT node.. - properties.AddShaderProperty(new BooleanShaderProperty() - { - overrideReferenceName = "_VirtualTexturing", - displayName = "Virtual Texturing", - generatePropertyBlock = true, - value = false - }); - } - - public override void CollectShaderPragmas(PragmaCollector pragmas, GenerationMode generationMode) - { - pragmas.AddShaderPragma(new ShaderFeatureLocalPragma(new string[] { "VIRTUAL_TEXTURES_BUILT" })); } public bool RequiresMeshUV(UVChannel channel, ShaderStageCapability stageCapability) diff --git a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs index ed7bea2a27d..e03bf64fc9e 100644 --- a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs +++ b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs @@ -987,7 +987,6 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial var results = new GenerationResults(); var shaderProperties = new PropertyCollector(); - var shaderPragmas = new PragmaCollector(); var shaderPropertyUniforms = new ShaderStringBuilder(); var functionBuilder = new ShaderStringBuilder(); var functionRegistry = new FunctionRegistry(functionBuilder); @@ -1068,7 +1067,6 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial graph, surfaceDescriptionFunction, functionRegistry, - shaderPragmas, shaderProperties, requirements, mode, @@ -1136,7 +1134,7 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial finalShader.AppendLine(@"ENDHLSL"); - finalShader.AppendLines(ShaderGenerator.GetPreviewSubShader(node, requirements, shaderPragmas)); + finalShader.AppendLines(ShaderGenerator.GetPreviewSubShader(node, requirements)); ListPool.Release(activeNodeList); } @@ -1243,7 +1241,6 @@ public static void GenerateSurfaceDescriptionFunction( GraphData graph, ShaderStringBuilder surfaceDescriptionFunction, FunctionRegistry functionRegistry, - PragmaCollector shaderPragmas, PropertyCollector shaderProperties, ShaderGraphRequirements requirements, GenerationMode mode, @@ -1281,7 +1278,6 @@ public static void GenerateSurfaceDescriptionFunction( } activeNode.CollectShaderProperties(shaderProperties, mode); - activeNode.CollectShaderPragmas(shaderPragmas, mode); } functionRegistry.builder.currentNode = null; @@ -1352,7 +1348,6 @@ public static void GenerateVertexDescriptionFunction( GraphData graph, ShaderStringBuilder builder, FunctionRegistry functionRegistry, - PragmaCollector shaderPragmas, PropertyCollector shaderProperties, GenerationMode mode, List nodes, @@ -1388,7 +1383,6 @@ public static void GenerateVertexDescriptionFunction( builder.ReplaceInCurrentMapping(PrecisionUtil.Token, node.concretePrecision.ToShaderString()); } node.CollectShaderProperties(shaderProperties, mode); - node.CollectShaderPragmas(shaderPragmas, mode); } functionRegistry.builder.currentNode = null; diff --git a/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs b/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs deleted file mode 100644 index 7e8cc640454..00000000000 --- a/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UnityEditor.ShaderGraph -{ - abstract class AbstractShaderPragma - { - // Check if this pragma is a of another pragma. Some pragmas may work identical if they are present several - // times and can be stripped while others do "something" each time they are used. - public abstract bool IsDuplicate(AbstractShaderPragma other); - public abstract string GetPragmaString(); - } - - // Just a list of string separated keywords - class SimplePragma : AbstractShaderPragma - { - public SimplePragma(string PragmaName, IEnumerable argumentKeywords) - { - keywords.Add("#pragma"); - keywords.Add(PragmaName); - keywords.AddRange(argumentKeywords); - } - - // By default we always emit the pragma - public override bool IsDuplicate(AbstractShaderPragma other) { return false; } - - public override string GetPragmaString() - { - return string.Join(" ", keywords); - } - - List keywords = new List(); - - public string pragmaname - { - get - { - return keywords[1]; - } - } - - public IEnumerable arguments - { - get - { - return keywords.Skip(2); - } - } - } - - class MultiCompilePragma : SimplePragma - { - public MultiCompilePragma(IEnumerable options) : base("multi_compile", options) - { - if ( options.Count() < 2) - { - throw new System.Exception("multi_compile needs at least 2 options, you probably need to use the empty '_' option."); - } - } - - public override bool IsDuplicate(AbstractShaderPragma other) - { - return (other is MultiCompilePragma) && (other as MultiCompilePragma).arguments.SequenceEqual(arguments); - } - } - - class ShaderFeaturePragma : SimplePragma - { - public ShaderFeaturePragma(IEnumerable options) : base("shader_feature", options) - { - } - - public override bool IsDuplicate(AbstractShaderPragma other) - { - return (other is ShaderFeaturePragma) && (other as ShaderFeaturePragma).arguments.SequenceEqual(arguments); - } - } - - class ShaderFeatureLocalPragma : SimplePragma - { - public ShaderFeatureLocalPragma(IEnumerable options) : base("shader_feature_local", options) - { - } - - public override bool IsDuplicate(AbstractShaderPragma other) - { - return (other is ShaderFeatureLocalPragma) && (other as ShaderFeatureLocalPragma).arguments.SequenceEqual(arguments); - } - } - - // Todo add build-in multicompiles, skip_variants, .... - - class PragmaCollector - { - public readonly List pragmas = new List(); - - public void AddShaderPragma(AbstractShaderPragma newPragma) - { - // A equivalent pragma is already there - if (pragmas.Any(x => x.IsDuplicate(newPragma))) - return; - pragmas.Add(newPragma); - } - - public string GetPragmaLines(int baseIndentLevel) - { - var sb = new StringBuilder(); - foreach (var pragma in pragmas) - { - for (var i = 0; i < baseIndentLevel; i++) - { - //sb.Append("\t"); - sb.Append(" "); // unity convention use space instead of tab... - } - sb.AppendLine(pragma.GetPragmaString()); - } - return sb.ToString(); - } - - public override string ToString() - { - return GetPragmaLines(0); - } - } -} diff --git a/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs.meta b/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs.meta deleted file mode 100644 index 91315f10f4f..00000000000 --- a/com.unity.shadergraph/Editor/Data/Util/PragmaCollector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 14049a22003eeca4cae1d83c66b97721 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs b/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs index 5cce826c590..f96f500c6e3 100644 --- a/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs +++ b/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs @@ -811,7 +811,7 @@ public static void GenerateSpaceTranslations( DimensionToSwizzle(dimension)); } - public static string GetPreviewSubShader(AbstractMaterialNode node, ShaderGraphRequirements shaderGraphRequirements, PragmaCollector pragmas) + public static string GetPreviewSubShader(AbstractMaterialNode node, ShaderGraphRequirements shaderGraphRequirements) { // Should never be called without a node Debug.Assert(node != null); @@ -881,7 +881,6 @@ public static string GetPreviewSubShader(AbstractMaterialNode node, ShaderGraphR res = res.Replace("${LocalPixelShader}", pixelShader.ToString()); res = res.Replace("${SurfaceInputs}", pixelShaderSurfaceInputs.ToString()); res = res.Replace("${SurfaceOutputRemap}", pixelShaderSurfaceRemap.ToString()); - res = res.Replace("${Pragmas}", pragmas.ToString()); return res; } diff --git a/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs b/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs index 57be26b9e4b..b4f2dc368df 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs @@ -10,16 +10,8 @@ namespace UnityEditor.ShaderGraph class PBRMasterGUI : ShaderGUI { - - public bool m_FirstTimeApply = true; - - public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { - Material material = materialEditor.target as Material; - - EditorGUI.BeginChangeCheck(); - materialEditor.PropertiesDefaultGUI(props); foreach (MaterialProperty prop in props) @@ -33,18 +25,6 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro return; } } - - if (EditorGUI.EndChangeCheck()) - { - SetMaterialKeywords(material); - } - } - - - public static void SetMaterialKeywords(Material material, Action shadingModelFunc = null, Action shaderFunc = null) - { - StackUtilities.SetMaterialKeywords(material); } - } } diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs deleted file mode 100644 index 4dae2d4eac2..00000000000 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs +++ /dev/null @@ -1,262 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor; -using UnityEngine; -using UnityEngine.Rendering; - - -namespace UnityEditor.ShaderGraph -{ - //move to core Unity at some point, make sure the hash calculation is identical to GTSBuildInfoGenerator in the meantime - - public class TextureStackStatus - { - /// - /// Update the keywords on a material to reflect the correct VT state. - /// - /// Material to update - /// Force VT off even if the material indiates it wants VT and VT assets are correctly build. - public static void UpdateMaterial(Material material, bool forceOff = false) - { - if (material.HasProperty("_VirtualTexturing") == false) - return; - - bool enable = forceOff ? false : !(material.GetFloat("_VirtualTexturing") == 0.0f || !TextureStackStatus.AllStacksValid(material)); - - if (enable) - material.EnableKeyword("VIRTUAL_TEXTURES_BUILT"); - else - material.DisableKeyword("VIRTUAL_TEXTURES_BUILT"); - } - - // Scans all materials and updates their VT status - // Note this may take a long time, don't over use this. - public static void UpdateAllMaterials(bool forceOff = false) - { - // disable VT on all materials - var matIds = AssetDatabase.FindAssets("t:Material"); - for (int i = 0, length = matIds.Length; i < length; i++) - { - EditorUtility.DisplayProgressBar("Updating Materials", "Updating materials for VT changes...", (float)(i / matIds.Length)); - var path = AssetDatabase.GUIDToAssetPath(matIds[i]); - var mat = AssetDatabase.LoadAssetAtPath(path); - if (mat != null) - { - ShaderGraph.TextureStackStatus.UpdateMaterial(mat, forceOff); - } - } - EditorUtility.ClearProgressBar(); - } - - public static bool AllStacksValid(Material material) - { - /*var shader = material.shader; - - int propCount = ShaderUtil.GetPropertyCount(shader); - for (int i = 0; i < propCount; i++) - { - if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.Stack) - { - string stackPropName = ShaderUtil.GetPropertyName(shader, i); - TextureStack vtStack = material.GetTextureStack(stackPropName); - - if (vtStack != null) - { - string hash = GetStackHash(stackPropName, material); - - if (hash != vtStack.atlasName) - return false; - - } - else - { - return false; - } - } - } - */ - return true; - } - - public static List GetInvalidStacksInfo(Material material) - { - List result = new List(); - /* var shader = material.shader; - - int propCount = ShaderUtil.GetPropertyCount(shader); - for (int i = 0; i < propCount; i++) - { - if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.Stack) - { - string stackPropName = ShaderUtil.GetPropertyName(shader, i); - TextureStack vtStack = material.GetTextureStack(stackPropName); - - if (vtStack != null) - { - string hash = GetStackHash(stackPropName, material); - - if (hash != vtStack.atlasName) - { - result.Add(string.Format("Mat {0}, vt stack {1} hash does not match texture hash {2}", material.name, vtStack.atlasName, hash)); - } - - } - else - { - result.Add(string.Format("Mat {0}, vt stack {1} is null", material.name, stackPropName)); - } - } - }*/ - - return result; - } - - public static string GetStackHash(Material material, IEnumerable textureProperties) - { - // fill in a (hashed) name - string texturesHash = ""; - - if (material == null) - return texturesHash; - - if (material.shader == null) - return texturesHash; - - TextureWrapMode wrapMode = TextureWrapMode.Clamp; - TextureImporterNPOTScale textureScaling = TextureImporterNPOTScale.None; - - bool firstTextureAdded = false; - - int layer = 0; - foreach (string textureProperty in textureProperties) - { - /*string hash = "NO-DATA"; //TODO for empty layers the Granite layer data type is unknown. Therefor, this stack can be part of different tile sets with different layer layouts and still have the same hash - - Debug.Assert(material.HasProperty(textureProperty)); - - Texture2D tex2D = material.GetTexture(textureProperty) as Texture2D; - - if (tex2D != null) - { - string path = AssetDatabase.GetAssetPath(tex2D); - - if (!string.IsNullOrEmpty(path) && tex2D.imageContentsHash != null ) - { - Debug.Assert(hash!=null); // todo we checked this before, does this still make sense? - - TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter; - - if (textureImporter != null)// probably a fallback texture if this is false - { - hash = GetTextureHash(tex2D); - - if (!firstTextureAdded) - { - wrapMode = tex2D.wrapMode; - textureScaling = textureImporter.npotScale; - firstTextureAdded = true; - } - else - { - if (wrapMode != tex2D.wrapMode || textureScaling != textureImporter.npotScale) - UnityEngine.Debug.LogError("Texture settings don't match on all layers of StackedTexture"); - } - } - } - } - - texturesHash += hash;*/ - - // Note this is totally hacky once the old tools go away this should become something faster to calculate ideally - // always just hashes of hashes never strings - - Texture2D tex2D = material.GetTexture(textureProperty) as Texture2D; - if (tex2D != null) - { - - texturesHash += "_"; - texturesHash += tex2D.imageContentsHash; - } - layer++; - } - - String assetHash = "" + wrapMode + textureScaling; - - //todo: ignoring overall settings in hash for now - //TileSetBuildSettings tileSetBuildSettings = new TileSetBuildSettings(ts); - String settingsHash = ""; - - Hash128 result = Hash128.Compute("version_1" + texturesHash); - - return result.ToString();// ("version_1_" + texturesHash + assetHash + settingsHash).GetHashCode().ToString("X"); - } - - /// - /// Get a string that uniquely identifies the texture on the given slot of the given material. - /// -#if false - public static string GetTextureHash(Texture2D texture) - { - if (texture == null) - { - return null; - } - - // Do the texture resize here if needed. We only resize the texture if it's a normal texture. - // This makes sure we get the texture hash after the rescale, which is the hash we'll get when the material is valid - string assetPath = AssetDatabase.GetAssetPath(texture); - TextureImporter textureImporter = AssetImporter.GetAtPath(assetPath) as TextureImporter; - - if (textureImporter != null) - { - /* TODO no resizing for now - if (textureImporter.maxTextureSize > Constants.TextureResizeSize) - { - textureImporter.maxTextureSize = Constants.TextureResizeSize; - AssetDatabase.ImportAsset(assetPath); - - // Validate setting the size worked. - TextureImporter validateImport = AssetImporter.GetAtPath(assetPath) as TextureImporter; - if (validateImport.maxTextureSize > Constants.TextureResizeSize) - { - UnityEngine.Debug.LogError("Could not set maxTextureSize of '" + assetPath + "' to " + Constants.TextureResizeSize + ". Do you have an AssetPostProcessor active that changes texture sizes?"); - } - } - */ - } - - return texture.imageContentsHash.ToString() + GetGraniteLayerDataType(textureImporter); - } -#endif - - //returns null if no valid texture importer is passed - public static string GetGraniteLayerDataType(TextureImporter textureImporter) - { - if (textureImporter == null) - return null; - - if (textureImporter.textureType == TextureImporterType.NormalMap) - return "X8Y8Z0_TANGENT"; - - if (textureImporter.textureType == TextureImporterType.SingleChannel) - return "X8"; - - //todo is this the only way to detect HDR? - TextureImporterFormat format = textureImporter.GetAutomaticFormat("Standalone"); - - switch (format) - { - case TextureImporterFormat.BC6H: - case TextureImporterFormat.RGB16: - return "R16G16B16_FLOAT"; - default: - break; - } - - if (textureImporter.sRGBTexture) - return "R8G8B8A8_SRGB"; - else - return "R8G8B8A8_LINEAR"; - } - } -} diff --git a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs.meta b/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs.meta deleted file mode 100644 index 09c4040a879..00000000000 --- a/com.unity.shadergraph/Editor/ShaderGUI/StackStatus.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1e8d024c31c10ae439cc21b3f7b9bd19 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Util/StackUtilities.cs b/com.unity.shadergraph/Editor/Util/StackUtilities.cs deleted file mode 100644 index 62265d14a87..00000000000 --- a/com.unity.shadergraph/Editor/Util/StackUtilities.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Linq; -using UnityEngine; -using UnityEditor.Graphing; -using System.Collections.Generic; -using System; -using UnityEditor.ShaderGraph.Drawing.Controls; - -namespace UnityEditor.ShaderGraph -{ - class StackUtilities - { - public static void SetMaterialKeywords(IEnumerable materials) - { - foreach( var mat in materials) - { - if ( mat is Material) - { - SetMaterialKeywords(mat as Material); - } - } - } - - public static void SetMaterialKeywords(Material material) - { - if (material.HasProperty("_VirtualTexturing")) - { - if (material.GetFloat("_VirtualTexturing") == 0.0f || !TextureStackStatus.AllStacksValid(material)) - { - material.DisableKeyword("VIRTUAL_TEXTURES_BUILT"); - } - else - { - material.EnableKeyword("VIRTUAL_TEXTURES_BUILT"); - } - } - } - } -} diff --git a/com.unity.shadergraph/Editor/Util/StackUtilities.cs.meta b/com.unity.shadergraph/Editor/Util/StackUtilities.cs.meta deleted file mode 100644 index 2379f75b332..00000000000 --- a/com.unity.shadergraph/Editor/Util/StackUtilities.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 47b69849be258aa41b7911d850b02577 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: From dde00b1fb678304b58a571522f5b187feb3366a8 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 14 Aug 2019 14:33:19 +0200 Subject: [PATCH 051/143] [VirtualTexturing] Reworked feedback to use UAV scattered write from PS rather then MRT rops write --- .../ShaderLibrary/TextureStack.hlsl | 23 ++++ .../Runtime/Material/GBufferManager.cs | 28 +---- .../Runtime/Material/Lit/Lit.cs | 14 +-- .../Runtime/Material/Lit/Lit.hlsl | 19 +--- .../Material/MaterialGBufferMacros.hlsl | 2 +- .../Runtime/Material/VTBufferManager.cs | 56 +++++++++ .../Runtime/Material/VTBufferManager.cs.meta | 11 ++ .../Runtime/RenderPipeline/Camera/HDCamera.cs | 90 --------------- .../RenderPipeline/HDCustomSamplerId.cs | 1 - .../RenderPipeline/HDRenderPipeline.cs | 107 +++++++----------- .../RenderPipeline/RenderPipelineResources.cs | 6 - .../ShaderPass/ShaderPassForward.hlsl | 19 +--- .../DownsampleVTFeedback.compute | 43 ------- .../DownsampleVTFeedback.compute.meta | 8 -- 14 files changed, 135 insertions(+), 292 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs create mode 100644 com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs.meta delete mode 100644 com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute delete mode 100644 com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 385215863be..ee365a4e8a5 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -1,8 +1,13 @@ +#ifndef TEXTURESTACK_include +#define TEXTURESTACK_include + #define GRA_HLSL_5 1 #define GRA_ROW_MAJOR 1 #define GRA_TEXTURE_ARRAY_SUPPORT 0 #include "GraniteShaderLib3.cginc" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + /* This header adds the following pseudo definitions. Actual types etc may vary depending on vt- being on or off. @@ -68,6 +73,8 @@ #define VIRTUAL_TEXTURES_ACTIVE 0 #endif + + #if VIRTUAL_TEXTURES_ACTIVE struct StackInfo @@ -215,6 +222,19 @@ float4 ResolveVT_##stackName(float2 uv)\ #define GetResolveOutput(info) info.resolveOutput #define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) +RW_TEXTURE2D(float4, VTFeedback) : register(u7); +#define VTFeedbackScale 16 +void StoreVTFeedback(float4 feedback, uint2 positionSS) +{ + [branch] + if ( (positionSS.x & (VTFeedbackScale - 1)) == 0 && (positionSS.y & (VTFeedbackScale - 1)) == 0) + { + + const uint2 vt_pos = positionSS / VTFeedbackScale; + VTFeedback[vt_pos] = feedback; + } +} + #else // Stacks amount to nothing when VT is off @@ -249,5 +269,8 @@ StackInfo MakeStackInfo(float2 uv) // Resolve does nothing #define GetResolveOutput(info) float4(1,1,1,1) #define ResolveStack(uv, stackName) float4(1,1,1,1) +#define StoreVTFeedback(feedback, positionSS) #endif + +#endif //TEXTURESTACK_include diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs index 14a17e04661..64dbdbc57c2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs @@ -9,10 +9,7 @@ enum GBufferUsage SubsurfaceScattering, Normal, LightLayers, - ShadowMask, -#if ENABLE_VIRTUALTEXTURES - VTFeedback, -#endif + ShadowMask } class GBufferManager : MRTBufferManager @@ -23,7 +20,6 @@ class GBufferManager : MRTBufferManager // This is the index of the gbuffer use for shadowmask and lightlayers, if any protected int m_ShadowMaskIndex = -1; protected int m_LightLayers = -1; - protected int m_VTFeedbackIndex = -1; protected HDRenderPipelineAsset m_asset; // We need to store current set of RT to bind exactly, as we can have dynamic RT (LightLayers, ShadowMask), we allocated an array for each possible size (to avoid gardbage collect pressure) protected RenderTargetIdentifier[][] m_RTIDsArray = new RenderTargetIdentifier[8][]; @@ -58,10 +54,6 @@ public override void CreateBuffers() m_ShadowMaskIndex = gbufferIndex; else if (m_GBufferUsage[gbufferIndex] == GBufferUsage.LightLayers) m_LightLayers = gbufferIndex; -#if ENABLE_VIRTUALTEXTURES - else if (m_GBufferUsage[gbufferIndex] == GBufferUsage.VTFeedback) - m_VTFeedbackIndex = gbufferIndex; -#endif } } @@ -81,13 +73,6 @@ public override void BindBufferAsTextures(CommandBuffer cmd) cmd.SetGlobalTexture(HDShaderIDs._LightLayersTexture, TextureXR.GetWhiteTexture()); // This is never use but need to be bind as the read is inside a if } -#if ENABLE_VIRTUALTEXTURES - public RTHandle GetGBuffer0RT() - { - return m_RTs[0]; - } -#endif - // This function will setup the required render target array. This take into account if shadow mask and light layers are enabled or not. // Note for the future: Setup works fine as we don't have change per object (like velocity for example). If in the future it is the case // the changing per object buffer MUST be the last one so the shader can decide if it write to it or not @@ -145,17 +130,6 @@ public RTHandle GetNormalBuffer(int index) return null; } -#if ENABLE_VIRTUALTEXTURES - public RTHandle GetVTFeedbackBuffer() - { - if (m_VTFeedbackIndex != -1) - { - return m_RTs[m_VTFeedbackIndex]; - } - return null; - } -#endif - public RTHandle GetSubsurfaceScatteringBuffer(int index) { int currentIndex = 0; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs index 1c60fd494dd..7835aae8e87 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs @@ -200,9 +200,6 @@ protected void GetGBufferOptions(HDRenderPipelineAsset asset, out int gBufferCou supportShadowMask = asset.currentPlatformRenderPipelineSettings.supportShadowMask; supportLightLayers = asset.currentPlatformRenderPipelineSettings.supportLightLayers; gBufferCount = 4 + (supportShadowMask ? 1 : 0) + (supportLightLayers ? 1 : 0); -#if ENABLE_VIRTUALTEXTURES - gBufferCount++; -#endif } // This must return the number of GBuffer to allocate @@ -242,21 +239,12 @@ public override void GetMaterialGBufferDescription(HDRenderPipelineAsset asset, int index = 4; -#if ENABLE_VIRTUALTEXTURES - { - RTFormat[index] = GraphicsFormat.R8G8B8A8_UNorm; - gBufferUsage[index] = GBufferUsage.VTFeedback; - enableWrite[index] = false; //TODO(ddebaets) once VTF DD comes online, this needs to be true - index++; - } -#endif - if (supportLightLayers) { RTFormat[index] = GraphicsFormat.R8G8B8A8_UNorm; gBufferUsage[index] = GBufferUsage.LightLayers; index++; - } + } // All buffer above are fixed. However shadow mask buffer can be setup or not depends on light in view. // Thus it need to be the last one, so all indexes stay the same diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index ff077289ea2..7b20f10adda 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -11,6 +11,8 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/VolumeRendering.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + //----------------------------------------------------------------------------- // Configuration //----------------------------------------------------------------------------- @@ -66,17 +68,6 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k #define OUT_GBUFFER_SHADOWMASK outGBuffer4 #endif -// VT feedback goes at the back -#if VIRTUAL_TEXTURES_ENABLED -#if defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) -#define OUT_GBUFFER_VTFEEDBACK outGBuffer6 -#elif defined(LIGHT_LAYERS) || defined(SHADOWS_SHADOWMASK) -#define OUT_GBUFFER_VTFEEDBACK outGBuffer5 -#else -#define OUT_GBUFFER_VTFEEDBACK outGBuffer4 -#endif -#endif - #define HAS_REFRACTION (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE)) #define SUPPORTS_RAYTRACED_AREA_SHADOWS (SHADEROPTIONS_RAYTRACING && (SHADERPASS == SHADERPASS_DEFERRED_LIGHTING)) @@ -635,11 +626,7 @@ void EncodeIntoGBuffer( SurfaceData surfaceData OUT_GBUFFER_SHADOWMASK = BUILTIN_DATA_SHADOW_MASK; #endif -#if VIRTUAL_TEXTURES_ACTIVE - OUT_GBUFFER_VTFEEDBACK = surfaceData.VTFeedback; -#elif VIRTUAL_TEXTURES_ENABLED - OUT_GBUFFER_VTFEEDBACK = float4(1,1,1,1); -#endif + StoreVTFeedback(surfaceData.VTFeedback, positionSS); } // Fills the BSDFData. Also returns the (per-pixel) material feature flags inferred diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl index 51716d06179..f4a7ee845c8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl @@ -35,7 +35,7 @@ #define GBUFFER_LIT_IRIDESCENCE 5 // TODO // Caution: This must be in sync with Lit.cs GetMaterialGBufferCount() -#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK + VIRTUAL_TEXTURES_ENABLED) +#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK) // Only one deferred layout is allowed for a HDRenderPipeline, this will be detect by the redefinition of GBUFFERMATERIAL_COUNT // If GBUFFERMATERIAL_COUNT is define two time, the shaders will not compile diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs new file mode 100644 index 00000000000..38e6e20e5e6 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -0,0 +1,56 @@ +using UnityEngine.Experimental.Rendering; + + +namespace UnityEngine.Rendering.HighDefinition +{ + public class VTBufferManager + { + const int Scale = 16; //Keep in sync with TextureStack.hlsl + + RTHandle opaqueHandle = null; + Vector2 m_scale = new Vector2(1.0f / (float)Scale, 1.0f / (float)Scale); + + Experimental.VirtualTextureResolver m_Resolver = new Experimental.VirtualTextureResolver(); + + public void CreateBuffers() + { + opaqueHandle = RTHandles.Alloc(m_scale, TextureXR.slices, + colorFormat: GraphicsFormat.R8G8B8A8_UNorm, useDynamicScale: false, + name: "VTFeedbackBuffer_opaque", enableRandomWrite: true); + } + + public void BeginRender() + { + int width = Mathf.Max(Mathf.RoundToInt(m_scale.x * RTHandles.maxWidth), 1); + int height = Mathf.Max(Mathf.RoundToInt(m_scale.y * RTHandles.maxHeight), 1); + + m_Resolver.Init(width, height); + } + + public void Resolve(CommandBuffer cmd, int width, int height) + { + int resolveWidth = Mathf.Max(Mathf.RoundToInt(m_scale.x * width), 1); + int resolveHeight = Mathf.Max(Mathf.RoundToInt(m_scale.y * height), 1); + + m_Resolver.Process(cmd, opaqueHandle.nameID, 0, resolveWidth, 0, resolveHeight, 0, 0); + } + + public void DestroyBuffers() + { + RTHandles.Release(opaqueHandle); + opaqueHandle = null; + m_Resolver.Dispose(); + } + + public RenderTargetIdentifier GetOpaqueRTI() + { + return opaqueHandle.nameID; + } + + public void Clear(CommandBuffer cmd) + { + CoreUtils.SetRenderTarget(cmd, opaqueHandle.nameID, ClearFlag.Color, Color.white); + } + + } +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs.meta b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs.meta new file mode 100644 index 00000000000..c9f52af805c --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3155270212bf5cb4ebc62bc95bb8138c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs index 32b419d97c6..31337f151fb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs @@ -214,12 +214,6 @@ public LayerMask probeLayerMask int m_NumColorPyramidBuffersAllocated = 0; int m_NumVolumetricBuffersAllocated = 0; -#if ENABLE_VIRTUALTEXTURES - Experimental.VirtualTextureResolver resolver; - RTHandle lowresResolver; - int resolveScale = 16; -#endif - public HDCamera(Camera cam) { camera = cam; @@ -230,10 +224,6 @@ public HDCamera(Camera cam) frustumPlaneEquations = new Vector4[6]; -#if ENABLE_VIRTUALTEXTURES - resolver = new Experimental.VirtualTextureResolver(); -#endif - Reset(); } @@ -332,18 +322,6 @@ public void Update(FrameSettings currentFrameSettings, HDRenderPipeline hdrp, MS // This is necessary because we assume that after post processes, we have the full size render target for debug rendering // The only point of calling this here is to grow the render targets. The call in BeginRender will setup the current RTHandle viewport size. RTHandles.SetReferenceSize(nonScaledViewport.x, nonScaledViewport.y, m_msaaSamples); - -#if ENABLE_VIRTUALTEXTURES - var resolveWidth = (screenWidth + (resolveScale - 1)) / resolveScale; - var resolveHeight = (screenHeight + (resolveScale - 1)) / resolveScale; - if (resolveWidth != resolver.CurrentWidth || resolveHeight != resolver.CurrentHeight) - { - RTHandles.Release(lowresResolver); - } - lowresResolver = RTHandles.Alloc(resolveWidth, resolveHeight, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, enableRandomWrite: true, autoGenerateMips: false, name: "VTFeedback lowres"); - - resolver.Init(resolveWidth, resolveHeight); -#endif } // Updating RTHandle needs to be done at the beginning of rendering (not during update of HDCamera which happens in batches) @@ -356,71 +334,6 @@ public void BeginRender() m_RecorderCaptureActions = CameraCaptureBridge.GetCaptureActions(camera); } -#if ENABLE_VIRTUALTEXTURES - public void ResolveVT(CommandBuffer cmd, RTHandle primary, RTHandle secondary, HDRenderPipelineAsset asset) - { - using (new ProfilingSample(cmd, "VTFeedback Downsample", CustomSamplerId.VTFeedbackDownSample.GetSampler())) - { - if (lowresResolver == null) - { - return; - } - - if (primary != null) - { - ResolveVTDispatch(cmd, primary, asset); - /*var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; - int kernel = cs.FindKernel("KMain"); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, primary.nameID); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); - var resolveCounter = 0; - var startOffsetX = (resolveCounter % resolveScale); - var startOffsetY = (resolveCounter / resolveScale) % resolveScale; - cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, -1)); - var TGSize = 8; - cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); - - resolver.Process(lowresResolver.nameID, cmd);*/ - } - - if (secondary != null && secondary.enableMSAA == false) - { - ResolveVTDispatch(cmd, secondary, asset); - /*var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; - int kernel = cs.FindKernel("KMain"); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, secondary.nameID); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); - var resolveCounter = 0; - var startOffsetX = (resolveCounter % resolveScale); - var startOffsetY = (resolveCounter / resolveScale) % resolveScale; - cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, -1)); - var TGSize = 8; - cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); - - resolver.Process(lowresResolver.nameID, cmd);*/ - } - } - } - - private void ResolveVTDispatch(CommandBuffer cmd, RTHandle buffer, HDRenderPipelineAsset asset) - { - string mainFunction = (buffer.enableMSAA) ? "KMainMSAA" : "KMain"; - - var cs = asset.renderPipelineResources.shaders.VTFeedbackDownsample; - int kernel = cs.FindKernel(mainFunction); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._InputTexture, buffer.nameID); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); - var resolveCounter = 0; - var startOffsetX = (resolveCounter % resolveScale); - var startOffsetY = (resolveCounter / resolveScale) % resolveScale; - cmd.SetComputeVectorParam(cs, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); - var TGSize = 8; - cmd.DispatchCompute(cs, kernel, ((int)screenSize.x + (TGSize - 1)) / TGSize, ((int)screenSize.y + (TGSize - 1)) / TGSize, 1); - - resolver.Process(lowresResolver.nameID, cmd); - } -#endif - void UpdateAntialiasing() { // Handle post-process AA @@ -821,9 +734,6 @@ public void Dispose() m_HistoryRTSystem.Dispose(); m_HistoryRTSystem = null; } -#if ENABLE_VIRTUALTEXTURES - resolver.Dispose(); -#endif } // BufferedRTHandleSystem API expects an allocator function. We define it here. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs index 56bdf6be2eb..99cb85f036f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDCustomSamplerId.cs @@ -116,7 +116,6 @@ internal enum CustomSamplerId FinalPost, #if ENABLE_VIRTUALTEXTURES - VTFeedbackDownSample, VTFeedbackClear, #endif Max diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 3d6ed046956..dfd7796f990 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -73,6 +73,9 @@ static Volume GetOrCreateDefaultVolume() readonly GBufferManager m_GbufferManager; readonly DBufferManager m_DbufferManager; +#if ENABLE_VIRTUALTEXTURES + readonly VTBufferManager m_VTBufferManager; +#endif readonly SharedRTManager m_SharedRTManager = new SharedRTManager(); readonly PostProcessSystem m_PostProcessSystem; readonly XRSystem m_XRSystem; @@ -143,7 +146,6 @@ static Volume GetOrCreateDefaultVolume() RTHandle m_CameraColorMSAABuffer; RTHandle m_OpaqueAtmosphericScatteringMSAABuffer; // Necessary to perform dual-source (polychromatic alpha) blending which is not supported by Unity RTHandle m_CameraSssDiffuseLightingMSAABuffer; - RTHandle m_VTFeedbackBuffer; // The current MSAA count MSAASamples m_MSAASamples; @@ -244,14 +246,8 @@ internal int GetMaxScreenSpaceShadows() RenderTexture m_TemporaryTargetForCubemaps; Stack m_ProbeCameraPool = new Stack(); -#if ENABLE_VIRTUALTEXTURES - const int additionalVtRenderTargets = 1; -#else - const int additionalVtRenderTargets = 0; -#endif - RenderTargetIdentifier[] m_MRTTransparentMotionVec; - RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3+additionalVtRenderTargets]; // Specular, (optional) VT, diffuse, sss buffer; note: vt is alway on slot 1 to keep in sync with unlit. + RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3]; // Specular, (optional) VT, diffuse, sss buffer; RenderTargetIdentifier[] mMRTSingle = new RenderTargetIdentifier[1]; RenderTargetIdentifier[] m_MRTWithVTFeedback = new RenderTargetIdentifier[2]; string m_ForwardPassProfileName; @@ -338,6 +334,9 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau m_GbufferManager = new GBufferManager(asset, m_DeferredMaterial); m_DbufferManager = new DBufferManager(asset.currentPlatformRenderPipelineSettings.decalSettings.perChannelMask); +#if ENABLE_VIRTUALTEXTURES + m_VTBufferManager = new VTBufferManager(); +#endif m_SharedRTManager.Build(asset); m_PostProcessSystem = new PostProcessSystem(asset, defaultResources); @@ -415,7 +414,7 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau #else Shader.DisableKeyword("VIRTUAL_TEXTURES_ENABLED"); #endif - m_MRTTransparentMotionVec = new RenderTargetIdentifier[2 + additionalVtRenderTargets]; + m_MRTTransparentMotionVec = new RenderTargetIdentifier[2]; #if ENABLE_RAYTRACING m_RayTracingManager.Init(m_Asset.currentPlatformRenderPipelineSettings, m_Asset.renderPipelineResources, m_Asset.renderPipelineRayTracingResources, m_BlueNoise, this, m_SharedRTManager, m_DebugDisplaySettings); InitRayTracedReflections(); @@ -503,6 +502,10 @@ void InitializeRenderTextures() if (settings.supportDecals) m_DbufferManager.CreateBuffers(); +#if ENABLE_VIRTUALTEXTURES + m_VTBufferManager.CreateBuffers(); +#endif + InitSSSBuffers(); m_SharedRTManager.InitSharedBuffers(m_GbufferManager, m_Asset.currentPlatformRenderPipelineSettings, defaultResources); @@ -541,19 +544,15 @@ void InitializeRenderTextures() m_OpaqueAtmosphericScatteringMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "OpaqueAtmosphericScatteringMSAA"); m_CameraSssDiffuseLightingMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "CameraSSSDiffuseLightingMSAA"); } - - // Allocate a VT feedback buffer when the one from the GBuffer can't be used. - if (settings.supportMSAA || settings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) - { - // Our processing handles both MSAA and regular buffers so we don't need to explicitly resolve here saving a buffer - m_VTFeedbackBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "VTFeedbackForward"); - } } void DestroyRenderTextures() { m_GbufferManager.DestroyBuffers(); m_DbufferManager.DestroyBuffers(); +#if ENABLE_VIRTUALTEXTURES + m_VTBufferManager.DestroyBuffers(); +#endif m_MipGenerator.Release(); RTHandles.Release(m_CameraColorBuffer); @@ -1637,6 +1636,10 @@ AOVRequestData aovRequest // Updates RTHandle hdCamera.BeginRender(); +#if ENABLE_VIRTUALTEXTURES + m_VTBufferManager.BeginRender(); +#endif + using (ListPool.Get(out var aovBuffers)) { aovRequest.AllocateTargetTexturesIfRequired(ref aovBuffers); @@ -2083,9 +2086,7 @@ void Callback() } #if ENABLE_VIRTUALTEXTURES - // Unbind the RT. TODO(ddebaets) there must be a better way right ? - CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetGBuffer0RT(), m_SharedRTManager.GetDepthStencilBuffer()); - hdCamera.ResolveVT(cmd, m_GbufferManager.GetVTFeedbackBuffer(), m_VTFeedbackBuffer, m_Asset); + m_VTBufferManager.Resolve(cmd, hdCamera.actualWidth, hdCamera.actualHeight); Experimental.VirtualTexturing.UpdateSystem(); #endif @@ -2820,12 +2821,19 @@ void RenderGBuffer(CullingResults cull, HDCamera hdCamera, ScriptableRenderConte using (new ProfilingSample(cmd, m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() ? "GBuffer Debug" : "GBuffer", CustomSamplerId.GBuffer.GetSampler())) { // setup GBuffer for rendering +#if ENABLE_VIRTUALTEXTURES + cmd.SetRandomWriteTarget(7, m_VTBufferManager.GetOpaqueRTI()); +#endif CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetBuffersRTI(hdCamera.frameSettings), m_SharedRTManager.GetDepthStencilBuffer()); + var rendererList = RendererList.Create(CreateOpaqueRendererListDesc(cull, hdCamera.camera, HDShaderPassNames.s_GBufferName, m_CurrentRendererConfigurationBakedLighting)); DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); m_GbufferManager.BindBufferAsTextures(cmd); +#if ENABLE_VIRTUALTEXTURES + cmd.ClearRandomWriteTargets(); +#endif } } @@ -3114,34 +3122,29 @@ void RenderForwardOpaque(CullingResults cullResults, HDCamera hdCamera, Scriptab { renderTarget = m_MRTWithSSS; renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; // Store the specular color -#if ENABLE_VIRTUALTEXTURES - renderTarget[1] = GetVTFeedbackBufferForForward(hdCamera); - const int offset = 2; -#else - const int offset = 1; -#endif - renderTarget[offset+0] = msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer; - renderTarget[offset+1] = msaa ? GetSSSBufferMSAA() : GetSSSBuffer(); + renderTarget[1] = msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer; + renderTarget[2] = msaa ? GetSSSBufferMSAA() : GetSSSBuffer(); } else { -#if ENABLE_VIRTUALTEXTURES - renderTarget = m_MRTWithVTFeedback; - renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; - renderTarget[1] = GetVTFeedbackBufferForForward(hdCamera); -#else renderTarget = mMRTSingle; renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; -#endif } +#if ENABLE_VIRTUALTEXTURES + cmd.SetRandomWriteTarget(7, m_VTBufferManager.GetOpaqueRTI()); +#endif + RenderForwardRendererList(hdCamera.frameSettings, RendererList.Create(PrepareForwardOpaqueRendererList(cullResults, hdCamera)), renderTarget, m_SharedRTManager.GetDepthStencilBuffer(msaa), useFptl ? m_TileAndClusterData.lightList : m_TileAndClusterData.perVoxelLightLists, true, renderContext, cmd); +#if ENABLE_VIRTUALTEXTURES + cmd.ClearRandomWriteTargets(); +#endif } } @@ -3206,13 +3209,7 @@ void RenderForwardTransparent(CullingResults cullResults, HDCamera hdCamera, boo cmd.SetGlobalInt(HDShaderIDs._ColorMaskTransparentVel, renderMotionVecForTransparent ? (int)ColorWriteMask.All : 0); m_MRTTransparentMotionVec[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; -#if ENABLE_VIRTUALTEXTURES - m_MRTTransparentMotionVec[1] = GetVTFeedbackBufferForForward(hdCamera); - const int offset = 2; -#else - const int offset = 1; -#endif - m_MRTTransparentMotionVec[offset] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) + m_MRTTransparentMotionVec[1] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) // It doesn't really matter what gets bound here since the color mask state set will prevent this from ever being written to. However, we still need to bind something // to avoid warnings about unbound render targets. The following rendertarget could really be anything if renderVelocitiesForTransparent, here the normal buffer // as it is guaranteed to exist and to have the same size. @@ -3959,22 +3956,9 @@ void ClearBuffers(HDCamera hdCamera, CommandBuffer cmd) } #if ENABLE_VIRTUALTEXTURES - // Clearing VT buffers ensure we never end up thinking stale date is still relevant for the current frame. using (new ProfilingSample(cmd, "Clear VTFeedback Buffers", CustomSamplerId.VTFeedbackClear.GetSampler())) { - RTHandle alreadyCleared = null; - if (m_GbufferManager != null && m_GbufferManager.GetVTFeedbackBuffer() != null) - { - alreadyCleared = m_GbufferManager.GetVTFeedbackBuffer(); - CoreUtils.SetRenderTarget(cmd, alreadyCleared, ClearFlag.Color, Color.white); - - } - - // If the forward buffer is different from the GBuffer clear it also - if (GetVTFeedbackBufferForForward(hdCamera) != alreadyCleared) - { - CoreUtils.SetRenderTarget(cmd, GetVTFeedbackBufferForForward(hdCamera), ClearFlag.Color, Color.white); - } + m_VTBufferManager.Clear(cmd); } #endif @@ -4132,20 +4116,5 @@ RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) VFXManager.SetCameraBuffer(hdCamera.camera, VFXCameraBufferTypes.Color, colorBuffer, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight); } } - - // GBuffer vt feedback is handled in GBufferManager -#if ENABLE_VIRTUALTEXTURES - RTHandle GetVTFeedbackBufferForForward(HDCamera hdCamera) - { - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) - { - return m_VTFeedbackBuffer; - } - else - { - return m_GbufferManager.GetVTFeedbackBuffer(); - } - } -#endif } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs index 1b049ebba5c..2d837964a06 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs @@ -235,12 +235,6 @@ public sealed class ShaderResources public ComputeShader CopyTAAHistoryCS; - //Virtual Texturing -#if ENABLE_VIRTUALTEXTURES - [Reload("Runtime/ShaderLibrary/DownsampleVTFeedback.compute")] - public ComputeShader VTFeedbackDownsample; -#endif - // Iterator to retrieve all compute shaders in reflection so we don't have to keep a list of // used compute shaders up to date (prefer editor-only usage) public IEnumerable GetAllComputeShaders() diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl index 5756c81f82c..979d948c4b7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl @@ -60,26 +60,13 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/TessellationShare.hlsl" #endif -#if VIRTUAL_TEXTURES_ENABLED -#define VT_BUFFER_TARGET SV_Target1 -#define EXTRA_BUFFER_TARGET SV_Target2 -#else -#define EXTRA_BUFFER_TARGET SV_Target1 -#endif - void Frag(PackedVaryingsToPS packedInput, #ifdef OUTPUT_SPLIT_LIGHTING out float4 outColor : SV_Target0, // outSpecularLighting - #if VIRTUAL_TEXTURES_ENABLED - out float4 outVTFeedback : VT_BUFFER_TARGET, - #endif // VIRTUAL_TEXTURES_ENABLED out float4 outDiffuseLighting : EXTRA_BUFFER_TARGET, OUTPUT_SSSBUFFER(outSSSBuffer) #else out float4 outColor : SV_Target0 - #if VIRTUAL_TEXTURES_ENABLED - , out float4 outVTFeedback : VT_BUFFER_TARGET - #endif // VIRTUAL_TEXTURES_ENABLED #ifdef _WRITE_TRANSPARENT_MOTION_VECTOR , out float4 outMotionVec : EXTRA_BUFFER_TARGET #endif // _WRITE_TRANSPARENT_MOTION_VECTOR @@ -233,9 +220,5 @@ void Frag(PackedVaryingsToPS packedInput, outputDepth = posInput.deviceDepth; #endif -#if VIRTUAL_TEXTURES_ACTIVE - outVTFeedback = surfaceData.VTFeedback; -#elif VIRTUAL_TEXTURES_ENABLED - outVTFeedback = float4(1,1,1,1); -#endif + StoreVTFeedback(surfaceData.VTFeedback, posInput.positionSS); } diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute deleted file mode 100644 index 703a52aba3e..00000000000 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute +++ /dev/null @@ -1,43 +0,0 @@ -// Each #kernel tells which function to compile; you can have many kernels -#pragma kernel KMain -#pragma kernel KMainMSAA - -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" - -RW_TEXTURE2D(float4, _OutputTexture); -TEXTURE2D_X(_InputTexture); -TEXTURE2D_X_MSAA(float4, _InputTextureMSAA); - -CBUFFER_START(cb0) - float4 _Params; -CBUFFER_END - -#define Scale _Params.x -#define startOffsetX _Params.y -#define startOffsetY _Params.z - -static const uint TGSize = 8; - -[numthreads(TGSize, TGSize, 1)] -void KMain(uint3 dispatchThreadId : SV_DispatchThreadID) -{ - const uint2 samplePos = dispatchThreadId.xy; - const uint2 startOffset = uint2(startOffsetX, startOffsetY); - const uint2 offset = (startOffset + samplePos) % Scale; - - float4 value = LOAD_TEXTURE2D_X(_InputTexture, samplePos * Scale + offset); - _OutputTexture[samplePos] = value; -} - -[numthreads(TGSize, TGSize, 1)] -void KMainMSAA(uint3 dispatchThreadId : SV_DispatchThreadID) -{ - const uint2 samplePos = dispatchThreadId.xy; - const uint2 startOffset = uint2(startOffsetX, startOffsetY); - const uint2 offset = (startOffset + samplePos) % Scale; - - float4 value = LOAD_TEXTURE2D_X_MSAA(_InputTextureMSAA, samplePos * Scale + offset, 0); - _OutputTexture[samplePos] = value; -} diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta deleted file mode 100644 index eb1e9464de7..00000000000 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e17543230455e474fb91c9fabc965001 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 4 - userData: - assetBundleName: - assetBundleVariant: From 454df6a1d199ff866d36f138b528df80e30a8f82 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Tue, 20 Aug 2019 10:27:17 +0200 Subject: [PATCH 052/143] [VirtualTexturing] VT feedback is now only possible from within shadergraph. This allows for dynamic selection of multiple VT samples --- .../Lit/ShaderGraph/HDLitPass.template | 7 +- .../PBR/ShaderGraph/HDPBRPass.template | 3 +- .../Unlit/ShaderGraph/HDUnlitPass.template | 3 +- .../Unlit/ShaderGraph/UnlitPass.template | 3 +- .../ShaderGraph/HDSubShaderUtilities.cs | 4 + .../ShaderGraph/SharedCode.template.hlsl | 1 + .../Runtime/Material/Lit/Lit.cs | 3 - .../Runtime/Material/Lit/Lit.cs.hlsl | 5 -- .../Runtime/Material/Lit/Lit.hlsl | 4 - .../Material/Lit/LitDataIndividualLayer.hlsl | 19 +++-- .../Material/TerrainLit/TerrainLitData.hlsl | 5 +- .../Runtime/Material/Unlit/Unlit.cs | 3 - .../Runtime/Material/Unlit/Unlit.cs.hlsl | 5 -- .../RenderPipeline/HDRenderPipeline.cs | 1 - .../ShaderPass/ShaderPassForward.hlsl | 1 - .../Nodes/Input/Texture/TextureStackNode.cs | 75 +++++++------------ .../Editor/Data/Util/GraphUtil.cs | 17 +++-- .../Editor/Data/Util/ShaderGenerator.cs | 4 +- 18 files changed, 62 insertions(+), 101 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template index dbba5e598ad..c6f2213afb3 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template @@ -180,7 +180,6 @@ $include("SharedCode.template.hlsl") $SurfaceDescription.Anisotropy: surfaceData.anisotropy = surfaceDescription.Anisotropy; $SurfaceDescription.IridescenceMask: surfaceData.iridescenceMask = surfaceDescription.IridescenceMask; $SurfaceDescription.IridescenceThickness: surfaceData.iridescenceThickness = surfaceDescription.IridescenceThickness; - $SurfaceDescription.VTFeedback: surfaceData.VTFeedback = surfaceDescription.VTFeedback; #ifdef _HAS_REFRACTION if (_EnableSSRefraction) @@ -206,7 +205,7 @@ $include("SharedCode.template.hlsl") surfaceData.atDistance = 1.0; surfaceData.transmittanceMask = 0.0; #endif - + // These static material feature allow compile time optimization surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD; #ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING @@ -317,14 +316,14 @@ $include("SharedCode.template.hlsl") $AlphaTestPrepass: DoAlphaTest(surfaceDescription.Alpha, surfaceDescription.AlphaClipThresholdDepthPrepass); $AlphaTestPostpass: DoAlphaTest(surfaceDescription.Alpha, surfaceDescription.AlphaClipThresholdDepthPostpass); $AlphaTestShadow: DoAlphaTest(surfaceDescription.Alpha, surfaceDescription.AlphaClipThresholdShadow); - + $DepthOffset: ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput); float3 bentNormalWS; BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS); // Builtin Data - // For back lighting we use the oposite vertex normal + // For back lighting we use the oposite vertex normal InitBuiltinData(posInput, surfaceDescription.Alpha, bentNormalWS, -fragInputs.tangentToWorld[2], fragInputs.texCoord1, fragInputs.texCoord2, builtinData); // override sampleBakedGI: diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template index 49cf40bfc20..9512246cef8 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template @@ -145,7 +145,6 @@ $include("SharedCode.template.hlsl") $SurfaceDescription.Occlusion: surfaceData.ambientOcclusion = surfaceDescription.Occlusion; $SurfaceDescription.Metallic: surfaceData.metallic = surfaceDescription.Metallic; $SurfaceDescription.Specular: surfaceData.specularColor = surfaceDescription.Specular; - $SurfaceDescription.VTFeedback: surfaceData.VTFeedback = surfaceDescription.VTFeedback; // These static material feature allow compile time optimization surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD; @@ -217,7 +216,7 @@ $include("SharedCode.template.hlsl") BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData); // Builtin Data - // For back lighting we use the oposite vertex normal + // For back lighting we use the oposite vertex normal InitBuiltinData(posInput, surfaceDescription.Alpha, surfaceData.normalWS, -fragInputs.tangentToWorld[2], fragInputs.texCoord1, fragInputs.texCoord2, builtinData); $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template index e3f2c5ef80e..c0c9977c53b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template @@ -27,7 +27,7 @@ Pass //------------------------------------------------------------------------------------- // Variant //------------------------------------------------------------------------------------- - + // #pragma shader_feature_local _DOUBLESIDED_ON - We have no lighting, so no need to have this combination for shader, the option will just disable backface culling // Keyword for transparent @@ -119,7 +119,6 @@ $include("SharedCode.template.hlsl") // copy across graph values, if defined $SurfaceDescription.Color: surfaceData.color = surfaceDescription.Color; - $SurfaceDescription.VTFeedback: surfaceData.VTFeedback = surfaceDescription.VTFeedback; #if defined(DEBUG_DISPLAY) if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template index 2a630ed0551..f196acc70c2 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template @@ -115,8 +115,7 @@ $include("SharedCode.template.hlsl") // copy across graph values, if defined $SurfaceDescription.Color: surfaceData.color = surfaceDescription.Color; - $SurfaceDescription.VTFeedback: surfaceData.VTFeedback = surfaceDescription.VTFeedback; - + #if defined(DEBUG_DISPLAY) if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) { diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs index b433890ba64..01e89901c46 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs @@ -48,6 +48,7 @@ internal struct VaryingsMeshToPS [Optional] Vector4 color; [Semantic("CUSTOM_INSTANCE_ID")] [PreprocessorIf("UNITY_ANY_INSTANCING_ENABLED")] uint instanceID; [Semantic("FRONT_FACE_SEMANTIC")][OverrideType("FRONT_FACE_TYPE")][PreprocessorIf("defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)")] bool cullFace; + [Optional] Vector4 PixelCoordinate; public static Dependency[] tessellationDependencies = new Dependency[] { @@ -155,6 +156,8 @@ internal struct SurfaceDescriptionInputs [Optional] float FaceSign; [Optional] Vector3 TimeParameters; + [Optional] Vector4 PixelCoordinate; + public static Dependency[] dependencies = new Dependency[] { new Dependency("SurfaceDescriptionInputs.WorldSpaceNormal", "FragInputs.tangentToWorld"), @@ -189,6 +192,7 @@ internal struct SurfaceDescriptionInputs new Dependency("SurfaceDescriptionInputs.uv3", "FragInputs.texCoord3"), new Dependency("SurfaceDescriptionInputs.VertexColor", "FragInputs.color"), new Dependency("SurfaceDescriptionInputs.FaceSign", "FragInputs.isFrontFace"), + new Dependency("SurfaceDescriptionInputs.PixelCoordinate", "FragInputs.positionSS"), new Dependency("DepthOffset", "FragInputs.positionRWS"), }; diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/SharedCode.template.hlsl b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/SharedCode.template.hlsl index 67cb503cc20..c0bcc9ac282 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/SharedCode.template.hlsl +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/SharedCode.template.hlsl @@ -60,6 +60,7 @@ $SurfaceDescriptionInputs.VertexColor: output.VertexColor = input.color; $SurfaceDescriptionInputs.FaceSign: output.FaceSign = input.isFrontFace; $SurfaceDescriptionInputs.TimeParameters: output.TimeParameters = _TimeParameters.xyz; // This is mainly for LW as HD overwrite this value + $SurfaceDescriptionInputs.PixelCoordinate: output.PixelCoordinate = input.positionSS; return output; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs index 7835aae8e87..e5db2dc20d3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs @@ -103,9 +103,6 @@ public struct SurfaceData public float atDistance; [SurfaceDataAttributes("Transmittance mask", precision = FieldPrecision.Real)] public float transmittanceMask; - - [SurfaceDataAttributes("VTFeedback")] - public Vector4 VTFeedback; }; //----------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs.hlsl index 5c19f16ce6c..35dcfd7bd86 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs.hlsl @@ -41,7 +41,6 @@ #define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_COLOR (1020) #define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_ABSORPTION_DISTANCE (1021) #define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_MASK (1022) -#define DEBUGVIEW_LIT_SURFACEDATA_VTFEEDBACK (1023) // // UnityEngine.Rendering.HighDefinition.Lit+BSDFData: static fields @@ -99,7 +98,6 @@ struct SurfaceData real3 transmittanceColor; real atDistance; real transmittanceMask; - real4 VTFeedback; }; // Generated from UnityEngine.Rendering.HighDefinition.Lit+BSDFData @@ -211,9 +209,6 @@ void GetGeneratedSurfaceDataDebug(uint paramId, SurfaceData surfacedata, inout f case DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_MASK: result = surfacedata.transmittanceMask.xxx; break; - case DEBUGVIEW_LIT_SURFACEDATA_VTFEEDBACK: - result = surfacedata.VTFeedback.xyz; - break; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index 7b20f10adda..3d1a52a7244 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -11,8 +11,6 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/VolumeRendering.hlsl" -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" - //----------------------------------------------------------------------------- // Configuration //----------------------------------------------------------------------------- @@ -625,8 +623,6 @@ void EncodeIntoGBuffer( SurfaceData surfaceData #ifdef SHADOWS_SHADOWMASK OUT_GBUFFER_SHADOWMASK = BUILTIN_DATA_SHADOW_MASK; #endif - - StoreVTFeedback(surfaceData.VTFeedback, positionSS); } // Fills the BSDFData. Also returns the (per-pixel) material feature flags inferred diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 006d051c993..c6766792e76 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -223,8 +223,7 @@ float3 ADD_IDX(GetBentNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, f float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out SurfaceData surfaceData, out float3 normalTS, out float3 bentNormalTS) { // Prepare the VT stack for sampling - StackInfo stackInfo = PrepareStack(UVMappingTo2D(ADD_IDX(layerTexCoord.base)), ADD_IDX(_TextureStack)); - surfaceData.VTFeedback = GetResolveOutput(stackInfo); + StackInfo stackInfo = PrepareStack(UVMappingTo2D(ADD_IDX(layerTexCoord.base)), ADD_IDX(_TextureStack)); #if VIRTUAL_TEXTURES_ACTIVE const float4 baseColorValue = SampleStack(stackInfo, ADD_IDX(_BaseColorMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)); #else @@ -241,7 +240,7 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out alphaCutoff = _AlphaCutoffPostpass; #endif -#if SHADERPASS == SHADERPASS_SHADOWS +#if SHADERPASS == SHADERPASS_SHADOWS DoAlphaTest(alpha, _UseShadowThreshold ? _AlphaCutoffShadow : alphaCutoff); #else DoAlphaTest(alpha, alphaCutoff); @@ -250,11 +249,11 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out #ifdef _MASKMAP_IDX -#if VIRTUAL_TEXTURES_ACTIVE +#if VIRTUAL_TEXTURES_ACTIVE const float4 maskValue = SampleStack(stackInfo, ADD_IDX(_MaskMap)); //SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).b; -#else +#else const float4 maskValue = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)); -#endif +#endif #endif float3 detailNormalTS = float3(0.0, 0.0, 0.0); @@ -271,18 +270,18 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out // We split both call due to trilinear mapping detailNormalTS = SAMPLE_UVMAPPING_NORMALMAP_AG(ADD_IDX(_DetailMap), SAMPLER_DETAILMAP_IDX, ADD_IDX(layerTexCoord.details), ADD_IDX(_DetailNormalScale)); #endif - - surfaceData.baseColor = baseColorValue.rgb * ADD_IDX(_BaseColor).rgb; + + surfaceData.baseColor = baseColorValue.rgb * ADD_IDX(_BaseColor).rgb; #ifdef _DETAIL_MAP_IDX - + // Goal: we want the detail albedo map to be able to darken down to black and brighten up to white the surface albedo. // The scale control the speed of the gradient. We simply remap detailAlbedo from [0..1] to [-1..1] then perform a lerp to black or white // with a factor based on speed. // For base color we interpolate in sRGB space (approximate here as square) as it get a nicer perceptual gradient float albedoDetailSpeed = saturate(abs(detailAlbedo) * ADD_IDX(_DetailAlbedoScale)); float3 baseColorOverlay = lerp(sqrt(surfaceData.baseColor), (detailAlbedo < 0.0) ? float3(0.0, 0.0, 0.0) : float3(1.0, 1.0, 1.0), albedoDetailSpeed * albedoDetailSpeed); - baseColorOverlay *= baseColorOverlay; + baseColorOverlay *= baseColorOverlay; // Lerp with details mask surfaceData.baseColor = lerp(surfaceData.baseColor, saturate(baseColorOverlay), detailMask); #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl index dc654a91f0a..6a718f130de 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl @@ -156,7 +156,7 @@ void GetSurfaceAndBuiltinData(inout FragInputs input, float3 V, inout PositionIn #ifdef _ALPHATEST_ON ClipHoles(input.texCoord0); -#endif +#endif // terrain lightmap uvs are always taken from uv0 input.texCoord1 = input.texCoord2 = input.texCoord0; @@ -192,7 +192,6 @@ void GetSurfaceAndBuiltinData(inout FragInputs input, float3 V, inout PositionIn surfaceData.subsurfaceMask = 0; surfaceData.thickness = 1; surfaceData.diffusionProfileHash = 0; - surfaceData.VTFeedback = float4(1, 1, 1, 1); surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD; @@ -239,7 +238,5 @@ void GetSurfaceAndBuiltinData(inout FragInputs input, float3 V, inout PositionIn ApplyDebugToSurfaceData(input.tangentToWorld, surfaceData); #endif - surfaceData.VTFeedback = float4(1, 1, 1, 1); - GetBuiltinData(input, V, posInput, surfaceData, 1, bentNormalWS, 0, builtinData); } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs index 8cc6102f7d3..8967b831c12 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs @@ -18,9 +18,6 @@ public struct SurfaceData [MaterialSharedPropertyMapping(MaterialSharedProperty.Albedo)] [SurfaceDataAttributes("Color", false, true)] public Vector3 color; - - [SurfaceDataAttributes("VTFeedback")] - public Vector4 VTFeedback; }; //----------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs.hlsl index bb94dcc823c..47877d78bcb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.cs.hlsl @@ -8,7 +8,6 @@ // UnityEngine.Rendering.HighDefinition.Unlit+SurfaceData: static fields // #define DEBUGVIEW_UNLIT_SURFACEDATA_COLOR (300) -#define DEBUGVIEW_UNLIT_SURFACEDATA_VTFEEDBACK (301) // // UnityEngine.Rendering.HighDefinition.Unlit+BSDFData: static fields @@ -20,7 +19,6 @@ struct SurfaceData { float3 color; - float4 VTFeedback; }; // Generated from UnityEngine.Rendering.HighDefinition.Unlit+BSDFData @@ -41,9 +39,6 @@ void GetGeneratedSurfaceDataDebug(uint paramId, SurfaceData surfacedata, inout f result = surfacedata.color; needLinearToSRGB = true; break; - case DEBUGVIEW_UNLIT_SURFACEDATA_VTFEEDBACK: - result = surfacedata.VTFeedback.xyz; - break; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index dfd7796f990..9e70b056a5b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -249,7 +249,6 @@ internal int GetMaxScreenSpaceShadows() RenderTargetIdentifier[] m_MRTTransparentMotionVec; RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3]; // Specular, (optional) VT, diffuse, sss buffer; RenderTargetIdentifier[] mMRTSingle = new RenderTargetIdentifier[1]; - RenderTargetIdentifier[] m_MRTWithVTFeedback = new RenderTargetIdentifier[2]; string m_ForwardPassProfileName; internal Material GetBlitMaterial(bool useTexArray, bool singleSlice) { return useTexArray ? (singleSlice ? m_BlitTexArraySingleSlice : m_BlitTexArray) : m_Blit; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl index 979d948c4b7..334003e439e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl @@ -220,5 +220,4 @@ void Frag(PackedVaryingsToPS packedInput, outputDepth = posInput.deviceDepth; #endif - StoreVTFeedback(surfaceData.VTFeedback, posInput.positionSS); } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index d4c21fd6d7c..327549eb8d2 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -221,7 +221,7 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener public override void CollectShaderPragmas(PragmaCollector pragmas, GenerationMode generationMode) { pragmas.AddShaderPragma(new MultiCompilePragma(new string[] { "_", "VIRTUAL_TEXTURES_ENABLED" })); - pragmas.AddShaderPragma(new ShaderFeatureLocalPragma(new string[] { "VIRTUAL_TEXTURES_BUILT" })); + pragmas.AddShaderPragma(new ShaderFeatureLocalPragma(new string[] { "VIRTUAL_TEXTURES_BUILT" })); } public bool RequiresMeshUV(UVChannel channel, ShaderStageCapability stageCapability) @@ -426,6 +426,7 @@ public TextureStackAggregateFeedbackNode() UpdateNodeAfterDeserialization(); } + public override void UpdateNodeAfterDeserialization() { AddSlot(new Vector4MaterialSlot(AggregateOutputId, AggregateOutputName, AggregateOutputName, SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment)); @@ -443,56 +444,36 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GraphContext graphC var slots = this.GetInputSlots(); int numSlots = slots.Count(); - if (numSlots > 1) - { - string arrayName = string.Format("{0}_array", GetVariableNameForSlot(AggregateOutputId)); - sb.AppendLine(string.Format("float4 {0}[{1}];", arrayName, numSlots)); - - int arrayIndex = 0; - foreach (var slot in slots) - { - string code = string.Format("{0}[{1}] = {2};" - , arrayName - , arrayIndex - , GetSlotValue(AggregateInputFirstId + arrayIndex, generationMode)); - sb.AppendLine(code); - arrayIndex++; - } - - string feedBackCode = string.Format("float4 {0} = {1}[IN.{2}.x%{3}];" - , GetVariableNameForSlot(AggregateOutputId) - , arrayName - , ShaderGeneratorNames.PixelCoordinate - , numSlots); - - sb.AppendLine(feedBackCode); - } - else if (numSlots == 1) - { - string feedBackCode = string.Format("float4 {0} = {1};" - , GetVariableNameForSlot(AggregateOutputId) - , GetSlotValue(AggregateInputFirstId, generationMode)); - - sb.AppendLine(feedBackCode); - } - else - { - string feedBackCode = string.Format("float4 {0} = float4(1,1,1,1);" - , GetVariableNameForSlot(AggregateOutputId) - , GetSlotValue(AggregateInputFirstId, generationMode)); - - sb.AppendLine(feedBackCode); - } + if (numSlots == 1) + { + string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = {GetSlotValue(AggregateInputFirstId, generationMode)};"; + sb.AppendLine(feedBackCode); + } + else if (numSlots > 1) + { + string arrayName = $"{GetVariableNameForSlot(AggregateOutputId)}_array"; + sb.AppendLine($"float4 {arrayName}[{numSlots}];"); + + int arrayIndex = 0; + foreach (var slot in slots) + { + string code = $"{arrayName}[{arrayIndex}] = {GetSlotValue(AggregateInputFirstId + arrayIndex, generationMode)};"; + sb.AppendLine(code); + arrayIndex++; + } + + string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = {arrayName}[ (IN.{ShaderGeneratorNames.PixelCoordinate}.x + _FrameCount )% (uint){numSlots}];"; + + sb.AppendLine(feedBackCode); + } + + string write = $"StoreVTFeedback({GetVariableNameForSlot(AggregateOutputId)}, (uint2)IN.{ShaderGeneratorNames.PixelCoordinate}.xy );"; + sb.AppendLine(write); } public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) { - // If there's only one VT slot we don't need the screen position - - var slots = this.GetInputSlots(); - int numSlots = slots.Count(); - - return (numSlots > 1); + return true; } // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output diff --git a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs index ed7bea2a27d..7bd3637cad9 100644 --- a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs +++ b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs @@ -1186,13 +1186,13 @@ public static void GenerateSurfaceInputStruct(ShaderStringBuilder sb, ShaderGrap public static void GenerateSurfaceInputTransferCode(ShaderStringBuilder sb, ShaderGraphRequirements requirements, string structName, string variableName) { sb.AppendLine($"{structName} {variableName};"); - + ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresNormal, InterpolatorType.Normal, sb, $"{variableName}.{{0}} = IN.{{0}};"); ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresTangent, InterpolatorType.Tangent, sb, $"{variableName}.{{0}} = IN.{{0}};"); ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresBitangent, InterpolatorType.BiTangent, sb, $"{variableName}.{{0}} = IN.{{0}};"); ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresViewDir, InterpolatorType.ViewDirection, sb, $"{variableName}.{{0}} = IN.{{0}};"); ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresPosition, InterpolatorType.Position, sb, $"{variableName}.{{0}} = IN.{{0}};"); - + if (requirements.requiresVertexColor) sb.AppendLine($"{variableName}.{ShaderGeneratorNames.VertexColor} = IN.{ShaderGeneratorNames.VertexColor};"); @@ -1221,12 +1221,17 @@ public static void GenerateSurfaceDescriptionStruct(ShaderStringBuilder surfaceD { foreach (var slot in slots) { + if (slot.hidden) + { + continue; + } + string hlslName = NodeUtils.GetHLSLSafeName(slot.shaderOutputName); if (useIdsInNames) { hlslName = $"{hlslName}_{slot.id}"; } - + surfaceDescriptionStruct.AppendLine("{0} {1};", slot.concreteValueType.ToShaderString(slot.owner.concretePrecision), hlslName); if (activeFields != null) @@ -1292,7 +1297,7 @@ public static void GenerateSurfaceDescriptionFunction( var usedSlots = slots ?? rootNode.GetInputSlots(); foreach (var input in usedSlots) { - if (input != null) + if (input != null && input.hidden == false) { var foundEdges = graph.GetEdges(input.slotReference).ToArray(); var hlslName = NodeUtils.GetHLSLSafeName(input.shaderOutputName); @@ -1392,7 +1397,7 @@ public static void GenerateVertexDescriptionFunction( } functionRegistry.builder.currentNode = null; - builder.currentNode = null; + builder.currentNode = null; if(slots.Count != 0) { @@ -1400,7 +1405,7 @@ public static void GenerateVertexDescriptionFunction( { var isSlotConnected = slot.owner.owner.GetEdges(slot.slotReference).Any(); var slotName = NodeUtils.GetHLSLSafeName(slot.shaderOutputName); - var slotValue = isSlotConnected ? + var slotValue = isSlotConnected ? ((AbstractMaterialNode)slot.owner).GetSlotValue(slot.id, mode, slot.owner.concretePrecision) : slot.GetDefaultValue(mode, slot.owner.concretePrecision); builder.AppendLine("description.{0} = {1};", slotName, slotValue); } diff --git a/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs b/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs index 5cce826c590..1e28d91c35d 100644 --- a/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs +++ b/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs @@ -436,7 +436,7 @@ public static void GenerateSpaceTranslationSurfaceInputs( if ((neededSpaces & NeededCoordinateSpace.Tangent) > 0) builder.AppendLine(format, CoordinateSpace.Tangent.ToVariableName(interpolatorType)); - + if ((neededSpaces & NeededCoordinateSpace.AbsoluteWorld) > 0) builder.AppendLine(format, CoordinateSpace.AbsoluteWorld.ToVariableName(interpolatorType)); } @@ -873,7 +873,7 @@ public static string GetPreviewSubShader(AbstractMaterialNode node, ShaderGraphR faceSign.AppendLine(", half FaceSign : VFACE"); if (shaderGraphRequirements.requiresPixelCoordinate) - faceSign.AppendLine(", half PixelCoordinate : VPOS"); + faceSign.AppendLine(", UNITY_VPOS_TYPE PixelCoordinate : VPOS"); var res = subShaderTemplate.Replace("${Interpolators}", vertexOutputStruct.ToString()); res = res.Replace("${VertexShader}", vertexShader.ToString()); From 21d6024eeb38175319a9c7a3e71c94c9627a33ab Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Thu, 22 Aug 2019 13:56:35 +0200 Subject: [PATCH 053/143] [VirtualTexturing] Improved VTFeedback - Early depth/stencil testing is currently forced. This will be improved later on - More masternodes supported (fabric, unlit, ...) - UAV write is postponed to end of PS (rather than in-place) to account for discarding of fragments --- .../Fabric/ShaderGraph/FabricMasterNode.cs | 9 +++ .../Fabric/ShaderGraph/FabricPass.template | 9 ++- .../Fabric/ShaderGraph/FabricSubShader.cs | 6 ++ .../Lit/ShaderGraph/HDLitPass.template | 4 ++ .../PBR/ShaderGraph/HDPBRPass.template | 4 ++ .../ShaderGraph/StackLitMasterNode.cs | 8 +++ .../ShaderGraph/StackLitPass.template | 27 +++++---- .../StackLit/ShaderGraph/StackLitSubShader.cs | 5 ++ .../Unlit/ShaderGraph/HDUnlitPass.template | 4 ++ .../Unlit/ShaderGraph/UnlitPass.template | 4 ++ .../Runtime/Material/Builtin/BuiltinData.cs | 3 + .../Material/Builtin/BuiltinData.cs.hlsl | 5 ++ .../Material/LayeredLit/LayeredLitData.hlsl | 9 --- .../Runtime/Material/Unlit/UnlitData.hlsl | 2 - .../ShaderPass/ShaderPassForward.hlsl | 7 +++ .../ShaderPass/ShaderPassForwardUnlit.hlsl | 18 +++--- .../ShaderPass/ShaderPassGBuffer.hlsl | 8 +++ .../Nodes/Input/Texture/TextureStackNode.cs | 56 ++++++++++--------- .../Editor/Data/Util/GraphUtil.cs | 7 +-- 19 files changed, 130 insertions(+), 65 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs index abc7c5df655..a174e0dcdaf 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs @@ -81,6 +81,10 @@ class FabricMasterNode : MasterNode, IMayRequirePosition, IMay public const int DepthOffsetSlotId = 18; public const string DepthOffsetSlotName = "DepthOffset"; + public const int VTFeedbackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; + public const string VTFeedbackSlotName = "VTFeedback"; + + public enum MaterialType { CottonWool, @@ -637,6 +641,11 @@ public sealed override void UpdateNodeAfterDeserialization() validSlots.Add(DepthOffsetSlotId); } + var vtFeedbackSlot = new Vector4MaterialSlot(VTFeedbackSlotId, VTFeedbackSlotName, VTFeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); + vtFeedbackSlot.hidden = true; + AddSlot(vtFeedbackSlot); + validSlots.Add(VTFeedbackSlotId); + RemoveSlotsNameNotMatching(validSlots, true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template index fcffd8bef0d..b52dcb563de 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template @@ -104,6 +104,7 @@ Pass // End Defines //------------------------------------------------------------------------------------- + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #ifdef DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" @@ -193,7 +194,7 @@ $include("SharedCode.template.hlsl") $SurfaceDescription.SubsurfaceMask: surfaceData.subsurfaceMask = surfaceDescription.SubsurfaceMask; $SurfaceDescription.Thickness: surfaceData.thickness = surfaceDescription.Thickness; $SurfaceDescription.Anisotropy: surfaceData.anisotropy = surfaceDescription.Anisotropy; - + // These static material feature allow compile time optimization surfaceData.materialFeatures = 0; @@ -309,9 +310,13 @@ $include("SharedCode.template.hlsl") // override sampleBakedGI: $LightingGI: builtinData.bakeDiffuseLighting = surfaceDescription.BakedGI; $BackLightingGI: builtinData.backBakeDiffuseLighting = surfaceDescription.BakedBackGI; - + $DepthOffset: builtinData.depthOffset = surfaceDescription.DepthOffset; +#if !defined(_SURFACE_TYPE_TRANSPARENT) + $SurfaceDescription.VTFeedback: builtinData.vtFeedback = surfaceDescription.VTFeedback; +#endif + $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; PostInitBuiltinData(V, posInput, surfaceData, builtinData); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs index b9c14a005ba..5631e5c6ca8 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs @@ -273,6 +273,7 @@ class FabricSubShader : IFabricSubShader FabricMasterNode.LightingSlotId, FabricMasterNode.BackLightingSlotId, FabricMasterNode.DepthOffsetSlotId, + FabricMasterNode.VTFeedbackSlotId, }, VertexShaderSlots = new List() { @@ -651,6 +652,11 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List, IMayRequirePosition, public const string SOFixupMaxAddedRoughnessSlotName = "SOConeFixupMaxAddedRoughness"; public const string DepthOffsetSlotName = "DepthOffset"; + public const string VTFeedbackSlotName = "VTFeedback"; public const int PositionSlotId = 0; public const int BaseColorSlotId = 1; @@ -136,6 +137,8 @@ class StackLitMasterNode : MasterNode, IMayRequirePosition, // TODO: we would ideally need one value per lobe public const int SpecularOcclusionSlotId = 43; // for custom (external) SO replacing data based SO (which normally comes from some func of DataBasedSOMode(dataAO, optional bent normal)) + public const int VTFeedbackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; + // In StackLit.hlsl engine side //public enum BaseParametrization //public enum DualSpecularLobeParametrization @@ -1169,6 +1172,11 @@ public sealed override void UpdateNodeAfterDeserialization() validSlots.Add(DepthOffsetSlotId); } + var vtFeedbackSlot = new Vector4MaterialSlot(VTFeedbackSlotId, VTFeedbackSlotName, VTFeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); + vtFeedbackSlot.hidden = true; + AddSlot(vtFeedbackSlot); + validSlots.Add(VTFeedbackSlotId); + RemoveSlotsNameNotMatching(validSlots, true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template index 99911e0e2cd..bfce57ca64c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template @@ -72,7 +72,7 @@ Pass // (eg property enabled + one or even multiple (and all of them) slots present, // connection or unconnected but non default value): - // + // // $SpecularAA: // this one is set whether we have GeometricSpecularAA or NormalMapFiltering (TODOTODO) // $GeometricSpecularAA: // $AmbientOcclusion: // not used, bugbug todotodo in Lit @@ -101,8 +101,8 @@ Pass // // Original shader keywords reference: - // - + // + // _ALPHATEST_ON // _DOUBLESIDED_ON @@ -113,14 +113,14 @@ Pass // // Keyword for transparent - // + // // _SURFACE_TYPE_TRANSPARENT // _ _BLENDMODE_ALPHA _BLENDMODE_ADD _BLENDMODE_PRE_MULTIPLY // _BLENDMODE_PRESERVE_SPECULAR_LIGHTING // handled in material.hlsl // _ENABLE_FOG_ON_TRANSPARENT // // MaterialFeature used as shader feature - // + // // _MATERIAL_FEATURE_DUAL_SPECULAR_LOBE // _MATERIAL_FEATURE_ANISOTROPY // _MATERIAL_FEATURE_COAT @@ -135,7 +135,7 @@ Pass // // // Handling of anisotropy for area lights: // _ANISOTROPY_FOR_AREA_LIGHTS - // + // // // Vertically layered BSDF test/tweak // _VLAYERED_RECOMPUTE_PERLIGHT // _VLAYERED_USE_REFRACTED_ANGLES_FOR_BASE @@ -278,6 +278,7 @@ Pass #define DISABLE_MODIFY_BAKED_DIFFUSE_LIGHTING #endif + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #ifdef DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" @@ -321,7 +322,7 @@ Pass // // Note: the constant buffer is declared here, and we manually add // debug properties in the master node if debug is enabled. - // These are in turn used in StackLit.hlsl, so we need the cbuffer declaration before + // These are in turn used in StackLit.hlsl, so we need the cbuffer declaration before // including Material.hlsl. // TODOTODO: // For now, we still splice the Graph here, and debug mode won't work, as we need to @@ -464,9 +465,9 @@ $include("SharedCode.template.hlsl") } #endif - // + // // SpecularAA - // + // // TODO Note: specular occlusion that uses bent normals should also use filtering, although the visibility model is not a // specular lobe with roughness but a cone with solid angle determined by the ambient occlusion so this is an even more @@ -538,15 +539,19 @@ $include("SharedCode.template.hlsl") BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData); // Builtin Data - // For back lighting we use the oposite vertex normal + // For back lighting we use the oposite vertex normal InitBuiltinData(posInput, surfaceDescription.Alpha, surfaceData.bentNormalWS, -fragInputs.tangentToWorld[2], fragInputs.texCoord1, fragInputs.texCoord2, builtinData); - + // override sampleBakedGI: $LightingGI: builtinData.bakeDiffuseLighting = surfaceDescription.BakedGI; $BackLightingGI: builtinData.backBakeDiffuseLighting = surfaceDescription.BakedBackGI; $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; +#if !defined(_SURFACE_TYPE_TRANSPARENT) + $SurfaceDescription.VTFeedback: builtinData.vtFeedback = surfaceDescription.VTFeedback; +#endif + $DepthOffset: builtinData.depthOffset = surfaceDescription.DepthOffset; #if (SHADERPASS == SHADERPASS_DISTORTION) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubShader.cs index 08ac9eb8091..f63e858fd2d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubShader.cs @@ -398,6 +398,7 @@ class StackLitSubShader : IStackLitSubShader StackLitMasterNode.LightingSlotId, StackLitMasterNode.BackLightingSlotId, StackLitMasterNode.DepthOffsetSlotId, + FabricMasterNode.VTFeedbackSlotId, }, VertexShaderSlots = new List() { @@ -871,6 +872,10 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List(); int numSlots = slots.Count(); + if (numSlots == 0) + { + return; + } + + if (numSlots == 1) + { + string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = {GetSlotValue(AggregateInputFirstId, generationMode)};"; + sb.AppendLine(feedBackCode); + } + else if (numSlots > 1) + { + string arrayName = $"{GetVariableNameForSlot(AggregateOutputId)}_array"; + sb.AppendLine($"float4 {arrayName}[{numSlots}];"); - if (numSlots == 1) - { - string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = {GetSlotValue(AggregateInputFirstId, generationMode)};"; - sb.AppendLine(feedBackCode); - } - else if (numSlots > 1) - { - string arrayName = $"{GetVariableNameForSlot(AggregateOutputId)}_array"; - sb.AppendLine($"float4 {arrayName}[{numSlots}];"); - - int arrayIndex = 0; - foreach (var slot in slots) - { - string code = $"{arrayName}[{arrayIndex}] = {GetSlotValue(AggregateInputFirstId + arrayIndex, generationMode)};"; - sb.AppendLine(code); - arrayIndex++; - } - - string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = {arrayName}[ (IN.{ShaderGeneratorNames.PixelCoordinate}.x + _FrameCount )% (uint){numSlots}];"; - - sb.AppendLine(feedBackCode); - } - - string write = $"StoreVTFeedback({GetVariableNameForSlot(AggregateOutputId)}, (uint2)IN.{ShaderGeneratorNames.PixelCoordinate}.xy );"; - sb.AppendLine(write); + int arrayIndex = 0; + foreach (var slot in slots) + { + string code = $"{arrayName}[{arrayIndex}] = {GetSlotValue(AggregateInputFirstId + arrayIndex, generationMode)};"; + sb.AppendLine(code); + arrayIndex++; + } + + string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = {arrayName}[ (IN.{ShaderGeneratorNames.PixelCoordinate}.x + _FrameCount )% (uint){numSlots}];"; + + sb.AppendLine(feedBackCode); + } } public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) { - return true; + var slots = this.GetInputSlots(); + int numSlots = slots.Count(); + return numSlots > 1; } // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output diff --git a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs index 7bd3637cad9..07065a0305c 100644 --- a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs +++ b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs @@ -1221,11 +1221,6 @@ public static void GenerateSurfaceDescriptionStruct(ShaderStringBuilder surfaceD { foreach (var slot in slots) { - if (slot.hidden) - { - continue; - } - string hlslName = NodeUtils.GetHLSLSafeName(slot.shaderOutputName); if (useIdsInNames) { @@ -1297,7 +1292,7 @@ public static void GenerateSurfaceDescriptionFunction( var usedSlots = slots ?? rootNode.GetInputSlots(); foreach (var input in usedSlots) { - if (input != null && input.hidden == false) + if (input != null) { var foundEdges = graph.GetEdges(input.slotReference).ToArray(); var hlslName = NodeUtils.GetHLSLSafeName(input.shaderOutputName); From 5efba1ff94a13c87a42b2cc8530e320fea68c836 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Fri, 23 Aug 2019 10:40:23 +0200 Subject: [PATCH 054/143] shader compile fix after merge --- .../Runtime/Material/Lit/LitDataIndividualLayer.hlsl | 2 -- 1 file changed, 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 4d09d22d015..0eb70b2db69 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -178,8 +178,6 @@ float3 ADD_IDX(GetBentNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, f // Return opacity float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out SurfaceData surfaceData, out float3 normalTS, out float3 bentNormalTS) { - surfaceData.VTFeedback = float4(1,1,1,1); - float alpha = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)).a * ADD_IDX(_BaseColor).a; // Perform alha test very early to save performance (a killed pixel will not sample textures) From 06904d7799228546c0e27e498344871d85136089 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Fri, 23 Aug 2019 11:21:15 +0200 Subject: [PATCH 055/143] [VirtualTexturing] delay packing of VT feedback value untill write --- .../ShaderLibrary/TextureStack.hlsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index f99b83caba5..446a6a40392 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -4,6 +4,7 @@ #define GRA_HLSL_5 1 #define GRA_ROW_MAJOR 1 #define GRA_TEXTURE_ARRAY_SUPPORT 0 +#define GRA_PACK_RESOLVE_OUTPUT 0 #include "GraniteShaderLib3.cginc" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" @@ -230,7 +231,7 @@ void StoreVTFeedback(float4 feedback, uint2 positionSS) { const uint2 vt_pos = positionSS / VTFeedbackScale; - VTFeedback[vt_pos] = feedback; + VTFeedback[vt_pos] = Granite_PackTileId(feedback); } } From bd8173a3420fb0794533a26ef44f13e594f9399b Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 28 Aug 2019 15:54:17 +0200 Subject: [PATCH 056/143] [VirtualTexturing] removed an old pragma template that could cause compile errors --- com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs b/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs index ad4786e0cc1..debfb02e2ad 100644 --- a/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs +++ b/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs @@ -995,8 +995,6 @@ LOD 100 #pragma vertex vert #pragma fragment frag - ${Pragmas} - struct GraphVertexOutput { float4 position : POSITION; From 3b875e7767bac29e840c83ac2a8b64469ae138c5 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 28 Aug 2019 16:07:50 +0200 Subject: [PATCH 057/143] [VirtualTexturing] Added support for Texture2DArray caches --- .../ShaderLibrary/TextureStack.hlsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 446a6a40392..b8de6a428de 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -3,7 +3,7 @@ #define GRA_HLSL_5 1 #define GRA_ROW_MAJOR 1 -#define GRA_TEXTURE_ARRAY_SUPPORT 0 +#define GRA_TEXTURE_ARRAY_SUPPORT 1 #define GRA_PACK_RESOLVE_OUTPUT 0 #include "GraniteShaderLib3.cginc" @@ -134,7 +134,7 @@ StackInfo PrepareVT_##stackName(float2 uv)\ #define jj(a, b) jj2(a, b) #define DECLARE_STACK_LAYER(stackName, layerSamplerName, layerIndex) \ -TEXTURE2D(stackName##_c##layerIndex);\ +TEXTURE2D_ARRAY(stackName##_c##layerIndex);\ SAMPLER(sampler##stackName##_c##layerIndex);\ \ float4 SampleVT_##layerSamplerName(StackInfo info)\ @@ -156,7 +156,7 @@ float4 SampleVT_##layerSamplerName(StackInfo info)\ grCB.streamingTextureBuffer = textureParamBlock;\ \ GraniteCacheTexture cache;\ - cache.Texture = stackName##_c##layerIndex;\ + cache.TextureArray = stackName##_c##layerIndex;\ cache.Sampler = sampler##stackName##_c##layerIndex;\ \ float4 output;\ From 40273a2eb6e11bbb99dcee751daad36f6bf4c62e Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 30 Aug 2019 17:01:19 +0200 Subject: [PATCH 058/143] Adjust shader graph generation to match the new attibute-based declarations of texture stacks. --- .../Editor/Data/Graphs/StackShaderProperty.cs | 10 +------- .../Data/Graphs/TextureShaderProperty.cs | 5 +++- .../Nodes/Input/Texture/TextureStackNode.cs | 24 ++++++++++++++++++- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs index 6423259db3f..ae5f63c4899 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs @@ -64,15 +64,7 @@ private string GetSlotNamesString(string delimiter=",") public override string GetPropertyBlockString() { - var result = new StringBuilder(); - - result.Append(referenceName); - result.Append("(\""); - result.Append(displayName); - result.Append("\", TextureStack) = {"); - result.Append(GetSlotNamesString(" ")); - result.Append("}"); - return result.ToString(); + return ""; //A stack only has variables declared in the actual shader not in the shaderlab wrapper code } public override string GetPropertyDeclarationString(string delimiter = ";") diff --git a/com.unity.shadergraph/Editor/Data/Graphs/TextureShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/TextureShaderProperty.cs index c0c1beac3d1..8eb8f9ea8a4 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/TextureShaderProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/TextureShaderProperty.cs @@ -24,9 +24,12 @@ public TextureShaderProperty() public string modifiableTagString => modifiable ? "" : "[NonModifiableTextureData]"; + public string textureStack = null; + public string textureStackTagString => string.IsNullOrEmpty(textureStack) ? "" : "[TextureStack." + textureStack + "]"; + public override string GetPropertyBlockString() { - return $"{hideTagString}{modifiableTagString}[NoScaleOffset]{referenceName}(\"{displayName}\", 2D) = \"{defaultType.ToString().ToLower()}\" {{}}"; + return $"{hideTagString}{modifiableTagString}[NoScaleOffset]{textureStackTagString}{referenceName}(\"{displayName}\", 2D) = \"{defaultType.ToString().ToLower()}\" {{}}"; } public override string GetPropertyDeclarationString(string delimiter = ";") diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 4f816447331..2266f225ce8 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -194,6 +194,7 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener { base.CollectShaderProperties(properties, generationMode); + // Get names of connected textures List slotNames = new List(); for (int i = 0; i < numSlots; i++) { @@ -201,9 +202,30 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener slotNames.Add(id); } + string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_texturestack"; + + // Add attributes to any connected textures + int found = 0; + foreach (var prop in properties.properties.OfType()) + { + foreach (var inputTex in slotNames) + { + if (string.Compare(inputTex, prop.referenceName) == 0) + { + prop.textureStack = stackName; + found++; + } + } + } + + if (found != slotNames.Count) + { + Debug.LogWarning("Could not find some texture properties for stack " + stackName); + } + properties.AddShaderProperty(new StackShaderProperty() { - overrideReferenceName = GetVariableNameForSlot(OutputSlotIds[0]) + "_texturestack", + overrideReferenceName = stackName, generatePropertyBlock = true, modifiable = false, slotNames = slotNames From 3115ff1ccdc1c4cd9fe66fde8f29e81483e2f4bc Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 4 Sep 2019 12:16:18 +0200 Subject: [PATCH 059/143] [VT] cleanup SRP core --- .../Runtime/Textures/RTHandle.cs | 2 - .../Sampling/SampleUVMapping.hlsl | 41 ------------------- 2 files changed, 43 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs b/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs index 9924468a42a..9b8a18c14a5 100644 --- a/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs +++ b/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs @@ -26,8 +26,6 @@ public class RTHandle public RenderTargetIdentifier nameID { get { return m_NameID; } } - public bool enableMSAA { get { return m_EnableMSAA; } } - public string name { get { return m_Name; } } // Keep constructor private diff --git a/com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl index 293fce58883..3daac140e54 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl @@ -29,47 +29,6 @@ struct UVMapping #endif }; - -real2 UVMappingTo2D(UVMapping mapping) -{ - if (mapping.mappingType == UV_MAPPING_TRIPLANAR) - { - real3 triplanarWeights = mapping.triplanarWeights; - real4 val = real4(0.0, 0.0, 0.0, 0.0); - - // x -> mapping.uvZY - // y -> mapping.uvXZ - // z -> mapping.uvXY - - if (triplanarWeights.x > triplanarWeights.y) - { - if (triplanarWeights.x > triplanarWeights.z) - { - return mapping.uvZY; - } - else - { - return mapping.uvXY; - } - } - else - { - if (triplanarWeights.y > triplanarWeights.z) - { - return mapping.uvXZ; - } - else - { - return mapping.uvXY; - } - } - } - else // UV_MAPPING_UVSET / UV_MAPPING_PLANAR - { - return mapping.uv; - } -} - // Multiple includes of the file to handle all variations of textures sampling for regular, lod and bias // Regular sampling functions From 2afe2e4f242909d2d6b142ea9be14006b2247e88 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 4 Sep 2019 13:27:09 +0200 Subject: [PATCH 060/143] [VT] clean up LWRP --- .../lightweightPBRStreamFeedbackPass.template | 102 ------------------ ...ightweightUnlitStreamFeedbackPass.template | 96 ----------------- ...eightUnlitStreamFeedbackPass.template.meta | 7 -- .../Runtime/Passes/VTFeedbackPass.cs | 93 ---------------- .../ShaderLibrary/SurfaceInput.hlsl | 2 +- .../ShaderLibrary/UnityInput.hlsl | 2 +- .../Shaders/LitInput.hlsl | 2 +- .../Shaders/Terrain/TerrainLitPasses.hlsl | 2 +- .../Shaders/UnlitInput.hlsl | 2 +- 9 files changed, 5 insertions(+), 303 deletions(-) delete mode 100644 com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template delete mode 100644 com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template delete mode 100644 com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template.meta delete mode 100644 com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template deleted file mode 100644 index 15d8bbd802e..00000000000 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightPBRStreamFeedbackPass.template +++ /dev/null @@ -1,102 +0,0 @@ -Pass -{ - Name "VTFeedback" - Tags{"LightMode" = "VTFeedback"} - - // Material options generated by graph -${Culling} -${ZTest} - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma target 2.0 - - //-------------------------------------- - // GPU Instancing - #pragma multi_compile_instancing - - #pragma vertex vert - #pragma fragment frag - - #define RESOLVE_SCALE_OVERRIDE VT_ResolveConstantPatch - - //Pragmas generated by graph -${Pragmas} - - // Defines generated by graph -${Defines} - #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Lighting.hlsl" - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/ShaderGraphFunctions.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl" - -${Graph} - struct VertexOutput - { - float2 uv : TEXCOORD0; - float4 clipPos : SV_POSITION; - // Interpolators defined by graph -${VertexOutputStruct} - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - VertexOutput vert(GraphVertexInput v) - { - VertexOutput o = (VertexOutput)0; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - - // Vertex transformations performed by graph -${VertexShader} - VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; - - // Vertex description inputs defined by graph -${VertexShaderDescriptionInputs} - VertexDescription vd = PopulateVertexData(vdi); - v.vertex.xyz = vd.Position; - - // Vertex shader outputs defined by graph -${VertexShaderOutputs} - o.clipPos = TransformObjectToHClip(v.vertex.xyz); - return o; - } - - half4 frag(VertexOutput IN ${FaceSign}) : SV_TARGET - { - UNITY_SETUP_INSTANCE_ID(IN); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); - float4 PixelCoordinate = IN.clipPos; - - // Pixel transformations performed by graph -${PixelShader} - SurfaceDescriptionInputs surfaceInput = (SurfaceDescriptionInputs)0; - - // Surface description inputs defined by graph -${PixelShaderSurfaceInputs} - SurfaceDescription surf = PopulateSurfaceData(surfaceInput); - - float3 Albedo = float3(0.5, 0.5, 0.5); - float3 Specular = float3(0, 0, 0); - float Metallic = 1; - float3 Normal = float3(0, 0, 1); - float3 Emission = 0; - float Smoothness = 0.5; - float Occlusion = 1; - float Alpha = 1; - float AlphaClipThreshold = 0; - float4 VTFeedback = float4(1, 1, 1, 1); - - // Surface description remap performed by graph -${PixelShaderSurfaceRemap} - - #if _AlphaClip - clip(Alpha - AlphaClipThreshold); -#endif - return VTFeedback; - } - ENDHLSL -} diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template deleted file mode 100644 index 742674a9468..00000000000 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template +++ /dev/null @@ -1,96 +0,0 @@ -Pass -{ - Name "VTFeedback" - Tags{"LightMode" = "VTFeedback"} - - // Material options generated by graph -${Culling} -${ZTest} - - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma target 2.0 - - //-------------------------------------- - // GPU Instancing - #pragma multi_compile_instancing - - #pragma vertex vert - #pragma fragment frag - - #define RESOLVE_SCALE_OVERRIDE VT_ResolveConstantPatch - - //Pragmas generated by graph -${Pragmas} - - // Defines generated by graph -${Defines} - #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Lighting.hlsl" - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/ShaderGraphFunctions.hlsl" - #include "Packages/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl" - -${Graph} - struct VertexOutput - { - float2 uv : TEXCOORD0; - float4 clipPos : SV_POSITION; - // Interpolators defined by graph -${VertexOutputStruct} - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - VertexOutput vert(GraphVertexInput v) - { - VertexOutput o = (VertexOutput)0; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - - // Vertex transformations performed by graph -${VertexShader} - VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; - - // Vertex description inputs defined by graph -${VertexShaderDescriptionInputs} - VertexDescription vd = PopulateVertexData(vdi); - v.vertex.xyz = vd.Position; - - // Vertex shader outputs defined by graph -${VertexShaderOutputs} - o.clipPos = TransformObjectToHClip(v.vertex.xyz); - return o; - } - - half4 frag(VertexOutput IN ${FaceSign}) : SV_TARGET - { - UNITY_SETUP_INSTANCE_ID(IN); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); - float4 PixelCoordinate = IN.clipPos; - - // Pixel transformations performed by graph -${PixelShader} - SurfaceDescriptionInputs surfaceInput = (SurfaceDescriptionInputs)0; - - // Surface description inputs defined by graph -${PixelShaderSurfaceInputs} - SurfaceDescription surf = PopulateSurfaceData(surfaceInput); - - float3 Color = float3(0.5, 0.5, 0.5); - float Alpha = 1; - float AlphaClipThreshold = 0; - float4 VTFeedback = float4(1, 1, 1, 1); - - // Surface description remap performed by graph -${PixelShaderSurfaceRemap} - #if _AlphaClip - clip(Alpha - AlphaClipThreshold); -#endif - return VTFeedback; - } - ENDHLSL -} diff --git a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template.meta b/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template.meta deleted file mode 100644 index 0d4b2fcd370..00000000000 --- a/com.unity.render-pipelines.lightweight/Editor/ShaderGraph/lightweightUnlitStreamFeedbackPass.template.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 09de7a2003af582448e9f801bd0b7481 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs b/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs deleted file mode 100644 index 772a547f0a1..00000000000 --- a/com.unity.render-pipelines.lightweight/Runtime/Passes/VTFeedbackPass.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using Exerimental = UnityEngine.Experimental; - -namespace UnityEngine.Rendering.LWRP -{ - internal class VTFeedbackPass : ScriptableRenderPass - { - const int scale = 16; //== 1/16 res - - RenderTargetHandle m_FeedbackAttachmentHandle; - RenderTextureDescriptor m_Descriptor; - - FilteringSettings m_FilteringSettings; - string m_ProfilerTag = "VT feedback"; - ShaderTagId m_ShaderTagId = new ShaderTagId("VTFeedback"); - - Exerimental.VirtualTextureResolver m_Resolver; - int m_VirtualConstantPatchID = Shader.PropertyToID("VT_ResolveConstantPatch"); - - public VTFeedbackPass(RenderPassEvent evt, RenderQueueRange renderQueueRange, LayerMask layerMask) - { - m_FilteringSettings = new FilteringSettings(renderQueueRange, layerMask); - m_Resolver = new Exerimental.VirtualTextureResolver(); - renderPassEvent = evt; - } - - public void Setup(RenderTextureDescriptor baseDescriptor) - { - int w = baseDescriptor.width / scale; - int h = baseDescriptor.height / scale; - m_Descriptor = new RenderTextureDescriptor(w, h, Experimental.Rendering.GraphicsFormat.R8G8B8A8_UNorm, 32, 1); - m_Descriptor.useDynamicScale = false; - m_Descriptor.useMipMap = false; - m_Descriptor.autoGenerateMips = false; - m_Descriptor.enableRandomWrite = false; - - m_FeedbackAttachmentHandle.Init("VTFeedbackRT"); - - m_Resolver.Init(baseDescriptor.width, baseDescriptor.height, w, h); - } - - public override void Configure(CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) - { - cmd.GetTemporaryRT(m_FeedbackAttachmentHandle.id, m_Descriptor, FilterMode.Point); - ConfigureTarget(m_FeedbackAttachmentHandle.Identifier()); - ConfigureClear(ClearFlag.All, Color.white); - } - - public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) - { - CommandBuffer cmd = CommandBufferPool.Get(m_ProfilerTag); - using (new ProfilingSample(cmd, m_ProfilerTag)) - { - context.ExecuteCommandBuffer(cmd); - cmd.Clear(); - - if (m_VirtualConstantPatchID < 0) - { - Debug.LogError("Material is used with VT feedback but did not expose the VT_ResolveConstantPatch variable."); - } - - cmd.SetGlobalVector(m_VirtualConstantPatchID, m_Resolver.VirtualConstantPatch); - - var sortFlags = renderingData.cameraData.defaultOpaqueSortFlags; - var drawSettings = CreateDrawingSettings(m_ShaderTagId, ref renderingData, sortFlags); - drawSettings.perObjectData = PerObjectData.None; - - ref CameraData cameraData = ref renderingData.cameraData; - Camera camera = cameraData.camera; - if (cameraData.isStereoEnabled) - context.StartMultiEye(camera); - - context.DrawRenderers(renderingData.cullResults, ref drawSettings, ref m_FilteringSettings); - - m_Resolver.Process(m_FeedbackAttachmentHandle.Identifier(), cmd); - } - context.ExecuteCommandBuffer(cmd); - CommandBufferPool.Release(cmd); - } - - public override void FrameCleanup(CommandBuffer cmd) - { - if (cmd == null) - throw new ArgumentNullException("cmd"); - - if (m_FeedbackAttachmentHandle != RenderTargetHandle.CameraTarget) - { - cmd.ReleaseTemporaryRT(m_FeedbackAttachmentHandle.id); - m_FeedbackAttachmentHandle = RenderTargetHandle.CameraTarget; - } - } - } -} diff --git a/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl b/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl index 99c4c3cc489..286b085e5a8 100644 --- a/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl +++ b/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl @@ -1 +1 @@ -#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl" \ No newline at end of file diff --git a/com.unity.render-pipelines.lightweight/ShaderLibrary/UnityInput.hlsl b/com.unity.render-pipelines.lightweight/ShaderLibrary/UnityInput.hlsl index d67cd01b4f8..d7cd4c9effc 100644 --- a/com.unity.render-pipelines.lightweight/ShaderLibrary/UnityInput.hlsl +++ b/com.unity.render-pipelines.lightweight/ShaderLibrary/UnityInput.hlsl @@ -1 +1 @@ -#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityInput.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityInput.hlsl" \ No newline at end of file diff --git a/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl b/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl index 93c107c57d8..b88a48e8657 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/LitInput.hlsl @@ -1 +1 @@ -#include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl" +#include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl" \ No newline at end of file diff --git a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl index bc214bd9e49..eebffddc336 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/Terrain/TerrainLitPasses.hlsl @@ -1 +1 @@ -#include "Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitPasses.hlsl" +#include "Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitPasses.hlsl" \ No newline at end of file diff --git a/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl b/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl index 62d677668a4..474f1d41cb4 100644 --- a/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl +++ b/com.unity.render-pipelines.lightweight/Shaders/UnlitInput.hlsl @@ -1 +1 @@ -#include "Packages/com.unity.render-pipelines.universal/Shaders/UnlitInput.hlsl" +#include "Packages/com.unity.render-pipelines.universal/Shaders/UnlitInput.hlsl" \ No newline at end of file From 6dffe5ad150095dcda9f72aa84f2c82fa5b32154 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 4 Sep 2019 13:59:27 +0200 Subject: [PATCH 061/143] [VT] cleanup shadergraph (first pass) --- .../Editor/Data/Graphs/ShaderGraphRequirements.cs | 2 +- .../Editor/Data/Nodes/AbstractMaterialNode.cs | 2 +- .../Editor/Data/Nodes/Utility/SubGraphNode.cs | 2 +- .../Editor/ShaderGUI/PBRMasterGUI.cs | 11 +++-------- .../Editor/ShaderGUI/UnlitMasterGUI.cs | 14 -------------- .../Editor/ShaderGUI/UnlitMasterGUI.cs.meta | 11 ----------- 6 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs delete mode 100644 com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs.meta diff --git a/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs b/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs index e62cd8c7342..ab1d69ac66c 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs @@ -79,7 +79,7 @@ public static ShaderGraphRequirements FromNodes(List nodes, ShaderStageCap bool requiresDepthTexture = nodes.OfType().Any(x => x.RequiresDepthTexture()); bool requiresCameraOpaqueTexture = nodes.OfType().Any(x => x.RequiresCameraOpaqueTexture()); bool requiresTime = nodes.Any(x => x.RequiresTime()); - bool requiresPixelCoordinate = nodes.OfType().Any(x => x.RequiresPixelCoordinate()); + bool requiresPixelCoordinate = nodes.OfType().Any(x => x.RequiresPixelCoordinate()); var meshUV = new List(); for (int uvIndex = 0; uvIndex < ShaderGeneratorNames.UVCount; ++uvIndex) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs index 5370f705d90..965ba8913d1 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs @@ -290,7 +290,7 @@ public string GetSlotValue(int inputSlotId, GenerationMode generationMode) return inputSlot.GetDefaultValue(generationMode); } - + public static ConcreteSlotValueType ConvertDynamicVectorInputTypeToConcrete(IEnumerable inputTypes) { var concreteSlotValueTypes = inputTypes as IList ?? inputTypes.ToList(); diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs index 0fdd8dcc9fa..8ac5275bb12 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs @@ -24,7 +24,7 @@ class SubGraphNode : AbstractMaterialNode , IMayRequireFaceSign , IMayRequireCameraOpaqueTexture , IMayRequireDepthTexture - , IMayRequireRequirePixelCoordinate + , IMayRequireRequirePixelCoordinate { [Serializable] public class MinimalSubGraphNode : IHasDependencies diff --git a/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs b/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs index b4f2dc368df..5fc4a1cbbe9 100644 --- a/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs +++ b/com.unity.shadergraph/Editor/ShaderGUI/PBRMasterGUI.cs @@ -1,19 +1,14 @@ -using System; +using System; using UnityEngine; -using UnityEditor.Rendering; - - namespace UnityEditor.ShaderGraph { - - class PBRMasterGUI : ShaderGUI { public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { - materialEditor.PropertiesDefaultGUI(props); - + materialEditor.PropertiesDefaultGUI(props); + foreach (MaterialProperty prop in props) { if (prop.name == "_EmissionColor") diff --git a/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs b/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs deleted file mode 100644 index e856ad8b408..00000000000 --- a/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityEditor.ShaderGraph -{ - public class UnlitMasterGUI : ShaderGUI - { - public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) - { - materialEditor.PropertiesDefaultGUI(props); - // TODO: Add something here - } - } -} diff --git a/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs.meta b/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs.meta deleted file mode 100644 index baf2c8afa1f..00000000000 --- a/com.unity.shadergraph/Editor/ShaderGUI/UnlitMasterGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 626ba3ac3d4c0524080375de120ed02c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: From f16aad71f5580d29b77237548928d83bb7864ca8 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 4 Sep 2019 14:23:23 +0200 Subject: [PATCH 062/143] [VT] HDRP cleanup phase 1 --- .../Editor/Material/PBR/HDPBRLit.cs | 1 - .../Material/UIBlocks/AdvancedOptionsUIBlock.cs | 11 ++++++----- .../Editor/Material/Unlit/UnlitGUI.cs | 2 +- .../Settings/SerializedRenderPipelineSettings.cs | 1 + .../Runtime/Lighting/LightLoop/LightLoop.cs.hlsl | 1 - .../Runtime/Material/Lit/Lit.hlsl | 6 ------ .../Runtime/Material/Lit/LitDataIndividualLayer.hlsl | 6 +++--- .../Runtime/Material/MaterialGBufferMacros.hlsl | 1 - .../Runtime/Material/StandardLit/StandardLit.hlsl | 3 --- .../SubsurfaceScattering/SubsurfaceScattering.hlsl | 7 +++---- .../Runtime/Material/TerrainLit/TerrainLitData.hlsl | 2 +- .../Runtime/RenderPipeline/HDRenderPipelineAsset.cs | 9 ++++----- .../Runtime/RenderPipeline/RenderPipelineResources.cs | 1 - 13 files changed, 19 insertions(+), 32 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs index 176de16e2db..7fe5e89df34 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs @@ -8,7 +8,6 @@ class HDPBRLitGUI : ShaderGUI public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { materialEditor.PropertiesDefaultGUI(props); - if (materialEditor.EmissionEnabledProperty()) { materialEditor.LightmapEmissionFlagsProperty(MaterialEditor.kMiniTextureFieldLabelIndentLevel, true, true); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs index 0e7e41d5a91..93c0c74daf9 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AdvancedOptionsUIBlock.cs @@ -14,8 +14,7 @@ public enum Features Instancing = 1 << 0, SpecularOcclusion = 1 << 1, AdditionalVelocity = 1 << 2, - All = ~0, - Unlit = Instancing, + All = ~0 } public class Styles @@ -23,6 +22,7 @@ public class Styles public const string header = "Advanced Options"; public static GUIContent enableSpecularOcclusionText = new GUIContent("Specular Occlusion From Bent Normal", "Requires cosine weighted bent normal and cosine weighted ambient occlusion. Specular occlusion for Reflection Probe"); public static GUIContent additionalVelocityChangeText = new GUIContent("Additional Velocity Changes", "Requires additional per vertex velocity info"); + } protected MaterialProperty enableSpecularOcclusion = null; @@ -44,6 +44,7 @@ public override void LoadMaterialProperties() { enableSpecularOcclusion = FindProperty(kEnableSpecularOcclusion); additionalVelocityChange = FindProperty(kAdditionalVelocityChange); + } public override void OnGUI() @@ -65,8 +66,8 @@ void DrawAdvancedOptionsGUI() { if ( additionalVelocityChange != null) materialEditor.ShaderProperty(additionalVelocityChange, Styles.additionalVelocityChangeText); - } - } - } + } + } +} } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs index c1cb929f572..0142b37d798 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/UnlitGUI.cs @@ -18,7 +18,7 @@ class UnlitGUI : HDShaderGUI new UnlitSurfaceInputsUIBlock(MaterialUIBlock.Expandable.Input), new TransparencyUIBlock(MaterialUIBlock.Expandable.Transparency), new EmissionUIBlock(MaterialUIBlock.Expandable.Emissive), - new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.Instancing | AdvancedOptionsUIBlock.Features.AdditionalVelocity), + new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.Instancing | AdvancedOptionsUIBlock.Features.AdditionalVelocity) }; public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs index 8df225a81a6..a9764ef8219 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedRenderPipelineSettings.cs @@ -34,6 +34,7 @@ class SerializedRenderPipelineSettings public SerializedProperty supportTransparentDepthPrepass; public SerializedProperty supportTransparentDepthPostpass; + public SerializedGlobalLightLoopSettings lightLoopSettings; public SerializedHDShadowInitParameters hdShadowInitParams; public SerializedGlobalDecalSettings decalSettings; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl index 7ab11682506..f26c92ef83c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl @@ -54,7 +54,6 @@ #define LIGHT_FEATURE_MASK_FLAGS_OPAQUE (16642048) #define LIGHT_FEATURE_MASK_FLAGS_TRANSPARENT (16510976) #define MATERIAL_FEATURE_MASK_FLAGS (4095) -#define MAX_RAY_TRACED_SHADOWS (4) // Generated from UnityEngine.Rendering.HighDefinition.SFiniteLightBound // PackingRules = Exact diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index 3d1a52a7244..b320e15c238 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -512,12 +512,6 @@ void EncodeIntoGBuffer( SurfaceData surfaceData #endif #if GBUFFERMATERIAL_COUNT > 5 , out GBufferType5 outGBuffer5 -#endif -#if GBUFFERMATERIAL_COUNT > 6 - , out GBufferType6 outGBuffer6 -#endif -#if GBUFFERMATERIAL_COUNT > 7 - , out GBufferType7 outGBuffer7 #endif ) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl index 0eb70b2db69..d1c3cea5849 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl @@ -189,7 +189,7 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out alphaCutoff = _AlphaCutoffPostpass; #endif -#if SHADERPASS == SHADERPASS_SHADOWS +#if SHADERPASS == SHADERPASS_SHADOWS DoAlphaTest(alpha, _UseShadowThreshold ? _AlphaCutoffShadow : alphaCutoff); #else DoAlphaTest(alpha, alphaCutoff); @@ -213,14 +213,14 @@ float ADD_IDX(GetSurfaceData)(FragInputs input, LayerTexCoord layerTexCoord, out surfaceData.baseColor = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)).rgb * ADD_IDX(_BaseColor).rgb; #ifdef _DETAIL_MAP_IDX - + // Goal: we want the detail albedo map to be able to darken down to black and brighten up to white the surface albedo. // The scale control the speed of the gradient. We simply remap detailAlbedo from [0..1] to [-1..1] then perform a lerp to black or white // with a factor based on speed. // For base color we interpolate in sRGB space (approximate here as square) as it get a nicer perceptual gradient float albedoDetailSpeed = saturate(abs(detailAlbedo) * ADD_IDX(_DetailAlbedoScale)); float3 baseColorOverlay = lerp(sqrt(surfaceData.baseColor), (detailAlbedo < 0.0) ? float3(0.0, 0.0, 0.0) : float3(1.0, 1.0, 1.0), albedoDetailSpeed * albedoDetailSpeed); - baseColorOverlay *= baseColorOverlay; + baseColorOverlay *= baseColorOverlay; // Lerp with details mask surfaceData.baseColor = lerp(surfaceData.baseColor, saturate(baseColorOverlay), detailMask); #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl index f4a7ee845c8..528862c5603 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl @@ -11,7 +11,6 @@ #define GBufferType3 float4 #define GBufferType4 float4 #define GBufferType5 float4 -#define GBufferType6 float4 #ifdef LIGHT_LAYERS #define GBUFFERMATERIAL_LIGHT_LAYERS 1 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/StandardLit/StandardLit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/StandardLit/StandardLit.hlsl index f4c963dc085..93a6762cffd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/StandardLit/StandardLit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/StandardLit/StandardLit.hlsl @@ -10,9 +10,6 @@ void EncodeIntoStandardGBuffer( StandardBSDFData standardBSDFData #endif #if GBUFFERMATERIAL_COUNT > 5 , out GBufferType5 outGBuffer5 -#endif -#if GBUFFERMATERIAL_COUNT > 6 - , out GBufferType6 outGBuffer6 #endif ) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl index ec5723b64d4..86c3f476025 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl @@ -92,8 +92,7 @@ void DecodeFromSSSBuffer(uint2 positionSS, out SSSData sssData) } // OUTPUT_SSSBUFFER start from SV_Target2 as SV_Target0 and SV_Target1 are used for lighting buffer -#define SS_BUFFER_TARGET SV_Target2 -#define OUTPUT_SSSBUFFER(NAME) out SSSBufferType0 MERGE_NAME(NAME, 0) : SS_BUFFER_TARGET +#define OUTPUT_SSSBUFFER(NAME) out SSSBufferType0 MERGE_NAME(NAME, 0) : SV_Target2 #define ENCODE_INTO_SSSBUFFER(SURFACE_DATA, UNPOSITIONSS, NAME) EncodeIntoSSSBuffer(ConvertSurfaceDataToSSSData(SURFACE_DATA), UNPOSITIONSS, MERGE_NAME(NAME, 0)) #define DECODE_FROM_SSSBUFFER(UNPOSITIONSS, SSS_DATA) DecodeFromSSSBuffer(UNPOSITIONSS, SSS_DATA) @@ -225,10 +224,10 @@ uint FindDiffusionProfileIndex(uint diffusionProfileHash) { if (diffusionProfileHash == 0) return 0; - + uint diffusionProfileIndex = 0; uint i = 0; - + // Fetch the 4 bit index number by looking for the diffusion profile unique ID: for (i = 0; i < _DiffusionProfileCount; i++) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl index 6a718f130de..6e812d42dac 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl @@ -156,7 +156,7 @@ void GetSurfaceAndBuiltinData(inout FragInputs input, float3 V, inout PositionIn #ifdef _ALPHATEST_ON ClipHoles(input.texCoord0); -#endif +#endif // terrain lightmap uvs are always taken from uv0 input.texCoord1 = input.texCoord2 = input.texCoord0; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index 32fda4a1697..979282d7e6a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -319,23 +319,22 @@ bool UpdateDefineList(bool flagValue, string defineMacroValue) // This function allows us to raise or remove some preprocessing defines based on the render pipeline settings public void EvaluateSettings() { +#if REALTIME_RAYTRACING_SUPPORT // Grab the current set of defines and split them string currentDefineList = UnityEditor.PlayerSettings.GetScriptingDefineSymbolsForGroup(UnityEditor.BuildTargetGroup.Standalone); defineArray.Clear(); defineArray.AddRange(currentDefineList.Split(';')); + // Update all the individual defines bool needUpdate = false; - -#if REALTIME_RAYTRACING_SUPPORT - // Update all the individual defines needUpdate |= UpdateDefineList(currentPlatformRenderPipelineSettings.supportRayTracing, "ENABLE_RAYTRACING"); - -#endif + // Only set if it changed if (needUpdate) { UnityEditor.PlayerSettings.SetScriptingDefineSymbolsForGroup(UnityEditor.BuildTargetGroup.Standalone, string.Join(";", defineArray.ToArray())); } +#endif } public bool AddDiffusionProfile(DiffusionProfileSettings profile) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs index 2d837964a06..258b72663a5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs @@ -234,7 +234,6 @@ public sealed class ShaderResources [Reload("Runtime/PostProcessing/Shaders/CopyTAAHistory.compute")] public ComputeShader CopyTAAHistoryCS; - // Iterator to retrieve all compute shaders in reflection so we don't have to keep a list of // used compute shaders up to date (prefer editor-only usage) public IEnumerable GetAllComputeShaders() From 3352029f58de570881d7bb3db5cf88b297a5f927 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 4 Sep 2019 20:11:41 +0200 Subject: [PATCH 063/143] [VT] reworked VTFeedback node injection to be more generic and with less code footprint in different subshaders --- .../Fabric/ShaderGraph/FabricMasterNode.cs | 9 ----- .../Fabric/ShaderGraph/FabricSubShader.cs | 11 ++---- .../Lit/ShaderGraph/HDLitMasterNode.cs | 7 ---- .../Lit/ShaderGraph/HDLitSubShader.cs | 14 +++----- .../PBR/ShaderGraph/HDPBRSubShader.cs | 12 ++----- .../ShaderGraph/StackLitMasterNode.cs | 8 ----- .../StackLit/ShaderGraph/StackLitSubShader.cs | 8 ++--- .../Unlit/ShaderGraph/HDUnlitMasterNode.cs | 7 ---- .../Unlit/ShaderGraph/HDUnlitSubShader.cs | 10 ++---- .../Unlit/ShaderGraph/UnlitSubShader.cs | 12 +++---- .../Editor/Data/MasterNodes/PBRMasterNode.cs | 9 +---- .../Data/MasterNodes/UnlitMasterNode.cs | 9 +---- .../Nodes/Input/Texture/TextureStackNode.cs | 34 +++++++++++++------ 13 files changed, 44 insertions(+), 106 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs index a174e0dcdaf..abc7c5df655 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs @@ -81,10 +81,6 @@ class FabricMasterNode : MasterNode, IMayRequirePosition, IMay public const int DepthOffsetSlotId = 18; public const string DepthOffsetSlotName = "DepthOffset"; - public const int VTFeedbackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; - public const string VTFeedbackSlotName = "VTFeedback"; - - public enum MaterialType { CottonWool, @@ -641,11 +637,6 @@ public sealed override void UpdateNodeAfterDeserialization() validSlots.Add(DepthOffsetSlotId); } - var vtFeedbackSlot = new Vector4MaterialSlot(VTFeedbackSlotId, VTFeedbackSlotName, VTFeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); - vtFeedbackSlot.hidden = true; - AddSlot(vtFeedbackSlot); - validSlots.Add(VTFeedbackSlotId); - RemoveSlotsNameNotMatching(validSlots, true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs index 5631e5c6ca8..3fc2839ee6c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs @@ -273,7 +273,7 @@ class FabricSubShader : IFabricSubShader FabricMasterNode.LightingSlotId, FabricMasterNode.BackLightingSlotId, FabricMasterNode.DepthOffsetSlotId, - FabricMasterNode.VTFeedbackSlotId, + VirtualTexturingFeedback.OutputSlotID, }, VertexShaderSlots = new List() { @@ -650,13 +650,8 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List, IMayRequirePosition, IMayRe public const string BakedGISlotName = "Baked GI"; public const string BakedBackGISlotName = "Baked Back GI"; public const string DepthOffsetSlotName = "DepthOffset"; - public const string VTFeedbackSlotName = "VTFeedback"; public const int PositionSlotId = 0; public const int AlbedoSlotId = 1; @@ -92,7 +91,6 @@ class HDLitMasterNode : MasterNode, IMayRequirePosition, IMayRe public const int LightingSlotId = 30; public const int BackLightingSlotId = 31; public const int DepthOffsetSlotId = 32; - public const int VTFeedbackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; public enum MaterialType { @@ -903,11 +901,6 @@ public sealed override void UpdateNodeAfterDeserialization() validSlots.Add(DepthOffsetSlotId); } - var vtFeedbackSlot = new Vector4MaterialSlot(VTFeedbackSlotId, VTFeedbackSlotName, VTFeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); - vtFeedbackSlot.hidden = true; - AddSlot(vtFeedbackSlot); - validSlots.Add(VTFeedbackSlotId); - RemoveSlotsNameNotMatching(validSlots, true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs index b5f98999d27..6c8b1d8f249 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubShader.cs @@ -67,7 +67,7 @@ class HDLitSubShader : IHDLitSubShader HDLitMasterNode.LightingSlotId, HDLitMasterNode.BackLightingSlotId, HDLitMasterNode.DepthOffsetSlotId, - HDLitMasterNode.VTFeedbackSlotId, + VirtualTexturingFeedback.OutputSlotID, }, VertexShaderSlots = new List() { @@ -524,7 +524,7 @@ class HDLitSubShader : IHDLitSubShader HDLitMasterNode.LightingSlotId, HDLitMasterNode.BackLightingSlotId, HDLitMasterNode.DepthOffsetSlotId, - HDLitMasterNode.VTFeedbackSlotId, + VirtualTexturingFeedback.OutputSlotID, }, VertexShaderSlots = new List() { @@ -1060,14 +1060,8 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List() { @@ -318,7 +318,7 @@ class HDPBRSubShader : IPBRSubShader PBRMasterNode.OcclusionSlotId, PBRMasterNode.AlphaSlotId, PBRMasterNode.AlphaThresholdSlotId, - PBRMasterNode.VTFeedbackSlotId + VirtualTexturingFeedback.OutputSlotID }, VertexShaderSlots = new List() { @@ -557,13 +557,7 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List, IMayRequirePosition, public const string SOFixupMaxAddedRoughnessSlotName = "SOConeFixupMaxAddedRoughness"; public const string DepthOffsetSlotName = "DepthOffset"; - public const string VTFeedbackSlotName = "VTFeedback"; public const int PositionSlotId = 0; public const int BaseColorSlotId = 1; @@ -137,8 +136,6 @@ class StackLitMasterNode : MasterNode, IMayRequirePosition, // TODO: we would ideally need one value per lobe public const int SpecularOcclusionSlotId = 43; // for custom (external) SO replacing data based SO (which normally comes from some func of DataBasedSOMode(dataAO, optional bent normal)) - public const int VTFeedbackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; - // In StackLit.hlsl engine side //public enum BaseParametrization //public enum DualSpecularLobeParametrization @@ -1172,11 +1169,6 @@ public sealed override void UpdateNodeAfterDeserialization() validSlots.Add(DepthOffsetSlotId); } - var vtFeedbackSlot = new Vector4MaterialSlot(VTFeedbackSlotId, VTFeedbackSlotName, VTFeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); - vtFeedbackSlot.hidden = true; - AddSlot(vtFeedbackSlot); - validSlots.Add(VTFeedbackSlotId); - RemoveSlotsNameNotMatching(validSlots, true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubShader.cs index f63e858fd2d..b52d9435ce5 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubShader.cs @@ -398,7 +398,7 @@ class StackLitSubShader : IStackLitSubShader StackLitMasterNode.LightingSlotId, StackLitMasterNode.BackLightingSlotId, StackLitMasterNode.DepthOffsetSlotId, - FabricMasterNode.VTFeedbackSlotId, + VirtualTexturingFeedback.OutputSlotID, }, VertexShaderSlots = new List() { @@ -871,11 +871,7 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List, IMayRequirePosition public const string DistortionBlurSlotName = "DistortionBlur"; public const string PositionSlotName = "Position"; public const string EmissionSlotName = "Emission"; - public const string FeedbackSlotName = "VTFeedback"; public const int ColorSlotId = 0; public const int AlphaSlotId = 7; @@ -38,7 +37,6 @@ class HDUnlitMasterNode : MasterNode, IMayRequirePosition public const int DistortionSlotId = 10; public const int DistortionBlurSlotId = 11; public const int EmissionSlotId = 12; - public const int FeedBackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; // Don't support Multiply public enum AlphaModeLit @@ -331,11 +329,6 @@ public sealed override void UpdateNodeAfterDeserialization() validSlots.Add(DistortionBlurSlotId); } - var feedbackSlot = new Vector4MaterialSlot(FeedBackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); - feedbackSlot.hidden = true; - AddSlot(feedbackSlot); - validSlots.Add(FeedBackSlotId); - RemoveSlotsNameNotMatching(validSlots, true); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs index 2241aa95942..956c44eb875 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubShader.cs @@ -268,7 +268,7 @@ class HDUnlitSubShader : IHDUnlitSubShader HDUnlitMasterNode.AlphaSlotId, HDUnlitMasterNode.AlphaThresholdSlotId, HDUnlitMasterNode.EmissionSlotId, - HDUnlitMasterNode.FeedBackSlotId, + VirtualTexturingFeedback.OutputSlotID, }, VertexShaderSlots = new List() { @@ -454,13 +454,7 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List() { @@ -391,13 +391,9 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List, IMayRequirePosition, IMayRequir public const string AlphaSlotName = "Alpha"; public const string AlphaClipThresholdSlotName = "AlphaClipThreshold"; public const string PositionName = "Position"; - public const string VTFeedbackSlotName = "VTFeedback"; public const int AlbedoSlotId = 0; public const int NormalSlotId = 1; @@ -35,7 +34,6 @@ class PBRMasterNode : MasterNode, IMayRequirePosition, IMayRequir public const int AlphaSlotId = 7; public const int AlphaThresholdSlotId = 8; public const int PositionSlotId = 9; - public const int VTFeedbackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; public enum Model { @@ -130,10 +128,6 @@ public sealed override void UpdateNodeAfterDeserialization() AddSlot(new Vector1MaterialSlot(AlphaSlotId, AlphaSlotName, AlphaSlotName, SlotType.Input, 1f, ShaderStageCapability.Fragment)); AddSlot(new Vector1MaterialSlot(AlphaThresholdSlotId, AlphaClipThresholdSlotName, AlphaClipThresholdSlotName, SlotType.Input, 0.5f, ShaderStageCapability.Fragment)); - var fbSlot = new Vector4MaterialSlot(VTFeedbackSlotId, VTFeedbackSlotName, VTFeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); - fbSlot.hidden = true; - AddSlot(fbSlot); - // clear out slot names that do not match the slots // we support RemoveSlotsNameNotMatching( @@ -147,8 +141,7 @@ public sealed override void UpdateNodeAfterDeserialization() SmoothnessSlotId, OcclusionSlotId, AlphaSlotId, - AlphaThresholdSlotId, - VTFeedbackSlotId, + AlphaThresholdSlotId }, true); } diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs index d3941d28e08..2e63b79d4de 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs @@ -17,13 +17,11 @@ class UnlitMasterNode : MasterNode, IMayRequirePosition public const string AlphaSlotName = "Alpha"; public const string AlphaClipThresholdSlotName = "AlphaClipThreshold"; public const string PositionName = "Position"; - public const string FeedbackSlotName = "VTFeedback"; public const int ColorSlotId = 0; public const int AlphaSlotId = 7; public const int AlphaThresholdSlotId = 8; public const int PositionSlotId = 9; - public const int FeedBackSlotId = TextureStackAggregateFeedbackNode.MasterNodeFeedbackInputSlotID; [SerializeField] SurfaceType m_SurfaceType; @@ -102,10 +100,6 @@ public sealed override void UpdateNodeAfterDeserialization() AddSlot(new Vector1MaterialSlot(AlphaSlotId, AlphaSlotName, AlphaSlotName, SlotType.Input, 1, ShaderStageCapability.Fragment)); AddSlot(new Vector1MaterialSlot(AlphaThresholdSlotId, AlphaClipThresholdSlotName, AlphaClipThresholdSlotName, SlotType.Input, 0.5f, ShaderStageCapability.Fragment)); - var feedbackSlot = new Vector4MaterialSlot(FeedBackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); - feedbackSlot.hidden = true; - AddSlot(feedbackSlot); - // clear out slot names that do not match the slots // we support RemoveSlotsNameNotMatching( @@ -114,8 +108,7 @@ public sealed override void UpdateNodeAfterDeserialization() PositionSlotId, ColorSlotId, AlphaSlotId, - AlphaThresholdSlotId, - FeedBackSlotId + AlphaThresholdSlotId }); } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 2266f225ce8..7d0d8779006 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -425,9 +425,7 @@ class TextureStackAggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCo public const int AggregateInputFirstId = 1; public override bool hasPreview { get { return false; } } - - public const int MasterNodeFeedbackInputSlotID = 22021982; - + public TextureStackAggregateFeedbackNode() { name = "Feedback Aggregate"; @@ -487,9 +485,16 @@ public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) return numSlots > 1; } + } + + static class VirtualTexturingFeedback + { + public const int OutputSlotID = 22021982; + // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output - public static TextureStackAggregateFeedbackNode AutoInjectFeedbackNode(AbstractMaterialNode masterNode) + public static IMasterNode AutoInject(IMasterNode iMasterNode) { + var masterNode = iMasterNode as AbstractMaterialNode; var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); // Early out if there are no VT nodes in the graph @@ -497,9 +502,18 @@ public static TextureStackAggregateFeedbackNode AutoInjectFeedbackNode(AbstractM { return null; } + + // Duplicate the Graph so we can modify it + var workingMasterNode = masterNode.owner.ScratchCopy().GetNodeFromGuid(masterNode.guid);// as MasterNode; + + // inject VTFeedback output slot + var vtFeedbackSlot = new Vector4MaterialSlot(OutputSlotID, "VTFeedback", "VTFeedback", SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); + vtFeedbackSlot.hidden = true; + workingMasterNode.AddSlot(vtFeedbackSlot); + // Inject Aggregate node var feedbackNode = new TextureStackAggregateFeedbackNode(); - masterNode.owner.AddNode(feedbackNode); + workingMasterNode.owner.AddNode(feedbackNode); // Add inputs to feedback node int i = 0; @@ -524,7 +538,7 @@ public static TextureStackAggregateFeedbackNode AutoInjectFeedbackNode(AbstractM } // Add input to master node - var feedbackInputSlot = masterNode.FindInputSlot(MasterNodeFeedbackInputSlotID); + var feedbackInputSlot = workingMasterNode.FindInputSlot(OutputSlotID); if ( feedbackInputSlot == null ) { Debug.LogWarning("Could not find the VT feedback input slot on the master node."); @@ -538,10 +552,10 @@ public static TextureStackAggregateFeedbackNode AutoInjectFeedbackNode(AbstractM return null; } - masterNode.owner.Connect(feedbackOutputSlot.slotReference, feedbackInputSlot.slotReference); - masterNode.owner.ClearChanges(); + workingMasterNode.owner.Connect(feedbackOutputSlot.slotReference, feedbackInputSlot.slotReference); + workingMasterNode.owner.ClearChanges(); - return feedbackNode; - } + return workingMasterNode as IMasterNode; + } } } From 3a79574d07b3175f2a0db2fd6c1ab31a1afe9626 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 4 Sep 2019 20:24:40 +0200 Subject: [PATCH 064/143] [VT] bugfix forward renderer --- .../Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl index f19499cfa44..45ffeecda80 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl @@ -67,12 +67,12 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) void Frag(PackedVaryingsToPS packedInput, #ifdef OUTPUT_SPLIT_LIGHTING out float4 outColor : SV_Target0, // outSpecularLighting - out float4 outDiffuseLighting : EXTRA_BUFFER_TARGET, + out float4 outDiffuseLighting : SV_Target1, OUTPUT_SSSBUFFER(outSSSBuffer) #else out float4 outColor : SV_Target0 #ifdef _WRITE_TRANSPARENT_MOTION_VECTOR - , out float4 outMotionVec : EXTRA_BUFFER_TARGET + , out float4 outMotionVec : SV_Target1 #endif // _WRITE_TRANSPARENT_MOTION_VECTOR #endif // OUTPUT_SPLIT_LIGHTING #ifdef _DEPTHOFFSET_ON From 65adf63fa3ce5f06c84156e8dc6e1e88d8fc8b90 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 4 Sep 2019 20:32:48 +0200 Subject: [PATCH 065/143] [VT] whitespace cleanup --- .../Fabric/ShaderGraph/FabricPass.template | 4 ++-- .../Fabric/ShaderGraph/FabricSubShader.cs | 2 +- .../Lit/ShaderGraph/HDLitPass.template | 6 +++--- .../Lit/ShaderGraph/HDLitSubShader.cs | 2 +- .../PBR/ShaderGraph/HDPBRPass.template | 2 +- .../PBR/ShaderGraph/HDPBRSubShader.cs | 1 - .../ShaderGraph/StackLitPass.template | 20 +++++++++---------- .../Unlit/ShaderGraph/HDUnlitPass.template | 2 +- .../Unlit/ShaderGraph/UnlitSubShader.cs | 3 +-- .../Editor/Data/Enumerations/PropertyType.cs | 2 +- .../Editor/Data/Util/GraphUtil.cs | 12 +++++------ .../Editor/Data/Util/ShaderGenerator.cs | 2 +- .../Editor/Data/Util/ShaderGeneratorNames.cs | 2 +- 13 files changed, 29 insertions(+), 31 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template index b52dcb563de..baf41d9ab8c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template @@ -194,7 +194,7 @@ $include("SharedCode.template.hlsl") $SurfaceDescription.SubsurfaceMask: surfaceData.subsurfaceMask = surfaceDescription.SubsurfaceMask; $SurfaceDescription.Thickness: surfaceData.thickness = surfaceDescription.Thickness; $SurfaceDescription.Anisotropy: surfaceData.anisotropy = surfaceDescription.Anisotropy; - + // These static material feature allow compile time optimization surfaceData.materialFeatures = 0; @@ -310,7 +310,7 @@ $include("SharedCode.template.hlsl") // override sampleBakedGI: $LightingGI: builtinData.bakeDiffuseLighting = surfaceDescription.BakedGI; $BackLightingGI: builtinData.backBakeDiffuseLighting = surfaceDescription.BakedBackGI; - + $DepthOffset: builtinData.depthOffset = surfaceDescription.DepthOffset; #if !defined(_SURFACE_TYPE_TRANSPARENT) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs index 3fc2839ee6c..30b3bf01002 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubShader.cs @@ -651,7 +651,7 @@ public string GetSubshader(IMasterNode iMasterNode, GenerationMode mode, List 0) builder.AppendLine(format, CoordinateSpace.Tangent.ToVariableName(interpolatorType)); - + if ((neededSpaces & NeededCoordinateSpace.AbsoluteWorld) > 0) builder.AppendLine(format, CoordinateSpace.AbsoluteWorld.ToVariableName(interpolatorType)); } diff --git a/com.unity.shadergraph/Editor/Data/Util/ShaderGeneratorNames.cs b/com.unity.shadergraph/Editor/Data/Util/ShaderGeneratorNames.cs index ea11fa3e6aa..7cd65ace15b 100644 --- a/com.unity.shadergraph/Editor/Data/Util/ShaderGeneratorNames.cs +++ b/com.unity.shadergraph/Editor/Data/Util/ShaderGeneratorNames.cs @@ -11,7 +11,7 @@ static class ShaderGeneratorNames public const string VertexColor = "VertexColor"; public const string FaceSign = "FaceSign"; public const string TimeParameters = "TimeParameters"; - public const string PixelCoordinate = "PixelCoordinate"; + public const string PixelCoordinate = "PixelCoordinate"; public static string GetUVName(this UVChannel channel) { From 4a52d4566d74b59f2b4a0eef11ba50d3112e8f2e Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Thu, 5 Sep 2019 10:56:34 +0200 Subject: [PATCH 066/143] [VT] bugfix shadergraph with no VT nodes --- .../Editor/Data/Nodes/AbstractMaterialNode.cs | 2 +- .../Nodes/Input/Texture/TextureStackNode.cs | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs index 965ba8913d1..fab5b0cb734 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs @@ -633,7 +633,7 @@ protected virtual void OnSlotsChanged() public void RemoveSlotsNameNotMatching(IEnumerable slotIds, bool supressWarnings = false) { - var invalidSlots = m_Slots.Select(x => x.id).Except(slotIds); + var invalidSlots = m_Slots.Select(x => x.id).Except(slotIds).Where( x => x != VirtualTexturingFeedback.OutputSlotID); foreach (var invalidSlot in invalidSlots.ToArray()) { diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 7d0d8779006..ef419ffca40 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -425,7 +425,7 @@ class TextureStackAggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCo public const int AggregateInputFirstId = 1; public override bool hasPreview { get { return false; } } - + public TextureStackAggregateFeedbackNode() { name = "Feedback Aggregate"; @@ -490,9 +490,9 @@ public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) static class VirtualTexturingFeedback { public const int OutputSlotID = 22021982; - + // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output - public static IMasterNode AutoInject(IMasterNode iMasterNode) + public static IMasterNode AutoInject(IMasterNode iMasterNode) { var masterNode = iMasterNode as AbstractMaterialNode; var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); @@ -500,11 +500,11 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) // Early out if there are no VT nodes in the graph if ( stackNodes.Count <= 0 ) { - return null; + return iMasterNode; } - + // Duplicate the Graph so we can modify it - var workingMasterNode = masterNode.owner.ScratchCopy().GetNodeFromGuid(masterNode.guid);// as MasterNode; + var workingMasterNode = masterNode.owner.ScratchCopy().GetNodeFromGuid(masterNode.guid); // inject VTFeedback output slot var vtFeedbackSlot = new Vector4MaterialSlot(OutputSlotID, "VTFeedback", "VTFeedback", SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); @@ -524,7 +524,7 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) if (stackFeedbackOutputSlot == null) { Debug.LogWarning("Could not find the VT feedback output slot on the stack node."); - return null; + return iMasterNode; } // Create a new slot on the aggregate that is similar to the uv input slot @@ -542,20 +542,20 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) if ( feedbackInputSlot == null ) { Debug.LogWarning("Could not find the VT feedback input slot on the master node."); - return null; + return iMasterNode; } var feedbackOutputSlot = feedbackNode.FindOutputSlot(TextureStackAggregateFeedbackNode.AggregateOutputId); if ( feedbackOutputSlot == null ) { Debug.LogWarning("Could not find the VT feedback output slot on the aggregate node."); - return null; + return iMasterNode; } workingMasterNode.owner.Connect(feedbackOutputSlot.slotReference, feedbackInputSlot.slotReference); workingMasterNode.owner.ClearChanges(); return workingMasterNode as IMasterNode; - } + } } } From 17b6613b7c5e4bb3a00ea6331460b38c821e7001 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 18 Sep 2019 13:40:47 +0200 Subject: [PATCH 067/143] [VirtualTexturing] updates to reflect changed namespace --- .../Runtime/Material/VTBufferManager.cs | 2 +- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index 38e6e20e5e6..4310516eb47 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -10,7 +10,7 @@ public class VTBufferManager RTHandle opaqueHandle = null; Vector2 m_scale = new Vector2(1.0f / (float)Scale, 1.0f / (float)Scale); - Experimental.VirtualTextureResolver m_Resolver = new Experimental.VirtualTextureResolver(); + VirtualTextureResolver m_Resolver = new VirtualTextureResolver(); public void CreateBuffers() { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index a737acfcbc4..8f8809f1000 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -2086,7 +2086,7 @@ void Callback() #if ENABLE_VIRTUALTEXTURES m_VTBufferManager.Resolve(cmd, hdCamera.actualWidth, hdCamera.actualHeight); - Experimental.VirtualTexturing.UpdateSystem(); + VirtualTexturing.UpdateSystem(); #endif // At this point, m_CameraColorBuffer has been filled by either debug views are regular rendering so we can push it here. From 67908aa30a94dc29a05e36939f9e800dadca1ace Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Fri, 20 Sep 2019 16:38:08 +0200 Subject: [PATCH 068/143] [VirtualTexturing] compile bugfix when VT is disabled --- .../Runtime/Material/VTBufferManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index 4310516eb47..6b4f75ed112 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -3,6 +3,7 @@ namespace UnityEngine.Rendering.HighDefinition { +#if ENABLE_VIRTUALTEXTURES public class VTBufferManager { const int Scale = 16; //Keep in sync with TextureStack.hlsl @@ -51,6 +52,6 @@ public void Clear(CommandBuffer cmd) { CoreUtils.SetRenderTarget(cmd, opaqueHandle.nameID, ClearFlag.Color, Color.white); } - } +#endif } From a2134b607ea147f9e197702f78fe5d2532a7f716 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Fri, 20 Sep 2019 17:07:53 +0200 Subject: [PATCH 069/143] [VirtualTexturing] compile fix for changed API --- .../Runtime/Material/VTBufferManager.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index 6b4f75ed112..42e529f64fe 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -22,16 +22,16 @@ public void CreateBuffers() public void BeginRender() { - int width = Mathf.Max(Mathf.RoundToInt(m_scale.x * RTHandles.maxWidth), 1); - int height = Mathf.Max(Mathf.RoundToInt(m_scale.y * RTHandles.maxHeight), 1); + uint width = (uint)Mathf.Max(Mathf.RoundToInt(m_scale.x * RTHandles.maxWidth), 1); + uint height = (uint)Mathf.Max(Mathf.RoundToInt(m_scale.y * RTHandles.maxHeight), 1); m_Resolver.Init(width, height); } public void Resolve(CommandBuffer cmd, int width, int height) { - int resolveWidth = Mathf.Max(Mathf.RoundToInt(m_scale.x * width), 1); - int resolveHeight = Mathf.Max(Mathf.RoundToInt(m_scale.y * height), 1); + uint resolveWidth = (uint)Mathf.Max(Mathf.RoundToInt(m_scale.x * width), 1); + uint resolveHeight = (uint)Mathf.Max(Mathf.RoundToInt(m_scale.y * height), 1); m_Resolver.Process(cmd, opaqueHandle.nameID, 0, resolveWidth, 0, resolveHeight, 0, 0); } From 23309b672b353b1febedd7902869b26aae741851 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 24 Sep 2019 15:31:44 +0200 Subject: [PATCH 070/143] Update documentation to be up to date with recent changes. --- .../ShaderLibrary/TextureStack.hlsl | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 446a6a40392..24644aae543 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -9,29 +9,29 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" -/* - This header adds the following pseudo definitions. Actual types etc may vary depending - on vt- being on or off. - struct StackInfo { opaque struct ... } - StackInfo PrepareStack(float2 uv, Stack object); - float4 SampleStack(StackInfo info, Texture tex); +/* + This header adds the following pseudo definitions. Actual types etc may vary depending + on vt- being on or off. - To use this in your materials add the following to various locations in the shader: + struct StackInfo { opaque struct ... } + StackInfo PrepareStack(float2 uv, Stack object); + float4 SampleStack(StackInfo info, Texture tex); - In shaderlab "Properties" section add: + To use this in your materials add the following to various locations in the shader: - MyFancyStack ("Fancy Stack", Stack ) = { TextureSlot1, TextureSlot2, ... } + In shaderlab "Properties" section add: - In your CGPROGRAM code for each of the passes add: + [TextureStack.MyFancyStack] DiffuseTexture ("DiffuseTexture", 2D) = "white" {} + [TextureStack.MyFancyStack] NormalTexture ("NormalTexture", 2D) = "white" {} - #pragma shader_feature_local VIRTUAL_TEXTURES_BUILT + This will declare a texture stack with two shaders. Then add the following to the PerMaterial constant buffer: CBUFFER_START(UnityPerMaterial) ... - DECLARE_STACK_CB + DECLARE_STACK_CB(MyFancyStack) ... CBUFFER_END @@ -39,30 +39,29 @@ ... - DECLARE_STACK(MyFancyStack, TextureSlot1) - or - DECLARE_STACK2(MyFancyStack, TextureSlot1, TextureSlot2) - or - DECLARE_STACK3(MyFancyStack, TextureSlot1, TextureSlot2, TextureSlot2) - etc... + DECLARE_STACK(MyFancyStack, DiffuseTexture) + or + DECLARE_STACK2(MyFancyStack, DiffuseTexture, NormalTexture) + or + DECLARE_STACK3(MyFancyStack, TextureSlot1, TextureSlot2, TextureSlot2) + etc... - NOTE: The Stack shaderlab property and DECLARE_STACKn define need to match i.e. the same name and same texture slots. + NOTE: The Stack shaderlab property and DECLARE_STACKn define need to match i.e. the same name and same texture slots. - Then in the pixel shader function (likely somewhere at the beginning) do a call: + Then in the pixel shader function (likely somewhere at the beginning) do a call: - StackInfo info = PrepareStack(MyFancyStack, uvs); + StackInfo info = PrepareStack(uvs, MyFancyStack); - Then later on when you want to sample the actual texture do a call(s): + Then later on when you want to sample the actual texture do a call(s): - float4 color = SampleStack(info, TextureSlot1); - float4 color2 = SampleStack(info, TextureSlot2); - ... + float4 color = SampleStack(info, TextureSlot1); + float4 color2 = SampleStack(info, TextureSlot2); + ... - The above steps can be repeated for multiple stacks. But be sure that when using the SampleStack you always - pass in the result of the PrepareStack for the correct stack the texture belongs to. + The above steps can be repeated for multiple stacks. But be sure that when using the SampleStack you always + pass in the result of the PrepareStack for the correct stack the texture belongs to. */ - // A note about the on/off defines // UNITY_VIRTUAL_TEXTURING current project is configured to use VT this is something even non vt materials may need to be aware of (e.g. different gbuffer layout used etc...) // VIRTUAL_TEXTURES_ACTIVE vt data is built and enabled so the current shader should actively use VT sampling @@ -219,7 +218,7 @@ float4 ResolveVT_##stackName(float2 uv)\ #define PrepareStack(uv, stackName) PrepareVT_##stackName(uv) #define SampleStack(info, textureName) SampleVT_##textureName(info) #define SampleStack_Normal(info, textureName, scale) SampleVT_Normal_##textureName(info, scale) -#define GetResolveOutput(info) info.resolveOutput +#define GetResolveOutput(info) Granite_PackTileId(info.resolveOutput) #define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) RW_TEXTURE2D(float4, VTFeedback) : register(u7); From b630eb9ae29b1ac6614b1e214b981522af22bc27 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Thu, 26 Sep 2019 11:30:09 +0200 Subject: [PATCH 071/143] [VirtualTexturing] VTFeedback is (again) using an MRT setup. This ensures maximum platform support/performance --- .../Runtime/Textures/RTHandle.cs | 2 + .../ShaderLibrary/TextureStack.hlsl | 14 +-- .../Runtime/Material/GBufferManager.cs | 20 ++++ .../Runtime/Material/Lit/Lit.cs | 13 ++- .../Runtime/Material/Lit/Lit.hlsl | 24 ++++- .../Material/MaterialGBufferMacros.hlsl | 2 +- .../SubsurfaceScattering.hlsl | 9 +- .../Runtime/Material/VTBufferManager.cs | 93 ++++++++++++++----- .../RenderPipeline/HDRenderPipeline.cs | 85 ++++++++++++----- .../RenderPipeline/RenderPipelineResources.cs | 4 + .../ShaderPass/ShaderPassForward.hlsl | 19 +++- .../ShaderPass/ShaderPassForwardUnlit.hlsl | 9 +- .../ShaderPass/ShaderPassGBuffer.hlsl | 7 -- .../HDRenderPipelineResources.asset | 2 + .../DownsampleVTFeedback.compute | 43 +++++++++ .../DownsampleVTFeedback.compute.meta | 8 ++ 16 files changed, 272 insertions(+), 82 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute create mode 100644 com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta diff --git a/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs b/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs index 9b8a18c14a5..ccde53dd930 100644 --- a/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs +++ b/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs @@ -28,6 +28,8 @@ public class RTHandle public string name { get { return m_Name; } } + public bool enableMSAA { get { return m_EnableMSAA; } } + // Keep constructor private internal RTHandle(RTHandleSystem owner) { diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 446a6a40392..3f247fa08d6 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -222,17 +222,9 @@ float4 ResolveVT_##stackName(float2 uv)\ #define GetResolveOutput(info) info.resolveOutput #define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) -RW_TEXTURE2D(float4, VTFeedback) : register(u7); -#define VTFeedbackScale 16 -void StoreVTFeedback(float4 feedback, uint2 positionSS) +void GetPackedVTFeedback(float4 feedback) { - [branch] - if ( (positionSS.x & (VTFeedbackScale - 1)) == 0 && (positionSS.y & (VTFeedbackScale - 1)) == 0) - { - - const uint2 vt_pos = positionSS / VTFeedbackScale; - VTFeedback[vt_pos] = Granite_PackTileId(feedback); - } + return Granite_PackTileId(feedback); } #else @@ -269,7 +261,7 @@ StackInfo MakeStackInfo(float2 uv) // Resolve does nothing #define GetResolveOutput(info) float4(1,1,1,1) #define ResolveStack(uv, stackName) float4(1,1,1,1) -#define StoreVTFeedback(feedback, positionSS) +#define GetPackedVTFeedback(feedback) #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs index 64dbdbc57c2..1f9882fbe06 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GBufferManager.cs @@ -10,6 +10,9 @@ enum GBufferUsage Normal, LightLayers, ShadowMask + #if ENABLE_VIRTUALTEXTURES + ,VTFeedback + #endif } class GBufferManager : MRTBufferManager @@ -20,6 +23,9 @@ class GBufferManager : MRTBufferManager // This is the index of the gbuffer use for shadowmask and lightlayers, if any protected int m_ShadowMaskIndex = -1; protected int m_LightLayers = -1; + #if ENABLE_VIRTUALTEXTURES + protected int m_VTFeedbackIndex = -1; + #endif protected HDRenderPipelineAsset m_asset; // We need to store current set of RT to bind exactly, as we can have dynamic RT (LightLayers, ShadowMask), we allocated an array for each possible size (to avoid gardbage collect pressure) protected RenderTargetIdentifier[][] m_RTIDsArray = new RenderTargetIdentifier[8][]; @@ -54,6 +60,10 @@ public override void CreateBuffers() m_ShadowMaskIndex = gbufferIndex; else if (m_GBufferUsage[gbufferIndex] == GBufferUsage.LightLayers) m_LightLayers = gbufferIndex; +#if ENABLE_VIRTUALTEXTURES + else if (m_GBufferUsage[gbufferIndex] == GBufferUsage.VTFeedback) + m_VTFeedbackIndex = gbufferIndex; +#endif } } @@ -147,5 +157,15 @@ public RTHandle GetSubsurfaceScatteringBuffer(int index) return null; } +#if ENABLE_VIRTUALTEXTURES + public RTHandle GetVTFeedbackBuffer() + { + if (m_VTFeedbackIndex != -1) + { + return m_RTs[m_VTFeedbackIndex]; + } + return null; + } +#endif } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs index e5db2dc20d3..c4646fee86b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs @@ -197,6 +197,9 @@ protected void GetGBufferOptions(HDRenderPipelineAsset asset, out int gBufferCou supportShadowMask = asset.currentPlatformRenderPipelineSettings.supportShadowMask; supportLightLayers = asset.currentPlatformRenderPipelineSettings.supportLightLayers; gBufferCount = 4 + (supportShadowMask ? 1 : 0) + (supportLightLayers ? 1 : 0); +#if ENABLE_VIRTUALTEXTURES + gBufferCount++; +#endif } // This must return the number of GBuffer to allocate @@ -234,7 +237,15 @@ public override void GetMaterialGBufferDescription(HDRenderPipelineAsset asset, gBufferUsage[3] = GBufferUsage.None; enableWrite[3] = true; - int index = 4; + #if ENABLE_VIRTUALTEXTURES + int index = 4; + RTFormat[index] = VTBufferManager.GetFeedbackBufferFormat(); + gBufferUsage[index] = GBufferUsage.VTFeedback; + enableWrite[index] = false; + index++; + #else + int index = 4; + #endif if (supportLightLayers) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index b320e15c238..d31b7ff59bf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -57,13 +57,22 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k // Definition //----------------------------------------------------------------------------- +#if VIRTUAL_TEXTURES_ACTIVE +#define OUT_GBUFFER_VTFEEDBACK outGBuffer4 +#define OUT_GBUFFER_OPTIONAL_SLOT_1 outGBuffer5 +#define OUT_GBUFFER_OPTIONAL_SLOT_2 outGBuffer6 +#else +#define OUT_GBUFFER_OPTIONAL_SLOT_1 outGBuffer4 +#define OUT_GBUFFER_OPTIONAL_SLOT_2 outGBuffer5 +#endif + #if defined(LIGHT_LAYERS) && defined(SHADOWS_SHADOWMASK) -#define OUT_GBUFFER_LIGHT_LAYERS outGBuffer4 -#define OUT_GBUFFER_SHADOWMASK outGBuffer5 +#define OUT_GBUFFER_LIGHT_LAYERS OUT_GBUFFER_OPTIONAL_SLOT_1 +#define OUT_GBUFFER_SHADOWMASK OUT_GBUFFER_OPTIONAL_SLOT_2 #elif defined(LIGHT_LAYERS) -#define OUT_GBUFFER_LIGHT_LAYERS outGBuffer4 +#define OUT_GBUFFER_LIGHT_LAYERS OUT_GBUFFER_OPTIONAL_SLOT_1 #elif defined(SHADOWS_SHADOWMASK) -#define OUT_GBUFFER_SHADOWMASK outGBuffer4 +#define OUT_GBUFFER_SHADOWMASK OUT_GBUFFER_OPTIONAL_SLOT_1 #endif #define HAS_REFRACTION (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE)) @@ -512,6 +521,9 @@ void EncodeIntoGBuffer( SurfaceData surfaceData #endif #if GBUFFERMATERIAL_COUNT > 5 , out GBufferType5 outGBuffer5 +#endif +#if GBUFFERMATERIAL_COUNT > 6 + , out GBufferType5 outGBuffer6 #endif ) { @@ -617,6 +629,10 @@ void EncodeIntoGBuffer( SurfaceData surfaceData #ifdef SHADOWS_SHADOWMASK OUT_GBUFFER_SHADOWMASK = BUILTIN_DATA_SHADOW_MASK; #endif + +#if VIRTUAL_TEXTURES_ACTIVE + OUT_GBUFFER_VTFEEDBACK = GetPackedVTFeedback(builtinData.vtFeedback); +#endif } // Fills the BSDFData. Also returns the (per-pixel) material feature flags inferred diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl index 528862c5603..ca657e34590 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl @@ -34,7 +34,7 @@ #define GBUFFER_LIT_IRIDESCENCE 5 // TODO // Caution: This must be in sync with Lit.cs GetMaterialGBufferCount() -#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK) +#define GBUFFERMATERIAL_COUNT (4 + VIRTUAL_TEXTURES_ACTIVE + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK) // Only one deferred layout is allowed for a HDRenderPipeline, this will be detect by the redefinition of GBUFFERMATERIAL_COUNT // If GBUFFERMATERIAL_COUNT is define two time, the shaders will not compile diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl index 86c3f476025..76d9806ccff 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl @@ -91,8 +91,13 @@ void DecodeFromSSSBuffer(uint2 positionSS, out SSSData sssData) DecodeFromSSSBuffer(sssBuffer, positionSS, sssData); } -// OUTPUT_SSSBUFFER start from SV_Target2 as SV_Target0 and SV_Target1 are used for lighting buffer -#define OUTPUT_SSSBUFFER(NAME) out SSSBufferType0 MERGE_NAME(NAME, 0) : SV_Target2 +// OUTPUT_SSSBUFFER start from SV_Target2 as SV_Target0 and SV_Target1 are used for lighting buffer, shifts to SV_Target3 if VT is enabled +#if VIRTUAL_TEXTURES_ACTIVE + #define OUTPUT_SSSBUFFER(NAME) out SSSBufferType0 MERGE_NAME(NAME, 0) : SV_Target3 +#else + #define OUTPUT_SSSBUFFER(NAME) out SSSBufferType0 MERGE_NAME(NAME, 0) : SV_Target2 +#endif + #define ENCODE_INTO_SSSBUFFER(SURFACE_DATA, UNPOSITIONSS, NAME) EncodeIntoSSSBuffer(ConvertSurfaceDataToSSSData(SURFACE_DATA), UNPOSITIONSS, MERGE_NAME(NAME, 0)) #define DECODE_FROM_SSSBUFFER(UNPOSITIONSS, SSS_DATA) DecodeFromSSSBuffer(UNPOSITIONSS, SSS_DATA) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index 42e529f64fe..b4fb8df87a1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -6,52 +6,97 @@ namespace UnityEngine.Rendering.HighDefinition #if ENABLE_VIRTUALTEXTURES public class VTBufferManager { - const int Scale = 16; //Keep in sync with TextureStack.hlsl - - RTHandle opaqueHandle = null; - Vector2 m_scale = new Vector2(1.0f / (float)Scale, 1.0f / (float)Scale); + public static GraphicsFormat GetFeedbackBufferFormat() + { + return GraphicsFormat.R8G8B8A8_UNorm; + } + RTHandle m_VTFeedbackBufferMSAA; VirtualTextureResolver m_Resolver = new VirtualTextureResolver(); + public static int AdditionalForwardRT = 1; + int resolveScale = 16; + RTHandle lowresResolver; + ComputeShader downSampleCS; + + public VTBufferManager(HDRenderPipelineAsset asset) + { + downSampleCS = asset.renderPipelineResources.shaders.VTFeedbackDownsample; + } - public void CreateBuffers() + public void CreateBuffers(RenderPipelineSettings settings) { - opaqueHandle = RTHandles.Alloc(m_scale, TextureXR.slices, - colorFormat: GraphicsFormat.R8G8B8A8_UNorm, useDynamicScale: false, - name: "VTFeedbackBuffer_opaque", enableRandomWrite: true); + if (settings.supportMSAA || settings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) + { + // Our processing handles both MSAA and regular buffers so we don't need to explicitly resolve here saving a buffer + m_VTFeedbackBufferMSAA = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, + enableMSAA: true, useDynamicScale: true, name: "VTFeedbackForwardMSAA"); + } } - public void BeginRender() + public void BeginRender(int width, int height) { - uint width = (uint)Mathf.Max(Mathf.RoundToInt(m_scale.x * RTHandles.maxWidth), 1); - uint height = (uint)Mathf.Max(Mathf.RoundToInt(m_scale.y * RTHandles.maxHeight), 1); + GetResolveDimensions(ref width, ref height); + + if (width != m_Resolver.CurrentWidth || width != m_Resolver.CurrentHeight) + { + RTHandles.Release(lowresResolver); + } + lowresResolver = RTHandles.Alloc(width, height, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, enableRandomWrite: true, autoGenerateMips: false, name: "VTFeedback lowres"); + - m_Resolver.Init(width, height); + m_Resolver.Init((uint)width, (uint)height); } - public void Resolve(CommandBuffer cmd, int width, int height) + public void Resolve(CommandBuffer cmd, RTHandle rt, int width, int height) { - uint resolveWidth = (uint)Mathf.Max(Mathf.RoundToInt(m_scale.x * width), 1); - uint resolveHeight = (uint)Mathf.Max(Mathf.RoundToInt(m_scale.y * height), 1); + if (rt != null) + { + ResolveVTDispatch(cmd, rt, width, height ); + } - m_Resolver.Process(cmd, opaqueHandle.nameID, 0, resolveWidth, 0, resolveHeight, 0, 0); + if (m_VTFeedbackBufferMSAA != null) + { + ResolveVTDispatch(cmd, m_VTFeedbackBufferMSAA, width, height ); + } } - public void DestroyBuffers() + void ResolveVTDispatch(CommandBuffer cmd, RTHandle buffer, int width, int height) { - RTHandles.Release(opaqueHandle); - opaqueHandle = null; - m_Resolver.Dispose(); + string mainFunction = (buffer.enableMSAA) ? "KMainMSAA" : "KMain"; + + int kernel = downSampleCS.FindKernel(mainFunction); + cmd.SetComputeTextureParam(downSampleCS, kernel, HDShaderIDs._InputTexture, buffer.nameID); + cmd.SetComputeTextureParam(downSampleCS, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); + var resolveCounter = 0; + var startOffsetX = (resolveCounter % resolveScale); + var startOffsetY = (resolveCounter / resolveScale) % resolveScale; + cmd.SetComputeVectorParam(downSampleCS, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); + var TGSize = 8; + cmd.DispatchCompute(downSampleCS, kernel, ((int)width + (TGSize - 1)) / TGSize, ((int)height + (TGSize - 1)) / TGSize, 1); + + GetResolveDimensions(ref width, ref height); + m_Resolver.Process(cmd, lowresResolver.nameID, 0, (uint)width, 0, (uint)height, 0, 0); } - public RenderTargetIdentifier GetOpaqueRTI() + void GetResolveDimensions(ref int w, ref int h) { - return opaqueHandle.nameID; + w = (w + (resolveScale - 1)) / resolveScale; + h = (h + (resolveScale - 1)) / resolveScale; } - public void Clear(CommandBuffer cmd) + public void DestroyBuffers() { - CoreUtils.SetRenderTarget(cmd, opaqueHandle.nameID, ClearFlag.Color, Color.white); + RTHandles.Release(m_VTFeedbackBufferMSAA); + m_VTFeedbackBufferMSAA = null; + m_Resolver.Dispose(); } + + public RTHandle GetForwardMSAABuffer() + { + return m_VTFeedbackBufferMSAA; + } + + } #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 8f8809f1000..13ef8a1fdae 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -74,7 +74,7 @@ static Volume GetOrCreateDefaultVolume() readonly GBufferManager m_GbufferManager; readonly DBufferManager m_DbufferManager; #if ENABLE_VIRTUALTEXTURES - readonly VTBufferManager m_VTBufferManager; + readonly VTBufferManager m_VtBufferManager; #endif readonly SharedRTManager m_SharedRTManager = new SharedRTManager(); readonly PostProcessSystem m_PostProcessSystem; @@ -247,7 +247,12 @@ internal int GetMaxScreenSpaceShadows() Stack m_ProbeCameraPool = new Stack(); RenderTargetIdentifier[] m_MRTTransparentMotionVec; - RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3]; // Specular, (optional) VT, diffuse, sss buffer; +#if ENABLE_VIRTUALTEXTURES + RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3 + VTBufferManager.AdditionalForwardRT]; // Specular, (optional) VT, diffuse, sss buffer; note: vt is alway on slot 1 to keep in sync with unlit. + RenderTargetIdentifier[] m_MRTWithVTFeedback = new RenderTargetIdentifier[2]; +#else + RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3]; // Specular, diffuse, sss buffer; +#endif RenderTargetIdentifier[] mMRTSingle = new RenderTargetIdentifier[1]; string m_ForwardPassProfileName; @@ -333,9 +338,7 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau m_GbufferManager = new GBufferManager(asset, m_DeferredMaterial); m_DbufferManager = new DBufferManager(asset.currentPlatformRenderPipelineSettings.decalSettings.perChannelMask); -#if ENABLE_VIRTUALTEXTURES - m_VTBufferManager = new VTBufferManager(); -#endif + m_VtBufferManager = new VTBufferManager(asset); m_SharedRTManager.Build(asset); m_PostProcessSystem = new PostProcessSystem(asset, defaultResources); @@ -413,7 +416,7 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau #else Debug.Log("Scriptable renderpipeline VT disabled"); #endif - m_MRTTransparentMotionVec = new RenderTargetIdentifier[2]; + m_MRTTransparentMotionVec = new RenderTargetIdentifier[2 + VTBufferManager.AdditionalForwardRT]; #if ENABLE_RAYTRACING m_RayTracingManager.Init(m_Asset.currentPlatformRenderPipelineSettings, m_Asset.renderPipelineResources, m_Asset.renderPipelineRayTracingResources, m_BlueNoise, this, m_SharedRTManager, m_DebugDisplaySettings); InitRayTracedReflections(); @@ -502,7 +505,7 @@ void InitializeRenderTextures() m_DbufferManager.CreateBuffers(); #if ENABLE_VIRTUALTEXTURES - m_VTBufferManager.CreateBuffers(); + m_VtBufferManager.CreateBuffers(settings); #endif InitSSSBuffers(); @@ -550,7 +553,7 @@ void DestroyRenderTextures() m_GbufferManager.DestroyBuffers(); m_DbufferManager.DestroyBuffers(); #if ENABLE_VIRTUALTEXTURES - m_VTBufferManager.DestroyBuffers(); + m_VtBufferManager.DestroyBuffers(); #endif m_MipGenerator.Release(); @@ -1636,7 +1639,7 @@ AOVRequestData aovRequest hdCamera.BeginRender(); #if ENABLE_VIRTUALTEXTURES - m_VTBufferManager.BeginRender(); + m_VtBufferManager.BeginRender(hdCamera.actualWidth, hdCamera.actualHeight); #endif using (ListPool.Get(out var aovBuffers)) @@ -2085,7 +2088,7 @@ void Callback() } #if ENABLE_VIRTUALTEXTURES - m_VTBufferManager.Resolve(cmd, hdCamera.actualWidth, hdCamera.actualHeight); + m_VtBufferManager.Resolve(cmd, m_GbufferManager.GetVTFeedbackBuffer(), hdCamera.actualWidth, hdCamera.actualHeight); VirtualTexturing.UpdateSystem(); #endif @@ -2820,9 +2823,6 @@ void RenderGBuffer(CullingResults cull, HDCamera hdCamera, ScriptableRenderConte using (new ProfilingSample(cmd, m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() ? "GBuffer Debug" : "GBuffer", CustomSamplerId.GBuffer.GetSampler())) { // setup GBuffer for rendering -#if ENABLE_VIRTUALTEXTURES - cmd.SetRandomWriteTarget(7, m_VTBufferManager.GetOpaqueRTI()); -#endif CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetBuffersRTI(hdCamera.frameSettings), m_SharedRTManager.GetDepthStencilBuffer()); @@ -3121,19 +3121,27 @@ void RenderForwardOpaque(CullingResults cullResults, HDCamera hdCamera, Scriptab { renderTarget = m_MRTWithSSS; renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; // Store the specular color - renderTarget[1] = msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer; - renderTarget[2] = msaa ? GetSSSBufferMSAA() : GetSSSBuffer(); + +#if ENABLE_VIRTUALTEXTURES + renderTarget[1] = GetVTFeedbackBufferForForward(hdCamera); + const int offset = 2; +#else + const int offset = 1; +#endif + renderTarget[offset+0] = msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer; + renderTarget[offset+1] = msaa ? GetSSSBufferMSAA() : GetSSSBuffer(); } else { - +#if ENABLE_VIRTUALTEXTURES + renderTarget = m_MRTWithVTFeedback; + renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; + renderTarget[1] = GetVTFeedbackBufferForForward(hdCamera); +#else renderTarget = mMRTSingle; renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; - } - -#if ENABLE_VIRTUALTEXTURES - cmd.SetRandomWriteTarget(7, m_VTBufferManager.GetOpaqueRTI()); #endif + } RenderForwardRendererList(hdCamera.frameSettings, RendererList.Create(PrepareForwardOpaqueRendererList(cullResults, hdCamera)), @@ -3208,7 +3216,14 @@ void RenderForwardTransparent(CullingResults cullResults, HDCamera hdCamera, boo cmd.SetGlobalInt(HDShaderIDs._ColorMaskTransparentVel, renderMotionVecForTransparent ? (int)ColorWriteMask.All : 0); m_MRTTransparentMotionVec[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; - m_MRTTransparentMotionVec[1] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) + +#if ENABLE_VIRTUALTEXTURES + m_MRTTransparentMotionVec[1] = GetVTFeedbackBufferForForward(hdCamera); + const int offset = 2; +#else + const int offset = 1; +#endif + m_MRTTransparentMotionVec[offset] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) // It doesn't really matter what gets bound here since the color mask state set will prevent this from ever being written to. However, we still need to bind something // to avoid warnings about unbound render targets. The following rendertarget could really be anything if renderVelocitiesForTransparent, here the normal buffer // as it is guaranteed to exist and to have the same size. @@ -3957,7 +3972,19 @@ void ClearBuffers(HDCamera hdCamera, CommandBuffer cmd) #if ENABLE_VIRTUALTEXTURES using (new ProfilingSample(cmd, "Clear VTFeedback Buffers", CustomSamplerId.VTFeedbackClear.GetSampler())) { - m_VTBufferManager.Clear(cmd); + RTHandle alreadyCleared = null; + if (m_GbufferManager?.GetVTFeedbackBuffer() != null) + { + alreadyCleared = m_GbufferManager.GetVTFeedbackBuffer(); + CoreUtils.SetRenderTarget(cmd, alreadyCleared, ClearFlag.Color, Color.white); + + } + + // If the forward buffer is different from the GBuffer clear it also + if (GetVTFeedbackBufferForForward(hdCamera) != alreadyCleared) + { + CoreUtils.SetRenderTarget(cmd, GetVTFeedbackBufferForForward(hdCamera), ClearFlag.Color, Color.white); + } } #endif @@ -4115,5 +4142,19 @@ RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) VFXManager.SetCameraBuffer(hdCamera.camera, VFXCameraBufferTypes.Color, colorBuffer, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight); } } + +#if ENABLE_VIRTUALTEXTURES + RTHandle GetVTFeedbackBufferForForward(HDCamera hdCamera) + { + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) + { + return m_VtBufferManager.GetForwardMSAABuffer(); + } + else + { + return m_GbufferManager.GetVTFeedbackBuffer(); + } + } +#endif } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs index 258b72663a5..f53f4170cfd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs @@ -233,6 +233,10 @@ public sealed class ShaderResources public Shader temporalAntialiasingPS; [Reload("Runtime/PostProcessing/Shaders/CopyTAAHistory.compute")] public ComputeShader CopyTAAHistoryCS; +#if ENABLE_VIRTUALTEXTURES + [Reload("Runtime/ShaderLibrary/DownsampleVTFeedback.compute")] + public ComputeShader VTFeedbackDownsample; +#endif // Iterator to retrieve all compute shaders in reflection so we don't have to keep a list of // used compute shaders up to date (prefer editor-only usage) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl index 45ffeecda80..b622d1d4e27 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl @@ -60,19 +60,28 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/TessellationShare.hlsl" #endif -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #if VIRTUAL_TEXTURES_ACTIVE -[earlydepthstencil] +#define VT_BUFFER_TARGET SV_Target1 +#define EXTRA_BUFFER_TARGET SV_Target2 +#else +#define EXTRA_BUFFER_TARGET SV_Target1 #endif + void Frag(PackedVaryingsToPS packedInput, #ifdef OUTPUT_SPLIT_LIGHTING out float4 outColor : SV_Target0, // outSpecularLighting - out float4 outDiffuseLighting : SV_Target1, + #if VIRTUAL_TEXTURES_ACTIVE + out float4 outVTFeedback : VT_BUFFER_TARGET, + #endif + out float4 outDiffuseLighting : EXTRA_BUFFER_TARGET, OUTPUT_SSSBUFFER(outSSSBuffer) #else out float4 outColor : SV_Target0 + #if VIRTUAL_TEXTURES_ACTIVE + ,out float4 outVTFeedback : VT_BUFFER_TARGET + #endif #ifdef _WRITE_TRANSPARENT_MOTION_VECTOR - , out float4 outMotionVec : SV_Target1 + , out float4 outMotionVec : EXTRA_BUFFER_TARGET #endif // _WRITE_TRANSPARENT_MOTION_VECTOR #endif // OUTPUT_SPLIT_LIGHTING #ifdef _DEPTHOFFSET_ON @@ -225,6 +234,6 @@ void Frag(PackedVaryingsToPS packedInput, #endif #if VIRTUAL_TEXTURES_ACTIVE - StoreVTFeedback(builtinData.vtFeedback, posInput.positionSS); + outVTFeedback = GetPackedVTFeedback(builtinData.vtFeedback); #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl index 911eadc27e5..84d3f3f5dd4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl @@ -24,12 +24,11 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) #endif // TESSELLATION_ON -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" -#if VIRTUAL_TEXTURES_ACTIVE -[earlydepthstencil] -#endif void Frag(PackedVaryingsToPS packedInput, out float4 outResult : SV_Target0 +#if VIRTUAL_TEXTURES_ACTIVE + ,out float4 outVTFeedback : SV_Target1 +#endif ) { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); @@ -95,6 +94,6 @@ void Frag(PackedVaryingsToPS packedInput, outResult = outColor; #if VIRTUAL_TEXTURES_ACTIVE - StoreVTFeedback(builtinData.vtFeedback, posInput.positionSS); + outVTFeedback = GetPackedVTFeedback(builtinData.vtFeedback); #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl index 0736022f51d..aacfad5bb7a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl @@ -24,10 +24,6 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) #endif // TESSELLATION_ON -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" -#if VIRTUAL_TEXTURES_ACTIVE -[earlydepthstencil] -#endif void Frag( PackedVaryingsToPS packedInput, OUTPUT_GBUFFER(outGBuffer) #ifdef _DEPTHOFFSET_ON @@ -58,7 +54,4 @@ void Frag( PackedVaryingsToPS packedInput, outputDepth = posInput.deviceDepth; #endif -#if VIRTUAL_TEXTURES_ACTIVE - StoreVTFeedback(builtinData.vtFeedback, posInput.positionSS); -#endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/HDRenderPipelineResources.asset b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/HDRenderPipelineResources.asset index bf725f8d4df..f40aa761b7e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/HDRenderPipelineResources.asset +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/HDRenderPipelineResources.asset @@ -159,6 +159,8 @@ MonoBehaviour: temporalAntialiasingPS: {fileID: 4800000, guid: d22a37b5c800a0040a87b2a58de74e13, type: 3} CopyTAAHistoryCS: {fileID: 7200000, guid: c275ad6555b51e54599ef9f39d199907, type: 3} + VTFeedbackDownsample: {fileID: 7200000, guid: 32d963548086c2c439aeb23a93e9a00a, + type: 3} textures: debugFontTex: {fileID: 2800000, guid: a3ad2df0e49aaa341a3b3a80f93b3f66, type: 3} colorGradient: {fileID: 2800000, guid: 4ea52e665573c1644bf05dd9b11fd2a4, type: 3} diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute new file mode 100644 index 00000000000..703a52aba3e --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute @@ -0,0 +1,43 @@ +// Each #kernel tells which function to compile; you can have many kernels +#pragma kernel KMain +#pragma kernel KMainMSAA + +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" + +RW_TEXTURE2D(float4, _OutputTexture); +TEXTURE2D_X(_InputTexture); +TEXTURE2D_X_MSAA(float4, _InputTextureMSAA); + +CBUFFER_START(cb0) + float4 _Params; +CBUFFER_END + +#define Scale _Params.x +#define startOffsetX _Params.y +#define startOffsetY _Params.z + +static const uint TGSize = 8; + +[numthreads(TGSize, TGSize, 1)] +void KMain(uint3 dispatchThreadId : SV_DispatchThreadID) +{ + const uint2 samplePos = dispatchThreadId.xy; + const uint2 startOffset = uint2(startOffsetX, startOffsetY); + const uint2 offset = (startOffset + samplePos) % Scale; + + float4 value = LOAD_TEXTURE2D_X(_InputTexture, samplePos * Scale + offset); + _OutputTexture[samplePos] = value; +} + +[numthreads(TGSize, TGSize, 1)] +void KMainMSAA(uint3 dispatchThreadId : SV_DispatchThreadID) +{ + const uint2 samplePos = dispatchThreadId.xy; + const uint2 startOffset = uint2(startOffsetX, startOffsetY); + const uint2 offset = (startOffset + samplePos) % Scale; + + float4 value = LOAD_TEXTURE2D_X_MSAA(_InputTextureMSAA, samplePos * Scale + offset, 0); + _OutputTexture[samplePos] = value; +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta new file mode 100644 index 00000000000..e18ec83f2ff --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 32d963548086c2c439aeb23a93e9a00a +ComputeShaderImporter: + externalObjects: {} + currentAPIMask: 4 + userData: + assetBundleName: + assetBundleVariant: From dffdb8f65f2cf480244d99b075a70a763806f5bc Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Fri, 27 Sep 2019 12:05:36 +0200 Subject: [PATCH 072/143] [VirtualTexturing] Compile bugfix + fix bad merge --- .../Editor/ShaderGraph/HDSubShaderUtilities.cs | 2 +- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs index fdbc86c6834..6fd00754b2f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs @@ -53,7 +53,7 @@ internal struct VaryingsMeshToPS [Optional] Vector4 texCoord3; [Optional] Vector4 color; [Semantic("CUSTOM_INSTANCE_ID")] [PreprocessorIf("UNITY_ANY_INSTANCING_ENABLED")] uint instanceID; - [Semantic("FRONT_FACE_SEMANTIC")][OverrideType("FRONT_FACE_TYPE")][PreprocessorIf("defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)")] bool cullFace; + [Semantic("FRONT_FACE_SEMANTIC")][SystemGenerated][OverrideType("FRONT_FACE_TYPE")][PreprocessorIf("defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)")] bool cullFace; [Optional] Vector4 pixelCoordinate; public static Dependency[] tessellationDependencies = new Dependency[] diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index d66f15ee700..052ac588622 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -378,7 +378,9 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau m_GbufferManager = new GBufferManager(asset, m_DeferredMaterial); m_DbufferManager = new DBufferManager(asset.currentPlatformRenderPipelineSettings.decalSettings.perChannelMask); +#if ENABLE_VIRTUALTEXTURES m_VtBufferManager = new VTBufferManager(asset); +#endif m_SharedRTManager.Build(asset); m_PostProcessSystem = new PostProcessSystem(asset, defaultResources); @@ -453,10 +455,11 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau #if ENABLE_VIRTUALTEXTURES Debug.Log("Scriptable renderpipeline VT enabled"); + m_MRTTransparentMotionVec = new RenderTargetIdentifier[2 + VTBufferManager.AdditionalForwardRT]; #else Debug.Log("Scriptable renderpipeline VT disabled"); + m_MRTTransparentMotionVec = new RenderTargetIdentifier[2]; #endif - m_MRTTransparentMotionVec = new RenderTargetIdentifier[2 + VTBufferManager.AdditionalForwardRT]; #if ENABLE_RAYTRACING m_RayTracingManager.Init(m_Asset.currentPlatformRenderPipelineSettings, m_Asset.renderPipelineResources, m_Asset.renderPipelineRayTracingResources, m_BlueNoise, this, m_SharedRTManager, m_DebugDisplaySettings); InitRayTracedReflections(); From 40e1dad5bb648922bbe1a5d9e488bfb12e884c22 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 27 Sep 2019 13:00:03 +0200 Subject: [PATCH 073/143] Fix preview shader compile errors missing "_atlasparams" variables. --- .../Editor/Data/Nodes/Input/Texture/TextureStackNode.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 655cca23933..60ff6d21338 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -226,17 +226,13 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener properties.AddShaderProperty(new StackShaderProperty() { - overrideReferenceName = stackName, - generatePropertyBlock = true, - modifiable = false, + overrideReferenceName = stackName + "_cb", slotNames = slotNames }); properties.AddShaderProperty(new StackShaderProperty() { - overrideReferenceName = stackName + "_cb", - generatePropertyBlock = true, - modifiable = false, + overrideReferenceName = stackName, slotNames = slotNames }); } From ffff419bf785321c1a06ad6cb499fdec8abcb4c4 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 30 Sep 2019 08:44:33 +0200 Subject: [PATCH 074/143] Cleanup StackShaderProperty --- .../Editor/Data/Graphs/StackShaderProperty.cs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs index 3d7281d4115..b182200f972 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs @@ -11,14 +11,12 @@ namespace UnityEditor.ShaderGraph // Node a StackShaderProperty has no user settable values it is only used to ensure correct data is emitted into the shader. So we use a dummy value of "int" type. class StackShaderProperty : AbstractShaderProperty { - [SerializeField] - private bool m_Modifiable = false; - public StackShaderProperty() { displayName = "Stack"; slotNames = new List(); slotNames.Add("Dummy"); + generatePropertyBlock = false; } public override PropertyType propertyType @@ -26,12 +24,6 @@ public override PropertyType propertyType get { return PropertyType.Vector1; } } - public bool modifiable - { - get { return m_Modifiable; } - set { m_Modifiable = value; } - } - internal override bool isBatchable { get { return referenceName.EndsWith("_cb"); } @@ -39,12 +31,12 @@ internal override bool isBatchable internal override bool isRenamable { - get { return true; } + get { return false; } } internal override bool isExposable { - get { return true; } + get { return false; } } public List slotNames; @@ -64,12 +56,13 @@ private string GetSlotNamesString(string delimiter=",") internal override string GetPropertyBlockString() { - return ""; //A stack only has variables declared in the actual shader not in the shaderlab wrapper code + return ""; } internal override string GetPropertyDeclarationString(string delimiter = ";") { - // This node needs to generate some properties both in batched as in unbatched mode + // This just emits a define which declares several property variables. We split here over things that fit in a constant buffer + // (i.e. float arrays) and thing that don't (texture samplers). int numSlots = slotNames.Count; if (referenceName.EndsWith("_cb")) From 113d672175378c134ae67077f6e0fe6e7757e6dc Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Mon, 30 Sep 2019 12:13:36 +0200 Subject: [PATCH 075/143] [VirtualTexturing] misc bugfixes for modified MRT setup. All HDRP tests are passing now --- .../ShaderLibrary/TextureStack.hlsl | 13 +------------ .../Runtime/Material/Lit/Lit.hlsl | 14 ++++++++++---- .../Runtime/Material/MaterialGBufferMacros.hlsl | 9 ++++++++- .../SubsurfaceScattering/SubsurfaceScattering.hlsl | 6 +++--- .../Runtime/Material/VTBufferManager.cs | 3 ++- .../Runtime/RenderPipeline/HDStringConstants.cs | 3 ++- .../ShaderPass/ShaderPassForward.hlsl | 12 ++++++++---- .../ShaderPass/ShaderPassForwardUnlit.hlsl | 12 ++++++++---- 8 files changed, 42 insertions(+), 30 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 3403fad6d1f..dba1a2ff090 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -62,19 +62,8 @@ pass in the result of the PrepareStack for the correct stack the texture belongs to. */ -// A note about the on/off defines -// UNITY_VIRTUAL_TEXTURING current project is configured to use VT this is something even non vt materials may need to be aware of (e.g. different gbuffer layout used etc...) -// VIRTUAL_TEXTURES_ACTIVE vt data is built and enabled so the current shader should actively use VT sampling -#if UNITY_VIRTUAL_TEXTURING -#define VIRTUAL_TEXTURES_ACTIVE 1 -#else -#define VIRTUAL_TEXTURES_ACTIVE 0 -#endif - - - -#if VIRTUAL_TEXTURES_ACTIVE +#ifdef UNITY_VIRTUAL_TEXTURING struct StackInfo { diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index 7724ece1f2c..87f00e7ba31 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -11,6 +11,10 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/VolumeRendering.hlsl" +#ifdef UNITY_VIRTUAL_TEXTURING +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" +#endif + //----------------------------------------------------------------------------- // Configuration //----------------------------------------------------------------------------- @@ -42,8 +46,10 @@ TEXTURE2D_X(_GBufferTexture0); TEXTURE2D_X(_GBufferTexture1); TEXTURE2D_X(_GBufferTexture2); TEXTURE2D_X(_GBufferTexture3); // Bake lighting and/or emissive -TEXTURE2D_X(_GBufferTexture4); // Light layer or shadow mask -TEXTURE2D_X(_GBufferTexture5); // shadow mask +TEXTURE2D_X(_GBufferTexture4); // VTFeedbakc or Light layer or shadow mask +TEXTURE2D_X(_GBufferTexture5); // Light layer or shadow mask +TEXTURE2D_X(_GBufferTexture6); // shadow mask + TEXTURE2D_X(_LightLayersTexture); #ifdef SHADOWS_SHADOWMASK @@ -57,7 +63,7 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k // Definition //----------------------------------------------------------------------------- -#if VIRTUAL_TEXTURES_ACTIVE +#ifdef UNITY_VIRTUAL_TEXTURING #define OUT_GBUFFER_VTFEEDBACK outGBuffer4 #define OUT_GBUFFER_OPTIONAL_SLOT_1 outGBuffer5 #define OUT_GBUFFER_OPTIONAL_SLOT_2 outGBuffer6 @@ -637,7 +643,7 @@ void EncodeIntoGBuffer( SurfaceData surfaceData OUT_GBUFFER_SHADOWMASK = BUILTIN_DATA_SHADOW_MASK; #endif -#if VIRTUAL_TEXTURES_ACTIVE +#ifdef UNITY_VIRTUAL_TEXTURING OUT_GBUFFER_VTFEEDBACK = GetPackedVTFeedback(builtinData.vtFeedback); #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl index ca657e34590..47cbd8abfbd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialGBufferMacros.hlsl @@ -11,6 +11,7 @@ #define GBufferType3 float4 #define GBufferType4 float4 #define GBufferType5 float4 +#define GBufferType6 float4 #ifdef LIGHT_LAYERS #define GBUFFERMATERIAL_LIGHT_LAYERS 1 @@ -33,8 +34,14 @@ #define GBUFFER_LIT_ANISOTROPIC 4 #define GBUFFER_LIT_IRIDESCENCE 5 // TODO +#ifdef UNITY_VIRTUAL_TEXTURING +#define GBUFFERMATERIAL_VTFEEDBACK 1 +#else +#define GBUFFERMATERIAL_VTFEEDBACK 0 +#endif + // Caution: This must be in sync with Lit.cs GetMaterialGBufferCount() -#define GBUFFERMATERIAL_COUNT (4 + VIRTUAL_TEXTURES_ACTIVE + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK) +#define GBUFFERMATERIAL_COUNT (4 + GBUFFERMATERIAL_VTFEEDBACK + GBUFFERMATERIAL_LIGHT_LAYERS + GBUFFERMATERIAL_SHADOWMASK) // Only one deferred layout is allowed for a HDRenderPipeline, this will be detect by the redefinition of GBUFFERMATERIAL_COUNT // If GBUFFERMATERIAL_COUNT is define two time, the shaders will not compile diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl index 76d9806ccff..ecb3bfbb13d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl @@ -92,7 +92,7 @@ void DecodeFromSSSBuffer(uint2 positionSS, out SSSData sssData) } // OUTPUT_SSSBUFFER start from SV_Target2 as SV_Target0 and SV_Target1 are used for lighting buffer, shifts to SV_Target3 if VT is enabled -#if VIRTUAL_TEXTURES_ACTIVE +#ifdef UNITY_VIRTUAL_TEXTURING #define OUTPUT_SSSBUFFER(NAME) out SSSBufferType0 MERGE_NAME(NAME, 0) : SV_Target3 #else #define OUTPUT_SSSBUFFER(NAME) out SSSBufferType0 MERGE_NAME(NAME, 0) : SV_Target2 @@ -229,10 +229,10 @@ uint FindDiffusionProfileIndex(uint diffusionProfileHash) { if (diffusionProfileHash == 0) return 0; - + uint diffusionProfileIndex = 0; uint i = 0; - + // Fetch the 4 bit index number by looking for the diffusion profile unique ID: for (i = 0; i < _DiffusionProfileCount; i++) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index b4fb8df87a1..3d57194c3b1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -63,9 +63,10 @@ public void Resolve(CommandBuffer cmd, RTHandle rt, int width, int height) void ResolveVTDispatch(CommandBuffer cmd, RTHandle buffer, int width, int height) { string mainFunction = (buffer.enableMSAA) ? "KMainMSAA" : "KMain"; + int inputID = (buffer.enableMSAA) ? HDShaderIDs._InputTextureMSAA : HDShaderIDs._InputTexture; int kernel = downSampleCS.FindKernel(mainFunction); - cmd.SetComputeTextureParam(downSampleCS, kernel, HDShaderIDs._InputTexture, buffer.nameID); + cmd.SetComputeTextureParam(downSampleCS, kernel, inputID, buffer.nameID); cmd.SetComputeTextureParam(downSampleCS, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); var resolveCounter = 0; var startOffsetX = (resolveCounter % resolveScale); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs index 8c8d1febc0c..56690ee618e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs @@ -182,7 +182,7 @@ static class HDShaderIDs public static readonly int _DebugLightingAlbedo = Shader.PropertyToID("_DebugLightingAlbedo"); public static readonly int _DebugLightingSmoothness = Shader.PropertyToID("_DebugLightingSmoothness"); public static readonly int _DebugLightingNormal = Shader.PropertyToID("_DebugLightingNormal"); - public static readonly int _DebugLightingAmbientOcclusion = Shader.PropertyToID("_DebugLightingAmbientOcclusion"); + public static readonly int _DebugLightingAmbientOcclusion = Shader.PropertyToID("_DebugLightingAmbientOcclusion"); public static readonly int _DebugLightingSpecularColor = Shader.PropertyToID("_DebugLightingSpecularColor"); public static readonly int _DebugLightingEmissiveColor = Shader.PropertyToID("_DebugLightingEmissiveColor"); public static readonly int _AmbientOcclusionTexture = Shader.PropertyToID("_AmbientOcclusionTexture"); @@ -670,6 +670,7 @@ static class HDShaderIDs public static readonly int _ExposureCurveTexture = Shader.PropertyToID("_ExposureCurveTexture"); public static readonly int _Variants = Shader.PropertyToID("_Variants"); public static readonly int _InputTexture = Shader.PropertyToID("_InputTexture"); + public static readonly int _InputTextureMSAA = Shader.PropertyToID("_InputTextureMSAA"); public static readonly int _OutputTexture = Shader.PropertyToID("_OutputTexture"); public static readonly int _SourceTexture = Shader.PropertyToID("_SourceTexture"); public static readonly int _InputHistoryTexture = Shader.PropertyToID("_InputHistoryTexture"); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl index 6b231d0bc21..d2a32c2f8fe 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl @@ -60,7 +60,11 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/TessellationShare.hlsl" #endif -#if VIRTUAL_TEXTURES_ACTIVE +#ifdef UNITY_VIRTUAL_TEXTURING +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" +#endif + +#ifdef UNITY_VIRTUAL_TEXTURING #define VT_BUFFER_TARGET SV_Target1 #define EXTRA_BUFFER_TARGET SV_Target2 #else @@ -70,14 +74,14 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) void Frag(PackedVaryingsToPS packedInput, #ifdef OUTPUT_SPLIT_LIGHTING out float4 outColor : SV_Target0, // outSpecularLighting - #if VIRTUAL_TEXTURES_ACTIVE + #ifdef UNITY_VIRTUAL_TEXTURING out float4 outVTFeedback : VT_BUFFER_TARGET, #endif out float4 outDiffuseLighting : EXTRA_BUFFER_TARGET, OUTPUT_SSSBUFFER(outSSSBuffer) #else out float4 outColor : SV_Target0 - #if VIRTUAL_TEXTURES_ACTIVE + #ifdef UNITY_VIRTUAL_TEXTURING ,out float4 outVTFeedback : VT_BUFFER_TARGET #endif #ifdef _WRITE_TRANSPARENT_MOTION_VECTOR @@ -242,7 +246,7 @@ void Frag(PackedVaryingsToPS packedInput, outputDepth = posInput.deviceDepth; #endif -#if VIRTUAL_TEXTURES_ACTIVE +#ifdef UNITY_VIRTUAL_TEXTURING outVTFeedback = GetPackedVTFeedback(builtinData.vtFeedback); #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl index a1698601059..28e468c9b50 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl @@ -2,6 +2,10 @@ #error SHADERPASS_is_not_correctly_define #endif +#ifdef UNITY_VIRTUAL_TEXTURING +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" +#endif + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl" PackedVaryingsType Vert(AttributesMesh inputMesh) @@ -26,7 +30,7 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) void Frag(PackedVaryingsToPS packedInput, out float4 outResult : SV_Target0 -#if VIRTUAL_TEXTURES_ACTIVE +#ifdef UNITY_VIRTUAL_TEXTURING ,out float4 outVTFeedback : SV_Target1 #endif ) @@ -79,7 +83,7 @@ void Frag(PackedVaryingsToPS packedInput, GetBuiltinDataDebug(indexMaterialProperty, builtinData, result, needLinearToSRGB); GetSurfaceDataDebug(indexMaterialProperty, surfaceData, result, needLinearToSRGB); GetBSDFDataDebug(indexMaterialProperty, bsdfData, result, needLinearToSRGB); - + // TEMP! // For now, the final blit in the backbuffer performs an sRGB write // So in the meantime we apply the inverse transform to linear data to compensate. @@ -97,10 +101,10 @@ void Frag(PackedVaryingsToPS packedInput, } #endif - + outResult = outColor; -#if VIRTUAL_TEXTURES_ACTIVE +#ifdef UNITY_VIRTUAL_TEXTURING outVTFeedback = GetPackedVTFeedback(builtinData.vtFeedback); #endif } From ac70e8b2940cab626f6be16fa206fdbd58a8eded Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 2 Oct 2019 16:32:20 +0200 Subject: [PATCH 076/143] Add missing include for preview shader --- com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs b/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs index 9ecd2defbe6..cf8f4f8b31f 100644 --- a/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs +++ b/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs @@ -241,6 +241,7 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial finalShader.AppendLine(@"#include ""Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.render-pipelines.core/ShaderLibrary/EntityLighting.hlsl"""); + finalShader.AppendLine(@"#include ""Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.shadergraph/ShaderGraphLibrary/ShaderVariables.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.shadergraph/ShaderGraphLibrary/ShaderVariablesFunctions.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl"""); From 5c414c87a4a7fcaee8e686a5fb88dcbfd47b8353 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Thu, 3 Oct 2019 16:36:15 +0200 Subject: [PATCH 077/143] Fix vt constants not being generated in the per material constant buffer. They need to be there for SRP batching to work properly. --- com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs index b182200f972..275cb129c2e 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/StackShaderProperty.cs @@ -16,7 +16,7 @@ public StackShaderProperty() displayName = "Stack"; slotNames = new List(); slotNames.Add("Dummy"); - generatePropertyBlock = false; + generatePropertyBlock = true; } public override PropertyType propertyType From 5faca04bd66b56e233038ac0c9c05169aee6252c Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Thu, 3 Oct 2019 16:37:49 +0200 Subject: [PATCH 078/143] Generate explicit layer ids for texture stacks. --- .../Editor/Data/Nodes/Input/Texture/TextureStackNode.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 60ff6d21338..ce470b283fe 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -205,17 +205,19 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_texturestack"; - // Add attributes to any connected textures + // Add texture stack attributes to any connected textures int found = 0; foreach (var prop in properties.properties.OfType()) { + int layerIdx = 0; foreach (var inputTex in slotNames) { if (string.Compare(inputTex, prop.referenceName) == 0) { - prop.textureStack = stackName; + prop.textureStack = stackName + "(" + layerIdx + ")" ; found++; } + layerIdx++; } } From 917d8b574eadd878514266d07e7e202864695a5b Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 7 Oct 2019 11:48:18 +0200 Subject: [PATCH 079/143] Add global validation for VT nodes Checks if inter-node conditions are met. Particulary the fact that nodes cannot share texture input slots. (As a texture input slot can only belong to one particular stack). Similar two layers of the same not also cannot use the same input slot (since this would duplicate the data on both layers and since layers are sampled with the same UV's this is superfluous anyway. --- .../Editor/Data/Graphs/GraphData.cs | 2 ++ .../Nodes/Input/Texture/TextureStackNode.cs | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs b/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs index 6bf555e8d1b..db37ed66f7f 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs @@ -1023,6 +1023,8 @@ public void ValidateGraph() } } + SampleTextureStackNodeBase.ValidatNodes(this); + StackPool.Release(stack); ListPool.Release(slots); IndexSetPool.Release(temporaryMarks); diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index ce470b283fe..d31c1c3020f 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -6,6 +6,7 @@ using System.Globalization; using UnityEditor.ShaderGraph.Drawing.Controls; using UnityEditor.ShaderGraph.Internal; +using UnityEditor.Rendering; namespace UnityEditor.ShaderGraph { @@ -107,6 +108,38 @@ public override void UpdateNodeAfterDeserialization() RemoveSlotsNameNotMatching(liveIds); } + public static void ValidatNodes(GraphData d) + { + ValidatNodes(d.GetNodes()); + } + + public static void ValidatNodes(IEnumerable nodes) + { + List> slotNames = new List>(); + + foreach (SampleTextureStackNodeBase node in nodes) + { + for (int i = 0; i < node.numSlots; i++) + { + string value = node.GetSlotValue(node.TextureInputIds[i], GenerationMode.ForReals); + string name = node.FindSlot(node.TextureInputIds[i]).displayName; + + // Check if there is already a slot with the same value + int found = slotNames.FindIndex(elem => elem.Key == value); + if (found >= 0) + { + // Add a validation error, values need to be unique + node.owner.AddValidationError(node.tempId, $"Slot stack input slot '{value}' shares it's input with another stack input '{slotNames[found].Value}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); + } + else + { + // Save it for checking against other slots + slotNames.Add(new KeyValuePair(value, name)); + } + } + } + } + public override void ValidateNode() { for (int i = 0; i < numSlots; i++) From de8d86c897fabadd9fc701f14fef854e94af487a Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 2 Oct 2019 16:32:20 +0200 Subject: [PATCH 080/143] Add missing include for preview shader --- com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs b/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs index 9ecd2defbe6..cf8f4f8b31f 100644 --- a/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs +++ b/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs @@ -241,6 +241,7 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial finalShader.AppendLine(@"#include ""Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.render-pipelines.core/ShaderLibrary/EntityLighting.hlsl"""); + finalShader.AppendLine(@"#include ""Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.shadergraph/ShaderGraphLibrary/ShaderVariables.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.shadergraph/ShaderGraphLibrary/ShaderVariablesFunctions.hlsl"""); finalShader.AppendLine(@"#include ""Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl"""); From 7b8b3797b5067c328bc524a9e2d8c2edd1f7f29d Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 23 Oct 2019 20:06:41 +0200 Subject: [PATCH 081/143] [VirtualTexturing] added explicit LOD sampling functions --- .../ShaderLibrary/TextureStack.hlsl | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index b2f98d1b8c3..971557944f9 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -68,13 +68,16 @@ struct StackInfo { GraniteLookupData lookupData; + GraniteLODLookupData lookupDataLOD; float4 resolveOutput; }; #ifdef TEXTURESTACK_CLAMP #define GR_LOOKUP Granite_Lookup_Clamp_Linear + #define GR_LOOKUP_LOD Granite_Lookup_Clamp #else #define GR_LOOKUP Granite_Lookup_Anisotropic + #define GR_LOOKUP_LOD Granite_Lookup #endif // This can be used by certain resolver implementations to override screen space derivatives @@ -116,6 +119,32 @@ StackInfo PrepareVT_##stackName(float2 uv)\ StackInfo info;\ GR_LOOKUP(grCB, translationTable, uv, info.lookupData, info.resolveOutput);\ return info;\ +} \ +StackInfo PrepareVT_Lod_##stackName(float2 uv, float mip) \ +{ \ + GraniteStreamingTextureConstantBuffer textureParamBlock;\ + textureParamBlock.data[0] = stackName##_atlasparams[0];\ + textureParamBlock.data[1] = stackName##_atlasparams[1];\ +\ + /* hack resolve scale into constant buffer here */\ + stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ + stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ +\ + GraniteTilesetConstantBuffer graniteParamBlock;\ + graniteParamBlock.data[0] = stackName##_spaceparams[0];\ + graniteParamBlock.data[1] = stackName##_spaceparams[1];\ +\ + GraniteConstantBuffers grCB;\ + grCB.tilesetBuffer = graniteParamBlock;\ + grCB.streamingTextureBuffer = textureParamBlock;\ +\ + GraniteTranslationTexture translationTable;\ + translationTable.Texture = stackName##_transtab;\ + translationTable.Sampler = sampler##stackName##_transtab;\ +\ + StackInfo info;\ + GR_LOOKUP_LOD(grCB, translationTable, uv, mip, info.lookupDataLOD, info.resolveOutput);\ + return info;\ } #define jj2(a, b) a##b @@ -154,6 +183,36 @@ float4 SampleVT_##layerSamplerName(StackInfo info)\ float3 SampleVT_Normal_##layerSamplerName(StackInfo info, float scale)\ {\ return Granite_UnpackNormal( jj(SampleVT_,layerSamplerName)( info ), scale ); \ +} \ +float4 SampleVT_Lod_##layerSamplerName(StackInfo info)\ +{\ + GraniteStreamingTextureConstantBuffer textureParamBlock;\ + textureParamBlock.data[0] = stackName##_atlasparams[0];\ + textureParamBlock.data[1] = stackName##_atlasparams[1];\ +\ + /* hack resolve scale into constant buffer here */\ + stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ + stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ +\ + GraniteTilesetConstantBuffer graniteParamBlock;\ + graniteParamBlock.data[0] = stackName##_spaceparams[0];\ + graniteParamBlock.data[1] = stackName##_spaceparams[1];\ +\ + GraniteConstantBuffers grCB;\ + grCB.tilesetBuffer = graniteParamBlock;\ + grCB.streamingTextureBuffer = textureParamBlock;\ +\ + GraniteCacheTexture cache;\ + cache.TextureArray = stackName##_c##layerIndex;\ + cache.Sampler = sampler##stackName##_c##layerIndex;\ +\ + float4 output;\ + Granite_Sample(grCB, info.lookupDataLOD, cache, layerIndex, output);\ + return output;\ +} \ +float3 SampleVT_Lod_Normal_##layerSamplerName(StackInfo info, float scale)\ +{\ + return Granite_UnpackNormal( jj(SampleVT_Lod_,layerSamplerName)( info ), scale ); \ } #define DECLARE_STACK_RESOLVE(stackName)\ @@ -205,8 +264,11 @@ float4 ResolveVT_##stackName(float2 uv)\ DECLARE_STACK_LAYER(stackName, layer3SamplerName,3) #define PrepareStack(uv, stackName) PrepareVT_##stackName(uv) +#define PrepareStack_Lod(uv, stackName, mip) PrepareVT_Lod_##stackName(uv, mip) #define SampleStack(info, textureName) SampleVT_##textureName(info) +#define SampleStack_Lod(info, textureName) SampleVT_Lod_##textureName(info) #define SampleStack_Normal(info, textureName, scale) SampleVT_Normal_##textureName(info, scale) +#define SampleStack_Lod_Normal(info, textureName, scale) SampleVT_Lod_Normal_##textureName(info, scale) #define GetResolveOutput(info) info.resolveOutput #define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) @@ -230,6 +292,7 @@ float4 GetPackedVTFeedback(float4 feedback) struct StackInfo { float2 uv; + float lod; }; StackInfo MakeStackInfo(float2 uv) @@ -238,14 +301,27 @@ StackInfo MakeStackInfo(float2 uv) result.uv = uv; return result; } +StackInfo MakeStackInfoLOD(float2 uv, float lod) +{ + StackInfo result; + result.uv = uv; + result.lod = lod; + return result; +} // Prepare just passes the texture coord around #define PrepareStack(uv, stackName) MakeStackInfo(uv) +#define PrepareStack_Lod(uv, stackName, mip) MakeStackInfoLOD(uv, mip) + // Sample just samples the texture #define SampleStack(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) #define SampleStack_Normal(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) +#define SampleStack_Lod(info, textureName) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) +#define SampleStack_Lod_Normal(info, textureName) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) + + // Resolve does nothing #define GetResolveOutput(info) float4(1,1,1,1) #define ResolveStack(uv, stackName) float4(1,1,1,1) From d82f6fbf37049051206f83d374e36497a43b0b5d Mon Sep 17 00:00:00 2001 From: PaulDunning Date: Mon, 28 Oct 2019 12:22:23 +0000 Subject: [PATCH 082/143] Fixed PSSL shader compilation errors, the PSSL compiler does not support the unorm type modifier. --- .../ShaderLibrary/TextureStack.hlsl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index b2f98d1b8c3..f7f10ea811f 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -5,6 +5,9 @@ #define GRA_ROW_MAJOR 1 #define GRA_TEXTURE_ARRAY_SUPPORT 1 #define GRA_PACK_RESOLVE_OUTPUT 0 +#if SHADER_API_PSSL +#define GRA_NO_UNORM 1 +#endif #include "GraniteShaderLib3.cginc" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" From e1d0611d652f4d8063746458c52373fc66a4e3c5 Mon Sep 17 00:00:00 2001 From: PaulDunning Date: Mon, 28 Oct 2019 16:19:01 +0000 Subject: [PATCH 083/143] Removed an extra semi-colon in the DECLARE_STACK_CB macro definition which was causing compile errors with the PSSL shader compiler. --- com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index f7f10ea811f..5aa4100a078 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -88,7 +88,7 @@ struct StackInfo #define DECLARE_STACK_CB(stackName) \ float4x4 stackName##_spaceparams[2];\ - float4 stackName##_atlasparams[2];\ + float4 stackName##_atlasparams[2] #define DECLARE_STACK_BASE(stackName) \ TEXTURE2D(stackName##_transtab);\ From 5e17592743d20ca5d0269970704e096485641c7c Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 23 Oct 2019 20:06:41 +0200 Subject: [PATCH 084/143] [VirtualTexturing] added explicit LOD sampling functions --- .../ShaderLibrary/TextureStack.hlsl | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index dba1a2ff090..ef03260438c 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -68,13 +68,16 @@ struct StackInfo { GraniteLookupData lookupData; + GraniteLODLookupData lookupDataLOD; float4 resolveOutput; }; #ifdef TEXTURESTACK_CLAMP #define GR_LOOKUP Granite_Lookup_Clamp_Linear + #define GR_LOOKUP_LOD Granite_Lookup_Clamp #else #define GR_LOOKUP Granite_Lookup_Anisotropic + #define GR_LOOKUP_LOD Granite_Lookup #endif // This can be used by certain resolver implementations to override screen space derivatives @@ -116,6 +119,32 @@ StackInfo PrepareVT_##stackName(float2 uv)\ StackInfo info;\ GR_LOOKUP(grCB, translationTable, uv, info.lookupData, info.resolveOutput);\ return info;\ +} \ +StackInfo PrepareVT_Lod_##stackName(float2 uv, float mip) \ +{ \ + GraniteStreamingTextureConstantBuffer textureParamBlock;\ + textureParamBlock.data[0] = stackName##_atlasparams[0];\ + textureParamBlock.data[1] = stackName##_atlasparams[1];\ +\ + /* hack resolve scale into constant buffer here */\ + stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ + stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ +\ + GraniteTilesetConstantBuffer graniteParamBlock;\ + graniteParamBlock.data[0] = stackName##_spaceparams[0];\ + graniteParamBlock.data[1] = stackName##_spaceparams[1];\ +\ + GraniteConstantBuffers grCB;\ + grCB.tilesetBuffer = graniteParamBlock;\ + grCB.streamingTextureBuffer = textureParamBlock;\ +\ + GraniteTranslationTexture translationTable;\ + translationTable.Texture = stackName##_transtab;\ + translationTable.Sampler = sampler##stackName##_transtab;\ +\ + StackInfo info;\ + GR_LOOKUP_LOD(grCB, translationTable, uv, mip, info.lookupDataLOD, info.resolveOutput);\ + return info;\ } #define jj2(a, b) a##b @@ -154,6 +183,36 @@ float4 SampleVT_##layerSamplerName(StackInfo info)\ float3 SampleVT_Normal_##layerSamplerName(StackInfo info, float scale)\ {\ return Granite_UnpackNormal( jj(SampleVT_,layerSamplerName)( info ), scale ); \ +} \ +float4 SampleVT_Lod_##layerSamplerName(StackInfo info)\ +{\ + GraniteStreamingTextureConstantBuffer textureParamBlock;\ + textureParamBlock.data[0] = stackName##_atlasparams[0];\ + textureParamBlock.data[1] = stackName##_atlasparams[1];\ +\ + /* hack resolve scale into constant buffer here */\ + stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ + stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ +\ + GraniteTilesetConstantBuffer graniteParamBlock;\ + graniteParamBlock.data[0] = stackName##_spaceparams[0];\ + graniteParamBlock.data[1] = stackName##_spaceparams[1];\ +\ + GraniteConstantBuffers grCB;\ + grCB.tilesetBuffer = graniteParamBlock;\ + grCB.streamingTextureBuffer = textureParamBlock;\ +\ + GraniteCacheTexture cache;\ + cache.TextureArray = stackName##_c##layerIndex;\ + cache.Sampler = sampler##stackName##_c##layerIndex;\ +\ + float4 output;\ + Granite_Sample(grCB, info.lookupDataLOD, cache, layerIndex, output);\ + return output;\ +} \ +float3 SampleVT_Lod_Normal_##layerSamplerName(StackInfo info, float scale)\ +{\ + return Granite_UnpackNormal( jj(SampleVT_Lod_,layerSamplerName)( info ), scale ); \ } #define DECLARE_STACK_RESOLVE(stackName)\ @@ -205,8 +264,11 @@ float4 ResolveVT_##stackName(float2 uv)\ DECLARE_STACK_LAYER(stackName, layer3SamplerName,3) #define PrepareStack(uv, stackName) PrepareVT_##stackName(uv) +#define PrepareStack_Lod(uv, stackName, mip) PrepareVT_Lod_##stackName(uv, mip) #define SampleStack(info, textureName) SampleVT_##textureName(info) +#define SampleStack_Lod(info, textureName) SampleVT_Lod_##textureName(info) #define SampleStack_Normal(info, textureName, scale) SampleVT_Normal_##textureName(info, scale) +#define SampleStack_Lod_Normal(info, textureName, scale) SampleVT_Lod_Normal_##textureName(info, scale) #define GetResolveOutput(info) info.resolveOutput #define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) @@ -230,6 +292,7 @@ float4 GetPackedVTFeedback(float4 feedback) struct StackInfo { float2 uv; + float lod; }; StackInfo MakeStackInfo(float2 uv) @@ -238,14 +301,27 @@ StackInfo MakeStackInfo(float2 uv) result.uv = uv; return result; } +StackInfo MakeStackInfoLOD(float2 uv, float lod) +{ + StackInfo result; + result.uv = uv; + result.lod = lod; + return result; +} // Prepare just passes the texture coord around #define PrepareStack(uv, stackName) MakeStackInfo(uv) +#define PrepareStack_Lod(uv, stackName, mip) MakeStackInfoLOD(uv, mip) + // Sample just samples the texture #define SampleStack(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) #define SampleStack_Normal(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) +#define SampleStack_Lod(info, textureName) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) +#define SampleStack_Lod_Normal(info, textureName) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) + + // Resolve does nothing #define GetResolveOutput(info) float4(1,1,1,1) #define ResolveStack(uv, stackName) float4(1,1,1,1) From 5096a349caf3761b224fd11676266431fbad77e7 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 30 Oct 2019 12:08:22 +0100 Subject: [PATCH 085/143] Fix explicit lod sampling for this branch (dev already has array support this not). --- com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index ef03260438c..2cf78fb72c9 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -203,7 +203,7 @@ float4 SampleVT_Lod_##layerSamplerName(StackInfo info)\ grCB.streamingTextureBuffer = textureParamBlock;\ \ GraniteCacheTexture cache;\ - cache.TextureArray = stackName##_c##layerIndex;\ + cache.Texture = stackName##_c##layerIndex;\ cache.Sampler = sampler##stackName##_c##layerIndex;\ \ float4 output;\ From 84ed3675eb0c10ebdadf1bff82b1c695b3f37a2b Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Tue, 5 Nov 2019 14:18:54 +0100 Subject: [PATCH 086/143] Updated TextureStack.hlsl to better match UnityLegacyTextureStack.cginc --- .../ShaderLibrary/TextureStack.hlsl | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 971557944f9..c3b87425806 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -68,7 +68,7 @@ struct StackInfo { GraniteLookupData lookupData; - GraniteLODLookupData lookupDataLOD; + GraniteLODLookupData lookupDataLod; float4 resolveOutput; }; @@ -85,7 +85,6 @@ struct StackInfo #define RESOLVE_SCALE_OVERRIDE float2(1,1) #endif - #define DECLARE_STACK_CB(stackName) \ float4x4 stackName##_spaceparams[2];\ float4 stackName##_atlasparams[2];\ @@ -120,7 +119,7 @@ StackInfo PrepareVT_##stackName(float2 uv)\ GR_LOOKUP(grCB, translationTable, uv, info.lookupData, info.resolveOutput);\ return info;\ } \ -StackInfo PrepareVT_Lod_##stackName(float2 uv, float mip) \ +StackInfo PrepareVTLod_##stackName(float2 uv, float mip) \ { \ GraniteStreamingTextureConstantBuffer textureParamBlock;\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ @@ -143,10 +142,9 @@ StackInfo PrepareVT_Lod_##stackName(float2 uv, float mip) \ translationTable.Sampler = sampler##stackName##_transtab;\ \ StackInfo info;\ - GR_LOOKUP_LOD(grCB, translationTable, uv, mip, info.lookupDataLOD, info.resolveOutput);\ + GR_LOOKUP_LOD(grCB, translationTable, uv, mip, info.lookupDataLod, info.resolveOutput);\ return info;\ } - #define jj2(a, b) a##b #define jj(a, b) jj2(a, b) @@ -184,7 +182,7 @@ float3 SampleVT_Normal_##layerSamplerName(StackInfo info, float scale)\ {\ return Granite_UnpackNormal( jj(SampleVT_,layerSamplerName)( info ), scale ); \ } \ -float4 SampleVT_Lod_##layerSamplerName(StackInfo info)\ +float4 SampleVTLod_##layerSamplerName(StackInfo info)\ {\ GraniteStreamingTextureConstantBuffer textureParamBlock;\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ @@ -207,12 +205,12 @@ float4 SampleVT_Lod_##layerSamplerName(StackInfo info)\ cache.Sampler = sampler##stackName##_c##layerIndex;\ \ float4 output;\ - Granite_Sample(grCB, info.lookupDataLOD, cache, layerIndex, output);\ + Granite_Sample(grCB, info.lookupDataLod, cache, layerIndex, output);\ return output;\ } \ -float3 SampleVT_Lod_Normal_##layerSamplerName(StackInfo info, float scale)\ +float3 SampleVTLod_Normal_##layerSamplerName(StackInfo info, float scale)\ {\ - return Granite_UnpackNormal( jj(SampleVT_Lod_,layerSamplerName)( info ), scale ); \ + return Granite_UnpackNormal( jj(SampleVTLod_,layerSamplerName)( info ), scale ); \ } #define DECLARE_STACK_RESOLVE(stackName)\ @@ -264,12 +262,13 @@ float4 ResolveVT_##stackName(float2 uv)\ DECLARE_STACK_LAYER(stackName, layer3SamplerName,3) #define PrepareStack(uv, stackName) PrepareVT_##stackName(uv) -#define PrepareStack_Lod(uv, stackName, mip) PrepareVT_Lod_##stackName(uv, mip) +#define PrepareStackLod(uv, stackName, mip) PrepareVTLod_##stackName(uv, mip) #define SampleStack(info, textureName) SampleVT_##textureName(info) -#define SampleStack_Lod(info, textureName) SampleVT_Lod_##textureName(info) -#define SampleStack_Normal(info, textureName, scale) SampleVT_Normal_##textureName(info, scale) -#define SampleStack_Lod_Normal(info, textureName, scale) SampleVT_Lod_Normal_##textureName(info, scale) +#define SampleStackLod(info, textureName) SampleVTLod_##textureName(info) +#define SampleStackNormal(info, textureName, scale) (SampleVT_Normal_##textureName(info, scale)).xyz +#define SampleStackLodNormal(info, textureName, scale) SampleVTLod_Normal_##textureName(info, scale) #define GetResolveOutput(info) info.resolveOutput +#define PackResolveOutput(output) Granite_PackTileId(output) #define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) float4 GetPackedVTFeedback(float4 feedback) @@ -301,7 +300,7 @@ StackInfo MakeStackInfo(float2 uv) result.uv = uv; return result; } -StackInfo MakeStackInfoLOD(float2 uv, float lod) +StackInfo MakeStackInfoLod(float2 uv, float lod) { StackInfo result; result.uv = uv; @@ -311,21 +310,19 @@ StackInfo MakeStackInfoLOD(float2 uv, float lod) // Prepare just passes the texture coord around #define PrepareStack(uv, stackName) MakeStackInfo(uv) -#define PrepareStack_Lod(uv, stackName, mip) MakeStackInfoLOD(uv, mip) - +#define PrepareStackLod(uv, stackName, mip) MakeStackInfoLod(uv, mip) // Sample just samples the texture #define SampleStack(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) -#define SampleStack_Normal(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) - -#define SampleStack_Lod(info, textureName) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) -#define SampleStack_Lod_Normal(info, textureName) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) +#define SampleStackNormal(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) +#define SampleStackLod(info, texture) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) +#define SampleStackLodNormal(info, texture) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) // Resolve does nothing #define GetResolveOutput(info) float4(1,1,1,1) #define ResolveStack(uv, stackName) float4(1,1,1,1) -#define GetPackedVTFeedback(feedback) +#define PackResolveOutput(output) output #endif From 3324a30193f18e03dc7928257b89a41d32d5c7aa Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 12 Nov 2019 15:59:57 +0100 Subject: [PATCH 087/143] Fix VT feedback buffer null pointer exception when "force forward" is set on the HDRP assets as render mode (which is the case with some graphics tests). --- .../Runtime/Material/VTBufferManager.cs | 19 ++++++++++--------- .../RenderPipeline/HDRenderPipeline.cs | 5 +++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index 3d57194c3b1..30e121bfda9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -11,7 +11,7 @@ public static GraphicsFormat GetFeedbackBufferFormat() return GraphicsFormat.R8G8B8A8_UNorm; } - RTHandle m_VTFeedbackBufferMSAA; + RTHandle m_VTFeedbackBuffer; VirtualTextureResolver m_Resolver = new VirtualTextureResolver(); public static int AdditionalForwardRT = 1; int resolveScale = 16; @@ -28,8 +28,8 @@ public void CreateBuffers(RenderPipelineSettings settings) if (settings.supportMSAA || settings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) { // Our processing handles both MSAA and regular buffers so we don't need to explicitly resolve here saving a buffer - m_VTFeedbackBufferMSAA = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, - enableMSAA: true, useDynamicScale: true, name: "VTFeedbackForwardMSAA"); + m_VTFeedbackBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, + enableMSAA: settings.supportMSAA, useDynamicScale: true, name: "VTFeedbackForwardMSAA"); } } @@ -54,9 +54,9 @@ public void Resolve(CommandBuffer cmd, RTHandle rt, int width, int height) ResolveVTDispatch(cmd, rt, width, height ); } - if (m_VTFeedbackBufferMSAA != null) + if (m_VTFeedbackBuffer != null) { - ResolveVTDispatch(cmd, m_VTFeedbackBufferMSAA, width, height ); + ResolveVTDispatch(cmd, m_VTFeedbackBuffer, width, height ); } } @@ -87,14 +87,15 @@ void GetResolveDimensions(ref int w, ref int h) public void DestroyBuffers() { - RTHandles.Release(m_VTFeedbackBufferMSAA); - m_VTFeedbackBufferMSAA = null; + RTHandles.Release(m_VTFeedbackBuffer); + m_VTFeedbackBuffer = null; m_Resolver.Dispose(); } - public RTHandle GetForwardMSAABuffer() + // This may be null in some cases where this buffer can be shared with the one used by the Gbuffer + public RTHandle GetFeedbackBuffer() { - return m_VTFeedbackBufferMSAA; + return m_VTFeedbackBuffer; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index b6be0449552..13aad4afa3f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -4352,9 +4352,10 @@ RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) #if ENABLE_VIRTUALTEXTURES RTHandle GetVTFeedbackBufferForForward(HDCamera hdCamera) { - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) + var res = m_VtBufferManager.GetFeedbackBuffer(); + if (res != null) { - return m_VtBufferManager.GetForwardMSAABuffer(); + return res; } else { From 0b30c1289c129aacd153d971da46e9df86d0b2de Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 17 Dec 2019 14:59:51 +0100 Subject: [PATCH 088/143] Use regular 2d textures instead of texture arrays for cache textures (arrays require funcionality not in trunk yet). --- .../ShaderLibrary/TextureStack.hlsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 9c744f6f2a5..b3cf2117bbc 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -3,7 +3,7 @@ #define GRA_HLSL_5 1 #define GRA_ROW_MAJOR 1 -#define GRA_TEXTURE_ARRAY_SUPPORT 1 +#define GRA_TEXTURE_ARRAY_SUPPORT 0 #define GRA_PACK_RESOLVE_OUTPUT 0 #if SHADER_API_PSSL #define GRA_NO_UNORM 1 @@ -152,7 +152,7 @@ StackInfo PrepareVTLod_##stackName(float2 uv, float mip) \ #define jj(a, b) jj2(a, b) #define DECLARE_STACK_LAYER(stackName, layerSamplerName, layerIndex) \ -TEXTURE2D_ARRAY(stackName##_c##layerIndex);\ +TEXTURE2D(stackName##_c##layerIndex);\ SAMPLER(sampler##stackName##_c##layerIndex);\ \ float4 SampleVT_##layerSamplerName(StackInfo info)\ @@ -174,7 +174,7 @@ float4 SampleVT_##layerSamplerName(StackInfo info)\ grCB.streamingTextureBuffer = textureParamBlock;\ \ GraniteCacheTexture cache;\ - cache.TextureArray = stackName##_c##layerIndex;\ + cache.Texture = stackName##_c##layerIndex;\ cache.Sampler = sampler##stackName##_c##layerIndex;\ \ float4 output;\ @@ -204,7 +204,7 @@ float4 SampleVTLod_##layerSamplerName(StackInfo info)\ grCB.streamingTextureBuffer = textureParamBlock;\ \ GraniteCacheTexture cache;\ - cache.TextureArray = stackName##_c##layerIndex;\ + cache.Texture = stackName##_c##layerIndex;\ cache.Sampler = sampler##stackName##_c##layerIndex;\ \ float4 output;\ From 91189986c840c81361671774ee9e787e9a702268 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 17 Dec 2019 15:33:37 +0100 Subject: [PATCH 089/143] Re-enable texture stacks now vt-dev has been merged to vt --- .../ShaderLibrary/TextureStack.hlsl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index b3cf2117bbc..7682421a228 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -3,7 +3,7 @@ #define GRA_HLSL_5 1 #define GRA_ROW_MAJOR 1 -#define GRA_TEXTURE_ARRAY_SUPPORT 0 +#define GRA_TEXTURE_ARRAY_SUPPORT 1 #define GRA_PACK_RESOLVE_OUTPUT 0 #if SHADER_API_PSSL #define GRA_NO_UNORM 1 @@ -152,7 +152,7 @@ StackInfo PrepareVTLod_##stackName(float2 uv, float mip) \ #define jj(a, b) jj2(a, b) #define DECLARE_STACK_LAYER(stackName, layerSamplerName, layerIndex) \ -TEXTURE2D(stackName##_c##layerIndex);\ +TEXTURE2D_ARRAY(stackName##_c##layerIndex);\ SAMPLER(sampler##stackName##_c##layerIndex);\ \ float4 SampleVT_##layerSamplerName(StackInfo info)\ @@ -174,7 +174,7 @@ float4 SampleVT_##layerSamplerName(StackInfo info)\ grCB.streamingTextureBuffer = textureParamBlock;\ \ GraniteCacheTexture cache;\ - cache.Texture = stackName##_c##layerIndex;\ + cache.TextureArray = stackName##_c##layerIndex;\ cache.Sampler = sampler##stackName##_c##layerIndex;\ \ float4 output;\ @@ -204,7 +204,7 @@ float4 SampleVTLod_##layerSamplerName(StackInfo info)\ grCB.streamingTextureBuffer = textureParamBlock;\ \ GraniteCacheTexture cache;\ - cache.Texture = stackName##_c##layerIndex;\ + cache.TextureArray = stackName##_c##layerIndex;\ cache.Sampler = sampler##stackName##_c##layerIndex;\ \ float4 output;\ @@ -329,4 +329,4 @@ StackInfo MakeStackInfoLod(float2 uv, float lod) #endif -#endif //TEXTURESTACK_include +#endif //TEXTURESTACK_include \ No newline at end of file From 01a4d1ac69080eda3dafd90c2b5f30784a52a428 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 20 Jan 2020 13:56:43 +0100 Subject: [PATCH 090/143] Add (disabled by default) support for sampling procedural VTs from shadergraph. --- .../Nodes/Input/Texture/TextureStackNode.cs | 216 +++++++++++++++--- 1 file changed, 184 insertions(+), 32 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index d31c1c3020f..f33ce698a28 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -31,6 +31,7 @@ class SampleTextureStackNodeBase : AbstractMaterialNode, IGeneratesBodyCode, IMa int numSlots; int[] liveIds; + bool isProcedural; public override bool hasPreview { get { return false; } } @@ -56,8 +57,10 @@ public NormalMapSpace normalMapSpace } } - public SampleTextureStackNodeBase(int numSlots) + public SampleTextureStackNodeBase(int numSlots, bool procedural = false) { + isProcedural = procedural; + if (numSlots > 4) { throw new System.Exception("Maximum 4 slots supported"); @@ -80,7 +83,8 @@ public override void UpdateNodeAfterDeserialization() TextureInputIds[i] = UVInputId + 1 + numSlots + i; usedSlots.Add(OutputSlotIds[i]); - usedSlots.Add(TextureInputIds[i]); + if (!isProcedural) + usedSlots.Add(TextureInputIds[i]); } FeedbackSlotId = UVInputId + 1 + numSlots * 2; @@ -96,9 +100,12 @@ public override void UpdateNodeAfterDeserialization() AddSlot(new Vector4MaterialSlot(OutputSlotIds[i], OutputSlotNames[i], OutputSlotNames[i], SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment)); } - for (int i = 0; i < numSlots; i++) + if (!isProcedural) { - AddSlot(new Texture2DInputMaterialSlot(TextureInputIds[i], TextureInputNames[i], TextureInputNames[i])); + for (int i = 0; i < numSlots; i++) + { + AddSlot(new Texture2DInputMaterialSlot(TextureInputIds[i], TextureInputNames[i], TextureInputNames[i])); + } } var slot = new Vector4MaterialSlot(FeedbackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment); @@ -121,31 +128,61 @@ public static void ValidatNodes(IEnumerable nodes) { for (int i = 0; i < node.numSlots; i++) { - string value = node.GetSlotValue(node.TextureInputIds[i], GenerationMode.ForReals); - string name = node.FindSlot(node.TextureInputIds[i]).displayName; - - // Check if there is already a slot with the same value - int found = slotNames.FindIndex(elem => elem.Key == value); - if (found >= 0) + if (!node.isProcedural) { - // Add a validation error, values need to be unique - node.owner.AddValidationError(node.tempId, $"Slot stack input slot '{value}' shares it's input with another stack input '{slotNames[found].Value}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); + string value = node.GetSlotValue(node.TextureInputIds[i], GenerationMode.ForReals); + string name = node.FindSlot(node.TextureInputIds[i]).displayName; + + // Check if there is already a slot with the same value + int found = slotNames.FindIndex(elem => elem.Key == value); + if (found >= 0) + { + // Add a validation error, values need to be unique + node.owner.AddValidationError(node.tempId, $"Slot stack input slot '{value}' shares it's input with another stack input '{slotNames[found].Value}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); + } + else + { + // Save it for checking against other slots + slotNames.Add(new KeyValuePair(value, name)); + } } - else + +#if PROCEDURAL_VT_IN_GRAPH + // Check if there is already a node with the same sampleid + SampleTextureStackProcedural ssp = node as SampleTextureStackProcedural; + if ( ssp != null ) { - // Save it for checking against other slots - slotNames.Add(new KeyValuePair(value, name)); + string value = ssp.GetStackName(); + string name = ssp.GetStackName(); + // Check if there is already a slot with the same value + int found = slotNames.FindIndex(elem => elem.Key == value); + if (found >= 0) + { + // Add a validation error, values need to be unique + node.owner.AddValidationError(node.tempId, $"This node has the same procedural ID as another node. Nodes need to have different procedural IDs.", ShaderCompilerMessageSeverity.Error); + } + else + { + // Save it for checking against other slots + slotNames.Add(new KeyValuePair(value, name)); + } } +#endif } } } public override void ValidateNode() { + if (isProcedural) return; + for (int i = 0; i < numSlots; i++) { var textureSlot = FindInputSlot(TextureInputIds[i]); - textureSlot.defaultType = (m_TextureTypes[i] == TextureType.Normal ? Texture2DShaderProperty.DefaultType.Bump : Texture2DShaderProperty.DefaultType.White); + if (textureSlot != null) + { + textureSlot.defaultType = (m_TextureTypes[i] == TextureType.Normal ? Texture2DShaderProperty.DefaultType.Bump : Texture2DShaderProperty.DefaultType.White); + } } base.ValidateNode(); } @@ -155,12 +192,30 @@ public override PreviewMode previewMode get { return PreviewMode.Preview3D; } } + + protected virtual string GetStackName() + { + return GetVariableNameForSlot(OutputSlotIds[0]) + "_texturestack"; + } + + private string GetTextureName(int layerIndex, GenerationMode generationMode) + { + if (isProcedural) + { + return GetStackName() + "_stacks_are_not_supported_with_vt_off_" + layerIndex; + } + else + { + return GetSlotValue(TextureInputIds[layerIndex], generationMode); + } + } + // Node generations public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) { // Not all outputs may be connected (well one is or we wouln't get called) so we are carefull to // only generate code for connected outputs - string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_texturestack"; + string stackName = GetStackName(); bool anyConnected = false; for (int i = 0; i < numSlots; i++) @@ -186,7 +241,7 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene { if (IsSlotConnected(OutputSlotIds[i])) { - var id = GetSlotValue(TextureInputIds[i], generationMode); + var id = GetTextureName(i, generationMode); string resultLayer = string.Format("$precision4 {1} = SampleStack({0}_info, {2});" , stackName , GetVariableNameForSlot(OutputSlotIds[i]) @@ -232,31 +287,34 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener List slotNames = new List(); for (int i = 0; i < numSlots; i++) { - var id = GetSlotValue(TextureInputIds[i], generationMode); + var id = GetTextureName(i, generationMode); slotNames.Add(id); } - string stackName = GetVariableNameForSlot(OutputSlotIds[0]) + "_texturestack"; + string stackName = GetStackName(); // Add texture stack attributes to any connected textures - int found = 0; - foreach (var prop in properties.properties.OfType()) + if (!isProcedural) { - int layerIdx = 0; - foreach (var inputTex in slotNames) + int found = 0; + foreach (var prop in properties.properties.OfType()) { - if (string.Compare(inputTex, prop.referenceName) == 0) + int layerIdx = 0; + foreach (var inputTex in slotNames) { - prop.textureStack = stackName + "(" + layerIdx + ")" ; - found++; + if (string.Compare(inputTex, prop.referenceName) == 0) + { + prop.textureStack = stackName + "(" + layerIdx + ")"; + found++; + } + layerIdx++; } - layerIdx++; } - } - if (found != slotNames.Count) - { - Debug.LogWarning("Could not find some texture properties for stack " + stackName); + if (found != slotNames.Count) + { + Debug.LogWarning("Could not find some texture properties for stack " + stackName); + } } properties.AddShaderProperty(new StackShaderProperty() @@ -598,4 +656,98 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) return workingMasterNode as IMasterNode; } } + +#if PROCEDURAL_VT_IN_GRAPH + class SampleTextureStackProceduralBase : SampleTextureStackNodeBase + { + public SampleTextureStackProceduralBase(int numLayers) : base(numLayers, true) + { } + + [IntegerControl("Sample ID")] + public int sampleID + { + get { return m_sampleId; } + set + { + if (m_sampleId == value) + return; + + m_sampleId = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + + [SerializeField] + int m_sampleId = 0; + + protected override string GetStackName() + { + return "Procedural" + m_sampleId; + } + } + + [Title("Input", "Texture", "Sample Texture Stack Procedural 1")] + class SampleTextureStackProcedural : SampleTextureStackProceduralBase + { + public SampleTextureStackProcedural() : base(1) + { } + + [EnumControl("Type 1")] + public TextureType textureType + { + get { return m_TextureTypes[0]; } + set + { + if (m_TextureTypes[0] == value) + return; + + m_TextureTypes[0] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + } + + [Title("Input", "Texture", "Sample Texture Stack Procedural 2")] + class SampleTextureStackProcedural2 : SampleTextureStackProceduralBase + { + public SampleTextureStackProcedural2() : base(2) + { } + + [EnumControl("Type 1")] + public TextureType textureType + { + get { return m_TextureTypes[0]; } + set + { + if (m_TextureTypes[0] == value) + return; + + m_TextureTypes[0] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + + [EnumControl("Type 2")] + public TextureType textureType2 + { + get { return m_TextureTypes[1]; } + set + { + if (m_TextureTypes[1] == value) + return; + + m_TextureTypes[1] = value; + Dirty(ModificationScope.Graph); + + ValidateNode(); + } + } + } +#endif } From b79260275f5ec5e4259cf4a168033fef4479ac1d Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 20 Jan 2020 15:54:12 +0100 Subject: [PATCH 091/143] Fix changed profiling API after merge. --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index dc388c5c078..7c08283b975 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -4305,13 +4305,13 @@ void ClearBuffers(HDCamera hdCamera, CommandBuffer cmd) } #if ENABLE_VIRTUALTEXTURES - using (new ProfilingSample(cmd, "Clear VTFeedback Buffers", CustomSamplerId.VTFeedbackClear.GetSampler())) + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.VTFeedbackClear))) { RTHandle alreadyCleared = null; if (m_GbufferManager?.GetVTFeedbackBuffer() != null) { alreadyCleared = m_GbufferManager.GetVTFeedbackBuffer(); - CoreUtils.SetRenderTarget(cmd, alreadyCleared, ClearFlag.Color, Color.white); + CoreUtils.SetRenderTarget(cmd, alreadyCleared, ClearFlag.Color, Color.white); } // If the forward buffer is different from the GBuffer clear it also From 1605fae59eab83a36214479381fd7ae98d5e8594 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 27 Jan 2020 16:51:40 +0100 Subject: [PATCH 092/143] Include vt header in decails. This will give cleaner errors when users place texture stack nodes in decail graphs. --- .../Editor/Material/Decal/ShaderGraph/DecalPass.template | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template index b50790b66d5..b34e8cafd94 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template @@ -80,6 +80,7 @@ Pass //------------------------------------------------------------------------------------- $splice(DotsInstancedVars) + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #ifdef DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" From 3529465e3ae550163938ee56035fa11f1707ae41 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 27 Jan 2020 16:52:39 +0100 Subject: [PATCH 093/143] Always write to the resolve RT even intransparent mode. This ensures at least the nearest hit in transparent surfaces resolves instead of just invalid data. --- .../Editor/Material/Lit/ShaderGraph/HDLitPass.template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template index 4f1b9a00b69..a83be3c5fd3 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template @@ -354,9 +354,10 @@ $include("SharedCode.template.hlsl") $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; -#if !defined(_SURFACE_TYPE_TRANSPARENT) + //Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define) + //We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved + //This is a limitation of the current MRT approach. $SurfaceDescription.VTFeedback: builtinData.vtFeedback = surfaceDescription.VTFeedback; -#endif $DepthOffset: builtinData.depthOffset = surfaceDescription.DepthOffset; From 6d0b21b9d7ef41f618e09288679f3931a7a1083d Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 27 Jan 2020 16:54:13 +0100 Subject: [PATCH 094/143] Fix test failing because the resolver allocates memory. Now uses a subrect of a never schrinking buffer (like other post processing). --- .../Runtime/Material/VTBufferManager.cs | 44 +++++++++++-------- .../DownsampleVTFeedback.compute | 34 ++++++++++++-- 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index 30e121bfda9..08fffb1f058 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -14,7 +14,8 @@ public static GraphicsFormat GetFeedbackBufferFormat() RTHandle m_VTFeedbackBuffer; VirtualTextureResolver m_Resolver = new VirtualTextureResolver(); public static int AdditionalForwardRT = 1; - int resolveScale = 16; + const int resolveScaleFactor = 16; + Vector2 resolverScale = new Vector2(1.0f / (float)resolveScaleFactor, 1.0f / (float)resolveScaleFactor); RTHandle lowresResolver; ComputeShader downSampleCS; @@ -31,19 +32,13 @@ public void CreateBuffers(RenderPipelineSettings settings) m_VTFeedbackBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, bindTextureMS: true, enableMSAA: settings.supportMSAA, useDynamicScale: true, name: "VTFeedbackForwardMSAA"); } + + lowresResolver = RTHandles.Alloc(resolverScale, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, enableRandomWrite: true, autoGenerateMips: false, name: "VTFeedback lowres"); } public void BeginRender(int width, int height) { GetResolveDimensions(ref width, ref height); - - if (width != m_Resolver.CurrentWidth || width != m_Resolver.CurrentHeight) - { - RTHandles.Release(lowresResolver); - } - lowresResolver = RTHandles.Alloc(width, height, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, enableRandomWrite: true, autoGenerateMips: false, name: "VTFeedback lowres"); - - m_Resolver.Init((uint)width, (uint)height); } @@ -62,6 +57,15 @@ public void Resolve(CommandBuffer cmd, RTHandle rt, int width, int height) void ResolveVTDispatch(CommandBuffer cmd, RTHandle buffer, int width, int height) { + // We allow only resolving a sub-rectangle of a larger allocated buffer but not the other way around. + Debug.Assert(width <= buffer.referenceSize.x && height <= buffer.referenceSize.y); + + int lowResWidth = width; + int lowResHeight = height; + GetResolveDimensions(ref lowResWidth, ref lowResHeight); + Debug.Assert(lowResWidth <= m_Resolver.CurrentWidth && lowResHeight <= m_Resolver.CurrentHeight); + Debug.Assert(lowResWidth <= lowresResolver.referenceSize.x && lowResHeight <= lowresResolver.referenceSize.y); + string mainFunction = (buffer.enableMSAA) ? "KMainMSAA" : "KMain"; int inputID = (buffer.enableMSAA) ? HDShaderIDs._InputTextureMSAA : HDShaderIDs._InputTexture; @@ -69,26 +73,28 @@ void ResolveVTDispatch(CommandBuffer cmd, RTHandle buffer, int width, int height cmd.SetComputeTextureParam(downSampleCS, kernel, inputID, buffer.nameID); cmd.SetComputeTextureParam(downSampleCS, kernel, HDShaderIDs._OutputTexture, lowresResolver.nameID); var resolveCounter = 0; - var startOffsetX = (resolveCounter % resolveScale); - var startOffsetY = (resolveCounter / resolveScale) % resolveScale; - cmd.SetComputeVectorParam(downSampleCS, HDShaderIDs._Params, new Vector4(resolveScale, startOffsetX, startOffsetY, /*unused*/-1)); - var TGSize = 8; - cmd.DispatchCompute(downSampleCS, kernel, ((int)width + (TGSize - 1)) / TGSize, ((int)height + (TGSize - 1)) / TGSize, 1); - - GetResolveDimensions(ref width, ref height); - m_Resolver.Process(cmd, lowresResolver.nameID, 0, (uint)width, 0, (uint)height, 0, 0); + var startOffsetX = (resolveCounter % resolveScaleFactor); + var startOffsetY = (resolveCounter / resolveScaleFactor) % resolveScaleFactor; + cmd.SetComputeVectorParam(downSampleCS, HDShaderIDs._Params, new Vector4(resolveScaleFactor, startOffsetX, startOffsetY, /*unused*/-1)); + cmd.SetComputeVectorParam(downSampleCS, HDShaderIDs._Params1, new Vector4(width, height, lowResWidth, lowResHeight)); + var TGSize = 8; //Match shader + cmd.DispatchCompute(downSampleCS, kernel, ((int)lowResWidth + (TGSize - 1)) / TGSize, ((int)lowResHeight + (TGSize - 1)) / TGSize, 1); + + m_Resolver.Process(cmd, lowresResolver.nameID, 0, (uint)lowResWidth, 0, (uint)lowResHeight, 0, 0); } void GetResolveDimensions(ref int w, ref int h) { - w = (w + (resolveScale - 1)) / resolveScale; - h = (h + (resolveScale - 1)) / resolveScale; + w = Mathf.Max(Mathf.RoundToInt(resolverScale.x * w), 1); + h = Mathf.Max(Mathf.RoundToInt(resolverScale.y * h), 1); } public void DestroyBuffers() { RTHandles.Release(m_VTFeedbackBuffer); + RTHandles.Release(lowresResolver); m_VTFeedbackBuffer = null; + lowresResolver = null; m_Resolver.Dispose(); } diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute index 703a52aba3e..934f6f76e48 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute @@ -12,11 +12,17 @@ TEXTURE2D_X_MSAA(float4, _InputTextureMSAA); CBUFFER_START(cb0) float4 _Params; + float4 _Params1; CBUFFER_END #define Scale _Params.x #define startOffsetX _Params.y #define startOffsetY _Params.z +#define srcWidth _Params1.x +#define srcHeight _Params1.y +#define dstWidth _Params1.z +#define dstHeight _Params1.w + static const uint TGSize = 8; @@ -25,9 +31,20 @@ void KMain(uint3 dispatchThreadId : SV_DispatchThreadID) { const uint2 samplePos = dispatchThreadId.xy; const uint2 startOffset = uint2(startOffsetX, startOffsetY); - const uint2 offset = (startOffset + samplePos) % Scale; + const uint2 offset = (startOffset + samplePos) % Scale;// startOffset jitters the offset per frame, mixing in samplePos jitters within the macroblocks in a frame + + // At the edges we have a few threads due to round-up which are immediately terminated + if (samplePos.x >= (uint)dstWidth || samplePos.y >= (uint)dstHeight) + { + return; + } - float4 value = LOAD_TEXTURE2D_X(_InputTexture, samplePos * Scale + offset); + // Clamp to source rect + uint2 srcPos = samplePos * Scale + offset; + srcPos.x = min(srcPos.x, (uint)srcWidth - 1); + srcPos.y = min(srcPos.y, (uint)srcHeight - 1); + + float4 value = LOAD_TEXTURE2D_X(_InputTexture, srcPos); _OutputTexture[samplePos] = value; } @@ -38,6 +55,17 @@ void KMainMSAA(uint3 dispatchThreadId : SV_DispatchThreadID) const uint2 startOffset = uint2(startOffsetX, startOffsetY); const uint2 offset = (startOffset + samplePos) % Scale; - float4 value = LOAD_TEXTURE2D_X_MSAA(_InputTextureMSAA, samplePos * Scale + offset, 0); + // At the edges we have a few threads due to round-up which are immediately terminated + if (samplePos.x >= (uint)dstWidth || samplePos.y >= (uint)dstHeight) + { + return; + } + + // Clamp to source rect + uint2 srcPos = samplePos * Scale + offset; + srcPos.x = min(srcPos.x, (uint)srcWidth - 1); + srcPos.y = min(srcPos.y, (uint)srcHeight - 1); + + float4 value = LOAD_TEXTURE2D_X_MSAA(_InputTextureMSAA, srcPos, 0); _OutputTexture[samplePos] = value; } From 55f03714ee82245c4b52ab83c43a25251a6e0123 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 27 Jan 2020 16:55:16 +0100 Subject: [PATCH 095/143] Better error messages for unsupported graph types. --- .../Nodes/Input/Texture/TextureStackNode.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index f33ce698a28..9d0ea30eff5 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -213,7 +213,22 @@ private string GetTextureName(int layerIndex, GenerationMode generationMode) // Node generations public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) { - // Not all outputs may be connected (well one is or we wouln't get called) so we are carefull to + // This is not in templates or headers so this error only gets checked in shaders actually using the VT node + // as vt headers get included even if there are no vt nodes yet. + sb.AppendLine("#if defined(_SURFACE_TYPE_TRANSPARENT)"); + sb.AppendLine("#error VT cannot be used on transparent surfaces."); + sb.AppendLine("#endif"); + sb.AppendLine("#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_DBUFFER_PROJECTOR)"); //SHADERPASS is not defined for preview materials so check this first. + sb.AppendLine("#error VT cannot be used on decals. (DBuffer)"); + sb.AppendLine("#endif"); + sb.AppendLine("#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_DBUFFER_MESH)"); + sb.AppendLine("#error VT cannot be used on decals. (Mesh)"); + sb.AppendLine("#endif"); + sb.AppendLine("#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_FORWARD_EMISSIVE_PROJECTOR)"); + sb.AppendLine("#error VT cannot be used on decals. (Projector)"); + sb.AppendLine("#endif"); + + // Not all outputs may be connected (well one is or we wouldn't get called) so we are careful to // only generate code for connected outputs string stackName = GetStackName(); From 2a2a6a6ecc2fdd3b209c9443dccc7764021e4614 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 27 Jan 2020 16:56:43 +0100 Subject: [PATCH 096/143] VT test initial checkin. --- .../9x_Other/9700_VirtualTexturing.meta | 8 + .../9x_Other/9700_VirtualTexturing.unity | 2233 +++++++++++++++++ .../9x_Other/9700_VirtualTexturing.unity.meta | 7 + .../CloudGraph.shadergraph | 242 ++ .../CloudGraph.shadergraph.meta | 10 + .../9700_VirtualTexturing/CloudGraphMat.mat | 91 + .../CloudGraphMat.mat.meta | 8 + .../DecalGraph.shadergraph | 37 + .../DecalGraph.shadergraph.meta | 10 + .../9700_VirtualTexturing/DecalGraphMat.mat | 44 + .../DecalGraphMat.mat.meta | 8 + .../EmisUnlitGraph.shadergraph | 49 + .../EmisUnlitGraph.shadergraph.meta | 10 + .../9700_VirtualTexturing/EmisUnlitMat.mat | 79 + .../EmisUnlitMat.mat.meta | 8 + .../LitGraph.shadergraph | 49 + .../LitGraph.shadergraph.meta | 10 + .../9700_VirtualTexturing/LitGraphMat.mat | 83 + .../LitGraphMat.mat.meta | 8 + .../LowResolutionRequester.cs | 51 + .../LowResolutionRequester.cs.meta | 11 + .../MultiSampleGraph.shadergraph | 139 + .../MultiSampleGraph.shadergraph.meta | 10 + .../MultiSampleGraphMat.mat | 84 + .../MultiSampleGraphMat.mat.meta | 8 + .../PBRGraph.shadergraph | 43 + .../PBRGraph.shadergraph.meta | 10 + .../9700_VirtualTexturing/PBRGraphMat.mat | 35 + .../PBRGraphMat.mat.meta | 8 + .../PropGraph.shadergraph | 56 + .../PropGraph.shadergraph.meta | 10 + .../9700_VirtualTexturing/PropGraphMat.mat | 80 + .../PropGraphMat.mat.meta | 8 + .../SSSGraph.shadergraph | 43 + .../SSSGraph.shadergraph.meta | 10 + .../9700_VirtualTexturing/SSSGraphMat.mat | 86 + .../SSSGraphMat.mat.meta | 8 + .../Scene Settings Profile.asset | 169 ++ .../Scene Settings Profile.asset.meta | 8 + .../9700_VirtualTexturing/Textures.meta | 8 + .../Textures/VT_a2wall_diffuse.jpg | 3 + .../Textures/VT_a2wall_diffuse.jpg.meta | 117 + .../Textures/VT_a2wall_normal.png | 3 + .../Textures/VT_a2wall_normal.png.meta | 117 + .../Textures/VT_earth_albedo.jpg | 3 + .../Textures/VT_earth_albedo.jpg.meta | 117 + .../Textures/VT_earth_clouds.jpg | 3 + .../Textures/VT_earth_clouds.jpg.meta | 117 + .../Textures/VT_earth_clouds_normal.jpg | 3 + .../Textures/VT_earth_clouds_normal.jpg.meta | 117 + .../Textures/VT_earth_lights.jpg | 3 + .../Textures/VT_earth_lights.jpg.meta | 117 + .../Textures/earth_clouds.jpg | 3 + .../Textures/earth_clouds.jpg.meta | 93 + .../UnlitGraph.shadergraph | 37 + .../UnlitGraph.shadergraph.meta | 10 + .../9700_VirtualTexturing/UnlitGraphMat.mat | 31 + .../UnlitGraphMat.mat.meta | 8 + .../9700_VirtualTexturingSettings.lighting | 62 + ...700_VirtualTexturingSettings.lighting.meta | 8 + .../VirtualTexturingTestSceneController.cs | 115 + ...irtualTexturingTestSceneController.cs.meta | 11 + 62 files changed, 4977 insertions(+) create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Scene Settings Profile.asset create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Scene Settings Profile.asset.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_normal.png create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_normal.png.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_albedo.jpg create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_albedo.jpg.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds.jpg create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds.jpg.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_lights.jpg create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_lights.jpg.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/earth_clouds.jpg create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/earth_clouds.jpg.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturingSettings.lighting create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturingSettings.lighting.meta create mode 100644 com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs create mode 100644 com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.meta new file mode 100644 index 00000000000..f4db051ad68 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f8493e48bd94c6148befc28c658fc4de +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity new file mode 100644 index 00000000000..1d5fa63f91a --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity @@ -0,0 +1,2233 @@ +%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: 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.049135897, g: 0.06923287, b: 0.108832434, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 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_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000000, guid: 6ce0325459492594a93b5692c869356c, + type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: a1556c1d9fb367745a1c4aaa01451097, + type: 2} +--- !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 &45892344 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 45892345} + - component: {fileID: 45892347} + - component: {fileID: 45892346} + m_Layer: 0 + m_Name: LitGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &45892345 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 45892344} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.5, y: 3.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &45892346 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 45892344} + m_Text: 'Simple Lit Graph + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &45892347 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 45892344} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &133822026 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 133822030} + - component: {fileID: 133822029} + - component: {fileID: 133822028} + m_Layer: 0 + m_Name: LitGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &133822028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 133822026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: cc84e16d82c586944a35abe7b79273e4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &133822029 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 133822026} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &133822030 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 133822026} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2, y: 2.3, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &203258257 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 203258258} + - component: {fileID: 203258260} + - component: {fileID: 203258259} + m_Layer: 0 + m_Name: UnlitGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &203258258 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 203258257} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.521, y: 3.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &203258259 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 203258257} + m_Text: 'Simple Unlit Graph + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &203258260 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 203258257} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &314782149 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 314782153} + - component: {fileID: 314782152} + - component: {fileID: 314782151} + m_Layer: 0 + m_Name: UnlitGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &314782151 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 314782149} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6c09bf438cfab3d438d8fd945dc9bc84, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &314782152 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 314782149} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &314782153 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 314782149} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2, y: 2.3, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &361997041 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 361997044} + - component: {fileID: 361997043} + - component: {fileID: 361997042} + m_Layer: 0 + m_Name: Scene Settings + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &361997042 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 361997041} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: 22810a4b5b549954198ff70792391f0f, type: 2} + m_StaticLightingSkyUniqueID: 2 + m_SkySettings: {fileID: 1191271757} + m_SkySettingsFromProfile: {fileID: 114252824260178082, guid: 22810a4b5b549954198ff70792391f0f, + type: 2} +--- !u!114 &361997043 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 361997041} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: fa4ec2b9b6d574840b320077b8871c38, type: 2} +--- !u!4 &361997044 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 361997041} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1000, y: 1, z: 0} + 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!1 &411464814 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 411464815} + - component: {fileID: 411464816} + m_Layer: 0 + m_Name: SceneController + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &411464815 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 411464814} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -30, y: 0, z: 0} + 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!114 &411464816 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 411464814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0a0fe6dffef10d418605b143e1a8e4f, type: 3} + m_Name: + m_EditorClassIdentifier: + dirLight: {fileID: 1036204241} + rotateLight: 1 + rotationDegPerS: 45 + sensitivity: 30 + maxX: 88 + minX: -5 + minCameraDist: 1 + maxCameraDist: 15 +--- !u!1 &657075898 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 657075902} + - component: {fileID: 657075901} + - component: {fileID: 657075900} + m_Layer: 0 + m_Name: SubSurfaceScattered + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &657075900 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 657075898} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: dcf7b170acea5a94b8e35ec60d41744c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &657075901 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 657075898} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &657075902 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 657075898} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2, y: 0, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &698175485 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 698175486} + - component: {fileID: 698175488} + - component: {fileID: 698175487} + m_Layer: 0 + m_Name: MultiSample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &698175486 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 698175485} + m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: -2.4, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!23 &698175487 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 698175485} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0e0805d3bf312e34585b88bb067a8c22, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &698175488 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 698175485} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &878058836 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 878058837} + - component: {fileID: 878058839} + - component: {fileID: 878058838} + m_Layer: 0 + m_Name: PBRGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &878058837 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 878058836} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.395, y: 3.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &878058838 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 878058836} + m_Text: Simple PBR Graph + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &878058839 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 878058836} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &1036204241 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1036204245} + - component: {fileID: 1036204244} + - component: {fileID: 1036204243} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1036204243 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036204241} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 9 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 + m_Intensity: 3.1415927 + m_EnableSpotReflector: 0 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 0 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 2 + m_FadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 0.99 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + m_AreaLightShadowCone: 120 + m_UseScreenSpaceShadows: 0 + m_InteractsWithSky: 1 + m_AngularDiameter: 0 + m_FlareSize: 2 + m_FlareTint: {r: 1, g: 1, b: 1, a: 1} + m_FlareFalloff: 4 + m_SurfaceTexture: {fileID: 0} + m_SurfaceTint: {r: 1, g: 1, b: 1, a: 1} + m_Distance: 150000000 + m_UseRayTracedShadows: 0 + m_NumRayTracingSamples: 4 + m_FilterTracedShadow: 1 + m_FilterSizeTraced: 16 + m_SunLightConeAngle: 0.5 + m_LightShadowRadius: 0.5 + m_ColorShadow: 1 + m_EvsmExponent: 15 + m_EvsmLightLeakBias: 0 + m_EvsmVarianceBias: 0.00001 + m_EvsmBlurPasses: 0 + m_LightlayersMask: 1 + m_LinkShadowLayers: 1 + m_ShadowNearPlane: 0.2 + m_BlockerSampleCount: 24 + m_FilterSampleCount: 32 + m_MinFilterSize: 0.01 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 1 + m_ShadowDimmer: 1 + m_VolumetricShadowDimmer: 1 + m_ShadowFadeDistance: 10000 + m_UseContactShadow: + m_Override: 0 + m_UseOverride: 1 + m_Level: 0 + m_RayTracedContactShadow: 0 + m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} + m_PenumbraTint: 0 + m_NormalBias: 0.75 + m_SlopeBias: 0.5 + m_ShadowUpdateMode: 0 + m_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_ShadowCascadeRatios: + - 0.05 + - 0.2 + - 0.3 + m_ShadowCascadeBorders: + - 0.2 + - 0.2 + - 0.2 + - 0.2 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 3 + m_ShadowPrecision: 0 + useOldInspector: 0 + useVolumetric: 1 + featuresFoldout: 1 + showAdditionalSettings: 0 +--- !u!108 &1036204244 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036204241} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 3.1415927 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + 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_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 2 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1036204245 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036204241} + m_LocalRotation: {x: 0.2981349, y: 0.124443755, z: -0.03923696, w: 0.94556326} + m_LocalPosition: {x: 0, y: 7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 35, y: 14.995001, z: 0} +--- !u!1 &1053123894 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1053123895} + m_Layer: 0 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1053123895 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1053123894} + 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: + - {fileID: 45892345} + - {fileID: 878058837} + - {fileID: 203258258} + - {fileID: 1604621049} + - {fileID: 1132552987} + - {fileID: 1179882697} + - {fileID: 1178773848} + m_Father: {fileID: 2056951134} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1132552986 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1132552987} + - component: {fileID: 1132552989} + - component: {fileID: 1132552988} + m_Layer: 0 + m_Name: PropertyOverrideGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1132552987 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1132552986} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.395, y: 1.2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &1132552988 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1132552986} + m_Text: 'Material Property Override Earth + + Alpha Tested Lit Clouds' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &1132552989 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1132552986} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &1178773847 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1178773848} + - component: {fileID: 1178773850} + - component: {fileID: 1178773849} + m_Layer: 0 + m_Name: MultiSample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1178773848 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1178773847} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.31, y: -1.1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &1178773849 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1178773847} + m_Text: Multiple VT Samples, Separate UV's + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &1178773850 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1178773847} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &1179882696 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1179882697} + - component: {fileID: 1179882699} + - component: {fileID: 1179882698} + m_Layer: 0 + m_Name: EmisUnlitGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1179882697 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179882696} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.36, y: 1.2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &1179882698 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179882696} + m_Text: 'Unlit Emisson Graph + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &1179882699 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179882696} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &1191271757 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: 3df29e7cc05fbec4aa43e06ea875565d, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + rotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 0 + multiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxColor: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + min: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + sunSize: + m_OverrideState: 0 + m_Value: 0.04 + min: 0 + max: 1 + sunSizeConvergence: + m_OverrideState: 0 + m_Value: 5 + min: 1 + max: 10 + atmosphereThickness: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 5 + skyTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + groundColor: + m_OverrideState: 0 + m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + enableSunDisk: + m_OverrideState: 0 + m_Value: 1 +--- !u!1 &1303166446 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1303166450} + - component: {fileID: 1303166449} + - component: {fileID: 1303166448} + m_Layer: 0 + m_Name: PBRGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1303166448 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1303166446} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44f5224734b61e94fa0b4eb2d8dea605, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1303166449 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1303166446} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1303166450 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1303166446} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 2.3, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1604621048 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1604621049} + - component: {fileID: 1604621051} + - component: {fileID: 1604621050} + m_Layer: 0 + m_Name: Sub Surface Scattered + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1604621049 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1604621048} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.5, y: 1.2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &1604621050 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1604621048} + m_Text: Sub Surface Scattered + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &1604621051 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1604621048} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &1984901468 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1984901469} + - component: {fileID: 1984901471} + - component: {fileID: 1984901470} + - component: {fileID: 1984901472} + m_Layer: 0 + m_Name: Clouds + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1984901469 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1984901468} + m_LocalRotation: {x: -0, y: -0, z: -0.0000000060535967, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.1, y: 1.1, z: 1.1} + m_Children: [] + m_Father: {fileID: 2088724965} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 5, z: 90} +--- !u!23 &1984901470 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1984901468} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 48186b9b44885574a9e56fd68988986d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1984901471 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1984901468} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1984901472 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1984901468} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8098e6a0c5b7c054abf14fe03508004f, type: 3} + m_Name: + m_EditorClassIdentifier: + materialToRequest: {fileID: 2100000, guid: 48186b9b44885574a9e56fd68988986d, type: 2} + firstMipToRequest: 0 +--- !u!1 &2056951133 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2056951134} + m_Layer: 0 + m_Name: Balls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2056951134 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2056951133} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -30, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 133822030} + - {fileID: 1303166450} + - {fileID: 314782153} + - {fileID: 657075902} + - {fileID: 2088724965} + - {fileID: 2090775361} + - {fileID: 698175486} + - {fileID: 1053123895} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2088724961 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2088724965} + - component: {fileID: 2088724964} + - component: {fileID: 2088724963} + m_Layer: 0 + m_Name: PropertyOverrideGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2088724963 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2088724961} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 275d5e59711e73a439d896a258144eda, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2088724964 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2088724961} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2088724965 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2088724961} + m_LocalRotation: {x: 0, y: 0.043619405, z: 0, w: 0.9990483} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: + - {fileID: 1984901469} + m_Father: {fileID: 2056951134} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 5, z: 0} +--- !u!1 &2090775357 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2090775361} + - component: {fileID: 2090775360} + - component: {fileID: 2090775359} + m_Layer: 0 + m_Name: EmisUnlitGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2090775359 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090775357} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 235d3c3699f368b458ff0c1d16bab6a1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2090775360 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090775357} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2090775361 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090775357} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2, y: 0, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &3711618258335929874 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_Version + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableShadow + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableContactShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableShadowMask + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableSSR + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableSSAO + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableSubsurfaceScattering + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableTransmission + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableAtmosphericScattering + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableVolumetrics + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableReprojectionForVolumetrics + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableLightLayers + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.diffuseGlobalDimmer + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.specularGlobalDimmer + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableTransparentPrepass + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableMotionVectors + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableObjectMotionVectors + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableDecals + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableRoughRefraction + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableTransparentPostpass + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableDistortion + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enablePostprocess + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableOpaqueObjects + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableTransparentObjects + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.enableAsyncCompute + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableDeferredTileAndCluster + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableComputeLightEvaluation + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableComputeLightVariants + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableComputeMaterialVariants + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableFptlForForwardOpaque + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableBigTilePrepass + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.isFptlEnabled + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 + value: 2110976425804 + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: secondCamera + value: + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: sgObjs + value: + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: biObjs + value: + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: ImageComparisonSettings.PerPixelCorrectnessThreshold + value: 0.0005 + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: ImageComparisonSettings.AverageCorrectnessThreshold + value: 0.00005 + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: renderPipelineAsset + value: + objectReference: {fileID: 11400000, guid: d7fe5f39d2c099a4ea1f1f610af309d7, + type: 2} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: xrLayout + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: xrThresholdMultiplier + value: 1.5 + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: waitFrames + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: compareSGtoBI + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3712748143588121123, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_Name + value: HDRP_VirtualTexturing_Test_Camera + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalPosition.x + value: -30 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.073 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalPosition.z + value: -6.3 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f639aeb2b271eb458c4303b4c365c42, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity.meta new file mode 100644 index 00000000000..d5903ea8f3d --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 897c2870240f77a46a18884a0446b797 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph new file mode 100644 index 00000000000..fde5ddef6aa --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph @@ -0,0 +1,242 @@ +{ + "m_SerializedProperties": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty" + }, + "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"ef0c5218-02be-43d2-858e-592354a6cfed\"\n },\n \"m_Name\": \"Metallic\",\n \"m_DefaultReferenceName\": \"\",\n \"m_OverrideReferenceName\": \"Vector1_A6D4BDE2\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": 0.8999999761581421,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty" + }, + "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"5ac744a1-eef9-4c42-a281-6bd143fbd014\"\n },\n \"m_Name\": \"Smoothness\",\n \"m_DefaultReferenceName\": \"\",\n \"m_OverrideReferenceName\": \"Vector1_1EC2602A\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": 0.5,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" + } + ], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.HDLitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"0004a8ba-604a-4734-81ac-ec71efa2d4e2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 3.0,\n \"y\": -644.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.9339622855186462,\\n \\\"y\\\": 0.9339622855186462,\\n \\\"z\\\": 0.9339622855186462\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 17,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": false,\n \"m_TransparencyFog\": false,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": false,\n \"m_AlphaTest\": true,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": false,\n \"m_ReceiveDecals\": false,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": false,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_DOTSInstancing\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 10\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PropertyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"092d2f83-9486-496a-bd55-6b11fd236050\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -298.0000305175781,\n \"y\": -184.0,\n \"width\": 118.00000762939453,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"ef0c5218-02be-43d2-858e-592354a6cfed\"\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode2" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"308ee1bc-7f36-4ba5-9ff1-04acc460fdfa\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -711.0,\n \"y\": -534.0,\n \"width\": 212.00001525878907,\n \"height\": 209.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"9d826512ba2dfdd43b55968c032dde91\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"312de1f115b043b42804703d66a0e4b8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.OneMinusNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"48225bcc-e33f-4d09-b380-a2e293e91fd0\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"One Minus\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1339.0001220703125,\n \"y\": -307.0,\n \"width\": 208.00001525878907,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.TimeNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"58fddeaf-5e19-4c7c-906a-a7625bccbf2b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Time\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2168.0,\n \"y\": -590.9999389648438,\n \"width\": 133.0,\n \"height\": 173.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Time\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Time\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Sine Time\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sine Time\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Cosine Time\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Cosine Time\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Delta Time\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Delta Time\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Smooth Delta\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smooth Delta\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UVNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"5e8e4c97-0caa-4f3c-aa5d-b10c167ab561\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1673.9998779296875,\n \"y\": -959.0,\n \"width\": 207.99998474121095,\n \"height\": 311.9999694824219\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.AddNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"90b32223-1f19-4047-975d-4f3631a13f03\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -558.0,\n \"y\": -260.0000305175781,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.20000000298023225,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PowerNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"9f9a4fc9-7e9d-4f76-8276-2f1279e4538b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Power\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1078.0001220703125,\n \"y\": -317.0,\n \"width\": 208.00001525878907,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 4.0,\\n \\\"y\\\": 2.0,\\n \\\"z\\\": 2.0,\\n \\\"w\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"a4323ab5-7056-40f3-ac97-e16df1c0e181\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1476.0,\n \"y\": -641.0,\n \"width\": 207.99998474121095,\n \"height\": 301.9999694824219\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": -0.5,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.OneMinusNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"a9cad4fc-17d0-4cfe-8109-d16897860d36\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"One Minus\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -803.0000610351563,\n \"y\": -259.0,\n \"width\": 208.00001525878907,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PropertyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"b4a161b9-c67d-49d1-804b-31e89d07ca25\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -330.0,\n \"y\": -91.00004577636719,\n \"width\": 144.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"5ac744a1-eef9-4c42-a281-6bd143fbd014\"\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.AddNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"bbef275a-cffa-4318-b56e-c21cb06b7da2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -940.0000610351563,\n \"y\": 51.99998474121094,\n \"width\": 208.00001525878907,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.4000000059604645,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.DitherNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"bdbe3eb8-08d6-46d3-9dfc-06f489912cee\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Dither\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1229.0001220703125,\n \"y\": 38.000003814697269,\n \"width\": 212.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ScreenPositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Screen Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"ScreenPosition\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_ScreenSpaceType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SplitNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"c99aec2a-b9f5-4fb6-9f55-2524371059ba\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Split\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -400.0,\n \"y\": -458.0,\n \"width\": 128.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Vector2Node" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"d023280a-c244-4992-a753-c91bb9a38cda\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Vector 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1689.9998779296875,\n \"y\": -516.0,\n \"width\": 128.99998474121095,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"X\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"X\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Y\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Y\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Value\": {\n \"x\": 0.0,\n \"y\": 0.0\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.AddNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"d8ef3c23-259a-485a-ac9d-24a4a48b3988\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1935.9998779296875,\n \"y\": -584.0000610351563,\n \"width\": 128.99998474121095,\n \"height\": 117.99999237060547\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.12999999523162843,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.AddNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"e80c7bb6-7579-4fc7-8c51-ea8fbf8793cb\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -649.9675903320313,\n \"y\": 85.03246307373047,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.10000000149011612,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.AddNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"ed3a3f04-9634-4c1a-b0e6-52bd68747507\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1181.0,\n \"y\": -880.0,\n \"width\": 207.99998474121095,\n \"height\": 301.9999694824219\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"092d2f83-9486-496a-bd55-6b11fd236050\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 12,\n \"m_NodeGUIDSerialized\": \"0004a8ba-604a-4734-81ac-ec71efa2d4e2\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"308ee1bc-7f36-4ba5-9ff1-04acc460fdfa\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"c99aec2a-b9f5-4fb6-9f55-2524371059ba\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"308ee1bc-7f36-4ba5-9ff1-04acc460fdfa\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"0004a8ba-604a-4734-81ac-ec71efa2d4e2\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"48225bcc-e33f-4d09-b380-a2e293e91fd0\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"9f9a4fc9-7e9d-4f76-8276-2f1279e4538b\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5e8e4c97-0caa-4f3c-aa5d-b10c167ab561\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"ed3a3f04-9634-4c1a-b0e6-52bd68747507\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"90b32223-1f19-4047-975d-4f3631a13f03\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 16,\n \"m_NodeGUIDSerialized\": \"0004a8ba-604a-4734-81ac-ec71efa2d4e2\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"9f9a4fc9-7e9d-4f76-8276-2f1279e4538b\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"a9cad4fc-17d0-4cfe-8109-d16897860d36\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"a4323ab5-7056-40f3-ac97-e16df1c0e181\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"ed3a3f04-9634-4c1a-b0e6-52bd68747507\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"a9cad4fc-17d0-4cfe-8109-d16897860d36\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e80c7bb6-7579-4fc7-8c51-ea8fbf8793cb\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"b4a161b9-c67d-49d1-804b-31e89d07ca25\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 14,\n \"m_NodeGUIDSerialized\": \"0004a8ba-604a-4734-81ac-ec71efa2d4e2\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"bbef275a-cffa-4318-b56e-c21cb06b7da2\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"90b32223-1f19-4047-975d-4f3631a13f03\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"bdbe3eb8-08d6-46d3-9dfc-06f489912cee\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"bbef275a-cffa-4318-b56e-c21cb06b7da2\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"c99aec2a-b9f5-4fb6-9f55-2524371059ba\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"48225bcc-e33f-4d09-b380-a2e293e91fd0\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"d023280a-c244-4992-a753-c91bb9a38cda\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"a4323ab5-7056-40f3-ac97-e16df1c0e181\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"d8ef3c23-259a-485a-ac9d-24a4a48b3988\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"d023280a-c244-4992-a753-c91bb9a38cda\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"e80c7bb6-7579-4fc7-8c51-ea8fbf8793cb\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"90b32223-1f19-4047-975d-4f3631a13f03\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"ed3a3f04-9634-4c1a-b0e6-52bd68747507\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"308ee1bc-7f36-4ba5-9ff1-04acc460fdfa\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Transparent", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "0004a8ba-604a-4734-81ac-ec71efa2d4e2" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph.meta new file mode 100644 index 00000000000..006b180361f --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ab27d72fec363a047a6c74c0b7f8cef1 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat new file mode 100644 index 00000000000..007a379c1bc --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: CloudGraphMat + m_Shader: {fileID: -6465566751694194690, guid: ab27d72fec363a047a6c74c0b7f8cef1, + type: 3} + m_ShaderKeywords: _ALPHATEST_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2450 + stringTagMap: + MotionVector: User + RenderType: TransparentCutout + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - Texture2D_26D31A1D: + m_Texture: {fileID: 2800000, guid: c2f3ef3cb804f414e90609a436ec8e8a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_164AE2E_Texture2_4: + m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_164AE2E_Texture_3: + m_Texture: {fileID: 2800000, guid: 9d826512ba2dfdd43b55968c032dde91, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Vector1_1EC2602A: 0.5 + - Vector1_A6D4BDE2: 0.5 + - _AlphaCutoffEnable: 1 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 0 + - _ReceivesSSR: 1 + - _RenderQueueType: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 2 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 64 + - _StencilRefGBuffer: 2 + - _StencilRefMV: 128 + - _StencilWriteMask: 3 + - _StencilWriteMaskDepth: 48 + - _StencilWriteMaskDistortionVec: 64 + - _StencilWriteMaskGBuffer: 51 + - _StencilWriteMaskMV: 176 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 3 + - _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 &4048175855346994500 +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: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat.meta new file mode 100644 index 00000000000..58b71969633 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 48186b9b44885574a9e56fd68988986d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph new file mode 100644 index 00000000000..ec24c256e3c --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph @@ -0,0 +1,37 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"68065f08-7c25-43d3-bce2-bab59a5a253a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -777.0,\n \"y\": 24.0,\n \"width\": 205.0,\n \"height\": 160.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.DecalMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"8dbb241d-9c32-43a4-a837-03d1bf24228b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Decal Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -351.0000915527344,\n \"y\": -57.00001525878906,\n \"width\": 200.00001525878907,\n \"height\": 341.0000305175781\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"BaseColor Opacity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaAlbedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Normal Opacity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Ambient Occlusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"MAOS Opacity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"MAOSOpacity\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.DecalSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_AffectsMetal\": true,\n \"m_AffectsAO\": true,\n \"m_AffectsSmoothness\": true,\n \"m_AffectsAlbedo\": true,\n \"m_AffectsNormal\": true,\n \"m_AffectsEmission\": true,\n \"m_DrawOrder\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"68065f08-7c25-43d3-bce2-bab59a5a253a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"8dbb241d-9c32-43a4-a837-03d1bf24228b\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "8dbb241d-9c32-43a4-a837-03d1bf24228b" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph.meta new file mode 100644 index 00000000000..43271f2740e --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3899f9a985edc8444a69309861892c4c +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat new file mode 100644 index 00000000000..290aa38ca34 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat @@ -0,0 +1,44 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: DecalGraphMat + m_Shader: {fileID: -6465566751694194690, guid: 3899f9a985edc8444a69309861892c4c, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleTextureStack1_F1146E9_Texture_2: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _DecalMeshDepthBias: 0 + - _DrawOrder: 0 + m_Colors: [] + m_BuildTextureStacks: [] +--- !u!114 &4550561707362505580 +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: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat.meta new file mode 100644 index 00000000000..5383aeec62f --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 342da00bb7479ee4496c018d481c260f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph new file mode 100644 index 00000000000..5121217784a --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph @@ -0,0 +1,49 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"1a944490-65d6-4417-b514-6cc13b6bd635\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -217.0,\n \"y\": 328.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 10.0,\\n \\\"e01\\\": 7.0,\\n \\\"e02\\\": 5.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"418ce6b5-1a87-4747-940b-2238d19f921b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -557.0,\n \"y\": 198.0,\n \"width\": 205.0,\n \"height\": 160.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"062e2e8c474a74644bc719d5d294c476\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.HDUnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"86ecdce8-13f2-4fea-ad8d-8732fdaeb77b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.003921568859368563,\\n \\\"y\\\": 0.003921568859368563,\\n \\\"z\\\": 0.003921568859368563\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDUnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionOnly\": true,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSided\": false,\n \"m_ZWrite\": true,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnableShadowMatte\": false\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"1a944490-65d6-4417-b514-6cc13b6bd635\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 12,\n \"m_NodeGUIDSerialized\": \"86ecdce8-13f2-4fea-ad8d-8732fdaeb77b\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"418ce6b5-1a87-4747-940b-2238d19f921b\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"1a944490-65d6-4417-b514-6cc13b6bd635\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "86ecdce8-13f2-4fea-ad8d-8732fdaeb77b" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph.meta new file mode 100644 index 00000000000..0aff8de59c2 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6160a92e39d31d14582bc3f037b78082 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat new file mode 100644 index 00000000000..99e4fa5c7e7 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat @@ -0,0 +1,79 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-877316350253502381 +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: 0 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: EmisUnlitMat + m_Shader: {fileID: -6465566751694194690, guid: 6160a92e39d31d14582bc3f037b78082, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleTextureStack1_E020294_Texture_2: + m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 0 + - _RenderQueueType: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 2 + - _StencilRefDepth: 32 + - _StencilRefDistortionVec: 64 + - _StencilRefGBuffer: 34 + - _StencilRefMV: 160 + - _StencilWriteMask: 3 + - _StencilWriteMaskDepth: 48 + - _StencilWriteMaskDistortionVec: 64 + - _StencilWriteMaskGBuffer: 51 + - _StencilWriteMaskMV: 176 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 4 + - _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: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat.meta new file mode 100644 index 00000000000..611a1870cbe --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 235d3c3699f368b458ff0c1d16bab6a1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph new file mode 100644 index 00000000000..f5c95992e08 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph @@ -0,0 +1,49 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.HDLitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -281.0,\n \"y\": -157.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_DOTSInstancing\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode2" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -802.0,\n \"y\": -50.0,\n \"width\": 205.0,\n \"height\": 209.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e793b1c02c4f7ae448a9cc2c39447dd7\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 14,\n \"m_NodeGUIDSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "509edd25-5c61-4140-a3f0-92f3d9356390" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph.meta new file mode 100644 index 00000000000..c4f3ccf31f0 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 725a9a7054c16c84cb0b83d52871dad2 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat new file mode 100644 index 00000000000..3a19708ad99 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8464309422812162092 +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: 0 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LitGraphMat + m_Shader: {fileID: -6465566751694194690, guid: 725a9a7054c16c84cb0b83d52871dad2, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleTextureStack2_38945874_Texture2_4: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_38945874_Texture_3: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 1 + - _RenderQueueType: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 2 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 64 + - _StencilRefGBuffer: 2 + - _StencilRefMV: 128 + - _StencilWriteMask: 3 + - _StencilWriteMaskDepth: 48 + - _StencilWriteMaskDistortionVec: 64 + - _StencilWriteMaskGBuffer: 51 + - _StencilWriteMaskMV: 176 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 4 + - _ZTestGBuffer: 4 + - _ZTestTransparent: 4 + - _ZWrite: 0 + m_Colors: + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat.meta new file mode 100644 index 00000000000..8465cb44d62 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc84e16d82c586944a35abe7b79273e4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs new file mode 100644 index 00000000000..b647e41f507 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs @@ -0,0 +1,51 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Rendering = UnityEngine.Experimental.Rendering; + +[ExecuteInEditMode] +public class LowResolutionRequester : MonoBehaviour +{ + public Material materialToRequest; + List properties = new List(); + public int firstMipToRequest; + + // Start is called before the first frame update + void Start() + { + if (materialToRequest == null) return; + Shader shad = materialToRequest.shader; + + // Hack, we simply request all stacks in the shader ideally we would have some way + // to identify a specific stack within a shader. + properties.Clear(); + for ( int i=0;i maxCameraDist) currentDist = maxCameraDist; + + // Camera movement + if (cameraMovement) MoveCamera(); + } + + private void MoveCamera() + { + // Set rotation + float gainX = Input.GetAxis("Mouse Y"); + float gainY = Input.GetAxis("Mouse X"); + + rotX += (gainX * Time.deltaTime * sensitivity); + rotY -= (gainY * Time.deltaTime * sensitivity); + if (rotX < minX) rotX = minX; + if (rotX > maxX) rotX = maxX; + rotY %= 360.0f; + if (rotY < 0.0f) rotY += 360.0f; + + cameraGO.transform.eulerAngles = new Vector3(rotX, rotY, 0.0f); + + // Set position + float sinY = Mathf.Sin(rotY * Mathf.Deg2Rad); + float sinX = Mathf.Sin(rotX * Mathf.Deg2Rad); + float cosY = Mathf.Cos(rotY * Mathf.Deg2Rad); + float cosX = Mathf.Cos(rotX * Mathf.Deg2Rad); + cameraGO.transform.position = + GetRotationPointGameObj().transform.position + + new Vector3( + (currentDist * -sinY) * cosX, + (currentDist * sinX), + (currentDist * -cosY) * cosX); + } + + protected virtual GameObject GetRotationPointGameObj() + { + return gameObject; + } + +} diff --git a/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs.meta b/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs.meta new file mode 100644 index 00000000000..40faad83641 --- /dev/null +++ b/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b0a0fe6dffef10d418605b143e1a8e4f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 15787213747ced4c1a253184b12c2b4056f248ec Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Tue, 28 Jan 2020 17:46:36 +0100 Subject: [PATCH 097/143] Updated VirtualTexturing integration based on latest C# interface --- .../Runtime/Material/VTBufferManager.cs | 10 +++++----- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index 30e121bfda9..c5f93df8d9a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -1,9 +1,9 @@ +#if ENABLE_VIRTUALTEXTURES +using VirtualTexturing = UnityEngine.Rendering.VirtualTexturing; using UnityEngine.Experimental.Rendering; - namespace UnityEngine.Rendering.HighDefinition { -#if ENABLE_VIRTUALTEXTURES public class VTBufferManager { public static GraphicsFormat GetFeedbackBufferFormat() @@ -12,7 +12,7 @@ public static GraphicsFormat GetFeedbackBufferFormat() } RTHandle m_VTFeedbackBuffer; - VirtualTextureResolver m_Resolver = new VirtualTextureResolver(); + VirtualTexturing.Resolver m_Resolver = new VirtualTexturing.Resolver(); public static int AdditionalForwardRT = 1; int resolveScale = 16; RTHandle lowresResolver; @@ -44,7 +44,7 @@ public void BeginRender(int width, int height) lowresResolver = RTHandles.Alloc(width, height, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, enableRandomWrite: true, autoGenerateMips: false, name: "VTFeedback lowres"); - m_Resolver.Init((uint)width, (uint)height); + m_Resolver.UpdateSize((uint)width, (uint)height); } public void Resolve(CommandBuffer cmd, RTHandle rt, int width, int height) @@ -100,5 +100,5 @@ public RTHandle GetFeedbackBuffer() } -#endif } +#endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 7c08283b975..69d86f347f8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -2311,7 +2311,7 @@ void Callback(CommandBuffer c, HDCamera cam) #if ENABLE_VIRTUALTEXTURES m_VtBufferManager.Resolve(cmd, m_GbufferManager.GetVTFeedbackBuffer(), hdCamera.actualWidth, hdCamera.actualHeight); - VirtualTexturing.UpdateSystem(); + VirtualTexturing.System.Update(); #endif // At this point, m_CameraColorBuffer has been filled by either debug views are regular rendering so we can push it here. From 9ceafc1f17926e30054f4f4844c83b2ade6b019b Mon Sep 17 00:00:00 2001 From: Nico Leyman Date: Wed, 29 Jan 2020 16:09:31 +0100 Subject: [PATCH 098/143] Simple VT settings asset and editor to test interface. --- .../HDRenderPipelineMenuItems.cs | 15 +++ .../RenderPipeline/HDRenderPipelineUI.cs | 9 +- .../SerializedHDRenderPipelineAsset.cs | 2 + .../VirtualTexturingSettingsEditor.cs | 122 ++++++++++++++++++ .../VirtualTexturingSettingsEditor.cs.meta | 11 ++ .../RenderPipeline/HDRenderPipeline.cs | 4 + .../RenderPipeline/HDRenderPipelineAsset.cs | 9 ++ .../VirtualTexturingSettings.cs | 12 ++ .../VirtualTexturingSettings.cs.meta | 11 ++ .../HDRenderPipelineResources.asset | 4 +- 10 files changed, 197 insertions(+), 2 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs create mode 100644 com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs.meta create mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs create mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs.meta diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs index fe67955945c..a2b7abdb68a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs @@ -272,6 +272,14 @@ protected override void PostCreateAssetWork(DiffusionProfileSettings asset) } } + class DoCreateNewAssetVirtualTexturingSettings : DoCreateNewAsset + { + protected override void PostCreateAssetWork(VirtualTexturingSettings asset) + { + + } + } + [MenuItem("Assets/Create/Rendering/Diffusion Profile", priority = CoreUtils.assetCreateMenuPriority2)] static void MenuCreateDiffusionProfile() { @@ -279,6 +287,13 @@ static void MenuCreateDiffusionProfile() ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance(), "New Diffusion Profile.asset", icon, null); } + [MenuItem("Assets/Create/Rendering/Virtual Texturing Settings", priority = CoreUtils.assetCreateMenuPriority2)] + static void MenuCreateVirtualTexturingSettings() + { + var icon = EditorGUIUtility.FindTexture("ScriptableObject Icon"); + ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance(), "New Virtual Texturing Settings.asset", icon, null); + } + [MenuItem("Assets/Create/Shader/HDRP/Custom FullScreen Pass")] static void MenuCreateCustomFullScreenPassShader() { diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index 7f64d3cc1c8..10082c45690 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -40,6 +40,7 @@ enum Expandable ContactShadowQuality = 1 << 24, LightingQuality = 1 << 25, SSRQuality = 1 << 26, + VirtualTexturing = 1 << 27, } static readonly ExpandedState k_ExpandedState = new ExpandedState(Expandable.CameraFrameSettings | Expandable.General, "HDRP"); @@ -98,7 +99,8 @@ static HDRenderPipelineUI() CED.FoldoutGroup(Styles.bloomQualitySettings, Expandable.BloomQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionBloomQualitySettings), CED.FoldoutGroup(Styles.chromaticAberrationQualitySettings, Expandable.ChromaticAberrationQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionChromaticAberrationQualitySettings) ), - CED.FoldoutGroup(Styles.xrTitle, Expandable.XR, k_ExpandedState, Drawer_SectionXRSettings) + CED.FoldoutGroup(Styles.xrTitle, Expandable.XR, k_ExpandedState, Drawer_SectionXRSettings), + CED.FoldoutGroup(EditorGUIUtility.TrTextContent("Virtual Texturing"), Expandable.VirtualTexturing, k_ExpandedState, Drawer_VirtualTexturingSettings) ); // fix init of selection along what is serialized @@ -897,6 +899,11 @@ static void DrawDiffusionProfileElement(SerializedProperty element, Rect rect, i EditorGUI.ObjectField(rect, element, EditorGUIUtility.TrTextContent("Profile " + index)); } + static void Drawer_VirtualTexturingSettings(SerializedHDRenderPipelineAsset serialized, Editor owner) + { + EditorGUILayout.PropertyField(serialized.virtualTexturingSettings, EditorGUIUtility.TrTextContent("Virtual Texturing Settings")); + } + const string supportedFormaterMultipleValue = "\u2022 {0} --Multiple different values--"; const string supportedFormater = "\u2022 {0} ({1})"; const string supportedLitShaderModeFormater = "\u2022 {0}: {1} ({2})"; diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs index 1f1572a90e6..b7f6f84de14 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs @@ -16,6 +16,7 @@ class SerializedHDRenderPipelineAsset public SerializedProperty allowShaderVariantStripping; public SerializedProperty enableSRPBatcher; public SerializedProperty shaderVariantLogLevel; + public SerializedProperty virtualTexturingSettings; public SerializedRenderPipelineSettings renderPipelineSettings; public SerializedFrameSettings defaultFrameSettings; public SerializedFrameSettings defaultBakedOrCustomReflectionFrameSettings; @@ -58,6 +59,7 @@ public SerializedHDRenderPipelineAsset(SerializedObject serializedObject) allowShaderVariantStripping = serializedObject.Find((HDRenderPipelineAsset s) => s.allowShaderVariantStripping); enableSRPBatcher = serializedObject.Find((HDRenderPipelineAsset s) => s.enableSRPBatcher); shaderVariantLogLevel = serializedObject.Find((HDRenderPipelineAsset s) => s.shaderVariantLogLevel); + virtualTexturingSettings = serializedObject.Find((HDRenderPipelineAsset s) => s.virtualTexturingSettings); renderPipelineSettings = new SerializedRenderPipelineSettings(serializedObject.FindProperty("m_RenderPipelineSettings")); defaultFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultCameraFrameSettings"), null); //no overrides in HDRPAsset diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs new file mode 100644 index 00000000000..4caedb91fde --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs @@ -0,0 +1,122 @@ +using UnityEditor.Rendering; +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; +using VirtualTexturingSettings = UnityEngine.Rendering.HighDefinition.VirtualTexturingSettings; + +namespace UnityEditor.Rendering.HighDefinition +{ + [CustomEditor(typeof(VirtualTexturingSettings))] + partial class VirtualTexturingSettingsEditor : HDBaseEditor + { + sealed class Settings + { + internal SerializedProperty self; + internal UnityEngine.Experimental.Rendering.VirtualTexturingSettings objReference; + + internal SerializedProperty cpuCacheSize; + internal SerializedProperty gpuCacheSize; + internal SerializedProperty gpuCacheSizeOverrides; + } + + Settings m_Settings; + + private bool m_Dirty = false; + + protected override void OnEnable() + { + base.OnEnable(); + + var serializedSettings = properties.Find(x => x.settings); + + var rp = new RelativePropertyFetcher(serializedSettings); + + m_Settings = new Settings + { + self = serializedSettings, + objReference = m_Target.settings, + + cpuCacheSize = rp.Find(x => x.cpuCache.size), + gpuCacheSize = rp.Find(x => x.gpuCache.size), + gpuCacheSizeOverrides = rp.Find(x => x.gpuCache.sizeOverrides), + }; + + Undo.undoRedoPerformed += UpdateSettings; + } + + void OnDisable() + { + Undo.undoRedoPerformed -= UpdateSettings; + } + + void ApplyChanges() + { + VirtualTexturing.ApplyVirtualTexturingSettings(m_Settings.objReference); + } + + public override void OnInspectorGUI() + { + CheckStyles(); + + serializedObject.Update(); + + EditorGUILayout.Space(); + + EditorGUI.indentLevel++; + + using (var scope = new EditorGUI.ChangeCheckScope()) + { + EditorGUILayout.PropertyField(m_Settings.cpuCacheSize, s_Styles.cpuCacheSize); + EditorGUILayout.PropertyField(m_Settings.gpuCacheSize, s_Styles.gpuCacheSize); + + serializedObject.ApplyModifiedProperties(); + + if (scope.changed) + { + m_Dirty = true; + } + } + + EditorGUILayout.Space(); + + if (m_Dirty) + { + if (GUILayout.Button("Apply")) + { + ApplyChanges(); + m_Dirty = false; + } + } + + EditorGUILayout.Space(); + EditorGUI.indentLevel--; + + serializedObject.ApplyModifiedProperties(); + } + + void UpdateSettings() + { + //m_Target.settings.Validate(); + } + sealed class Styles + { + public readonly GUIContent cpuCacheSize = new GUIContent("CPU Cache Size"); + public readonly GUIContent gpuCacheSize = new GUIContent("GPU Cache Size"); + + public Styles() + { + + } + } + + static Styles s_Styles; + + // Can't use a static initializer in case we need to create GUIStyle in the Styles class as + // these can only be created with an active GUI rendering context + void CheckStyles() + { + if (s_Styles == null) + s_Styles = new Styles(); + } + } +} diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs.meta b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs.meta new file mode 100644 index 00000000000..4ae04e21758 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70f0b6c3ec6c0204cb6c42d12a295533 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 7c08283b975..37592775b15 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -349,6 +349,10 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau ValidateResources(); #endif +#if ENABLE_VIRTUALTEXTURES + VirtualTexturing.ApplyVirtualTexturingSettings(asset.virtualTexturingSettings.settings); +#endif + // Initial state of the RTHandle system. // Tells the system that we will require MSAA or not so that we can avoid wasteful render texture allocation. // TODO: Might want to initialize to at least the window resolution to avoid un-necessary re-alloc in the player diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index d9d0c15d847..7dc9e51fb6e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -19,6 +19,12 @@ public partial class HDRenderPipelineAsset : RenderPipelineAsset HDRenderPipelineAsset() { + + } + + public void OnEnable() + { + //virtualTexturingSettings = new VirtualTexturingSettings(); } void Reset() => OnValidate(); @@ -171,6 +177,9 @@ internal ReflectionSystemParameters reflectionSystemParameters [SerializeField] internal DiffusionProfileSettings[] diffusionProfileSettingsList = new DiffusionProfileSettings[0]; + [SerializeField] + internal VirtualTexturingSettings virtualTexturingSettings; + void UpdateRenderingLayerNames() { m_RenderingLayerNames = new string[32]; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs new file mode 100644 index 00000000000..71f2b5366ff --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs @@ -0,0 +1,12 @@ +using System; +using System.IO; +using UnityEditor; + +namespace UnityEngine.Rendering.HighDefinition +{ + [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "VirtualTexturing - Settings" + Documentation.endURL)] + public sealed class VirtualTexturingSettings : ScriptableObject + { + public UnityEngine.Experimental.Rendering.VirtualTexturingSettings settings = new Experimental.Rendering.VirtualTexturingSettings(); + } +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs.meta new file mode 100644 index 00000000000..46d3b4a8af0 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 06bf2c1824f37b0408dc260f4cdd7d98 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/HDRenderPipelineResources.asset b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/HDRenderPipelineResources.asset index c8c4e1d4539..4265c4bb62a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/HDRenderPipelineResources.asset +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/HDRenderPipelineResources.asset @@ -11,7 +11,7 @@ MonoBehaviour: m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 8b6f86e1523e69a4282e92d393be89a4, type: 3} m_Name: HDRenderPipelineResources - m_EditorClassIdentifier: + m_EditorClassIdentifier: m_Version: 4 shaders: defaultPS: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} @@ -166,6 +166,8 @@ MonoBehaviour: type: 3} contrastAdaptiveSharpenCS: {fileID: 7200000, guid: 560896aec2f412c48995be35551a4ac6, type: 3} + VTFeedbackDownsample: {fileID: 7200000, guid: 32d963548086c2c439aeb23a93e9a00a, + type: 3} textures: debugFontTex: {fileID: 2800000, guid: a3ad2df0e49aaa341a3b3a80f93b3f66, type: 3} colorGradient: {fileID: 2800000, guid: 4ea52e665573c1644bf05dd9b11fd2a4, type: 3} From 7900d60068e9336004e92f939133a8044b0bce18 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 29 Jan 2020 16:21:28 +0100 Subject: [PATCH 099/143] Compile fixes for latest VT C# api changes --- .../Runtime/Material/VTBufferManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index df419bc3acf..fa9eceab0ea 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -39,7 +39,7 @@ public void CreateBuffers(RenderPipelineSettings settings) public void BeginRender(int width, int height) { GetResolveDimensions(ref width, ref height); - m_Resolver.UpdateSize((uint)width, (uint)height); + m_Resolver.UpdateSize(width, height); } public void Resolve(CommandBuffer cmd, RTHandle rt, int width, int height) @@ -80,7 +80,7 @@ void ResolveVTDispatch(CommandBuffer cmd, RTHandle buffer, int width, int height var TGSize = 8; //Match shader cmd.DispatchCompute(downSampleCS, kernel, ((int)lowResWidth + (TGSize - 1)) / TGSize, ((int)lowResHeight + (TGSize - 1)) / TGSize, 1); - m_Resolver.Process(cmd, lowresResolver.nameID, 0, (uint)lowResWidth, 0, (uint)lowResHeight, 0, 0); + m_Resolver.Process(cmd, lowresResolver.nameID, 0, lowResWidth, 0, lowResHeight, 0, 0); } void GetResolveDimensions(ref int w, ref int h) From 4a6d6a80b26a39bb3efdcae04f0c2c43afdf34fc Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Thu, 30 Jan 2020 10:25:08 +0100 Subject: [PATCH 100/143] Refactor texture stack node so the number of layers is dynamic instead of having a separate derived class per number of layers. --- .../Editor/Data/Graphs/GraphData.cs | 2 +- .../Nodes/Input/Texture/TextureStackNode.cs | 582 +++++++++--------- 2 files changed, 301 insertions(+), 283 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs b/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs index 9af1355879a..2b68dd6b216 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs @@ -1023,7 +1023,7 @@ public void ValidateGraph() } } - SampleTextureStackNodeBase.ValidatNodes(this); + SampleTextureStackNode.ValidatNodes(this); StackPool.Release(stack); ListPool.Release(slots); diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index f33ce698a28..4a8277162e4 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -7,33 +7,106 @@ using UnityEditor.ShaderGraph.Drawing.Controls; using UnityEditor.ShaderGraph.Internal; using UnityEditor.Rendering; +using UnityEngine.UIElements; +using UnityEditor.ShaderGraph.Drawing; +using UnityEditor.Graphing.Util; namespace UnityEditor.ShaderGraph { - //[Title("Input", "Texture", "Sample Stack")] - class SampleTextureStackNodeBase : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV + [Title("Input", "Texture", "Sample VT Stack")] + [FormerName("UnityEditor.ShaderGraph.SampleTextureStackNodeBase")] + [FormerName("UnityEditor.ShaderGraph.SampleTextureStackNode2")] + [FormerName("UnityEditor.ShaderGraph.SampleTextureStackNode3")] + [FormerName("UnityEditor.ShaderGraph.SampleTextureStackNode4")] + class SampleTextureStackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV, IHasSettings { public const int UVInputId = 0; - [NonSerialized] - public int[] OutputSlotIds = new int[4]; - + public readonly int[] OutputSlotIds = new int[] { 1, 2, 3, 4 }; [NonSerialized] - public int[] TextureInputIds = new int[4]; - - [NonSerialized] - public int FeedbackSlotId; + public readonly int [] TextureInputIds = new int[] { 5, 6, 7, 8 }; + public const int FeedbackSlotId = 9; + public const int LODInputId = 10; static string[] OutputSlotNames = { "Out", "Out2", "Out3", "Out4" }; static string[] TextureInputNames = { "Texture", "Texture2", "Texture3", "Texture4" }; const string UVInputNAme = "UV"; const string FeedbackSlotName = "Feedback"; - - int numSlots; - int[] liveIds; - bool isProcedural; + const string LODSlotName = "Lod"; public override bool hasPreview { get { return false; } } + bool isProcedural;// set internally only + + public enum LodCalculation + { + Automatic, + Explicit, + //Biased, //TODO: Add support to TextureStack.hlsl first + } + + [SerializeField] + LodCalculation m_LodCalculation = LodCalculation.Automatic; + public LodCalculation lodCalculation + { + get + { + return m_LodCalculation; + } + set + { + if (m_LodCalculation == value) + return; + + m_LodCalculation = value; + UpdateNodeAfterDeserialization(); + Dirty(ModificationScope.Topological); + } + } + + [SerializeField] + int m_NumSlots = 1; + + public int numSlots + { + get + { + return m_NumSlots; + } + set + { + int cappedSlots = value; + if (cappedSlots > 4) cappedSlots = 4; + + if (m_NumSlots == cappedSlots) + return; + + m_NumSlots = cappedSlots; + UpdateNodeAfterDeserialization(); + Dirty(ModificationScope.Topological); + } + } + + [SerializeField] + bool m_NoFeedback; + + public bool noFeedback + { + get + { + return m_NoFeedback; + } + set + { + if (m_NoFeedback == value) + return; + + // No resolve affects the availability in the vertex shader of the node so we need to trigger a full + // topo change. + m_NoFeedback = value; + UpdateNodeAfterDeserialization(); + Dirty(ModificationScope.Topological); + } + } [SerializeField] protected TextureType[] m_TextureTypes = { TextureType.Default, TextureType.Default, TextureType.Default, TextureType.Default }; @@ -43,7 +116,6 @@ class SampleTextureStackNodeBase : AbstractMaterialNode, IGeneratesBodyCode, IMa [SerializeField] private NormalMapSpace m_NormalMapSpace = NormalMapSpace.Tangent; - [EnumControl("Space")] public NormalMapSpace normalMapSpace { get { return m_NormalMapSpace; } @@ -57,7 +129,121 @@ public NormalMapSpace normalMapSpace } } - public SampleTextureStackNodeBase(int numSlots, bool procedural = false) + class TextureStackNodeSettingsView : VisualElement + { + SampleTextureStackNode m_Node; + public TextureStackNodeSettingsView(SampleTextureStackNode node) + { + m_Node = node; + + PropertySheet ps = new PropertySheet(); + + ps.Add(new PropertyRow(new Label("Lod Mode")), (row) => + { + row.Add(new UIElements.EnumField(m_Node.lodCalculation), (field) => + { + field.value = m_Node.lodCalculation; + field.RegisterValueChangedCallback(ChangeLod); + }); + }); + + ps.Add(new PropertyRow(new Label("Num Slots")), (row) => + { + row.Add(new UIElements.IntegerField(), (field) => + { + field.value = m_Node.numSlots; + field.RegisterValueChangedCallback(ChangeNumSlots); + }); + }); + + ps.Add(new PropertyRow(new Label("No Resolve")), (row) => + { + row.Add(new UnityEngine.UIElements.Toggle(), (field) => + { + field.value = m_Node.noFeedback; + field.RegisterValueChangedCallback(ChangeFeedback); + }); + }); + + for (int i=0; i + { + row.Add(new UIElements.EnumField(m_Node.m_TextureTypes[i]), (field) => + { + field.value = m_Node.m_TextureTypes[i]; + field.RegisterValueChangedCallback(evt => { ChangeTextureType(evt, currentIndex); } ); + }); + }); + } + + ps.Add(new PropertyRow(new Label("Space")), (row) => + { + row.Add(new UIElements.EnumField(m_Node.normalMapSpace), (field) => + { + field.value = m_Node.normalMapSpace; + field.RegisterValueChangedCallback(ChangeNormalMapSpace); + }); + }); + + Add(ps); + } + + void ChangeNumSlots(ChangeEvent evt) + { + if (Equals(m_Node.numSlots, evt.newValue)) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("NumSlots Flow Change"); + m_Node.numSlots = evt.newValue; + } + + void ChangeLod(ChangeEvent evt) + { + if (m_Node.lodCalculation == (LodCalculation)evt.newValue) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Lod Mode Change"); + m_Node.lodCalculation = (LodCalculation)evt.newValue; + } + + void ChangeTextureType(ChangeEvent evt, int index) + { + if (m_Node.m_TextureTypes[index] == (TextureType)evt.newValue) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Texture Type Change"); + m_Node.m_TextureTypes[index] = (TextureType)evt.newValue; + } + + void ChangeFeedback(ChangeEvent evt) + { + if (m_Node.noFeedback == evt.newValue) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Feedback Settings Change"); + m_Node.noFeedback = evt.newValue; + } + + void ChangeNormalMapSpace(ChangeEvent evt) + { + if (m_Node.normalMapSpace == (NormalMapSpace)evt.newValue) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Normal Map space Change"); + m_Node.normalMapSpace = (NormalMapSpace)evt.newValue; + } + } + + public VisualElement CreateSettingsElement() + { + return new TextureStackNodeSettingsView(this); + } + + public SampleTextureStackNode() : this(1) {} + + public SampleTextureStackNode(int numSlots, bool procedural = false, bool isLod = false, bool noResolve = false) { isProcedural = procedural; @@ -66,38 +252,40 @@ public SampleTextureStackNodeBase(int numSlots, bool procedural = false) throw new System.Exception("Maximum 4 slots supported"); } this.numSlots = numSlots; - name = "Sample Texture Stack " + numSlots; + name = "Sample Texture Stack"; UpdateNodeAfterDeserialization(); } public override void UpdateNodeAfterDeserialization() { - // Allocate IDs List usedSlots = new List(); usedSlots.Add(UVInputId); for (int i = 0; i < numSlots; i++) { - OutputSlotIds[i] = UVInputId + 1 + i; - TextureInputIds[i] = UVInputId + 1 + numSlots + i; - usedSlots.Add(OutputSlotIds[i]); if (!isProcedural) usedSlots.Add(TextureInputIds[i]); } - FeedbackSlotId = UVInputId + 1 + numSlots * 2; - usedSlots.Add(FeedbackSlotId); + if (!noFeedback) + { + usedSlots.Add(FeedbackSlotId); + } + if (m_LodCalculation != LodCalculation.Automatic) + { + usedSlots.Add(LODInputId); + } - liveIds = usedSlots.ToArray(); + usedSlots.ToArray(); // Create slots AddSlot(new UVMaterialSlot(UVInputId, UVInputNAme, UVInputNAme, UVChannel.UV0)); for (int i = 0; i < numSlots; i++) { - AddSlot(new Vector4MaterialSlot(OutputSlotIds[i], OutputSlotNames[i], OutputSlotNames[i], SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment)); + AddSlot(new Vector4MaterialSlot(OutputSlotIds[i], OutputSlotNames[i], OutputSlotNames[i], SlotType.Output, Vector4.zero, (noFeedback && m_LodCalculation == LodCalculation.Explicit) ? ShaderStageCapability.All : ShaderStageCapability.Fragment)); } if (!isProcedural) @@ -108,23 +296,32 @@ public override void UpdateNodeAfterDeserialization() } } - var slot = new Vector4MaterialSlot(FeedbackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment); - slot.hidden = true; - AddSlot(slot); + if (m_LodCalculation != LodCalculation.Automatic) + { + var slot = new Vector1MaterialSlot(LODInputId, LODSlotName, LODSlotName, SlotType.Input, 0.0f, ShaderStageCapability.All, LODSlotName); + AddSlot(slot); + } - RemoveSlotsNameNotMatching(liveIds); + if (!noFeedback) + { + var slot = new Vector4MaterialSlot(FeedbackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment); + slot.hidden = true; + AddSlot(slot); + } + + RemoveSlotsNameNotMatching(usedSlots, true); } public static void ValidatNodes(GraphData d) { - ValidatNodes(d.GetNodes()); + ValidatNodes(d.GetNodes()); } - public static void ValidatNodes(IEnumerable nodes) + public static void ValidatNodes(IEnumerable nodes) { List> slotNames = new List>(); - foreach (SampleTextureStackNodeBase node in nodes) + foreach (SampleTextureStackNode node in nodes) { for (int i = 0; i < node.numSlots; i++) { @@ -149,8 +346,8 @@ public static void ValidatNodes(IEnumerable nodes) #if PROCEDURAL_VT_IN_GRAPH // Check if there is already a node with the same sampleid - SampleTextureStackProcedural ssp = node as SampleTextureStackProcedural; - if ( ssp != null ) + SampleTextureStackProceduralNode ssp = node as SampleTextureStackProceduralNode; + if (ssp != null) { string value = ssp.GetStackName(); string name = ssp.GetStackName(); @@ -210,10 +407,37 @@ private string GetTextureName(int layerIndex, GenerationMode generationMode) } } + private string GetSampleFunction() + { + if (m_LodCalculation != LodCalculation.Automatic) + { + return "SampleStackLod"; + } + else + { + return "SampleStack"; + } + } + // Node generations public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) { - // Not all outputs may be connected (well one is or we wouln't get called) so we are carefull to + // This is not in templates or headers so this error only gets checked in shaders actually using the VT node + // as vt headers get included even if there are no vt nodes yet. + sb.AppendLine("#if defined(_SURFACE_TYPE_TRANSPARENT)"); + sb.AppendLine("#error VT cannot be used on transparent surfaces."); + sb.AppendLine("#endif"); + sb.AppendLine("#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_DBUFFER_PROJECTOR)"); //SHADERPASS is not defined for preview materials so check this first. + sb.AppendLine("#error VT cannot be used on decals. (DBuffer)"); + sb.AppendLine("#endif"); + sb.AppendLine("#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_DBUFFER_MESH)"); + sb.AppendLine("#error VT cannot be used on decals. (Mesh)"); + sb.AppendLine("#endif"); + sb.AppendLine("#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_FORWARD_EMISSIVE_PROJECTOR)"); + sb.AppendLine("#error VT cannot be used on decals. (Projector)"); + sb.AppendLine("#endif"); + + // Not all outputs may be connected (well one is or we wouldn't get called) so we are careful to // only generate code for connected outputs string stackName = GetStackName(); @@ -231,10 +455,21 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene if (anyConnected) { - string result = string.Format("StackInfo {0}_info = PrepareStack({1}, {0});" + if (m_LodCalculation == LodCalculation.Automatic) + { + string result = string.Format("StackInfo {0}_info = PrepareStack({1}, {0});" , stackName , GetSlotValue(UVInputId, generationMode)); - sb.AppendLine(result); + sb.AppendLine(result); + } + else + { + string result = string.Format("StackInfo {0}_info = PrepareStackLod({1}, {0}, {2});" + , stackName + , GetSlotValue(UVInputId, generationMode) + , GetSlotValue(LODInputId, generationMode)); + sb.AppendLine(result); + } } for (int i = 0; i < numSlots; i++) @@ -242,10 +477,11 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene if (IsSlotConnected(OutputSlotIds[i])) { var id = GetTextureName(i, generationMode); - string resultLayer = string.Format("$precision4 {1} = SampleStack({0}_info, {2});" + string resultLayer = string.Format("$precision4 {1} = {3}({0}_info, {2});" , stackName , GetVariableNameForSlot(OutputSlotIds[i]) - , id); + , id + , GetSampleFunction()); sb.AppendLine(resultLayer); } } @@ -269,7 +505,7 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene } } - if (feedbackConnected) + if (!noFeedback && feedbackConnected) { //TODO: Investigate if the feedback pass can use halfs string feedBackCode = string.Format("float4 {0} = GetResolveOutput({1}_info);", @@ -343,178 +579,6 @@ public bool RequiresMeshUV(Internal.UVChannel channel, ShaderStageCapability sta } } - [Title("Input", "Texture", "Sample Texture Stack")] - class SampleTextureStackNode : SampleTextureStackNodeBase - { - public SampleTextureStackNode() : base(1) - { } - - [EnumControl("Type")] - public TextureType textureType - { - get { return m_TextureTypes[0]; } - set - { - if (m_TextureTypes[0] == value) - return; - - m_TextureTypes[0] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - } - - [Title("Input", "Texture", "Sample Texture Stack 2")] - class SampleTextureStackNode2 : SampleTextureStackNodeBase - { - public SampleTextureStackNode2() : base(2) - { } - - [EnumControl("Type 1")] - public TextureType textureType - { - get { return m_TextureTypes[0]; } - set - { - if (m_TextureTypes[0] == value) - return; - - m_TextureTypes[0] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - - [EnumControl("Type 2")] - public TextureType textureType2 - { - get { return m_TextureTypes[1]; } - set - { - if (m_TextureTypes[1] == value) - return; - - m_TextureTypes[1] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - } - - [Title("Input", "Texture", "Sample Texture Stack 3")] - class SampleTextureStackNode3 : SampleTextureStackNodeBase - { - public SampleTextureStackNode3() : base(3) - { } - - [EnumControl("Type 1")] - public TextureType textureType - { - get { return m_TextureTypes[0]; } - set - { - if (m_TextureTypes[0] == value) - return; - - m_TextureTypes[0] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - - [EnumControl("Type 2")] - public TextureType textureType2 - { - get { return m_TextureTypes[1]; } - set - { - if (m_TextureTypes[1] == value) - return; - - m_TextureTypes[1] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - - [EnumControl("Type 3")] - public TextureType textureType3 - { - get { return m_TextureTypes[2]; } - set - { - if (m_TextureTypes[2] == value) - return; - - m_TextureTypes[2] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - } - - [Title("Input", "Texture", "Sample Texture Stack 4")] - class SampleTextureStackNode4 : SampleTextureStackNodeBase - { - public SampleTextureStackNode4() : base(4) - { } - - [EnumControl("Type 1")] - public TextureType textureType - { - get { return m_TextureTypes[0]; } - set - { - if (m_TextureTypes[0] == value) - return; - - m_TextureTypes[0] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - - [EnumControl("Type 2")] - public TextureType textureType2 - { - get { return m_TextureTypes[1]; } - set - { - if (m_TextureTypes[1] == value) - return; - - m_TextureTypes[1] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - - [EnumControl("Type 3")] - public TextureType textureType3 - { - get { return m_TextureTypes[2]; } - set - { - if (m_TextureTypes[2] == value) - return; - - m_TextureTypes[2] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - } - class TextureStackAggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireRequirePixelCoordinate { public const int AggregateOutputId = 0; @@ -593,10 +657,23 @@ static class VirtualTexturingFeedback public static IMasterNode AutoInject(IMasterNode iMasterNode) { var masterNode = iMasterNode as AbstractMaterialNode; - var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); + var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); // Early out if there are no VT nodes in the graph - if ( stackNodes.Count <= 0 ) + if (stackNodes.Count <= 0) + { + return iMasterNode; + } + + bool hasFeedback = false; + foreach (var node in stackNodes) + { + if ( !node.noFeedback ) + { + hasFeedback = true; + } + } + if (!hasFeedback) { return iMasterNode; } @@ -618,11 +695,11 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) foreach (var node in stackNodes) { // Find feedback output slot on the vt node - var stackFeedbackOutputSlot = (node.FindOutputSlot(node.FeedbackSlotId)) as Vector4MaterialSlot; + var stackFeedbackOutputSlot = (node.FindOutputSlot(SampleTextureStackNode.FeedbackSlotId)) as Vector4MaterialSlot; if (stackFeedbackOutputSlot == null) { - Debug.LogWarning("Could not find the VT feedback output slot on the stack node."); - return iMasterNode; + // Nodes which are noResolve don't have a resolve slot so just skip them + continue; } // Create a new slot on the aggregate that is similar to the uv input slot @@ -637,14 +714,14 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) // Add input to master node var feedbackInputSlot = workingMasterNode.FindInputSlot(OutputSlotID); - if ( feedbackInputSlot == null ) + if (feedbackInputSlot == null) { Debug.LogWarning("Could not find the VT feedback input slot on the master node."); return iMasterNode; } var feedbackOutputSlot = feedbackNode.FindOutputSlot(TextureStackAggregateFeedbackNode.AggregateOutputId); - if ( feedbackOutputSlot == null ) + if (feedbackOutputSlot == null) { Debug.LogWarning("Could not find the VT feedback output slot on the aggregate node."); return iMasterNode; @@ -658,9 +735,12 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) } #if PROCEDURAL_VT_IN_GRAPH - class SampleTextureStackProceduralBase : SampleTextureStackNodeBase + [Title("Input", "Texture", "Sample Procedural VT Texture Stack")] + [FormerName("UnityEditor.ShaderGraph.SampleTextureStackProcedural")] + [FormerName("UnityEditor.ShaderGraph.SampleTextureStackProcedural2")] + class SampleTextureStackProceduralNode : SampleTextureStackNode { - public SampleTextureStackProceduralBase(int numLayers) : base(numLayers, true) + public SampleTextureStackProceduralNode() : base(1, true) { } [IntegerControl("Sample ID")] @@ -687,67 +767,5 @@ protected override string GetStackName() return "Procedural" + m_sampleId; } } - - [Title("Input", "Texture", "Sample Texture Stack Procedural 1")] - class SampleTextureStackProcedural : SampleTextureStackProceduralBase - { - public SampleTextureStackProcedural() : base(1) - { } - - [EnumControl("Type 1")] - public TextureType textureType - { - get { return m_TextureTypes[0]; } - set - { - if (m_TextureTypes[0] == value) - return; - - m_TextureTypes[0] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - } - - [Title("Input", "Texture", "Sample Texture Stack Procedural 2")] - class SampleTextureStackProcedural2 : SampleTextureStackProceduralBase - { - public SampleTextureStackProcedural2() : base(2) - { } - - [EnumControl("Type 1")] - public TextureType textureType - { - get { return m_TextureTypes[0]; } - set - { - if (m_TextureTypes[0] == value) - return; - - m_TextureTypes[0] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - - [EnumControl("Type 2")] - public TextureType textureType2 - { - get { return m_TextureTypes[1]; } - set - { - if (m_TextureTypes[1] == value) - return; - - m_TextureTypes[1] = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - } #endif } From df43ef11e6873ab08085dc199e9a7ce58bb917f8 Mon Sep 17 00:00:00 2001 From: Nico Leyman Date: Thu, 30 Jan 2020 11:36:09 +0100 Subject: [PATCH 101/143] Updated VT Settings editor: size -> sizeInMegaBytes --- .../Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs index 4caedb91fde..1bab8dff7fd 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs @@ -36,8 +36,8 @@ protected override void OnEnable() self = serializedSettings, objReference = m_Target.settings, - cpuCacheSize = rp.Find(x => x.cpuCache.size), - gpuCacheSize = rp.Find(x => x.gpuCache.size), + cpuCacheSize = rp.Find(x => x.cpuCache.sizeInMegaBytes), + gpuCacheSize = rp.Find(x => x.gpuCache.sizeInMegaBytes), gpuCacheSizeOverrides = rp.Find(x => x.gpuCache.sizeOverrides), }; From 96561a1ce64fb6b4d281c41433e36356049eef34 Mon Sep 17 00:00:00 2001 From: Nico Leyman Date: Thu, 30 Jan 2020 15:18:47 +0100 Subject: [PATCH 102/143] Fix for removal of experimental namespace. --- .../Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs | 6 +++--- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 +- .../Runtime/RenderPipeline/VirtualTexturingSettings.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs index 1bab8dff7fd..d66046f6007 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs @@ -12,7 +12,7 @@ partial class VirtualTexturingSettingsEditor : HDBaseEditor x.settings); - var rp = new RelativePropertyFetcher(serializedSettings); + var rp = new RelativePropertyFetcher(serializedSettings); m_Settings = new Settings { @@ -51,7 +51,7 @@ void OnDisable() void ApplyChanges() { - VirtualTexturing.ApplyVirtualTexturingSettings(m_Settings.objReference); + UnityEngine.Rendering.VirtualTexturing.System.ApplyVirtualTexturingSettings(m_Settings.objReference); } public override void OnInspectorGUI() diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 2d9655af53b..2e80e3d5029 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -350,7 +350,7 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau #endif #if ENABLE_VIRTUALTEXTURES - VirtualTexturing.ApplyVirtualTexturingSettings(asset.virtualTexturingSettings.settings); + VirtualTexturing.System.ApplyVirtualTexturingSettings(asset.virtualTexturingSettings.settings); #endif // Initial state of the RTHandle system. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs index 71f2b5366ff..3ab47d56e0e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs @@ -7,6 +7,6 @@ namespace UnityEngine.Rendering.HighDefinition [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "VirtualTexturing - Settings" + Documentation.endURL)] public sealed class VirtualTexturingSettings : ScriptableObject { - public UnityEngine.Experimental.Rendering.VirtualTexturingSettings settings = new Experimental.Rendering.VirtualTexturingSettings(); + public VirtualTexturing.VirtualTexturingSettings settings = new VirtualTexturing.VirtualTexturingSettings(); } } From 651ecc851fa4a0fa72d9b302dbb0d7af94d13c97 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 31 Jan 2020 16:14:59 +0100 Subject: [PATCH 103/143] Ensure project works even if no VT settings have been configured. --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 9 ++++++++- .../RenderPipeline/VirtualTexturingSettings.cs | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 2e80e3d5029..a3623473b45 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -350,7 +350,14 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau #endif #if ENABLE_VIRTUALTEXTURES - VirtualTexturing.System.ApplyVirtualTexturingSettings(asset.virtualTexturingSettings.settings); + if (asset.virtualTexturingSettings) + { + VirtualTexturing.System.ApplyVirtualTexturingSettings(asset.virtualTexturingSettings.settings); + } + else + { + VirtualTexturing.System.ApplyVirtualTexturingSettings(VirtualTexturingSettings.Default); + } #endif // Initial state of the RTHandle system. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs index 3ab47d56e0e..a1586b63cf7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs @@ -8,5 +8,16 @@ namespace UnityEngine.Rendering.HighDefinition public sealed class VirtualTexturingSettings : ScriptableObject { public VirtualTexturing.VirtualTexturingSettings settings = new VirtualTexturing.VirtualTexturingSettings(); + + public static VirtualTexturing.VirtualTexturingSettings Default + { + get + { + VirtualTexturing.VirtualTexturingSettings settings = new VirtualTexturing.VirtualTexturingSettings(); + settings.cpuCache.sizeInMegaBytes = 64; + settings.gpuCache.sizeInMegaBytes = 128; + return settings; + } + } } } From 9ae0283dff3f577e10c6febe1cf824ff8c9e284b Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 31 Jan 2020 16:57:18 +0100 Subject: [PATCH 104/143] Fix texture stack after merge --- .../Data/Nodes/Input/Texture/TextureStackNode.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 4a8277162e4..da982b87727 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -568,14 +568,16 @@ public override void CollectShaderProperties(PropertyCollector properties, Gener public bool RequiresMeshUV(Internal.UVChannel channel, ShaderStageCapability stageCapability) { - s_TempSlots.Clear(); - GetInputSlots(s_TempSlots); - foreach (var slot in s_TempSlots) + using (var tempSlots = PooledList.Get()) { - if (slot.RequiresMeshUV(channel)) - return true; + GetInputSlots(tempSlots); + foreach (var slot in tempSlots) + { + if (slot.RequiresMeshUV(channel)) + return true; + } + return false; } - return false; } } From fef30dd739e307caa7c7d636ec0ff8f172130685 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 3 Feb 2020 15:07:10 +0100 Subject: [PATCH 105/143] Enable VT and the VT tests. --- .../HDRP_Tests/Packages/manifest.json | 1 + .../ProjectSettings/EditorBuildSettings.asset | 3 + .../ProjectSettings/ProjectSettings.asset | 71 +++++++++++++------ 3 files changed, 55 insertions(+), 20 deletions(-) diff --git a/TestProjects/HDRP_Tests/Packages/manifest.json b/TestProjects/HDRP_Tests/Packages/manifest.json index dd138b488a1..2d3d045ec04 100644 --- a/TestProjects/HDRP_Tests/Packages/manifest.json +++ b/TestProjects/HDRP_Tests/Packages/manifest.json @@ -41,6 +41,7 @@ "com.unity.modules.unitywebrequestwww": "1.0.0", "com.unity.modules.vehicles": "1.0.0", "com.unity.modules.video": "1.0.0", + "com.unity.modules.virtualtexturing": "1.0.0", "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0" diff --git a/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset b/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset index c35fb84e0ce..28e37206505 100644 --- a/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset +++ b/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset @@ -557,4 +557,7 @@ EditorBuildSettings: - enabled: 0 path: Assets/GraphicTests/Scenes/9x_Other/9701_CustomPass_DrawRenderers.unity guid: c64196eb7ce78e84bb835b2ea858ee19 + - enabled: 1 + path: Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity + guid: 897c2870240f77a46a18884a0446b797 m_configObjects: {} diff --git a/TestProjects/HDRP_Tests/ProjectSettings/ProjectSettings.asset b/TestProjects/HDRP_Tests/ProjectSettings/ProjectSettings.asset index cf87a112447..183cb22495e 100644 --- a/TestProjects/HDRP_Tests/ProjectSettings/ProjectSettings.asset +++ b/TestProjects/HDRP_Tests/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 17 + serializedVersion: 20 productGUID: 6cbbd3ece3fac30458cd56ff93b88a97 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -49,11 +49,12 @@ PlayerSettings: m_StereoRenderingPath: 0 m_ActiveColorSpace: 1 m_MTRendering: 1 + mipStripping: 0 + numberOfMipsStripped: 0 m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 - iosAppInBackgroundBehavior: 0 - displayResolutionDialog: 0 + iosUseCustomAppBackgroundBehavior: 0 iosAllowHTTPDownload: 1 allowedAutorotateToPortrait: 1 allowedAutorotateToPortraitUpsideDown: 1 @@ -80,11 +81,11 @@ PlayerSettings: usePlayerLog: 1 bakeCollisionMeshes: 0 forceSingleInstance: 0 + useFlipModelSwapchain: 1 resizableWindow: 1 useMacAppStoreValidation: 0 macAppStoreCategory: public.app-category.games gpuSkinning: 0 - graphicsJobs: 0 xboxPIXTextureCapture: 0 xboxEnableAvatar: 0 xboxEnableKinect: 0 @@ -92,7 +93,6 @@ PlayerSettings: xboxEnableFitness: 0 visibleInBackground: 1 allowFullscreenSwitch: 1 - graphicsJobMode: 0 fullscreenMode: 3 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 @@ -105,6 +105,7 @@ PlayerSettings: xboxOneMonoLoggingLevel: 0 xboxOneLoggingLevel: 1 xboxOneDisableEsram: 0 + xboxOneEnableTypeOptimization: 0 xboxOnePresentImmediateThreshold: 0 switchQueueCommandMemory: 0 switchQueueControlMemory: 16384 @@ -112,6 +113,7 @@ PlayerSettings: switchNVNShaderPoolsGranularity: 33554432 switchNVNDefaultPoolsGranularity: 16777216 switchNVNOtherPoolsGranularity: 16777216 + vulkanNumSwapchainBuffers: 3 vulkanEnableSetSRGBWrite: 0 m_SupportedAspectRatios: 4:3: 1 @@ -150,11 +152,13 @@ PlayerSettings: sharedDepthBuffer: 0 dashSupport: 0 lowOverheadMode: 0 + protectedContext: 0 + v2Signing: 1 enable360StereoCapture: 0 isWsaHolographicRemotingEnabled: 0 - protectGraphicsMemory: 0 enableFrameTimingStats: 0 useHDRDisplay: 0 + D3DHDRBitDepth: 0 m_ColorGamuts: 00000000 targetPixelDensity: 30 resolutionScalingMode: 0 @@ -163,7 +167,7 @@ PlayerSettings: applicationIdentifier: {} buildNumber: {} AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 16 + AndroidMinSdkVersion: 19 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: nimt-trampolines=1024 @@ -178,10 +182,10 @@ PlayerSettings: StripUnusedMeshComponents: 0 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 9.0 + iOSTargetOSVersionString: 11.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 9.0 + tvOSTargetOSVersionString: 11.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 @@ -271,16 +275,46 @@ PlayerSettings: androidGamepadSupportLevel: 0 AndroidValidateAppBundleSize: 1 AndroidAppBundleSizeToValidate: 100 - resolutionDialogBanner: {fileID: 0} m_BuildTargetIcons: [] m_BuildTargetPlatformIcons: [] m_BuildTargetBatching: [] + m_BuildTargetGraphicsJobs: + - m_BuildTarget: MacStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: Switch + m_GraphicsJobs: 0 + - m_BuildTarget: MetroSupport + m_GraphicsJobs: 0 + - m_BuildTarget: AppleTVSupport + m_GraphicsJobs: 0 + - m_BuildTarget: BJMSupport + m_GraphicsJobs: 0 + - m_BuildTarget: LinuxStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: PS4Player + m_GraphicsJobs: 0 + - m_BuildTarget: iOSSupport + m_GraphicsJobs: 0 + - m_BuildTarget: WindowsStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobs: 0 + - m_BuildTarget: LuminSupport + m_GraphicsJobs: 0 + - m_BuildTarget: AndroidPlayer + m_GraphicsJobs: 0 + - m_BuildTarget: WebGLSupport + m_GraphicsJobs: 0 + m_BuildTargetGraphicsJobMode: + - m_BuildTarget: PS4Player + m_GraphicsJobMode: 0 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobMode: 0 m_BuildTargetGraphicsAPIs: - m_BuildTarget: WindowsStandaloneSupport m_APIs: 0200000015000000 m_Automatic: 0 m_BuildTargetVRSettings: [] - m_BuildTargetEnableVuforiaSettings: [] openGLRequireES31: 0 openGLRequireES31AEP: 0 openGLRequireES32: 0 @@ -308,12 +342,14 @@ PlayerSettings: cameraUsageDescription: locationUsageDescription: microphoneUsageDescription: + switchNMETAOverride: switchNetLibKey: switchSocketMemoryPoolSize: 6144 switchSocketAllocatorPoolSize: 128 switchSocketConcurrencyLimit: 14 switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 + switchUseGOLDLinker: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: switchTitleNames_0: @@ -407,6 +443,7 @@ PlayerSettings: switchRatingsInt_9: 0 switchRatingsInt_10: 0 switchRatingsInt_11: 0 + switchRatingsInt_12: 0 switchLocalCommunicationIds_0: switchLocalCommunicationIds_1: switchLocalCommunicationIds_2: @@ -506,6 +543,7 @@ PlayerSettings: ps4contentSearchFeaturesUsed: 0 ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] + ps4attribVROutputEnabled: 0 monoEnv: splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0} @@ -524,7 +562,7 @@ PlayerSettings: webGLCompressionFormat: 1 webGLLinkerTarget: 0 webGLThreadsSupport: 0 - webGLWasmStreaming: 0 + webGLDecompressionFallback: 0 scriptingDefineSymbols: 1: HDRP_DEBUG_STATIC_POSTFX 4: HDRP_DEBUG_STATIC_POSTFX @@ -604,7 +642,6 @@ PlayerSettings: XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 XboxOneXTitleMemory: 8 - xboxOneScriptCompiler: 1 XboxOneOverrideIdentityName: vrEditorSettings: daydream: @@ -622,13 +659,6 @@ PlayerSettings: luminVersion: m_VersionCode: 1 m_VersionName: - facebookSdkVersion: 7.9.4 - facebookAppId: - facebookCookies: 1 - facebookLogging: 1 - facebookStatus: 1 - facebookXfbml: 0 - facebookFrictionlessRequests: 1 apiCompatibilityLevel: 6 cloudProjectId: framebufferDepthMemorylessMode: 0 @@ -638,3 +668,4 @@ PlayerSettings: enableNativePlatformBackendsForNewInputSystem: 0 disableOldInputManagerSupport: 0 legacyClampBlendShapeWeights: 1 + virtualTexturingSupportEnabled: 1 From dc78fc11dacea0f7cc367415abe73f9e9dad57dd Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 3 Feb 2020 15:08:03 +0100 Subject: [PATCH 106/143] Fix tests after recfactoring of VT api. --- .../Scripts/VirtualTexturingTestSceneController.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs b/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs index 72b3648d681..d049d573ff3 100644 --- a/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs +++ b/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -using Experimental = UnityEngine.Experimental.Rendering; public class VirtualTexturingTestSceneController : MonoBehaviour { @@ -62,7 +61,7 @@ public void Update() } if (Input.GetKeyDown("t")) { - Experimental.VirtualTexturing.debugTilesEnabled = !Experimental.VirtualTexturing.debugTilesEnabled; + UnityEngine.Rendering.VirtualTexturing.Debugging.debugTilesEnabled = !UnityEngine.Rendering.VirtualTexturing.Debugging.debugTilesEnabled; } if (dirLight != null && rotateLight) From 68c9e07fac164615783bec2e8a23def49915e8dd Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 3 Feb 2020 15:12:16 +0100 Subject: [PATCH 107/143] Rename VT test number from 7900 to 7913 after latest merge already used 7900. --- ...turing.meta => 9713_VirtualTexturing.meta} | 0 ...ring.unity => 9713_VirtualTexturing.unity} | 523 +++++++++++++++--- ....meta => 9713_VirtualTexturing.unity.meta} | 0 .../CloudGraph.shadergraph | 6 +- .../CloudGraph.shadergraph.meta | 0 .../CloudGraphMat.mat | 31 +- .../CloudGraphMat.mat.meta | 0 .../DecalGraph.shadergraph | 4 +- .../DecalGraph.shadergraph.meta | 0 .../DecalGraphMat.mat | 6 +- .../DecalGraphMat.mat.meta | 0 .../EmisUnlitGraph.shadergraph | 6 +- .../EmisUnlitGraph.shadergraph.meta | 0 .../EmisUnlitMat.mat | 30 +- .../EmisUnlitMat.mat.meta | 0 .../ExplicitLodGraph.shadergraph | 109 ++++ .../ExplicitLodGraph.shadergraph.meta | 10 + .../9713_VirtualTexturing/ExplicitLodMat.mat | 81 +++ .../ExplicitLodMat.mat.meta | 8 + .../LitGraph.shadergraph | 12 +- .../LitGraph.shadergraph.meta | 0 .../LitGraphMat.mat | 36 +- .../LitGraphMat.mat.meta | 0 .../LowResolutionRequester.cs | 2 +- .../LowResolutionRequester.cs.meta | 0 .../MultiSampleGraph.shadergraph | 6 +- .../MultiSampleGraph.shadergraph.meta | 0 .../MultiSampleGraphMat.mat | 31 +- .../MultiSampleGraphMat.mat.meta | 0 .../PBRGraph.shadergraph | 6 +- .../PBRGraph.shadergraph.meta | 0 .../PBRGraphMat.mat | 8 + .../PBRGraphMat.mat.meta | 0 .../PropGraph.shadergraph | 8 +- .../PropGraph.shadergraph.meta | 0 .../PropGraphMat.mat | 23 +- .../PropGraphMat.mat.meta | 0 .../SSSGraph.shadergraph | 6 +- .../SSSGraph.shadergraph.meta | 0 .../SSSGraphMat.mat | 31 +- .../SSSGraphMat.mat.meta | 0 .../Scene Settings Profile.asset | 0 .../Scene Settings Profile.asset.meta | 0 .../Textures.meta | 0 .../Textures/VT_a2wall_diffuse.jpg | 0 .../Textures/VT_a2wall_diffuse.jpg.meta | 0 .../Textures/VT_a2wall_normal.png | 0 .../Textures/VT_a2wall_normal.png.meta | 0 .../Textures/VT_earth_albedo.jpg | 0 .../Textures/VT_earth_albedo.jpg.meta | 0 .../Textures/VT_earth_clouds.jpg | 0 .../Textures/VT_earth_clouds.jpg.meta | 0 .../Textures/VT_earth_clouds_normal.jpg | 0 .../Textures/VT_earth_clouds_normal.jpg.meta | 0 .../Textures/VT_earth_lights.jpg | 0 .../Textures/VT_earth_lights.jpg.meta | 0 .../Textures/earth_clouds.jpg | 0 .../Textures/earth_clouds.jpg.meta | 0 .../UnlitGraph.shadergraph | 4 +- .../UnlitGraph.shadergraph.meta | 0 .../UnlitGraphMat.mat | 4 + .../UnlitGraphMat.mat.meta | 0 .../VertexShader.shadergraph | 121 ++++ .../VertexShader.shadergraph.meta | 10 + .../9713_VirtualTexturing/VertexShaderMat.mat | 85 +++ .../VertexShaderMat.mat.meta | 8 + ...=> 9713_VirtualTexturingSettings.lighting} | 2 +- ...13_VirtualTexturingSettings.lighting.meta} | 0 68 files changed, 1031 insertions(+), 186 deletions(-) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing.meta => 9713_VirtualTexturing.meta} (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing.unity => 9713_VirtualTexturing.unity} (86%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing.unity.meta => 9713_VirtualTexturing.unity.meta} (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/CloudGraph.shadergraph (91%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/CloudGraph.shadergraph.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/CloudGraphMat.mat (76%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/CloudGraphMat.mat.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/DecalGraph.shadergraph (92%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/DecalGraph.shadergraph.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/DecalGraphMat.mat (85%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/DecalGraphMat.mat.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/EmisUnlitGraph.shadergraph (91%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/EmisUnlitGraph.shadergraph.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/EmisUnlitMat.mat (76%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/EmisUnlitMat.mat.meta (100%) create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat.meta rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/LitGraph.shadergraph (86%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/LitGraph.shadergraph.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/LitGraphMat.mat (71%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/LitGraphMat.mat.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/LowResolutionRequester.cs (87%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/LowResolutionRequester.cs.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/MultiSampleGraph.shadergraph (82%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/MultiSampleGraph.shadergraph.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/MultiSampleGraphMat.mat (74%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/MultiSampleGraphMat.mat.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/PBRGraph.shadergraph (93%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/PBRGraph.shadergraph.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/PBRGraphMat.mat (72%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/PBRGraphMat.mat.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/PropGraph.shadergraph (84%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/PropGraph.shadergraph.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/PropGraphMat.mat (85%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/PropGraphMat.mat.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/SSSGraph.shadergraph (89%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/SSSGraph.shadergraph.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/SSSGraphMat.mat (75%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/SSSGraphMat.mat.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Scene Settings Profile.asset (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Scene Settings Profile.asset.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_a2wall_diffuse.jpg (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_a2wall_diffuse.jpg.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_a2wall_normal.png (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_a2wall_normal.png.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_earth_albedo.jpg (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_earth_albedo.jpg.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_earth_clouds.jpg (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_earth_clouds.jpg.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_earth_clouds_normal.jpg (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_earth_clouds_normal.jpg.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_earth_lights.jpg (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/VT_earth_lights.jpg.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/earth_clouds.jpg (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/Textures/earth_clouds.jpg.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/UnlitGraph.shadergraph (63%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/UnlitGraph.shadergraph.meta (100%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/UnlitGraphMat.mat (81%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturing => 9713_VirtualTexturing}/UnlitGraphMat.mat.meta (100%) create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShader.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShader.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat.meta rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturingSettings.lighting => 9713_VirtualTexturingSettings.lighting} (97%) rename TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/{9700_VirtualTexturingSettings.lighting.meta => 9713_VirtualTexturingSettings.lighting.meta} (100%) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity similarity index 86% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity index 1d5fa63f91a..bae1fdf6e28 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity @@ -479,6 +479,103 @@ Transform: m_Father: {fileID: 2056951134} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &339800103 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 339800104} + - component: {fileID: 339800106} + - component: {fileID: 339800105} + m_Layer: 0 + m_Name: ExplicitLod + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &339800104 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339800103} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2, y: -1.1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &339800105 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339800103} + m_Text: 'Explicit Lod sampling + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &339800106 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339800103} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &361997041 GameObject: m_ObjectHideFlags: 0 @@ -511,7 +608,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Profile: {fileID: 11400000, guid: 22810a4b5b549954198ff70792391f0f, type: 2} m_StaticLightingSkyUniqueID: 2 - m_SkySettings: {fileID: 1191271757} + m_SkySettings: {fileID: 904386611} m_SkySettingsFromProfile: {fileID: 114252824260178082, guid: 22810a4b5b549954198ff70792391f0f, type: 2} --- !u!114 &361997043 @@ -596,6 +693,87 @@ MonoBehaviour: minX: -5 minCameraDist: 1 maxCameraDist: 15 +--- !u!1 &563548582 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 563548583} + - component: {fileID: 563548585} + - component: {fileID: 563548584} + m_Layer: 0 + m_Name: VertexShader + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &563548583 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 563548582} + m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} + m_LocalPosition: {x: -2, y: -2.4, z: 0} + m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!23 &563548584 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 563548582} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4d44d890bd690ee40b18df454cc3c54e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &563548585 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 563548582} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &657075898 GameObject: m_ObjectHideFlags: 0 @@ -758,6 +936,101 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 698175485} m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &711217080 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 711217081} + - component: {fileID: 711217083} + - component: {fileID: 711217082} + m_Layer: 0 + m_Name: VertexShader + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &711217081 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 711217080} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.213, y: -1.1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &711217082 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 711217080} + m_Text: "Vertex\n Shader\n" + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &711217083 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 711217080} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &878058836 GameObject: m_ObjectHideFlags: 0 @@ -853,6 +1126,85 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &904386611 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: 3df29e7cc05fbec4aa43e06ea875565d, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + rotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 0 + multiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxColor: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + min: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + sunSize: + m_OverrideState: 0 + m_Value: 0.04 + min: 0 + max: 1 + sunSizeConvergence: + m_OverrideState: 0 + m_Value: 5 + min: 1 + max: 10 + atmosphereThickness: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 5 + skyTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + groundColor: + m_OverrideState: 0 + m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + enableSunDisk: + m_OverrideState: 0 + m_Value: 1 --- !u!1 &1036204241 GameObject: m_ObjectHideFlags: 0 @@ -929,6 +1281,7 @@ MonoBehaviour: m_FilterSizeTraced: 16 m_SunLightConeAngle: 0.5 m_LightShadowRadius: 0.5 + m_SemiTransparentShadow: 0 m_ColorShadow: 1 m_EvsmExponent: 15 m_EvsmLightLeakBias: 0 @@ -1087,8 +1440,10 @@ Transform: - {fileID: 1132552987} - {fileID: 1179882697} - {fileID: 1178773848} + - {fileID: 339800104} + - {fileID: 711217081} m_Father: {fileID: 2056951134} - m_RootOrder: 7 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1132552986 GameObject: @@ -1213,7 +1568,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1178773847} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.31, y: -1.1, z: 0} + m_LocalPosition: {x: -0.89, y: -1.1, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1053123895} @@ -1379,85 +1734,6 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &1191271757 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 3df29e7cc05fbec4aa43e06ea875565d, type: 3} - m_Name: - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - rotation: - m_OverrideState: 0 - m_Value: 0 - min: 0 - max: 360 - skyIntensityMode: - m_OverrideState: 0 - m_Value: 0 - exposure: - m_OverrideState: 0 - m_Value: 0 - multiplier: - m_OverrideState: 0 - m_Value: 1 - min: 0 - upperHemisphereLuxValue: - m_OverrideState: 0 - m_Value: 1 - min: 0 - upperHemisphereLuxColor: - m_OverrideState: 0 - m_Value: {x: 0, y: 0, z: 0} - desiredLuxValue: - m_OverrideState: 0 - m_Value: 20000 - updateMode: - m_OverrideState: 0 - m_Value: 0 - updatePeriod: - m_OverrideState: 0 - m_Value: 0 - min: 0 - includeSunInBaking: - m_OverrideState: 0 - m_Value: 0 - sunSize: - m_OverrideState: 0 - m_Value: 0.04 - min: 0 - max: 1 - sunSizeConvergence: - m_OverrideState: 0 - m_Value: 5 - min: 1 - max: 10 - atmosphereThickness: - m_OverrideState: 0 - m_Value: 1 - min: 0 - max: 5 - skyTint: - m_OverrideState: 0 - m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} - hdr: 0 - showAlpha: 1 - showEyeDropper: 1 - groundColor: - m_OverrideState: 0 - m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1} - hdr: 0 - showAlpha: 1 - showEyeDropper: 1 - enableSunDisk: - m_OverrideState: 0 - m_Value: 1 --- !u!1 &1303166446 GameObject: m_ObjectHideFlags: 0 @@ -1634,6 +1910,87 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &1606819159 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1606819160} + - component: {fileID: 1606819162} + - component: {fileID: 1606819161} + m_Layer: 0 + m_Name: ExplicitLod + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1606819160 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1606819159} + m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} + m_LocalPosition: {x: 2, y: -2.4, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!23 &1606819161 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1606819159} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 07d9e73903bb12c47908581c233e64d8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1606819162 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1606819159} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1984901468 GameObject: m_ObjectHideFlags: 0 @@ -1764,6 +2121,8 @@ Transform: - {fileID: 2088724965} - {fileID: 2090775361} - {fileID: 698175486} + - {fileID: 1606819160} + - {fileID: 563548583} - {fileID: 1053123895} m_Father: {fileID: 0} m_RootOrder: 4 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing.unity.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraph.shadergraph similarity index 91% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraph.shadergraph index fde5ddef6aa..6daafc93bca 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraph.shadergraph @@ -19,7 +19,7 @@ "typeInfo": { "fullName": "UnityEditor.Rendering.HighDefinition.HDLitMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"0004a8ba-604a-4734-81ac-ec71efa2d4e2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 3.0,\n \"y\": -644.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.9339622855186462,\\n \\\"y\\\": 0.9339622855186462,\\n \\\"z\\\": 0.9339622855186462\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 17,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": false,\n \"m_TransparencyFog\": false,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": false,\n \"m_AlphaTest\": true,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": false,\n \"m_ReceiveDecals\": false,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": false,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_DOTSInstancing\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 10\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"0004a8ba-604a-4734-81ac-ec71efa2d4e2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 3.0,\n \"y\": -644.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.9339622855186462,\\n \\\"y\\\": 0.9339622855186462,\\n \\\"z\\\": 0.9339622855186462\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 17,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": false,\n \"m_TransparencyFog\": false,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": false,\n \"m_AlphaTest\": true,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": false,\n \"m_ReceiveDecals\": false,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": false,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 10\n}" }, { "typeInfo": { @@ -29,9 +29,9 @@ }, { "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode2" + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"308ee1bc-7f36-4ba5-9ff1-04acc460fdfa\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -711.0,\n \"y\": -534.0,\n \"width\": 212.00001525878907,\n \"height\": 209.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"9d826512ba2dfdd43b55968c032dde91\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"312de1f115b043b42804703d66a0e4b8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"308ee1bc-7f36-4ba5-9ff1-04acc460fdfa\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -785.0,\n \"y\": -644.0000610351563,\n \"width\": 196.00001525878907,\n \"height\": 125.00000762939453\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"402f77c2ec784934a884d97647d9fe9b\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"312de1f115b043b42804703d66a0e4b8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 2,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" }, { "typeInfo": { diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraph.shadergraph.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraph.shadergraph.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraph.shadergraph.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat similarity index 76% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat index 007a379c1bc..66181cdea56 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat @@ -32,10 +32,18 @@ Material: m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_164AE2E_Texture2_6: + m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTextureStack2_164AE2E_Texture_3: m_Texture: {fileID: 2800000, guid: 9d826512ba2dfdd43b55968c032dde91, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_164AE2E_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - Vector1_1EC2602A: 0.5 - Vector1_A6D4BDE2: 0.5 @@ -53,20 +61,21 @@ Material: - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 0 - - _StencilRefDistortionVec: 64 - - _StencilRefGBuffer: 2 - - _StencilRefMV: 128 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 - - _StencilWriteMaskDistortionVec: 64 - - _StencilWriteMaskGBuffer: 51 - - _StencilWriteMaskMV: 176 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 - _SurfaceType: 0 - _TransparentBackfaceEnable: 0 - _TransparentCullMode: 2 - _TransparentSortPriority: 0 + - _TransparentZWrite: 0 - _UseShadowThreshold: 0 - _ZTestDepthEqualForOpaque: 3 - _ZTestGBuffer: 3 @@ -88,4 +97,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} m_Name: m_EditorClassIdentifier: - version: 0 + version: 2 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/CloudGraphMat.mat.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraph.shadergraph similarity index 92% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraph.shadergraph index ec24c256e3c..3456daf356c 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraph.shadergraph @@ -6,13 +6,13 @@ "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"68065f08-7c25-43d3-bce2-bab59a5a253a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -777.0,\n \"y\": 24.0,\n \"width\": 205.0,\n \"height\": 160.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"68065f08-7c25-43d3-bce2-bab59a5a253a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -867.0,\n \"y\": 28.0,\n \"width\": 195.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"402f77c2ec784934a884d97647d9fe9b\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" }, { "typeInfo": { "fullName": "UnityEditor.Rendering.HighDefinition.DecalMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"8dbb241d-9c32-43a4-a837-03d1bf24228b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Decal Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -351.0000915527344,\n \"y\": -57.00001525878906,\n \"width\": 200.00001525878907,\n \"height\": 341.0000305175781\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"BaseColor Opacity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaAlbedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Normal Opacity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Ambient Occlusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"MAOS Opacity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"MAOSOpacity\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.DecalSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_AffectsMetal\": true,\n \"m_AffectsAO\": true,\n \"m_AffectsSmoothness\": true,\n \"m_AffectsAlbedo\": true,\n \"m_AffectsNormal\": true,\n \"m_AffectsEmission\": true,\n \"m_DrawOrder\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"8dbb241d-9c32-43a4-a837-03d1bf24228b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Decal Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -351.0000915527344,\n \"y\": -57.00001525878906,\n \"width\": 200.00001525878907,\n \"height\": 341.0000305175781\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"BaseColor Opacity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaAlbedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Normal Opacity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Ambient Occlusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"MAOS Opacity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"MAOSOpacity\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.DecalSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_AffectsMetal\": true,\n \"m_AffectsAO\": true,\n \"m_AffectsSmoothness\": true,\n \"m_AffectsAlbedo\": true,\n \"m_AffectsNormal\": true,\n \"m_AffectsEmission\": true,\n \"m_DrawOrder\": 0\n}" } ], "m_Groups": [], diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraph.shadergraph.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraph.shadergraph.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraph.shadergraph.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraphMat.mat similarity index 85% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraphMat.mat index 290aa38ca34..40f31f4a07c 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraphMat.mat @@ -24,6 +24,10 @@ Material: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack1_F1146E9_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _DecalMeshDepthBias: 0 - _DrawOrder: 0 @@ -41,4 +45,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} m_Name: m_EditorClassIdentifier: - version: 0 + version: 2 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraphMat.mat.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/DecalGraphMat.mat.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraphMat.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitGraph.shadergraph similarity index 91% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitGraph.shadergraph index 5121217784a..074d72b0af5 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitGraph.shadergraph @@ -6,19 +6,19 @@ "typeInfo": { "fullName": "UnityEditor.ShaderGraph.MultiplyNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"1a944490-65d6-4417-b514-6cc13b6bd635\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -217.0,\n \"y\": 328.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 10.0,\\n \\\"e01\\\": 7.0,\\n \\\"e02\\\": 5.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"1a944490-65d6-4417-b514-6cc13b6bd635\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -359.0,\n \"y\": 176.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 10.0,\\n \\\"e01\\\": 7.0,\\n \\\"e02\\\": 5.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" }, { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"418ce6b5-1a87-4747-940b-2238d19f921b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -557.0,\n \"y\": 198.0,\n \"width\": 205.0,\n \"height\": 160.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"062e2e8c474a74644bc719d5d294c476\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"418ce6b5-1a87-4747-940b-2238d19f921b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -709.0,\n \"y\": 124.0,\n \"width\": 195.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"062e2e8c474a74644bc719d5d294c476\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" }, { "typeInfo": { "fullName": "UnityEditor.Rendering.HighDefinition.HDUnlitMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"86ecdce8-13f2-4fea-ad8d-8732fdaeb77b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.003921568859368563,\\n \\\"y\\\": 0.003921568859368563,\\n \\\"z\\\": 0.003921568859368563\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDUnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionOnly\": true,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSided\": false,\n \"m_ZWrite\": true,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnableShadowMatte\": false\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"86ecdce8-13f2-4fea-ad8d-8732fdaeb77b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.003921568859368563,\\n \\\"y\\\": 0.003921568859368563,\\n \\\"z\\\": 0.003921568859368563\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDUnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionOnly\": true,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSided\": false,\n \"m_ZWrite\": true,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnableShadowMatte\": false\n}" } ], "m_Groups": [], diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitGraph.shadergraph.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitGraph.shadergraph.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitGraph.shadergraph.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat similarity index 76% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat index 99e4fa5c7e7..ba7c5487565 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} m_Name: m_EditorClassIdentifier: - version: 0 + version: 2 --- !u!21 &2100000 Material: serializedVersion: 6 @@ -32,6 +32,7 @@ Material: MotionVector: User disabledShaderPasses: - MOTIONVECTORS + - TransparentBackface m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -39,6 +40,10 @@ Material: m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack1_E020294_Texture_5: + m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 @@ -54,22 +59,23 @@ Material: - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 32 - - _StencilRefDistortionVec: 64 - - _StencilRefGBuffer: 34 - - _StencilRefMV: 160 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 - - _StencilWriteMaskDistortionVec: 64 - - _StencilWriteMaskGBuffer: 51 - - _StencilWriteMaskMV: 176 + - _StencilRef: 0 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 2 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 - _SurfaceType: 0 - _TransparentBackfaceEnable: 0 - _TransparentCullMode: 2 - _TransparentSortPriority: 0 + - _TransparentZWrite: 1 - _UseShadowThreshold: 0 - - _ZTestDepthEqualForOpaque: 4 + - _ZTestDepthEqualForOpaque: 3 - _ZTestGBuffer: 4 - _ZTestTransparent: 4 - _ZWrite: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/EmisUnlitMat.mat.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph new file mode 100644 index 00000000000..422b95fd614 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph @@ -0,0 +1,109 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.ModuloNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"031d4a1b-1dd1-4ebd-9f26-c114d573a465\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Modulo\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -360.00006103515627,\n \"y\": 198.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 2.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"0c062317-608d-4be8-98ae-317024aa8604\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -43.27217102050781,\n \"y\": 291.72784423828127,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 10.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UVNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"12a90813-fc57-4e6b-a2ca-984d3f37e998\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1188.0001220703125,\n \"y\": 273.0,\n \"width\": 208.0,\n \"height\": 313.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.RoundNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"4703b601-f0b0-466d-908f-dad70c8cd7d0\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Round\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -745.0000610351563,\n \"y\": -46.0000114440918,\n \"width\": 208.0,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SplitNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"6db72112-d751-489a-afba-2aaf99fd7a0e\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Split\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -939.0000610351563,\n \"y\": 282.0,\n \"width\": 118.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"706e1d01-fa79-4d97-8a46-e49d06d859d2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -746.0000610351563,\n \"y\": 310.9999694824219,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 8.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.HDLitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"7204a8a6-53ca-499b-a124-6e2b17f89079\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 372.0,\n \"y\": -96.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"b97e50cc-f655-4015-89d1-451ce38e12c0\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -61.0,\n \"y\": -36.0,\n \"width\": 186.0,\n \"height\": 125.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Lod\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Lod\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"Lod\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"031d4a1b-1dd1-4ebd-9f26-c114d573a465\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0c062317-608d-4be8-98ae-317024aa8604\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"0c062317-608d-4be8-98ae-317024aa8604\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 10,\n \"m_NodeGUIDSerialized\": \"b97e50cc-f655-4015-89d1-451ce38e12c0\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"12a90813-fc57-4e6b-a2ca-984d3f37e998\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"6db72112-d751-489a-afba-2aaf99fd7a0e\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"4703b601-f0b0-466d-908f-dad70c8cd7d0\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"031d4a1b-1dd1-4ebd-9f26-c114d573a465\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"6db72112-d751-489a-afba-2aaf99fd7a0e\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"706e1d01-fa79-4d97-8a46-e49d06d859d2\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"706e1d01-fa79-4d97-8a46-e49d06d859d2\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4703b601-f0b0-466d-908f-dad70c8cd7d0\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"b97e50cc-f655-4015-89d1-451ce38e12c0\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"7204a8a6-53ca-499b-a124-6e2b17f89079\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "7204a8a6-53ca-499b-a124-6e2b17f89079" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph.meta new file mode 100644 index 00000000000..4a837d998c0 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 95cfe7544cc0daa42bdb78ee21f9a8db +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat new file mode 100644 index 00000000000..f282702d6a8 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat @@ -0,0 +1,81 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8705482740865616583 +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: 2 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ExplicitLodMat + m_Shader: {fileID: -6465566751694194690, guid: 95cfe7544cc0daa42bdb78ee21f9a8db, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleTextureStack_622C0D0_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 1 + - _RenderQueueType: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 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: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat.meta new file mode 100644 index 00000000000..cc4b61c1b46 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 07d9e73903bb12c47908581c233e64d8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraph.shadergraph similarity index 86% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraph.shadergraph index f5c95992e08..f798a96ddfe 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraph.shadergraph @@ -6,13 +6,13 @@ "typeInfo": { "fullName": "UnityEditor.Rendering.HighDefinition.HDLitMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -281.0,\n \"y\": -157.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_DOTSInstancing\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -281.0,\n \"y\": -157.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" }, { "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode2" + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -802.0,\n \"y\": -50.0,\n \"width\": 205.0,\n \"height\": 209.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e793b1c02c4f7ae448a9cc2c39447dd7\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -880.0,\n \"y\": -90.0,\n \"width\": 196.0,\n \"height\": 125.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e793b1c02c4f7ae448a9cc2c39447dd7\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 2,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" } ], "m_Groups": [], @@ -29,12 +29,6 @@ "fullName": "UnityEditor.Graphing.Edge" }, "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\"\n }\n}" - }, - { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" - }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 14,\n \"m_NodeGUIDSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\"\n }\n}" } ], "m_PreviewData": { diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraph.shadergraph.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraph.shadergraph.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraph.shadergraph.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat similarity index 71% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat index 3a19708ad99..b37b3b39c99 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} m_Name: m_EditorClassIdentifier: - version: 0 + version: 2 --- !u!21 &2100000 Material: serializedVersion: 6 @@ -32,6 +32,7 @@ Material: MotionVector: User disabledShaderPasses: - MOTIONVECTORS + - TransparentBackface m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -39,10 +40,18 @@ Material: m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_38945874_Texture2_6: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTextureStack2_38945874_Texture_3: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_38945874_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 @@ -58,25 +67,26 @@ Material: - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 0 - - _StencilRefDistortionVec: 64 - - _StencilRefGBuffer: 2 - - _StencilRefMV: 128 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 - - _StencilWriteMaskDistortionVec: 64 - - _StencilWriteMaskGBuffer: 51 - - _StencilWriteMaskMV: 176 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 - _SurfaceType: 0 - _TransparentBackfaceEnable: 0 - _TransparentCullMode: 2 - _TransparentSortPriority: 0 + - _TransparentZWrite: 0 - _UseShadowThreshold: 0 - - _ZTestDepthEqualForOpaque: 4 + - _ZTestDepthEqualForOpaque: 3 - _ZTestGBuffer: 4 - _ZTestTransparent: 4 - - _ZWrite: 0 + - _ZWrite: 1 m_Colors: - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LitGraphMat.mat.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LowResolutionRequester.cs similarity index 87% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LowResolutionRequester.cs index b647e41f507..a64813df2c1 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LowResolutionRequester.cs @@ -44,7 +44,7 @@ void Update() { foreach (int prop in properties) { - Rendering.VirtualTexturing.RequestRegion(materialToRequest, prop, new Rect(0.0f, 0.0f, 1.0f, 1.0f), firstMipToRequest, Rendering.VirtualTexturing.AllMips); + UnityEngine.Rendering.VirtualTexturing.System.RequestRegion(materialToRequest, prop, new Rect(0.0f, 0.0f, 1.0f, 1.0f), firstMipToRequest, UnityEngine.Rendering.VirtualTexturing.System.AllMips); } } } diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LowResolutionRequester.cs.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/LowResolutionRequester.cs.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LowResolutionRequester.cs.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraph.shadergraph similarity index 82% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraph.shadergraph rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraph.shadergraph index 2fdc7f555e4..05f262c2f5f 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraph.shadergraph @@ -36,13 +36,13 @@ "typeInfo": { "fullName": "UnityEditor.Rendering.HighDefinition.HDLitMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"c1053fb2-b3f3-4ceb-822b-5ead3d10394f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 183.0,\n \"y\": -71.0,\n \"width\": 200.00001525878907,\n \"height\": 341.0000305175781\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_DOTSInstancing\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"c1053fb2-b3f3-4ceb-822b-5ead3d10394f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 183.0,\n \"y\": -71.0,\n \"width\": 200.00001525878907,\n \"height\": 341.0000305175781\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" }, { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"c4bb064b-a8fc-4a6b-add0-8232d6f7dd77\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -672.0,\n \"y\": 442.0,\n \"width\": 210.0,\n \"height\": 162.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"9d826512ba2dfdd43b55968c032dde91\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"c4bb064b-a8fc-4a6b-add0-8232d6f7dd77\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -598.0,\n \"y\": 473.0,\n \"width\": 194.99998474121095,\n \"height\": 101.00000762939453\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"402f77c2ec784934a884d97647d9fe9b\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" }, { "typeInfo": { @@ -54,7 +54,7 @@ "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"d9e49341-179e-4890-ba40-38f8c114d860\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -441.0,\n \"y\": -58.0,\n \"width\": 206.0,\n \"height\": 160.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"d9e49341-179e-4890-ba40-38f8c114d860\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -632.9998779296875,\n \"y\": -73.00000762939453,\n \"width\": 194.99998474121095,\n \"height\": 101.00000762939453\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" }, { "typeInfo": { diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraph.shadergraph.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraph.shadergraph.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraph.shadergraph.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat similarity index 74% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraphMat.mat rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat index 7ebb7fb46ed..6071d6c350a 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat @@ -27,10 +27,18 @@ Material: m_Texture: {fileID: 2800000, guid: 9d826512ba2dfdd43b55968c032dde91, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack1_89E299BF_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTextureStack1_C858D4E6_Texture_2: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack1_C858D4E6_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 @@ -46,20 +54,21 @@ Material: - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 0 - - _StencilRefDistortionVec: 64 - - _StencilRefGBuffer: 2 - - _StencilRefMV: 128 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 - - _StencilWriteMaskDistortionVec: 64 - - _StencilWriteMaskGBuffer: 51 - - _StencilWriteMaskMV: 176 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 - _SurfaceType: 0 - _TransparentBackfaceEnable: 0 - _TransparentCullMode: 2 - _TransparentSortPriority: 0 + - _TransparentZWrite: 0 - _UseShadowThreshold: 0 - _ZTestDepthEqualForOpaque: 3 - _ZTestGBuffer: 4 @@ -81,4 +90,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} m_Name: m_EditorClassIdentifier: - version: 0 + version: 2 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/MultiSampleGraphMat.mat.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraph.shadergraph similarity index 93% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraph.shadergraph rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraph.shadergraph index a109f06c008..e4cde18413e 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraph.shadergraph @@ -6,13 +6,13 @@ "typeInfo": { "fullName": "UnityEditor.ShaderGraph.PBRMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"42757517-cf48-4c46-b2f0-65d995ba46bc\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"PBR Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Albedo\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Occlusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDPBRSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_Model\": 1,\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_NormalDropOffSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"42757517-cf48-4c46-b2f0-65d995ba46bc\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"PBR Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Albedo\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Occlusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDPBRSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_Model\": 1,\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_NormalDropOffSpace\": 0\n}" }, { "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode2" + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"9a2e6366-d9b5-4e6e-88fd-5f76ca0bacdf\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -360.0,\n \"y\": 71.0,\n \"width\": 205.0,\n \"height\": 209.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e793b1c02c4f7ae448a9cc2c39447dd7\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"9a2e6366-d9b5-4e6e-88fd-5f76ca0bacdf\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -456.0,\n \"y\": 43.0,\n \"width\": 196.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e793b1c02c4f7ae448a9cc2c39447dd7\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 2,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" } ], "m_Groups": [], diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraph.shadergraph.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraph.shadergraph.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraph.shadergraph.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat similarity index 72% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraphMat.mat rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat index 98f167dfb18..027aea5c059 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat @@ -26,10 +26,18 @@ Material: m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_F6736428_Texture2_6: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTextureStack2_F6736428_Texture_3: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_F6736428_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: [] m_Colors: [] m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PBRGraphMat.mat.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraph.shadergraph similarity index 84% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraph.shadergraph rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraph.shadergraph index bd3f665dd55..1e967adb900 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraph.shadergraph @@ -13,19 +13,19 @@ "typeInfo": { "fullName": "UnityEditor.ShaderGraph.PropertyNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"5bed8cec-1a24-4e31-94bf-a99f80ab35d3\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -586.0,\n \"y\": 387.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"TheTexture\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"b37f5119-fbdd-4f62-a35a-58037a3556e0\"\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"5bed8cec-1a24-4e31-94bf-a99f80ab35d3\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -723.0,\n \"y\": 262.0,\n \"width\": 143.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"TheTexture\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"b37f5119-fbdd-4f62-a35a-58037a3556e0\"\n}" }, { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"8ac16606-8b03-4132-ab7e-7a035265ef4a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -354.0,\n \"y\": 276.0,\n \"width\": 205.0,\n \"height\": 160.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"instanceID\\\\\\\":0}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"8ac16606-8b03-4132-ab7e-7a035265ef4a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -354.0,\n \"y\": 276.0,\n \"width\": 205.0,\n \"height\": 160.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"instanceID\\\\\\\":0}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" }, { "typeInfo": { "fullName": "UnityEditor.Rendering.HighDefinition.HDLitMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"f69ca6f5-5e74-419b-a3e6-6e9b20026af2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_DOTSInstancing\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"f69ca6f5-5e74-419b-a3e6-6e9b20026af2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" } ], "m_Groups": [], @@ -35,7 +35,7 @@ "typeInfo": { "fullName": "UnityEditor.Graphing.Edge" }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5bed8cec-1a24-4e31-94bf-a99f80ab35d3\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"8ac16606-8b03-4132-ab7e-7a035265ef4a\"\n }\n}" + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5bed8cec-1a24-4e31-94bf-a99f80ab35d3\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 5,\n \"m_NodeGUIDSerialized\": \"8ac16606-8b03-4132-ab7e-7a035265ef4a\"\n }\n}" }, { "typeInfo": { diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraph.shadergraph.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraph.shadergraph.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraph.shadergraph.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraphMat.mat similarity index 85% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraphMat.mat rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraphMat.mat index c86396620b8..e42bc3fa753 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraphMat.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} m_Name: m_EditorClassIdentifier: - version: 0 + version: 2 --- !u!21 &2100000 Material: serializedVersion: 6 @@ -55,20 +55,21 @@ Material: - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 0 - - _StencilRefDistortionVec: 64 - - _StencilRefGBuffer: 2 - - _StencilRefMV: 128 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 - - _StencilWriteMaskDistortionVec: 64 - - _StencilWriteMaskGBuffer: 51 - - _StencilWriteMaskMV: 176 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 - _SurfaceType: 0 - _TransparentBackfaceEnable: 0 - _TransparentCullMode: 2 - _TransparentSortPriority: 0 + - _TransparentZWrite: 0 - _UseShadowThreshold: 0 - _ZTestDepthEqualForOpaque: 3 - _ZTestGBuffer: 4 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraphMat.mat.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/PropGraphMat.mat.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PropGraphMat.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraph.shadergraph similarity index 89% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraph.shadergraph rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraph.shadergraph index b06968b5e6c..ae1bfb211bb 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraph.shadergraph @@ -6,13 +6,13 @@ "typeInfo": { "fullName": "UnityEditor.Rendering.HighDefinition.HDLitMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -165.0,\n \"y\": -109.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"SubsurfaceMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SubsurfaceMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Thickness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Thickness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.DiffusionProfileInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Diffusion Profile\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"DiffusionProfileHash\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ],\\n \\\"m_DiffusionProfile\\\": {\\n \\\"selectedEntry\\\": 0,\\n \\\"popupEntries\\\": []\\n },\\n \\\"m_SerializedDiffusionProfile\\\": \\\"{\\\\n \\\\\\\"diffusionProfileAsset\\\\\\\": {\\\\n \\\\\\\"instanceID\\\\\\\": 0\\\\n }\\\\n}\\\",\\n \\\"m_Version\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 1,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_DOTSInstancing\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 3\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"509edd25-5c61-4140-a3f0-92f3d9356390\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -165.0,\n \"y\": -109.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"SubsurfaceMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SubsurfaceMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Thickness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Thickness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.DiffusionProfileInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Diffusion Profile\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"DiffusionProfileHash\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ],\\n \\\"m_DiffusionProfile\\\": {\\n \\\"selectedEntry\\\": 0,\\n \\\"popupEntries\\\": []\\n },\\n \\\"m_SerializedDiffusionProfile\\\": \\\"{\\\\n \\\\\\\"diffusionProfileAsset\\\\\\\": {\\\\n \\\\\\\"instanceID\\\\\\\": 0\\\\n }\\\\n}\\\",\\n \\\"m_Version\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 1,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 3\n}" }, { "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode2" + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -807.0,\n \"y\": -60.0,\n \"width\": 205.0,\n \"height\": 209.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e793b1c02c4f7ae448a9cc2c39447dd7\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -846.0,\n \"y\": -39.0,\n \"width\": 196.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e793b1c02c4f7ae448a9cc2c39447dd7\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 2,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" } ], "m_Groups": [], diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraph.shadergraph.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraph.shadergraph.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraph.shadergraph.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat similarity index 75% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraphMat.mat rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat index a6f21231691..2a358b9bc66 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} m_Name: m_EditorClassIdentifier: - version: 0 + version: 2 --- !u!21 &2100000 Material: serializedVersion: 6 @@ -40,10 +40,18 @@ Material: m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_38945874_Texture2_6: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTextureStack2_38945874_Texture_3: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack2_38945874_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 @@ -60,20 +68,21 @@ Material: - _RenderQueueType: 1 - _RequireSplitLighting: 1 - _SrcBlend: 1 - - _StencilRef: 1 - - _StencilRefDepth: 0 - - _StencilRefDistortionVec: 64 - - _StencilRefGBuffer: 1 - - _StencilRefMV: 128 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 - - _StencilWriteMaskDistortionVec: 64 - - _StencilWriteMaskGBuffer: 51 - - _StencilWriteMaskMV: 176 + - _StencilRef: 4 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 14 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 - _SurfaceType: 0 - _TransparentBackfaceEnable: 0 - _TransparentCullMode: 2 - _TransparentSortPriority: 0 + - _TransparentZWrite: 0 - _UseShadowThreshold: 0 - _ZTestDepthEqualForOpaque: 3 - _ZTestGBuffer: 4 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/SSSGraphMat.mat.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Scene Settings Profile.asset b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Scene Settings Profile.asset similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Scene Settings Profile.asset rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Scene Settings Profile.asset diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Scene Settings Profile.asset.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Scene Settings Profile.asset.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Scene Settings Profile.asset.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Scene Settings Profile.asset.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_a2wall_diffuse.jpg.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_normal.png b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_a2wall_normal.png similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_normal.png rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_a2wall_normal.png diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_normal.png.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_a2wall_normal.png.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_a2wall_normal.png.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_a2wall_normal.png.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_albedo.jpg b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_albedo.jpg similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_albedo.jpg rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_albedo.jpg diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_albedo.jpg.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_albedo.jpg.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_albedo.jpg.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_albedo.jpg.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds.jpg b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_clouds.jpg similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds.jpg rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_clouds.jpg diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds.jpg.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_clouds.jpg.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds.jpg.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_clouds.jpg.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_clouds_normal.jpg.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_lights.jpg b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_lights.jpg similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_lights.jpg rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_lights.jpg diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_lights.jpg.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_lights.jpg.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/VT_earth_lights.jpg.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/VT_earth_lights.jpg.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/earth_clouds.jpg b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/earth_clouds.jpg similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/earth_clouds.jpg rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/earth_clouds.jpg diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/earth_clouds.jpg.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/earth_clouds.jpg.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/Textures/earth_clouds.jpg.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/earth_clouds.jpg.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraph.shadergraph similarity index 63% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraph.shadergraph rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraph.shadergraph index 4214f15996b..52ab36550ca 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraph.shadergraph @@ -6,13 +6,13 @@ "typeInfo": { "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"1e1e86d6-8bfd-4be7-9c08-ee8a281c06a9\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -42.0,\n \"y\": -287.0,\n \"width\": 200.0,\n \"height\": 197.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.UnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"1e1e86d6-8bfd-4be7-9c08-ee8a281c06a9\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -42.0,\n \"y\": -287.0,\n \"width\": 200.0,\n \"height\": 197.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.UnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false\n}" }, { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"865f0824-8808-4f13-968c-b0225a82f740\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -381.0000305175781,\n \"y\": 95.00001525878906,\n \"width\": 206.00001525878907,\n \"height\": 160.00001525878907\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"062e2e8c474a74644bc719d5d294c476\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"865f0824-8808-4f13-968c-b0225a82f740\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -491.0,\n \"y\": -247.0,\n \"width\": 195.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"062e2e8c474a74644bc719d5d294c476\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" } ], "m_Groups": [], diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraph.shadergraph.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraph.shadergraph.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraph.shadergraph.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat similarity index 81% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraphMat.mat rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat index 12dafaa4509..4a91dd6b773 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat @@ -26,6 +26,10 @@ Material: m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTextureStack1_20847E1A_Texture_5: + m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: [] m_Colors: [] m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturing/UnlitGraphMat.mat.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShader.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShader.shadergraph new file mode 100644 index 00000000000..afcf6b828b3 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShader.shadergraph @@ -0,0 +1,121 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.AddNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"0794cd36-a737-4b9d-867b-68a67740e910\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -438.00006103515627,\n \"y\": -4.999996185302734,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Vector1Node" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"08f5b62c-32e4-4194-9df1-cff658cc3f49\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Vector 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1160.0,\n \"y\": -133.0,\n \"width\": 124.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"X\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"X\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.30000001192092898,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Value\": 0.0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.HDLitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"2657bdf1-6e0b-45a4-a1b3-f14257b24947\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 84.99989318847656,\n \"y\": -110.99999237060547,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"2854a8aa-fa5a-4e72-88ea-ba6ff00c88ab\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -703.0,\n \"y\": -39.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"2e299fe1-cda9-41a6-80d4-00720d2fab7a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1216.0,\n \"y\": -2.0,\n \"width\": 186.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"402f77c2ec784934a884d97647d9fe9b\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Lod\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Lod\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 10.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"Lod\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": true,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"5daf675c-1d12-474f-8e1d-7afddd93c2cf\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -971.0,\n \"y\": -118.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"b4ca267e-bafa-4a52-95a0-1b5025acb78a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -336.0,\n \"y\": 344.0,\n \"width\": 185.99998474121095,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"312de1f115b043b42804703d66a0e4b8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 1,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PositionNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"c650985a-d288-4f29-becb-a10a18f61db3\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Position\",\n \"m_NodeVersion\": 1,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -718.9999389648438,\n \"y\": 297.0,\n \"width\": 207.99998474121095,\n \"height\": 315.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 1,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.NormalVectorNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"ec34ddfb-2e08-4e40-9f11-3879a94e521b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Normal Vector\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1055.0,\n \"y\": 181.0,\n \"width\": 208.0,\n \"height\": 315.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"0794cd36-a737-4b9d-867b-68a67740e910\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"2657bdf1-6e0b-45a4-a1b3-f14257b24947\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"08f5b62c-32e4-4194-9df1-cff658cc3f49\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5daf675c-1d12-474f-8e1d-7afddd93c2cf\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"2854a8aa-fa5a-4e72-88ea-ba6ff00c88ab\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0794cd36-a737-4b9d-867b-68a67740e910\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"2e299fe1-cda9-41a6-80d4-00720d2fab7a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"5daf675c-1d12-474f-8e1d-7afddd93c2cf\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"5daf675c-1d12-474f-8e1d-7afddd93c2cf\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"2854a8aa-fa5a-4e72-88ea-ba6ff00c88ab\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"b4ca267e-bafa-4a52-95a0-1b5025acb78a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"2657bdf1-6e0b-45a4-a1b3-f14257b24947\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"c650985a-d288-4f29-becb-a10a18f61db3\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"0794cd36-a737-4b9d-867b-68a67740e910\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"ec34ddfb-2e08-4e40-9f11-3879a94e521b\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"2854a8aa-fa5a-4e72-88ea-ba6ff00c88ab\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "2657bdf1-6e0b-45a4-a1b3-f14257b24947" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShader.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShader.shadergraph.meta new file mode 100644 index 00000000000..aee99ff0813 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShader.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 573c29c178ddae84dbf22005b17e0143 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat new file mode 100644 index 00000000000..5dbc8f10d39 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat @@ -0,0 +1,85 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: VertexShaderMat + m_Shader: {fileID: -6465566751694194690, guid: 573c29c178ddae84dbf22005b17e0143, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleTextureStack_6E4297F5_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleTextureStack_92BB29F_Texture_5: + m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 1 + - _RenderQueueType: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 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 &1414816604430355339 +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: 2 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat.meta new file mode 100644 index 00000000000..2bbb3f698a8 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d44d890bd690ee40b18df454cc3c54e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturingSettings.lighting b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturingSettings.lighting similarity index 97% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturingSettings.lighting rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturingSettings.lighting index 2e623acbb18..897ebbba6fc 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturingSettings.lighting +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturingSettings.lighting @@ -6,7 +6,7 @@ LightingSettings: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: 9700_VirtualTexturingSettings + m_Name: 9713_VirtualTexturingSettings serializedVersion: 2 m_GIWorkflowMode: 1 m_EnableBakedLightmaps: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturingSettings.lighting.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturingSettings.lighting.meta similarity index 100% rename from TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_VirtualTexturingSettings.lighting.meta rename to TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturingSettings.lighting.meta From f35bfedc8e590703a048999552ce370fe0b2a74e Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 4 Feb 2020 16:56:06 +0100 Subject: [PATCH 108/143] Tweaks to the tests - Fix project with VT disabled - Fix lightmap asserts (fixed by rebuilding lightmaps) --- .../9x_Other/9713_VirtualTexturing.unity | 594 +++++++----------- .../9713_VirtualTexturing/LightingData.asset | Bin 0 -> 18168 bytes .../LightingData.asset.meta | 8 + .../VirtualTexturingSettings.cs | 8 +- 4 files changed, 224 insertions(+), 386 deletions(-) create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LightingData.asset create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LightingData.asset.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity index bae1fdf6e28..658d26b085e 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.049135897, g: 0.06923287, b: 0.108832434, a: 1} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -97,7 +97,7 @@ LightmapSettings: m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 112000000, guid: 6ce0325459492594a93b5692c869356c, + m_LightingDataAsset: {fileID: 112000000, guid: bf8ca8e1564687f40b494fc1f1490915, type: 2} m_LightingSettings: {fileID: 4890085278179872738, guid: a1556c1d9fb367745a1c4aaa01451097, type: 2} @@ -601,16 +601,15 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 361997041} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} m_Name: m_EditorClassIdentifier: m_Profile: {fileID: 11400000, guid: 22810a4b5b549954198ff70792391f0f, type: 2} m_StaticLightingSkyUniqueID: 2 - m_SkySettings: {fileID: 904386611} - m_SkySettingsFromProfile: {fileID: 114252824260178082, guid: 22810a4b5b549954198ff70792391f0f, - type: 2} + m_SkySettings: {fileID: 0} + m_SkySettingsFromProfile: {fileID: 0} --- !u!114 &361997043 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1126,85 +1125,6 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &904386611 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 3df29e7cc05fbec4aa43e06ea875565d, type: 3} - m_Name: - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - rotation: - m_OverrideState: 0 - m_Value: 0 - min: 0 - max: 360 - skyIntensityMode: - m_OverrideState: 0 - m_Value: 0 - exposure: - m_OverrideState: 0 - m_Value: 0 - multiplier: - m_OverrideState: 0 - m_Value: 1 - min: 0 - upperHemisphereLuxValue: - m_OverrideState: 0 - m_Value: 1 - min: 0 - upperHemisphereLuxColor: - m_OverrideState: 0 - m_Value: {x: 0, y: 0, z: 0} - desiredLuxValue: - m_OverrideState: 0 - m_Value: 20000 - updateMode: - m_OverrideState: 0 - m_Value: 0 - updatePeriod: - m_OverrideState: 0 - m_Value: 0 - min: 0 - includeSunInBaking: - m_OverrideState: 0 - m_Value: 0 - sunSize: - m_OverrideState: 0 - m_Value: 0.04 - min: 0 - max: 1 - sunSizeConvergence: - m_OverrideState: 0 - m_Value: 5 - min: 1 - max: 10 - atmosphereThickness: - m_OverrideState: 0 - m_Value: 1 - min: 0 - max: 5 - skyTint: - m_OverrideState: 0 - m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} - hdr: 0 - showAlpha: 1 - showEyeDropper: 1 - groundColor: - m_OverrideState: 0 - m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1} - hdr: 0 - showAlpha: 1 - showEyeDropper: 1 - enableSunDisk: - m_OverrideState: 0 - m_Value: 1 --- !u!1 &1036204241 GameObject: m_ObjectHideFlags: 0 @@ -2290,303 +2210,211 @@ Transform: m_Father: {fileID: 2056951134} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &3711618258335929874 -PrefabInstance: +--- !u!1 &1132393544551473 +GameObject: m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4209882626151009} + - component: {fileID: 20109209845833397} + - component: {fileID: 114777190067558783} + - component: {fileID: 1132393544551474} + m_Layer: 0 + m_Name: HDRP_VirtualTexturing_Test_Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1132393544551474 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1132393544551473} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9459100e7946cb84eb53a26a14473032, type: 3} + m_Name: + m_EditorClassIdentifier: + ImageComparisonSettings: + TargetWidth: 1024 + TargetHeight: 1024 + PerPixelCorrectnessThreshold: 0.0005 + AverageCorrectnessThreshold: 0.0005 + UseHDR: 0 + doBeforeTest: + m_PersistentCalls: + m_Calls: [] + captureFramerate: 0 + waitFrames: 20 + xrCompatible: 1 + xrThresholdMultiplier: 1 + checkMemoryAllocation: 1 + renderPipelineAsset: {fileID: 11400000, guid: d7fe5f39d2c099a4ea1f1f610af309d7, + type: 2} +--- !u!4 &4209882626151009 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1132393544551473} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -30, y: 0.073, z: -6.3} + 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!20 &20109209845833397 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1132393544551473} + m_Enabled: 1 serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_Version - value: 7 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableShadow - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableContactShadows - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableShadowMask - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableSSR - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableSSAO - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableSubsurfaceScattering - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableTransmission - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableAtmosphericScattering - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableVolumetrics - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableReprojectionForVolumetrics - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableLightLayers - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.diffuseGlobalDimmer - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.specularGlobalDimmer - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableTransparentPrepass - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableMotionVectors - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableObjectMotionVectors - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableDecals - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableRoughRefraction - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableTransparentPostpass - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableDistortion - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enablePostprocess - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableOpaqueObjects - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableTransparentObjects - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.enableAsyncCompute - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableDeferredTileAndCluster - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableComputeLightEvaluation - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableComputeLightVariants - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableComputeMaterialVariants - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableFptlForForwardOpaque - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.enableBigTilePrepass - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.isFptlEnabled - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3608953520624815981, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 - value: 2110976425804 - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.size - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: secondCamera - value: - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: sgObjs - value: - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: biObjs - value: - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: ImageComparisonSettings.PerPixelCorrectnessThreshold - value: 0.0005 - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: ImageComparisonSettings.AverageCorrectnessThreshold - value: 0.00005 - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: renderPipelineAsset - value: - objectReference: {fileID: 11400000, guid: d7fe5f39d2c099a4ea1f1f610af309d7, - type: 2} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: xrLayout - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: xrThresholdMultiplier - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_Mode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_CallState - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: waitFrames - value: 50 - objectReference: {fileID: 0} - - target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: compareSGtoBI - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3712748143588121123, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_Name - value: HDRP_VirtualTexturing_Test_Camera - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalPosition.x - value: -30 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalPosition.y - value: 0.073 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalPosition.z - value: -6.3 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3714526284685886579, guid: 5f639aeb2b271eb458c4303b4c365c42, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 5f639aeb2b271eb458c4303b4c365c42, type: 3} + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.5 + far clip plane: 20 + field of view: 60 + orthographic: 0 + orthographic size: 1.2 + 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: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!114 &114777190067558783 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1132393544551473} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 7 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + clearColorMode: 1 + backgroundColorHDR: {r: 0.147, g: 0.08628003, b: 0.056594998, a: 0} + clearDepth: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + volumeAnchorOverride: {fileID: 0} + antialiasing: 0 + SMAAQuality: 2 + dithering: 0 + stopNaNs: 0 + taaSharpenStrength: 0.6 + physicalParameters: + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + flipYMode: 0 + fullscreenPassthrough: 0 + allowDynamicResolution: 0 + customRenderingSettings: 0 + invertFaceCulling: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + hasPersistentHistory: 0 + m_RenderingPathCustomFrameSettings: + bitDatas: + data1: 2110976425804 + data2: 4539628425463136256 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 0 + data2: 0 + defaultFrameSettings: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LightingData.asset b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LightingData.asset new file mode 100644 index 0000000000000000000000000000000000000000..943f4c0d893f099d2577647d27a403da5c116e04 GIT binary patch literal 18168 zcmdU%eVklXdB@LWHwgp;c@OW)dw2_(Ndn<5PF~4|goI=X?}o|l-R!{b>@qVUyWwp> zd6O4G&?+D$RsmnAU{#bVrQk~|V6BR+RH?K@tyYSyQl!-Q`_f$de|>n%{_TxR$EUHnr!n24WIig z=W_0W4%hfh&NX;0n)yx7Am0@SOFCU+N9=h?o}(#;ninB^1}fOT0~xpF`i-f6qCFxni1k`0?8pGB`GGBljbv?K|9=XnQd>>b+Bj=iDmP zU4)IYcgB`Z?c?`$z=`H(mkiIj=b_sG>e)ZqLau>KQhWb)Lw&BOl-G*;w>xJ*NQ~$%r8^|QJ>wh@v zb5AOztk}MeAa7yM>7Ue}@@J4YS|>pN$Ul!HFQ$2zfA!C!$XgiY$&r5^o#8q64b=Sr z8^`aM43Fd6v7R@OheZEP$IqFlZXZ96|Ibj*_;H-)$RshozJc=2P5uD9&u`1UJza|_=&=28@wodj=@h8KG)!92tVH7X9>rBZe0B@5I)b~y~0m4_{G9` zuR^hzI6qr4ewPYA+2EtXPcit_!cR5$^}^>H{8r)bF!)`6`g!j~KTCE=%Mc!+O51!w$OLEbE?_7hce&-on^*i6-s^0|}-sx_}`1L?P{J9G~M<$8)SMm+Q---Ho z{zCsYOaIn;-X*PhZrs0%46gkv8C?6f!Qk4z-V6`=T`T(aWq7P#VsO>3-{7j>MuV$< ze2$InuhZQH-R>3r%AO;W#PPcyF8mUMKP{a1;CTK*`)7p@8T@(S z6@$MheAwVW5k6w@SA}0{@ZSip8hlbm=vU3)I|%2q{&@Z0L-;0xA1M4XgC8k;v%zNz zA2s-?!pAZ^#P8F<8NauXH;_qckKdQ0K37!AzQ*zU3i1~AybrP&zZsvd%<%C1yanfM z2X>XgZxDWUhUeT}V4uK7{Tt-WB=Px$?{`lLzXtU&?}(m{uO%-^W0n!0`24BQ$M5oW zG5;oHvwuZYzdOSxyD_|9{2b@-{&Zc2Pl?_yuJ^owJfxhP5`EG}+&ueg*j) z-y1#eLLL&^Z-s7pf4T|PaeN3|Uxo+!I8^N84?S-n4~h1jzJJ}1 z>exR5SNni3jLX$NK4NgSk3TZF+Q&x?uJ-XUgR6Z!U~sjM2MwuK9^!i*_QCl72zdjUB;22(`2HyBb48`Jg*d){ zhP;J6KN+$a-}!F;CmBB3uP?8|Irwv*HF%%!&yB-*f4Nln=M8>^@W%{(lkhK$!x>*c z0M7XO#SD-A=W&Cp|NN=J)qlQZaP^-r8(jV834^Qu{F%Ykf1WhB`p=&mT>a-MgRB2M zZE*FUuNYkY=c@)+|M{B1)qlQjaP^bAV^@rrz*q6imDdQ{S6JlW-kKa%K z-r#C~KQg%5-%AEp`}+rjtNs0>!PWl$$>3^#FB@F#@5csL`}>K()&72JaJ9dGHn`f~ z&kU~i_j7}*{r!u<)&72AaJ9czGCbJd*Tnw*mArvWQoH@Viu#G{@0aA-*q1xq_aK}0 zHyy|Smf_+38sqP;zsm49e*W6vYQL`;TNPJl1cT z!Iz8vI~e?I;X7t{SYPS`XaC+t-bm{o|9)U6@?x6D>r4F3hredR__*}?(%UmUUSHb9 z;JUuFYla8?ZxH==BX2Y>4_#vYcPB5Vd942)8TqmPduDj7|6T@H{ikPm(EoPPe{b>$ z^xud4Nn8JY+vM~24IhJS+Se{*RXAe_6KHo zu-~aug8VLnPZxerhIhIZ(ETWIAa^i%5d}&7zWhAa4-4S5-$Te7O4%l!|3k^2O!IjD z4*U$L=sOyt6GV>%wU{riC9GCb%%Ci>4JZ#B=%PoBKk z6z|7BJ%0Qh0REb(J-*D&@Yp}+7+n2xZiWZ_?-2cuCvP+_pV9vW@?x6D<3BGWzr(MO z(Y}Bjf5*VRCfYaqzZKW#_@C6qSClsn)XSBPi%a#=f?6%9yVa}f)l-)AmFvURC8PDE zQY#Nv=DVTwOUr{v_hJ-Qm+Av3`14j*lm60%?n^}HZ0C=#_g5M! zjntf$c+C_*adEk-kSzyFeZ!kqmTH&aV8N=MWVF7in$%KFYKuy}0|_;&g-iR^tE(kPlceGst}Km=z(H{dt6pcY)@rF$-Ie~~>QJc;A9hulb=Mc>a)nIO z+Me#p+Ob+a8FDqh>+W-9@n}Ef8&NsOw~GAo;g!nxg*b6o1+Tx;f5-`(MZiHQ5)!RF`iQ(DLWEj(7tz+0+G*GHklEG%cWo+}YPknCOik`8N z#0`~4lRhsOdiXZw8qem)`2Cuse-H+ZtNUqKv}r>Emrupx3D09k#}mW)=H$u!Av#`{ zRM}&Hd*izt9@;iOw{F*kSKa&YRmUFo^e_i_BsP$T#81Np3x=wg~6)W6V4J zqyKw_^Ytd?@uT^!jJj(-39OKVO}fgX7N~<$1&B%=qfWSLZc= z^gqTq*I*VBUhSe!v&XQy7#Q<*|2ejWe2M&J$fy4>4$t(pT|Q?<{kDQ#i0gBFj`O6; z=ggF^7fu^(Yn5x--_N z6ZtS?vw!r>xoL&{Q1(q)lCu# z?f%PqbUL;7Z%rDaOn#s&eevGDHp7Ge-UA)zzdacq`|nu>SN~mSaP{A_4X*yn=cIH} z|5yJ#Hw{r%uKs(T!PS4yH@N!m1qN6Dz0lz5zwb1-`Y)gL(n`7= z^Zql4nsSDBdjGry=TJYK7bV(1{r67cmqax92l?H?d5v_^_FIJyr6J179}*s3`dTL` z|FrPo7V;(KpBFx2@GlF$)ZkwcUN!hL!fOWqw(z>azb|}~!G9$DGK2HeE$3&m!Cw(R zYVcnRA2axy!ucMRPCC9Fc=6@+FHb|1l}{6Xg~4|bex<>u3%|7aX~CfC0y!zV}aRMRC{NH_aX$g`Q zGr#kav1;CfrQ6a#(pN1FmbZkJU@mS>Sm~M^OKs&!U%5A|xoZ(C<66YhxE8TCUP-X1 zykWTNSLj;@IKOp(7OexcSy`%A%cHYL=kzEQ5W&u04MoH);L(; zE#FJ;2F*3`u;}eaq*W*O(5&!Hf-LbveYo9NH(9G|EDP3oJU zn!@wNn?qx_S8n*WCEgV&COs2t5Cjv?CgM&E>l-Wp^EPaCB{ztGcFC zQS^JaUk;7Vs^BZnQvWJ7b?(g3nWHZKzs88lJaHN}u9`gkT$B#LNb8H9KJaZX&E9G^ R6(`JCG&o#Ij-2q+-vNU_>qh_p literal 0 HcmV?d00001 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LightingData.asset.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LightingData.asset.meta new file mode 100644 index 00000000000..c5b2324ec8e --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LightingData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bf8ca8e1564687f40b494fc1f1490915 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs index a1586b63cf7..73a1d3c6787 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs @@ -7,17 +7,19 @@ namespace UnityEngine.Rendering.HighDefinition [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "VirtualTexturing - Settings" + Documentation.endURL)] public sealed class VirtualTexturingSettings : ScriptableObject { - public VirtualTexturing.VirtualTexturingSettings settings = new VirtualTexturing.VirtualTexturingSettings(); +#if ENABLE_VIRTUALTEXTURES + public UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings settings = new UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings(); - public static VirtualTexturing.VirtualTexturingSettings Default + public static UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings Default { get { - VirtualTexturing.VirtualTexturingSettings settings = new VirtualTexturing.VirtualTexturingSettings(); + UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings settings = new UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings(); settings.cpuCache.sizeInMegaBytes = 64; settings.gpuCache.sizeInMegaBytes = 128; return settings; } } +#endif } } From 4726b9912385610d1d9fa43e3127d1128cdfcaca Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Wed, 5 Feb 2020 17:24:55 +0100 Subject: [PATCH 109/143] initial late latching for VT tileset CBs --- .../ShaderLibrary/TextureStack.hlsl | 58 +++++++------------ 1 file changed, 21 insertions(+), 37 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 7682421a228..ef3b6d811c3 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -8,6 +8,7 @@ #if SHADER_API_PSSL #define GRA_NO_UNORM 1 #endif +#define GRA_DEBUG 1 #include "GraniteShaderLib3.cginc" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" @@ -88,27 +89,34 @@ struct StackInfo #define RESOLVE_SCALE_OVERRIDE float2(1,1) #endif +StructuredBuffer _VTTilesetBuffer; + #define DECLARE_STACK_CB(stackName) \ - float4x4 stackName##_spaceparams[2];\ float4 stackName##_atlasparams[2] #define DECLARE_STACK_BASE(stackName) \ TEXTURE2D(stackName##_transtab);\ SAMPLER(sampler##stackName##_transtab);\ \ +GraniteTilesetConstantBuffer GetConstantBuffer_##stackName() \ +{ \ + int idx = (int)stackName##_atlasparams[1].w; \ + GraniteTilesetConstantBuffer graniteParamBlock; \ + graniteParamBlock = _VTTilesetBuffer[idx]; \ + \ + /* hack resolve scale into constant buffer here */\ + graniteParamBlock.data[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x; \ + graniteParamBlock.data[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y; \ + \ + return graniteParamBlock; \ +} \ StackInfo PrepareVT_##stackName(float2 uv)\ {\ GraniteStreamingTextureConstantBuffer textureParamBlock;\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ textureParamBlock.data[1] = stackName##_atlasparams[1];\ \ - /* hack resolve scale into constant buffer here */\ - stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ - stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ -\ - GraniteTilesetConstantBuffer graniteParamBlock;\ - graniteParamBlock.data[0] = stackName##_spaceparams[0];\ - graniteParamBlock.data[1] = stackName##_spaceparams[1];\ + GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ \ GraniteConstantBuffers grCB;\ grCB.tilesetBuffer = graniteParamBlock;\ @@ -128,13 +136,7 @@ StackInfo PrepareVTLod_##stackName(float2 uv, float mip) \ textureParamBlock.data[0] = stackName##_atlasparams[0];\ textureParamBlock.data[1] = stackName##_atlasparams[1];\ \ - /* hack resolve scale into constant buffer here */\ - stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ - stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ -\ - GraniteTilesetConstantBuffer graniteParamBlock;\ - graniteParamBlock.data[0] = stackName##_spaceparams[0];\ - graniteParamBlock.data[1] = stackName##_spaceparams[1];\ + GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ \ GraniteConstantBuffers grCB;\ grCB.tilesetBuffer = graniteParamBlock;\ @@ -161,13 +163,7 @@ float4 SampleVT_##layerSamplerName(StackInfo info)\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ textureParamBlock.data[1] = stackName##_atlasparams[1];\ \ - /* hack resolve scale into constant buffer here */\ - stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ - stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ -\ - GraniteTilesetConstantBuffer graniteParamBlock;\ - graniteParamBlock.data[0] = stackName##_spaceparams[0];\ - graniteParamBlock.data[1] = stackName##_spaceparams[1];\ + GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ \ GraniteConstantBuffers grCB;\ grCB.tilesetBuffer = graniteParamBlock;\ @@ -191,13 +187,7 @@ float4 SampleVTLod_##layerSamplerName(StackInfo info)\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ textureParamBlock.data[1] = stackName##_atlasparams[1];\ \ - /* hack resolve scale into constant buffer here */\ - stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ - stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ -\ - GraniteTilesetConstantBuffer graniteParamBlock;\ - graniteParamBlock.data[0] = stackName##_spaceparams[0];\ - graniteParamBlock.data[1] = stackName##_spaceparams[1];\ + GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ \ GraniteConstantBuffers grCB;\ grCB.tilesetBuffer = graniteParamBlock;\ @@ -223,13 +213,7 @@ float4 ResolveVT_##stackName(float2 uv)\ textureParamBlock.data[0] = stackName##_atlasparams[0];\ textureParamBlock.data[1] = stackName##_atlasparams[1];\ \ - /* hack resolve scale into constant buffer here */\ - stackName##_spaceparams[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x;\ - stackName##_spaceparams[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y;\ -\ - GraniteTilesetConstantBuffer graniteParamBlock;\ - graniteParamBlock.data[0] = stackName##_spaceparams[0];\ - graniteParamBlock.data[1] = stackName##_spaceparams[1];\ + GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ \ GraniteConstantBuffers grCB;\ grCB.tilesetBuffer = graniteParamBlock;\ @@ -329,4 +313,4 @@ StackInfo MakeStackInfoLod(float2 uv, float lod) #endif -#endif //TEXTURESTACK_include \ No newline at end of file +#endif //TEXTURESTACK_include From 8ece7409d058b033d4315bdc1a153aad1e977de3 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Thu, 6 Feb 2020 11:41:19 +0100 Subject: [PATCH 110/143] cleanup debugging code --- com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl | 1 - 1 file changed, 1 deletion(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index ef3b6d811c3..e0058085d8a 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -8,7 +8,6 @@ #if SHADER_API_PSSL #define GRA_NO_UNORM 1 #endif -#define GRA_DEBUG 1 #include "GraniteShaderLib3.cginc" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" From 5993cf01a799bf68d7ca53a4b42792627ec3a791 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Tue, 18 Feb 2020 13:58:35 +0100 Subject: [PATCH 111/143] Do not compile VT settings editor if VT is disabled --- .../Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs index d66046f6007..178e6c3d607 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs @@ -4,6 +4,7 @@ using UnityEngine.Rendering; using VirtualTexturingSettings = UnityEngine.Rendering.HighDefinition.VirtualTexturingSettings; +#if ENABLE_VIRTUALTEXTURES namespace UnityEditor.Rendering.HighDefinition { [CustomEditor(typeof(VirtualTexturingSettings))] @@ -120,3 +121,4 @@ void CheckStyles() } } } +#endif From b9f2996b1a3b721b9fd1f5d9cb08a3a82f9d6a78 Mon Sep 17 00:00:00 2001 From: Dieter De Baets Date: Thu, 20 Feb 2020 11:41:49 +0100 Subject: [PATCH 112/143] Fix uninitialized variables in VT TextureStack --- .../ShaderLibrary/TextureStack.hlsl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index e0058085d8a..ffa042f2027 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -127,6 +127,7 @@ StackInfo PrepareVT_##stackName(float2 uv)\ \ StackInfo info;\ GR_LOOKUP(grCB, translationTable, uv, info.lookupData, info.resolveOutput);\ + info.lookupDataLod = (GraniteLODLookupData)0; \ return info;\ } \ StackInfo PrepareVTLod_##stackName(float2 uv, float mip) \ @@ -147,6 +148,7 @@ StackInfo PrepareVTLod_##stackName(float2 uv, float mip) \ \ StackInfo info;\ GR_LOOKUP_LOD(grCB, translationTable, uv, mip, info.lookupDataLod, info.resolveOutput);\ + info.lookupData = (GraniteLookupData)0; \ return info;\ } #define jj2(a, b) a##b @@ -284,6 +286,7 @@ StackInfo MakeStackInfo(float2 uv) { StackInfo result; result.uv = uv; + result.lod = 0; return result; } StackInfo MakeStackInfoLod(float2 uv, float lod) From 35f007a07d873b8b406b49755c520a2002d8ca04 Mon Sep 17 00:00:00 2001 From: Yao Xiaoling Date: Mon, 24 Feb 2020 17:30:18 -0800 Subject: [PATCH 113/143] Enable Procedural Texture Stack node. --- .../Nodes/Input/Texture/TextureStackNode.cs | 80 +++++++------------ .../Editor/Drawing/Controls/StringControl.cs | 55 +++++++++++++ .../Drawing/Controls/StringControl.cs.meta | 11 +++ .../Styles/Controls/StringControlView.uss | 21 +++++ .../Controls/StringControlView.uss.meta | 11 +++ 5 files changed, 127 insertions(+), 51 deletions(-) create mode 100644 com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs create mode 100644 com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs.meta create mode 100644 com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss create mode 100644 com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss.meta diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index da982b87727..c1f2b97fb67 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -1,3 +1,4 @@ +#define PROCEDURAL_VT_IN_GRAPH using System.Linq; using UnityEngine; using UnityEditor.Graphing; @@ -319,52 +320,29 @@ public static void ValidatNodes(GraphData d) public static void ValidatNodes(IEnumerable nodes) { - List> slotNames = new List>(); + var slotNames = new Dictionary(); foreach (SampleTextureStackNode node in nodes) { + if (node.isProcedural) + continue; + for (int i = 0; i < node.numSlots; i++) { - if (!node.isProcedural) - { - string value = node.GetSlotValue(node.TextureInputIds[i], GenerationMode.ForReals); - string name = node.FindSlot(node.TextureInputIds[i]).displayName; + string key = node.GetSlotValue(node.TextureInputIds[i], GenerationMode.ForReals); + string name = node.FindSlot(node.TextureInputIds[i]).displayName; - // Check if there is already a slot with the same value - int found = slotNames.FindIndex(elem => elem.Key == value); - if (found >= 0) - { - // Add a validation error, values need to be unique - node.owner.AddValidationError(node.tempId, $"Slot stack input slot '{value}' shares it's input with another stack input '{slotNames[found].Value}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); - } - else - { - // Save it for checking against other slots - slotNames.Add(new KeyValuePair(value, name)); - } + // Check if there is already a slot with the same value + if (slotNames.ContainsKey(key)) + { + // Add a validation error, values need to be unique + node.owner.AddValidationError(node.tempId, $"Slot stack input slot '{key}' shares it's input with another stack input '{slotNames[key]}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); } - -#if PROCEDURAL_VT_IN_GRAPH - // Check if there is already a node with the same sampleid - SampleTextureStackProceduralNode ssp = node as SampleTextureStackProceduralNode; - if (ssp != null) + else { - string value = ssp.GetStackName(); - string name = ssp.GetStackName(); - // Check if there is already a slot with the same value - int found = slotNames.FindIndex(elem => elem.Key == value); - if (found >= 0) - { - // Add a validation error, values need to be unique - node.owner.AddValidationError(node.tempId, $"This node has the same procedural ID as another node. Nodes need to have different procedural IDs.", ShaderCompilerMessageSeverity.Error); - } - else - { - // Save it for checking against other slots - slotNames.Add(new KeyValuePair(value, name)); - } + // Save it for checking against other slots + slotNames.Add(key, name); } -#endif } } } @@ -399,7 +377,7 @@ private string GetTextureName(int layerIndex, GenerationMode generationMode) { if (isProcedural) { - return GetStackName() + "_stacks_are_not_supported_with_vt_off_" + layerIndex; + return $"{GetStackName()}_{layerIndex}"; } else { @@ -457,15 +435,17 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene { if (m_LodCalculation == LodCalculation.Automatic) { - string result = string.Format("StackInfo {0}_info = PrepareStack({1}, {0});" + string result = string.Format("StackInfo {1}_info = PrepareStack({2}, {0});" , stackName + , GetVariableNameForNode() , GetSlotValue(UVInputId, generationMode)); sb.AppendLine(result); } else { - string result = string.Format("StackInfo {0}_info = PrepareStackLod({1}, {0}, {2});" + string result = string.Format("StackInfo {1}_info = PrepareStackLod({2}, {0}, {3});" , stackName + , GetVariableNameForNode() , GetSlotValue(UVInputId, generationMode) , GetSlotValue(LODInputId, generationMode)); sb.AppendLine(result); @@ -478,7 +458,7 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene { var id = GetTextureName(i, generationMode); string resultLayer = string.Format("$precision4 {1} = {3}({0}_info, {2});" - , stackName + , GetVariableNameForNode() , GetVariableNameForSlot(OutputSlotIds[i]) , id , GetSampleFunction()); @@ -510,7 +490,7 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene //TODO: Investigate if the feedback pass can use halfs string feedBackCode = string.Format("float4 {0} = GetResolveOutput({1}_info);", GetVariableNameForSlot(FeedbackSlotId), - stackName); + GetVariableNameForNode()); sb.AppendLine(feedBackCode); } } @@ -745,16 +725,16 @@ class SampleTextureStackProceduralNode : SampleTextureStackNode public SampleTextureStackProceduralNode() : base(1, true) { } - [IntegerControl("Sample ID")] - public int sampleID + [StringControl("Texture Stack Name")] + public string stackName { - get { return m_sampleId; } + get { return m_StackName; } set { - if (m_sampleId == value) + if (m_StackName == value) return; - m_sampleId = value; + m_StackName = value; Dirty(ModificationScope.Graph); ValidateNode(); @@ -762,12 +742,10 @@ public int sampleID } [SerializeField] - int m_sampleId = 0; + string m_StackName = "_Procedural"; protected override string GetStackName() - { - return "Procedural" + m_sampleId; - } + => m_StackName; } #endif } diff --git a/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs b/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs new file mode 100644 index 00000000000..f26599036fb --- /dev/null +++ b/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs @@ -0,0 +1,55 @@ +using System; +using System.Reflection; +using UnityEngine; +using UnityEditor.UIElements; +using UnityEngine.UIElements; + +namespace UnityEditor.ShaderGraph.Drawing.Controls +{ + [AttributeUsage(AttributeTargets.Property)] + class StringControlAttribute : Attribute, IControlAttribute + { + string m_Label; + + public StringControlAttribute(string label = null) + { + m_Label = label; + } + + public VisualElement InstantiateControl(AbstractMaterialNode node, PropertyInfo propertyInfo) + { + return new StringControlView(m_Label, node, propertyInfo); + } + } + + class StringControlView : VisualElement + { + AbstractMaterialNode m_Node; + PropertyInfo m_PropertyInfo; + + public StringControlView(string label, AbstractMaterialNode node, PropertyInfo propertyInfo) + { + styleSheets.Add(Resources.Load("Styles/Controls/StringControlView")); + m_Node = node; + m_PropertyInfo = propertyInfo; + if (propertyInfo.PropertyType != typeof(string)) + throw new ArgumentException("Property must be of type string.", "propertyInfo"); + label = label ?? ObjectNames.NicifyVariableName(propertyInfo.Name); + + if (!string.IsNullOrEmpty(label)) + Add(new Label(label)); + + var textField = new TextField { value = (string)m_PropertyInfo.GetValue(m_Node, null) }; + textField.RegisterValueChangedCallback(OnChange); + + Add(textField); + } + + void OnChange(ChangeEvent evt) + { + m_Node.owner.owner.RegisterCompleteObjectUndo("String Change"); + m_PropertyInfo.SetValue(m_Node, evt.newValue, null); + this.MarkDirtyRepaint(); + } + } +} diff --git a/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs.meta b/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs.meta new file mode 100644 index 00000000000..ca175a7bdab --- /dev/null +++ b/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b595b9bacf95bd64494a956a0f45fab2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss b/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss new file mode 100644 index 00000000000..64b937d8aaf --- /dev/null +++ b/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss @@ -0,0 +1,21 @@ +StringControlView { + flex-direction: row; + padding-left: 8px; + padding-right: 8px; + padding-top: 4px; + padding-bottom: 4px; +} + +.unity-base-field { + width: 100px; + flex-grow: 1; + margin-top: 1px; + margin-bottom: 1px; +} + +.unity-base-field__input{ + margin-left: 0; + margin-right: 0; + -unity-text-align: middle-left; +} + diff --git a/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss.meta b/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss.meta new file mode 100644 index 00000000000..61e87e7138f --- /dev/null +++ b/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b31d720e4387abc4581f3362dc429798 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 From 540aa6d89af832376ddccddd4bbb67de457f487c Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 28 Feb 2020 16:30:29 +0100 Subject: [PATCH 114/143] Revert "Enable Procedural Texture Stack node." This reverts commit ee46ec1e189bcf5a597cc867c4767db5e119d963. --- .../Nodes/Input/Texture/TextureStackNode.cs | 80 ++++++++++++------- .../Editor/Drawing/Controls/StringControl.cs | 55 ------------- .../Drawing/Controls/StringControl.cs.meta | 11 --- .../Styles/Controls/StringControlView.uss | 21 ----- .../Controls/StringControlView.uss.meta | 11 --- 5 files changed, 51 insertions(+), 127 deletions(-) delete mode 100644 com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs delete mode 100644 com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs.meta delete mode 100644 com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss delete mode 100644 com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss.meta diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index c1f2b97fb67..da982b87727 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -1,4 +1,3 @@ -#define PROCEDURAL_VT_IN_GRAPH using System.Linq; using UnityEngine; using UnityEditor.Graphing; @@ -320,29 +319,52 @@ public static void ValidatNodes(GraphData d) public static void ValidatNodes(IEnumerable nodes) { - var slotNames = new Dictionary(); + List> slotNames = new List>(); foreach (SampleTextureStackNode node in nodes) { - if (node.isProcedural) - continue; - for (int i = 0; i < node.numSlots; i++) { - string key = node.GetSlotValue(node.TextureInputIds[i], GenerationMode.ForReals); - string name = node.FindSlot(node.TextureInputIds[i]).displayName; - - // Check if there is already a slot with the same value - if (slotNames.ContainsKey(key)) + if (!node.isProcedural) { - // Add a validation error, values need to be unique - node.owner.AddValidationError(node.tempId, $"Slot stack input slot '{key}' shares it's input with another stack input '{slotNames[key]}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); + string value = node.GetSlotValue(node.TextureInputIds[i], GenerationMode.ForReals); + string name = node.FindSlot(node.TextureInputIds[i]).displayName; + + // Check if there is already a slot with the same value + int found = slotNames.FindIndex(elem => elem.Key == value); + if (found >= 0) + { + // Add a validation error, values need to be unique + node.owner.AddValidationError(node.tempId, $"Slot stack input slot '{value}' shares it's input with another stack input '{slotNames[found].Value}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); + } + else + { + // Save it for checking against other slots + slotNames.Add(new KeyValuePair(value, name)); + } } - else + +#if PROCEDURAL_VT_IN_GRAPH + // Check if there is already a node with the same sampleid + SampleTextureStackProceduralNode ssp = node as SampleTextureStackProceduralNode; + if (ssp != null) { - // Save it for checking against other slots - slotNames.Add(key, name); + string value = ssp.GetStackName(); + string name = ssp.GetStackName(); + // Check if there is already a slot with the same value + int found = slotNames.FindIndex(elem => elem.Key == value); + if (found >= 0) + { + // Add a validation error, values need to be unique + node.owner.AddValidationError(node.tempId, $"This node has the same procedural ID as another node. Nodes need to have different procedural IDs.", ShaderCompilerMessageSeverity.Error); + } + else + { + // Save it for checking against other slots + slotNames.Add(new KeyValuePair(value, name)); + } } +#endif } } } @@ -377,7 +399,7 @@ private string GetTextureName(int layerIndex, GenerationMode generationMode) { if (isProcedural) { - return $"{GetStackName()}_{layerIndex}"; + return GetStackName() + "_stacks_are_not_supported_with_vt_off_" + layerIndex; } else { @@ -435,17 +457,15 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene { if (m_LodCalculation == LodCalculation.Automatic) { - string result = string.Format("StackInfo {1}_info = PrepareStack({2}, {0});" + string result = string.Format("StackInfo {0}_info = PrepareStack({1}, {0});" , stackName - , GetVariableNameForNode() , GetSlotValue(UVInputId, generationMode)); sb.AppendLine(result); } else { - string result = string.Format("StackInfo {1}_info = PrepareStackLod({2}, {0}, {3});" + string result = string.Format("StackInfo {0}_info = PrepareStackLod({1}, {0}, {2});" , stackName - , GetVariableNameForNode() , GetSlotValue(UVInputId, generationMode) , GetSlotValue(LODInputId, generationMode)); sb.AppendLine(result); @@ -458,7 +478,7 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene { var id = GetTextureName(i, generationMode); string resultLayer = string.Format("$precision4 {1} = {3}({0}_info, {2});" - , GetVariableNameForNode() + , stackName , GetVariableNameForSlot(OutputSlotIds[i]) , id , GetSampleFunction()); @@ -490,7 +510,7 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene //TODO: Investigate if the feedback pass can use halfs string feedBackCode = string.Format("float4 {0} = GetResolveOutput({1}_info);", GetVariableNameForSlot(FeedbackSlotId), - GetVariableNameForNode()); + stackName); sb.AppendLine(feedBackCode); } } @@ -725,16 +745,16 @@ class SampleTextureStackProceduralNode : SampleTextureStackNode public SampleTextureStackProceduralNode() : base(1, true) { } - [StringControl("Texture Stack Name")] - public string stackName + [IntegerControl("Sample ID")] + public int sampleID { - get { return m_StackName; } + get { return m_sampleId; } set { - if (m_StackName == value) + if (m_sampleId == value) return; - m_StackName = value; + m_sampleId = value; Dirty(ModificationScope.Graph); ValidateNode(); @@ -742,10 +762,12 @@ public string stackName } [SerializeField] - string m_StackName = "_Procedural"; + int m_sampleId = 0; protected override string GetStackName() - => m_StackName; + { + return "Procedural" + m_sampleId; + } } #endif } diff --git a/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs b/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs deleted file mode 100644 index f26599036fb..00000000000 --- a/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Reflection; -using UnityEngine; -using UnityEditor.UIElements; -using UnityEngine.UIElements; - -namespace UnityEditor.ShaderGraph.Drawing.Controls -{ - [AttributeUsage(AttributeTargets.Property)] - class StringControlAttribute : Attribute, IControlAttribute - { - string m_Label; - - public StringControlAttribute(string label = null) - { - m_Label = label; - } - - public VisualElement InstantiateControl(AbstractMaterialNode node, PropertyInfo propertyInfo) - { - return new StringControlView(m_Label, node, propertyInfo); - } - } - - class StringControlView : VisualElement - { - AbstractMaterialNode m_Node; - PropertyInfo m_PropertyInfo; - - public StringControlView(string label, AbstractMaterialNode node, PropertyInfo propertyInfo) - { - styleSheets.Add(Resources.Load("Styles/Controls/StringControlView")); - m_Node = node; - m_PropertyInfo = propertyInfo; - if (propertyInfo.PropertyType != typeof(string)) - throw new ArgumentException("Property must be of type string.", "propertyInfo"); - label = label ?? ObjectNames.NicifyVariableName(propertyInfo.Name); - - if (!string.IsNullOrEmpty(label)) - Add(new Label(label)); - - var textField = new TextField { value = (string)m_PropertyInfo.GetValue(m_Node, null) }; - textField.RegisterValueChangedCallback(OnChange); - - Add(textField); - } - - void OnChange(ChangeEvent evt) - { - m_Node.owner.owner.RegisterCompleteObjectUndo("String Change"); - m_PropertyInfo.SetValue(m_Node, evt.newValue, null); - this.MarkDirtyRepaint(); - } - } -} diff --git a/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs.meta b/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs.meta deleted file mode 100644 index ca175a7bdab..00000000000 --- a/com.unity.shadergraph/Editor/Drawing/Controls/StringControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b595b9bacf95bd64494a956a0f45fab2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss b/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss deleted file mode 100644 index 64b937d8aaf..00000000000 --- a/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss +++ /dev/null @@ -1,21 +0,0 @@ -StringControlView { - flex-direction: row; - padding-left: 8px; - padding-right: 8px; - padding-top: 4px; - padding-bottom: 4px; -} - -.unity-base-field { - width: 100px; - flex-grow: 1; - margin-top: 1px; - margin-bottom: 1px; -} - -.unity-base-field__input{ - margin-left: 0; - margin-right: 0; - -unity-text-align: middle-left; -} - diff --git a/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss.meta b/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss.meta deleted file mode 100644 index 61e87e7138f..00000000000 --- a/com.unity.shadergraph/Editor/Resources/Styles/Controls/StringControlView.uss.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b31d720e4387abc4581f3362dc429798 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} - disableValidation: 0 From 0f87deba16b25e56203913ba8f6380a1628734c2 Mon Sep 17 00:00:00 2001 From: robin-demoor Date: Wed, 4 Mar 2020 11:19:18 +0100 Subject: [PATCH 115/143] VT FullscreenDebug pass v1.0 --- .../Runtime/Debug/DebugDisplay.cs | 15 ++ .../Runtime/Debug/DebugDisplay.cs.hlsl | 11 +- .../Runtime/Debug/DebugFullScreen.shader | 241 +++++++++++------- .../RenderPipeline/HDRenderPipeline.cs | 2 + .../RenderPipeline/HDStringConstants.cs | 3 + 5 files changed, 180 insertions(+), 92 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 8f34f033a72..9e37084a0e8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -59,6 +59,8 @@ public enum FullScreenDebugMode DepthOfFieldCoc, /// Display Transparency Overdraw. TransparencyOverdraw, + /// Display Virtual Texturing resolver feedback. + VirtualTexturingFeedback, /// Maximum Full Screen Rendering debug mode value (used internally). MaxRenderingFullScreenDebug, @@ -149,6 +151,8 @@ public class DebugData public uint screenSpaceShadowIndex = 0; /// Display ray tracing ray count per frame. public bool countRays = false; + /// Toggle focus on mips vs VT tilesets + public bool highlightMips = false; /// Index of the camera to freeze for visibility. public int debugCameraToFreeze = 0; @@ -985,6 +989,17 @@ void RegisterRenderingDebug() }); } + if (data.fullScreenDebugMode == FullScreenDebugMode.VirtualTexturingFeedback) + { + widgetList.Add(new DebugUI.Container + { + children = + { + new DebugUI.BoolField {displayName = "Focus on mips = true, focus on tileset = false", getter = () => data.highlightMips, setter = value => data.highlightMips = value} + } + }); + } + widgetList.AddRange(new DebugUI.Widget[] { new DebugUI.EnumField { displayName = "MipMaps", getter = () => (int)data.mipMapDebugSettings.debugMipMapMode, setter = value => SetMipMapMode((DebugMipMapMode)value), autoEnum = typeof(DebugMipMapMode), onValueChanged = RefreshRenderingDebug, getIndex = () => data.mipMapsEnumIndex, setIndex = value => { data.ResetExclusiveEnumIndices(); data.mipMapsEnumIndex = value; } }, diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs.hlsl index 6536111ceb1..769b5d0e503 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs.hlsl @@ -28,11 +28,12 @@ #define FULLSCREENDEBUGMODE_COLOR_LOG (18) #define FULLSCREENDEBUGMODE_DEPTH_OF_FIELD_COC (19) #define FULLSCREENDEBUGMODE_TRANSPARENCY_OVERDRAW (20) -#define FULLSCREENDEBUGMODE_MAX_RENDERING_FULL_SCREEN_DEBUG (21) -#define FULLSCREENDEBUGMODE_MIN_MATERIAL_FULL_SCREEN_DEBUG (22) -#define FULLSCREENDEBUGMODE_VALIDATE_DIFFUSE_COLOR (23) -#define FULLSCREENDEBUGMODE_VALIDATE_SPECULAR_COLOR (24) -#define FULLSCREENDEBUGMODE_MAX_MATERIAL_FULL_SCREEN_DEBUG (25) +#define FULLSCREENDEBUGMODE_VIRTUAL_TEXTURING_FEEDBACK (21) +#define FULLSCREENDEBUGMODE_MAX_RENDERING_FULL_SCREEN_DEBUG (22) +#define FULLSCREENDEBUGMODE_MIN_MATERIAL_FULL_SCREEN_DEBUG (23) +#define FULLSCREENDEBUGMODE_VALIDATE_DIFFUSE_COLOR (24) +#define FULLSCREENDEBUGMODE_VALIDATE_SPECULAR_COLOR (25) +#define FULLSCREENDEBUGMODE_MAX_MATERIAL_FULL_SCREEN_DEBUG (26) #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader index f5bfaf2b24b..105f0c16b47 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader @@ -26,9 +26,10 @@ Shader "Hidden/HDRP/DebugFullScreen" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" - CBUFFER_START (UnityDebug) + CBUFFER_START(UnityDebug) float _FullScreenDebugMode; float _TransparencyOverdrawMaxPixelCost; + float _VTFocusMips; CBUFFER_END TEXTURE2D_X(_DebugFullScreenTexture); @@ -127,98 +128,117 @@ Shader "Hidden/HDRP/DebugFullScreen" } // end motion vector utilties + + //VT debug colors + static float4 DebugColors[] = { + float4(1.0f, 1.0f, 1.0f, 1.0f), + float4(1.0f, 1.0f, 0.0f, 1.0f), + float4(0.0f, 1.0f, 1.0f, 1.0f), + float4(0.0f, 1.0f, 0.0f, 1.0f), + float4(1.0f, 0.0f, 1.0f, 1.0f), + float4(1.0f, 0.0f, 0.0f, 1.0f), + float4(0.0f, 0.0f, 1.0f, 1.0f), + float4(0.5f, 0.5f, 0.5f, 1.0f), + float4(0.5f, 0.5f, 0.0f, 1.0f), + float4(0.0f, 0.5f, 0.5f, 1.0f), + float4(0.0f, 0.5f, 0.0f, 1.0f), + float4(0.5f, 0.0f, 0.5f, 1.0f), + float4(0.5f, 0.0f, 0.0f, 1.0f), + float4(0.0f, 0.0f, 0.5f, 1.0f) + }; + float4 Frag(Varyings input) : SV_Target { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); - // Note: If the single shadow debug mode is enabled, we don't render other full screen debug modes - // and the value of _FullScreenDebugMode is forced to 0 - if (_DebugShadowMapMode == SHADOWMAPDEBUGMODE_SINGLE_SHADOW) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - // SSAO - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_SSAO) - { - return 1.0f - SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord).xxxx; - } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_NAN_TRACKER) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - - if (AnyIsNaN(color) || AnyIsInf(color)) - { - color = float4(1.0, 0.0, 0.0, 1.0); - } - else - { - color.rgb = Luminance(color.rgb).xxx; - } + // Note: If the single shadow debug mode is enabled, we don't render other full screen debug modes + // and the value of _FullScreenDebugMode is forced to 0 + if (_DebugShadowMapMode == SHADOWMAPDEBUGMODE_SINGLE_SHADOW) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); + return color; + } + // SSAO + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_SSAO) + { + return 1.0f - SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord).xxxx; + } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_NAN_TRACKER) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - if( _FullScreenDebugMode == FULLSCREENDEBUGMODE_LIGHT_CLUSTER) + if (AnyIsNaN(color) || AnyIsInf(color)) { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - if( _FullScreenDebugMode == FULLSCREENDEBUGMODE_RAY_TRACED_GLOBAL_ILLUMINATION) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - if( _FullScreenDebugMode == FULLSCREENDEBUGMODE_RECURSIVE_RAY_TRACING) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - if ( _FullScreenDebugMode == FULLSCREENDEBUGMODE_RAY_TRACED_SUB_SURFACE) - { - float4 color = LOAD_TEXTURE2D_X(_DebugFullScreenTexture, (uint2)input.positionCS.xy); - return color; + color = float4(1.0, 0.0, 0.0, 1.0); } - if ( _FullScreenDebugMode == FULLSCREENDEBUGMODE_SCREEN_SPACE_SHADOWS) + else { - float4 color = LOAD_TEXTURE2D_X(_DebugFullScreenTexture, (uint2)input.positionCS.xy); - return color; + color.rgb = Luminance(color.rgb).xxx; } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_MOTION_VECTORS) - { - float2 mv = SampleMotionVectors(input.texcoord); - - // Background color intensity - keep this low unless you want to make your eyes bleed - const float kMinIntensity = 0.03f; - const float kMaxIntensity = 0.50f; - - // Map motion vector direction to color wheel (hue between 0 and 360deg) - float phi = atan2(mv.x, mv.y); - float hue = (phi / PI + 1.0) * 0.5; - float r = abs(hue * 6.0 - 3.0) - 1.0; - float g = 2.0 - abs(hue * 6.0 - 2.0); - float b = 2.0 - abs(hue * 6.0 - 4.0); - - float maxSpeed = 60.0f / 0.15f; // Admit that 15% of a move the viewport by second at 60 fps is really fast - float absoluteLength = saturate(length(mv.xy) * maxSpeed); - float3 color = float3(r, g, b) * lerp(kMinIntensity, kMaxIntensity, absoluteLength); - color = saturate(color); - - // Grid subdivisions - should be dynamic - const float kGrid = 64.0; - - // Arrow grid (aspect ratio is kept) - float aspect = _ScreenSize.y * _ScreenSize.z; - float rows = floor(kGrid * aspect); - float cols = kGrid; - float2 size = _ScreenSize.xy / float2(cols, rows); - float body = min(size.x, size.y) / sqrt(2.0); - float2 positionSS = input.texcoord.xy / _RTHandleScale.xy; - positionSS *= _ScreenSize.xy; - float2 center = (floor(positionSS / size) + 0.5) * size; - positionSS -= center; - - // Sample the center of the cell to get the current arrow vector - float2 mv_arrow = 0.0f; + + return color; + } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_LIGHT_CLUSTER) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); + return color; + } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_RAY_TRACED_GLOBAL_ILLUMINATION) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); + return color; + } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_RECURSIVE_RAY_TRACING) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); + return color; + } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_RAY_TRACED_SUB_SURFACE) + { + float4 color = LOAD_TEXTURE2D_X(_DebugFullScreenTexture, (uint2)input.positionCS.xy); + return color; + } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_SCREEN_SPACE_SHADOWS) + { + float4 color = LOAD_TEXTURE2D_X(_DebugFullScreenTexture, (uint2)input.positionCS.xy); + return color; + } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_MOTION_VECTORS) + { + float2 mv = SampleMotionVectors(input.texcoord); + + // Background color intensity - keep this low unless you want to make your eyes bleed + const float kMinIntensity = 0.03f; + const float kMaxIntensity = 0.50f; + + // Map motion vector direction to color wheel (hue between 0 and 360deg) + float phi = atan2(mv.x, mv.y); + float hue = (phi / PI + 1.0) * 0.5; + float r = abs(hue * 6.0 - 3.0) - 1.0; + float g = 2.0 - abs(hue * 6.0 - 2.0); + float b = 2.0 - abs(hue * 6.0 - 4.0); + + float maxSpeed = 60.0f / 0.15f; // Admit that 15% of a move the viewport by second at 60 fps is really fast + float absoluteLength = saturate(length(mv.xy) * maxSpeed); + float3 color = float3(r, g, b) * lerp(kMinIntensity, kMaxIntensity, absoluteLength); + color = saturate(color); + + // Grid subdivisions - should be dynamic + const float kGrid = 64.0; + + // Arrow grid (aspect ratio is kept) + float aspect = _ScreenSize.y * _ScreenSize.z; + float rows = floor(kGrid * aspect); + float cols = kGrid; + float2 size = _ScreenSize.xy / float2(cols, rows); + float body = min(size.x, size.y) / sqrt(2.0); + float2 positionSS = input.texcoord.xy / _RTHandleScale.xy; + positionSS *= _ScreenSize.xy; + float2 center = (floor(positionSS / size) + 0.5) * size; + positionSS -= center; + + // Sample the center of the cell to get the current arrow vector + float2 mv_arrow = 0.0f; #if DONT_USE_NINE_TAP_FILTER mv_arrow = SampleMotionVectors(center * _ScreenSize.zw * _RTHandleScale.xy); #else @@ -299,17 +319,64 @@ Shader "Hidden/HDRP/DebugFullScreen" float linearDepth = frac(posInput.linearDepth * 0.1); return float4(linearDepth.xxx, 1.0); } - + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_TRANSPARENCY_OVERDRAW) { float4 color = (float4)0; - + float pixelCost = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord).r; if ((pixelCost > 0.001)) color.rgb = HsvToRgb(float3(0.66 * saturate(1.0 - (1.0 / _TransparencyOverdrawMaxPixelCost) * pixelCost), 1.0, 1.0));// return color; } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_VIRTUAL_TEXTURING_FEEDBACK) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); + + float4 swiz; + swiz = color.zyxw; + swiz *= 255.0f; + + //float tileX = swiz.x + fmod(swiz.y, 8.0f) * 256.0f; + //float tileY = floor(swiz.y / 8.0f) + fmod(swiz.z, 64.0f) * 32.0f; + //float level = floor(swiz.z / 64.0f) + fmod(swiz.w, 4.0f) * 4.0f; + //float tex = floor(swiz.w / 4.0f); + + + float tileX = swiz.x + fmod(swiz.y, 8.0f) * 256.0f; + float tileY = floor(swiz.y / 8.0f) + fmod(swiz.z, 64.0f) * 32.0f; + uint level = ((uint)swiz.z >> 6) + (((uint)swiz.w & 3) << 2); + float tex = floor(swiz.w / 4.0f); + + + + float v = 1.0f; + v = (uint)tileY % 5 / 5.0f + 0.2f; + if (tileX == 0 && tileY == 0) v = 0; + + float h = 0; + if (_VTFocusMips == 0) + { + if (tex < 8.0f) h = ((uint)tex % 8) * 45.0f; + else if (tex < 16.0f) h = ((uint) tex % 8) * 45.0f + 22.5f; + else if (tex < 32.0f) h = ((uint) tex % 8) * 45.0f + 11.25f; + + h /= 360.0f; + } + else + { + h = level / 16.0f; + } + float s = 0; + + s = (uint)tileX % 5 / 10.0f + 0.5f; + + + + return float4(HsvToRgb(float3(h,s,v)), 1.0f); + } + return float4(0.0, 0.0, 0.0, 0.0); } @@ -317,5 +384,5 @@ Shader "Hidden/HDRP/DebugFullScreen" } } - Fallback Off + Fallback Off } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 0dfec8112b0..d4146de7f8a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -2359,6 +2359,8 @@ void Callback(CommandBuffer c, HDCamera cam) #if ENABLE_VIRTUALTEXTURES m_VtBufferManager.Resolve(cmd, m_GbufferManager.GetVTFeedbackBuffer(), hdCamera.actualWidth, hdCamera.actualHeight); VirtualTexturing.System.Update(); + PushFullScreenDebugTexture(hdCamera, cmd, GetVTFeedbackBufferForForward(hdCamera), FullScreenDebugMode.VirtualTexturingFeedback); + m_DebugFullScreenPropertyBlock.SetFloat(HDShaderIDs._VTFocusMips, m_DebugDisplaySettings.data.highlightMips? 1.0f : 0.0f); #endif // At this point, m_CameraColorBuffer has been filled by either debug views are regular rendering so we can push it here. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs index 90b54dcf444..84d2f23353f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs @@ -589,6 +589,9 @@ static class HDShaderIDs public static readonly int _HorizonZenithShiftPower = Shader.PropertyToID("_HorizonZenithShiftPower"); public static readonly int _HorizonZenithShiftScale = Shader.PropertyToID("_HorizonZenithShiftScale"); + //Virtual Texturing debug + public static readonly int _VTFocusMips = Shader.PropertyToID("_VTFocusMips"); + // Raytracing variables public static readonly int _RaytracingRayBias = Shader.PropertyToID("_RaytracingRayBias"); public static readonly int _RayTracingLayerMask = Shader.PropertyToID("_RayTracingLayerMask"); From 567d94ef1cd321c652fe113b8731965d9220a451 Mon Sep 17 00:00:00 2001 From: robin-demoor Date: Wed, 4 Mar 2020 11:26:24 +0100 Subject: [PATCH 116/143] Revert "VT FullscreenDebug pass v1.0" This reverts commit c81e6fd0334484a841d139850c494c7b074fa606. --- .../Runtime/Debug/DebugDisplay.cs | 15 -- .../Runtime/Debug/DebugDisplay.cs.hlsl | 11 +- .../Runtime/Debug/DebugFullScreen.shader | 241 +++++++----------- .../RenderPipeline/HDRenderPipeline.cs | 2 - .../RenderPipeline/HDStringConstants.cs | 3 - 5 files changed, 92 insertions(+), 180 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 9e37084a0e8..8f34f033a72 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -59,8 +59,6 @@ public enum FullScreenDebugMode DepthOfFieldCoc, /// Display Transparency Overdraw. TransparencyOverdraw, - /// Display Virtual Texturing resolver feedback. - VirtualTexturingFeedback, /// Maximum Full Screen Rendering debug mode value (used internally). MaxRenderingFullScreenDebug, @@ -151,8 +149,6 @@ public class DebugData public uint screenSpaceShadowIndex = 0; /// Display ray tracing ray count per frame. public bool countRays = false; - /// Toggle focus on mips vs VT tilesets - public bool highlightMips = false; /// Index of the camera to freeze for visibility. public int debugCameraToFreeze = 0; @@ -989,17 +985,6 @@ void RegisterRenderingDebug() }); } - if (data.fullScreenDebugMode == FullScreenDebugMode.VirtualTexturingFeedback) - { - widgetList.Add(new DebugUI.Container - { - children = - { - new DebugUI.BoolField {displayName = "Focus on mips = true, focus on tileset = false", getter = () => data.highlightMips, setter = value => data.highlightMips = value} - } - }); - } - widgetList.AddRange(new DebugUI.Widget[] { new DebugUI.EnumField { displayName = "MipMaps", getter = () => (int)data.mipMapDebugSettings.debugMipMapMode, setter = value => SetMipMapMode((DebugMipMapMode)value), autoEnum = typeof(DebugMipMapMode), onValueChanged = RefreshRenderingDebug, getIndex = () => data.mipMapsEnumIndex, setIndex = value => { data.ResetExclusiveEnumIndices(); data.mipMapsEnumIndex = value; } }, diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs.hlsl index 769b5d0e503..6536111ceb1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs.hlsl @@ -28,12 +28,11 @@ #define FULLSCREENDEBUGMODE_COLOR_LOG (18) #define FULLSCREENDEBUGMODE_DEPTH_OF_FIELD_COC (19) #define FULLSCREENDEBUGMODE_TRANSPARENCY_OVERDRAW (20) -#define FULLSCREENDEBUGMODE_VIRTUAL_TEXTURING_FEEDBACK (21) -#define FULLSCREENDEBUGMODE_MAX_RENDERING_FULL_SCREEN_DEBUG (22) -#define FULLSCREENDEBUGMODE_MIN_MATERIAL_FULL_SCREEN_DEBUG (23) -#define FULLSCREENDEBUGMODE_VALIDATE_DIFFUSE_COLOR (24) -#define FULLSCREENDEBUGMODE_VALIDATE_SPECULAR_COLOR (25) -#define FULLSCREENDEBUGMODE_MAX_MATERIAL_FULL_SCREEN_DEBUG (26) +#define FULLSCREENDEBUGMODE_MAX_RENDERING_FULL_SCREEN_DEBUG (21) +#define FULLSCREENDEBUGMODE_MIN_MATERIAL_FULL_SCREEN_DEBUG (22) +#define FULLSCREENDEBUGMODE_VALIDATE_DIFFUSE_COLOR (23) +#define FULLSCREENDEBUGMODE_VALIDATE_SPECULAR_COLOR (24) +#define FULLSCREENDEBUGMODE_MAX_MATERIAL_FULL_SCREEN_DEBUG (25) #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader index 105f0c16b47..f5bfaf2b24b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader @@ -26,10 +26,9 @@ Shader "Hidden/HDRP/DebugFullScreen" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" - CBUFFER_START(UnityDebug) + CBUFFER_START (UnityDebug) float _FullScreenDebugMode; float _TransparencyOverdrawMaxPixelCost; - float _VTFocusMips; CBUFFER_END TEXTURE2D_X(_DebugFullScreenTexture); @@ -128,117 +127,98 @@ Shader "Hidden/HDRP/DebugFullScreen" } // end motion vector utilties - - //VT debug colors - static float4 DebugColors[] = { - float4(1.0f, 1.0f, 1.0f, 1.0f), - float4(1.0f, 1.0f, 0.0f, 1.0f), - float4(0.0f, 1.0f, 1.0f, 1.0f), - float4(0.0f, 1.0f, 0.0f, 1.0f), - float4(1.0f, 0.0f, 1.0f, 1.0f), - float4(1.0f, 0.0f, 0.0f, 1.0f), - float4(0.0f, 0.0f, 1.0f, 1.0f), - float4(0.5f, 0.5f, 0.5f, 1.0f), - float4(0.5f, 0.5f, 0.0f, 1.0f), - float4(0.0f, 0.5f, 0.5f, 1.0f), - float4(0.0f, 0.5f, 0.0f, 1.0f), - float4(0.5f, 0.0f, 0.5f, 1.0f), - float4(0.5f, 0.0f, 0.0f, 1.0f), - float4(0.0f, 0.0f, 0.5f, 1.0f) - }; - float4 Frag(Varyings input) : SV_Target { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); - // Note: If the single shadow debug mode is enabled, we don't render other full screen debug modes - // and the value of _FullScreenDebugMode is forced to 0 - if (_DebugShadowMapMode == SHADOWMAPDEBUGMODE_SINGLE_SHADOW) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - // SSAO - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_SSAO) - { - return 1.0f - SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord).xxxx; - } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_NAN_TRACKER) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - - if (AnyIsNaN(color) || AnyIsInf(color)) + // Note: If the single shadow debug mode is enabled, we don't render other full screen debug modes + // and the value of _FullScreenDebugMode is forced to 0 + if (_DebugShadowMapMode == SHADOWMAPDEBUGMODE_SINGLE_SHADOW) { - color = float4(1.0, 0.0, 0.0, 1.0); + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); + return color; } - else + // SSAO + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_SSAO) { - color.rgb = Luminance(color.rgb).xxx; + return 1.0f - SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord).xxxx; } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_NAN_TRACKER) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_LIGHT_CLUSTER) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_RAY_TRACED_GLOBAL_ILLUMINATION) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_RECURSIVE_RAY_TRACING) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - return color; - } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_RAY_TRACED_SUB_SURFACE) - { - float4 color = LOAD_TEXTURE2D_X(_DebugFullScreenTexture, (uint2)input.positionCS.xy); - return color; - } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_SCREEN_SPACE_SHADOWS) - { - float4 color = LOAD_TEXTURE2D_X(_DebugFullScreenTexture, (uint2)input.positionCS.xy); - return color; - } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_MOTION_VECTORS) - { - float2 mv = SampleMotionVectors(input.texcoord); - - // Background color intensity - keep this low unless you want to make your eyes bleed - const float kMinIntensity = 0.03f; - const float kMaxIntensity = 0.50f; - - // Map motion vector direction to color wheel (hue between 0 and 360deg) - float phi = atan2(mv.x, mv.y); - float hue = (phi / PI + 1.0) * 0.5; - float r = abs(hue * 6.0 - 3.0) - 1.0; - float g = 2.0 - abs(hue * 6.0 - 2.0); - float b = 2.0 - abs(hue * 6.0 - 4.0); - - float maxSpeed = 60.0f / 0.15f; // Admit that 15% of a move the viewport by second at 60 fps is really fast - float absoluteLength = saturate(length(mv.xy) * maxSpeed); - float3 color = float3(r, g, b) * lerp(kMinIntensity, kMaxIntensity, absoluteLength); - color = saturate(color); - - // Grid subdivisions - should be dynamic - const float kGrid = 64.0; - - // Arrow grid (aspect ratio is kept) - float aspect = _ScreenSize.y * _ScreenSize.z; - float rows = floor(kGrid * aspect); - float cols = kGrid; - float2 size = _ScreenSize.xy / float2(cols, rows); - float body = min(size.x, size.y) / sqrt(2.0); - float2 positionSS = input.texcoord.xy / _RTHandleScale.xy; - positionSS *= _ScreenSize.xy; - float2 center = (floor(positionSS / size) + 0.5) * size; - positionSS -= center; - - // Sample the center of the cell to get the current arrow vector - float2 mv_arrow = 0.0f; + if (AnyIsNaN(color) || AnyIsInf(color)) + { + color = float4(1.0, 0.0, 0.0, 1.0); + } + else + { + color.rgb = Luminance(color.rgb).xxx; + } + + return color; + } + if( _FullScreenDebugMode == FULLSCREENDEBUGMODE_LIGHT_CLUSTER) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); + return color; + } + if( _FullScreenDebugMode == FULLSCREENDEBUGMODE_RAY_TRACED_GLOBAL_ILLUMINATION) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); + return color; + } + if( _FullScreenDebugMode == FULLSCREENDEBUGMODE_RECURSIVE_RAY_TRACING) + { + float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); + return color; + } + if ( _FullScreenDebugMode == FULLSCREENDEBUGMODE_RAY_TRACED_SUB_SURFACE) + { + float4 color = LOAD_TEXTURE2D_X(_DebugFullScreenTexture, (uint2)input.positionCS.xy); + return color; + } + if ( _FullScreenDebugMode == FULLSCREENDEBUGMODE_SCREEN_SPACE_SHADOWS) + { + float4 color = LOAD_TEXTURE2D_X(_DebugFullScreenTexture, (uint2)input.positionCS.xy); + return color; + } + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_MOTION_VECTORS) + { + float2 mv = SampleMotionVectors(input.texcoord); + + // Background color intensity - keep this low unless you want to make your eyes bleed + const float kMinIntensity = 0.03f; + const float kMaxIntensity = 0.50f; + + // Map motion vector direction to color wheel (hue between 0 and 360deg) + float phi = atan2(mv.x, mv.y); + float hue = (phi / PI + 1.0) * 0.5; + float r = abs(hue * 6.0 - 3.0) - 1.0; + float g = 2.0 - abs(hue * 6.0 - 2.0); + float b = 2.0 - abs(hue * 6.0 - 4.0); + + float maxSpeed = 60.0f / 0.15f; // Admit that 15% of a move the viewport by second at 60 fps is really fast + float absoluteLength = saturate(length(mv.xy) * maxSpeed); + float3 color = float3(r, g, b) * lerp(kMinIntensity, kMaxIntensity, absoluteLength); + color = saturate(color); + + // Grid subdivisions - should be dynamic + const float kGrid = 64.0; + + // Arrow grid (aspect ratio is kept) + float aspect = _ScreenSize.y * _ScreenSize.z; + float rows = floor(kGrid * aspect); + float cols = kGrid; + float2 size = _ScreenSize.xy / float2(cols, rows); + float body = min(size.x, size.y) / sqrt(2.0); + float2 positionSS = input.texcoord.xy / _RTHandleScale.xy; + positionSS *= _ScreenSize.xy; + float2 center = (floor(positionSS / size) + 0.5) * size; + positionSS -= center; + + // Sample the center of the cell to get the current arrow vector + float2 mv_arrow = 0.0f; #if DONT_USE_NINE_TAP_FILTER mv_arrow = SampleMotionVectors(center * _ScreenSize.zw * _RTHandleScale.xy); #else @@ -319,64 +299,17 @@ Shader "Hidden/HDRP/DebugFullScreen" float linearDepth = frac(posInput.linearDepth * 0.1); return float4(linearDepth.xxx, 1.0); } - + if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_TRANSPARENCY_OVERDRAW) { float4 color = (float4)0; - + float pixelCost = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord).r; if ((pixelCost > 0.001)) color.rgb = HsvToRgb(float3(0.66 * saturate(1.0 - (1.0 / _TransparencyOverdrawMaxPixelCost) * pixelCost), 1.0, 1.0));// return color; } - if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_VIRTUAL_TEXTURING_FEEDBACK) - { - float4 color = SAMPLE_TEXTURE2D_X(_DebugFullScreenTexture, s_point_clamp_sampler, input.texcoord); - - float4 swiz; - swiz = color.zyxw; - swiz *= 255.0f; - - //float tileX = swiz.x + fmod(swiz.y, 8.0f) * 256.0f; - //float tileY = floor(swiz.y / 8.0f) + fmod(swiz.z, 64.0f) * 32.0f; - //float level = floor(swiz.z / 64.0f) + fmod(swiz.w, 4.0f) * 4.0f; - //float tex = floor(swiz.w / 4.0f); - - - float tileX = swiz.x + fmod(swiz.y, 8.0f) * 256.0f; - float tileY = floor(swiz.y / 8.0f) + fmod(swiz.z, 64.0f) * 32.0f; - uint level = ((uint)swiz.z >> 6) + (((uint)swiz.w & 3) << 2); - float tex = floor(swiz.w / 4.0f); - - - - float v = 1.0f; - v = (uint)tileY % 5 / 5.0f + 0.2f; - if (tileX == 0 && tileY == 0) v = 0; - - float h = 0; - if (_VTFocusMips == 0) - { - if (tex < 8.0f) h = ((uint)tex % 8) * 45.0f; - else if (tex < 16.0f) h = ((uint) tex % 8) * 45.0f + 22.5f; - else if (tex < 32.0f) h = ((uint) tex % 8) * 45.0f + 11.25f; - - h /= 360.0f; - } - else - { - h = level / 16.0f; - } - float s = 0; - - s = (uint)tileX % 5 / 10.0f + 0.5f; - - - - return float4(HsvToRgb(float3(h,s,v)), 1.0f); - } - return float4(0.0, 0.0, 0.0, 0.0); } @@ -384,5 +317,5 @@ Shader "Hidden/HDRP/DebugFullScreen" } } - Fallback Off + Fallback Off } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index d4146de7f8a..0dfec8112b0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -2359,8 +2359,6 @@ void Callback(CommandBuffer c, HDCamera cam) #if ENABLE_VIRTUALTEXTURES m_VtBufferManager.Resolve(cmd, m_GbufferManager.GetVTFeedbackBuffer(), hdCamera.actualWidth, hdCamera.actualHeight); VirtualTexturing.System.Update(); - PushFullScreenDebugTexture(hdCamera, cmd, GetVTFeedbackBufferForForward(hdCamera), FullScreenDebugMode.VirtualTexturingFeedback); - m_DebugFullScreenPropertyBlock.SetFloat(HDShaderIDs._VTFocusMips, m_DebugDisplaySettings.data.highlightMips? 1.0f : 0.0f); #endif // At this point, m_CameraColorBuffer has been filled by either debug views are regular rendering so we can push it here. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs index 84d2f23353f..90b54dcf444 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs @@ -589,9 +589,6 @@ static class HDShaderIDs public static readonly int _HorizonZenithShiftPower = Shader.PropertyToID("_HorizonZenithShiftPower"); public static readonly int _HorizonZenithShiftScale = Shader.PropertyToID("_HorizonZenithShiftScale"); - //Virtual Texturing debug - public static readonly int _VTFocusMips = Shader.PropertyToID("_VTFocusMips"); - // Raytracing variables public static readonly int _RaytracingRayBias = Shader.PropertyToID("_RaytracingRayBias"); public static readonly int _RayTracingLayerMask = Shader.PropertyToID("_RayTracingLayerMask"); From aa91771125a597c4677c071ed4c55029ac046657 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 11 Mar 2020 14:00:14 +0100 Subject: [PATCH 117/143] Virtual texturing improved sample node (#6157) * This is a temporary commit since this work was parked: - Improved node to support different modes: Explicit lod, bias lod, ddx/ddy, quiality, ... - Support subgraphs with VT - Clean behaviour in URP (vt not supported but doesn't break anything). - Correctly load vt data in preview windows * Updated VT test with new functionality. * Update texture stack for late latching. * Cleanup and improvements - Move some ui code to separate file 'IdentifierField' and clean up. - Fix validation for SubGraph nodes - Emit variables using node name not using stack name (allows using same stack name on several nodes) - Allow several procedural nodes sampling the same stack * Remove TextureStack.hlsl includes. The Node now adds the include itself if nececarry. * Minor cleanup - Better user facing labels - #warning is not supported in unity uses #error for now - Remove duplicate VT enabled state checks. * Update VT test with subgraphs. * Fix compiler errors when VT was off. * Fix material preview generating error when VT is disabled. * Give user feedback when VT is not supported + put nodes names in namespace - Srps and nodetypes which do not support VT now show an info panel in the sample node settings indicating why vt is not supported. - Node Names are now put in a namespace (prefixed with StackNodeNamespace_) to avoid them conflicting with existing HLSL keywords, variables, function names,... * Add missing file * Update VT Test * Bump required unity release version to the actual needed version. * Remove log spam --- .../9x_Other/9713_VirtualTexturing.unity | 1819 ++++++++++++++--- .../Anisotropic.shadergraph | 241 +++ .../Anisotropic.shadergraph.meta | 10 + .../9713_VirtualTexturing/AnisotrpicMat.mat | 35 + .../AnisotrpicMat.mat.meta | 8 + .../BiasGraph.shadergraph | 210 ++ .../BiasGraph.shadergraph.meta | 10 + .../9713_VirtualTexturing/BiasGraphMat.mat | 44 + .../BiasGraphMat.mat.meta | 8 + .../9713_VirtualTexturing/CloudGraphMat.mat | 8 + .../9713_VirtualTexturing/EmisUnlitMat.mat | 4 + .../ExplicitLodGraph.shadergraph | 66 +- .../9713_VirtualTexturing/ExplicitLodMat.mat | 8 + .../EyeGraph.shadergraph | 37 + .../EyeGraph.shadergraph.meta | 10 + .../9713_VirtualTexturing/EyeGraphMat.mat | 80 + .../EyeGraphMat.mat.meta | 8 + .../FabricGraph.shadergraph | 37 + .../FabricGraph.shadergraph.meta | 10 + .../9713_VirtualTexturing/FabricGraphMat.mat | 80 + .../FabricGraphMat.mat.meta | 8 + .../HairGraph.shadergraph | 37 + .../HairGraph.shadergraph.meta | 10 + .../9713_VirtualTexturing/HairGraphMat.mat | 80 + .../HairGraphMat.mat.meta | 8 + .../LitGraph.shadergraph | 2 +- .../9713_VirtualTexturing/LitGraphMat.mat | 10 +- .../MipEquivalent.shadergraph | 85 + .../MipEquivalent.shadergraph.meta | 10 + .../MipEquivalentMat.mat | 35 + .../MipEquivalentMat.mat.meta | 8 + .../MultiSampleGraphMat.mat | 8 + .../9713_VirtualTexturing/PBRGraphMat.mat | 8 + .../9713_VirtualTexturing/SSSGraphMat.mat | 8 + .../StackLitGraph.shadergraph | 37 + .../StackLitGraph.shadergraph.meta | 10 + .../StackLitGraphMat.mat | 80 + .../StackLitGraphMat.mat.meta | 8 + .../Textures/fadetored.DDS | 3 + .../Textures/fadetored.DDS.meta | 19 + .../UnlitGraph.shadergraph | 4 +- .../9713_VirtualTexturing/UnlitGraphMat.mat | 4 + .../VTSubGraph.shadersubgraph | 56 + .../VTSubGraph.shadersubgraph.meta | 10 + .../VTSubGraphShader.shadergraph | 91 + .../VTSubGraphShader.shadergraph.meta | 10 + .../VTSubGraphShaderMat.mat | 31 + .../VTSubGraphShaderMat.mat.meta | 8 + .../9713_VirtualTexturing/VertexShaderMat.mat | 8 + .../VtSubGraphTexArg.shadersubgraph | 56 + .../VtSubGraphTexArg.shadersubgraph.meta | 10 + .../VtSubGraphTexArgShader.shadergraph | 56 + .../VtSubGraphTexArgShader.shadergraph.meta | 10 + .../VtSubGraphTexArgShaderMat.mat | 31 + .../VtSubGraphTexArgShaderMat.mat.meta | 8 + .../IVirtualTexturingEnabledRenderPipeline.cs | 10 + ...tualTexturingEnabledRenderPipeline.cs.meta | 11 + .../ShaderLibrary/GraniteShaderLibBase.h | 1252 ++++++++++++ .../ShaderLibrary/GraniteShaderLibBase.h.meta | 27 + .../ShaderLibrary/TextureStack.hlsl | 153 +- .../ShaderLibrary/VirtualTexturing.hlsl | 206 ++ .../ShaderLibrary/VirtualTexturing.hlsl.meta | 9 + .../Decal/ShaderGraph/DecalPass.template | 1 - .../Material/Eye/ShaderGraph/EyeMasterNode.cs | 5 + .../Fabric/ShaderGraph/FabricMasterNode.cs | 5 + .../Fabric/ShaderGraph/FabricPass.template | 3 +- .../Hair/ShaderGraph/HairMasterNode.cs | 5 + .../Lit/ShaderGraph/HDLitMasterNode.cs | 5 + .../Lit/ShaderGraph/HDLitPass.template | 3 +- .../PBR/ShaderGraph/HDPBRPass.template | 3 +- .../ShaderGraph/StackLitMasterNode.cs | 5 + .../ShaderGraph/StackLitPass.template | 3 +- .../Unlit/ShaderGraph/HDUnlitMasterNode.cs | 5 + .../Unlit/ShaderGraph/HDUnlitPass.template | 3 +- .../Unlit/ShaderGraph/UnlitPass.template | 3 +- .../ShaderGraph/HDSubShaderUtilities.cs | 9 + .../Runtime/Material/Builtin/BuiltinData.cs | 4 +- .../Material/Builtin/BuiltinData.cs.hlsl | 8 +- .../Runtime/Material/Lit/Lit.hlsl | 6 +- .../RenderPipeline/HDRenderPipelineAsset.cs | 5 +- .../ShaderPass/ShaderPassForward.hlsl | 6 +- .../ShaderPass/ShaderPassForwardUnlit.hlsl | 6 +- .../package.json | 2 +- .../ShaderLibrary/Core.hlsl | 4 + com.unity.shadergraph/CHANGELOG.md | 1 + .../Editor/CodeGen/GenerationUtils.cs | 13 + .../Editor/CodeGen/SubShaderGenerator.cs | 21 +- .../Interfaces/IGeneratesFunction.cs.meta | 3 + .../Data/Interfaces/IGeneratesInclude.cs | 7 + .../Data/Interfaces/IGeneratesInclude.cs.meta | 11 + .../Editor/Data/MasterNodes/PBRMasterNode.cs | 7 + .../Data/MasterNodes/UnlitMasterNode.cs | 7 + .../Editor/Data/Nodes/IMasterNode.cs | 1 + .../Nodes/Input/Texture/TextureStackNode.cs | 729 +++++-- .../Editor/Data/Nodes/MasterNode.cs | 2 + .../Editor/Data/Nodes/Utility/SubGraphNode.cs | 53 +- .../Editor/Data/SubGraph/SubGraphAsset.cs | 4 +- .../Editor/Data/Util/IncludeRegistry.cs | 48 + .../Editor/Data/Util/IncludeRegistry.cs.meta | 11 + .../Editor/Drawing/PreviewManager.cs | 39 + .../Editor/Drawing/Views/HelpBoxRow.cs | 49 + .../Editor/Drawing/Views/HelpBoxRow.cs.meta | 11 + .../Editor/Drawing/Views/IdentifierField.cs | 94 + .../Drawing/Views/IdentifierField.cs.meta | 11 + .../Importers/ShaderSubGraphImporter.cs | 9 + .../Editor/Resources/Styles/HelpBoxRow.uss | 54 + .../Resources/Styles/HelpBoxRow.uss.meta | 11 + .../Editor/Templates/PassMesh.template | 3 + com.unity.shadergraph/package.json | 2 +- 109 files changed, 5987 insertions(+), 581 deletions(-) create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Anisotropic.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Anisotropic.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalent.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalent.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/fadetored.DDS create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/fadetored.DDS.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraph.shadersubgraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraph.shadersubgraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShader.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShader.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArg.shadersubgraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArg.shadersubgraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShader.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShader.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShaderMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShaderMat.mat.meta create mode 100644 com.unity.render-pipelines.core/Runtime/Common/IVirtualTexturingEnabledRenderPipeline.cs create mode 100644 com.unity.render-pipelines.core/Runtime/Common/IVirtualTexturingEnabledRenderPipeline.cs.meta create mode 100644 com.unity.render-pipelines.core/ShaderLibrary/GraniteShaderLibBase.h create mode 100644 com.unity.render-pipelines.core/ShaderLibrary/GraniteShaderLibBase.h.meta create mode 100644 com.unity.render-pipelines.core/ShaderLibrary/VirtualTexturing.hlsl create mode 100644 com.unity.render-pipelines.core/ShaderLibrary/VirtualTexturing.hlsl.meta create mode 100644 com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs create mode 100644 com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs.meta create mode 100644 com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs create mode 100644 com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs.meta create mode 100644 com.unity.shadergraph/Editor/Drawing/Views/HelpBoxRow.cs create mode 100644 com.unity.shadergraph/Editor/Drawing/Views/HelpBoxRow.cs.meta create mode 100644 com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs create mode 100644 com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs.meta create mode 100644 com.unity.shadergraph/Editor/Resources/Styles/HelpBoxRow.uss create mode 100644 com.unity.shadergraph/Editor/Resources/Styles/HelpBoxRow.uss.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity index 658d26b085e..bc1d3d72cb3 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity @@ -120,6 +120,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -220,6 +222,87 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &78105986 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 78105987} + - component: {fileID: 78105989} + - component: {fileID: 78105988} + m_Layer: 0 + m_Name: Hair + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &78105987 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 78105986} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.47, y: -2.93, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 17 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &78105988 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 78105986} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 68a009b14c10a24488b47dd0fb86b883, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &78105989 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 78105986} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &133822026 GameObject: m_ObjectHideFlags: 0 @@ -398,7 +481,7 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &314782149 +--- !u!1 &220407417 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -406,23 +489,37 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 314782153} - - component: {fileID: 314782152} - - component: {fileID: 314782151} + - component: {fileID: 220407418} + - component: {fileID: 220407420} + - component: {fileID: 220407419} m_Layer: 0 - m_Name: UnlitGraph + m_Name: SubGraph1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!23 &314782151 +--- !u!4 &220407418 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 220407417} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4, y: 2.3, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &220407419 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 314782149} + m_GameObject: {fileID: 220407417} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -435,7 +532,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 6c09bf438cfab3d438d8fd945dc9bc84, type: 2} + - {fileID: 2100000, guid: ba2a5e802a9105145812d83b16e9b9e7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -457,29 +554,15 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &314782152 +--- !u!33 &220407420 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 314782149} + m_GameObject: {fileID: 220407417} m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &314782153 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 314782149} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 2, y: 2.3, z: 0} - m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} - m_Children: [] - m_Father: {fileID: 2056951134} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &339800103 +--- !u!1 &245866176 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -487,41 +570,39 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 339800104} - - component: {fileID: 339800106} - - component: {fileID: 339800105} + - component: {fileID: 245866177} + - component: {fileID: 245866179} + - component: {fileID: 245866178} m_Layer: 0 - m_Name: ExplicitLod + m_Name: SubGraph2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &339800104 +--- !u!4 &245866177 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 339800103} + m_GameObject: {fileID: 245866176} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 2, y: -1.1, z: 0} + m_LocalPosition: {x: -4.73, y: 1.2, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1053123895} - m_RootOrder: 7 + m_RootOrder: 13 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!102 &339800105 +--- !u!102 &245866178 TextMesh: serializedVersion: 3 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 339800103} - m_Text: 'Explicit Lod sampling - -' + m_GameObject: {fileID: 245866176} + m_Text: Stack exposed from subgraph m_OffsetZ: 0 m_CharacterSize: 0.01 m_LineSpacing: 1 @@ -535,13 +616,13 @@ TextMesh: m_Color: serializedVersion: 2 rgba: 4294967295 ---- !u!23 &339800106 +--- !u!23 &245866179 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 339800103} + m_GameObject: {fileID: 245866176} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -576,72 +657,7 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &361997041 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 361997044} - - component: {fileID: 361997043} - - component: {fileID: 361997042} - m_Layer: 0 - m_Name: Scene Settings - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &361997042 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 361997041} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Profile: {fileID: 11400000, guid: 22810a4b5b549954198ff70792391f0f, type: 2} - m_StaticLightingSkyUniqueID: 2 - m_SkySettings: {fileID: 0} - m_SkySettingsFromProfile: {fileID: 0} ---- !u!114 &361997043 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 361997041} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} - m_Name: - m_EditorClassIdentifier: - isGlobal: 1 - priority: 0 - blendDistance: 0 - weight: 1 - sharedProfile: {fileID: 11400000, guid: fa4ec2b9b6d574840b320077b8871c38, type: 2} ---- !u!4 &361997044 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 361997041} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -1000, y: 1, z: 0} - 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!1 &411464814 +--- !u!1 &280369411 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -649,88 +665,37 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 411464815} - - component: {fileID: 411464816} + - component: {fileID: 280369412} + - component: {fileID: 280369414} + - component: {fileID: 280369413} m_Layer: 0 - m_Name: SceneController + m_Name: Eye m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &411464815 +--- !u!4 &280369412 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 411464814} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -30, y: 0, z: 0} + m_GameObject: {fileID: 280369411} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4.64, y: -2.93, z: 0} 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!114 &411464816 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 411464814} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b0a0fe6dffef10d418605b143e1a8e4f, type: 3} - m_Name: - m_EditorClassIdentifier: - dirLight: {fileID: 1036204241} - rotateLight: 1 - rotationDegPerS: 45 - sensitivity: 30 - maxX: 88 - minX: -5 - minCameraDist: 1 - maxCameraDist: 15 ---- !u!1 &563548582 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 563548583} - - component: {fileID: 563548585} - - component: {fileID: 563548584} - m_Layer: 0 - m_Name: VertexShader - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &563548583 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 563548582} - m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} - m_LocalPosition: {x: -2, y: -2.4, z: 0} - m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} - m_Children: [] m_Father: {fileID: 2056951134} - m_RootOrder: 8 - m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} ---- !u!23 &563548584 + m_RootOrder: 18 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &280369413 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 563548582} + m_GameObject: {fileID: 280369411} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -743,7 +708,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 4d44d890bd690ee40b18df454cc3c54e, type: 2} + - {fileID: 2100000, guid: 9ea3de83b55e1f745aaa7d7a9152158a, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -765,15 +730,15 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &563548585 +--- !u!33 &280369414 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 563548582} + m_GameObject: {fileID: 280369411} m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &657075898 +--- !u!1 &314782149 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -781,10 +746,661 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 657075902} - - component: {fileID: 657075901} - - component: {fileID: 657075900} - m_Layer: 0 + - component: {fileID: 314782153} + - component: {fileID: 314782152} + - component: {fileID: 314782151} + m_Layer: 0 + m_Name: UnlitGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &314782151 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 314782149} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6c09bf438cfab3d438d8fd945dc9bc84, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &314782152 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 314782149} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &314782153 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 314782149} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2, y: 2.3, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &329574045 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 329574046} + - component: {fileID: 329574048} + - component: {fileID: 329574047} + m_Layer: 0 + m_Name: BiasDeriv + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &329574046 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 329574045} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 3.52, y: -1.1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &329574047 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 329574045} + m_Text: 'Bias / Derivatives + + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &329574048 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 329574045} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &339800103 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 339800104} + - component: {fileID: 339800106} + - component: {fileID: 339800105} + m_Layer: 0 + m_Name: ExplicitLod + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &339800104 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339800103} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.5, y: -1.1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &339800105 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339800103} + m_Text: 'Explicit Lod sampling + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &339800106 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339800103} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &361997041 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 361997044} + - component: {fileID: 361997043} + - component: {fileID: 361997042} + m_Layer: 0 + m_Name: Scene Settings + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &361997042 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 361997041} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: 22810a4b5b549954198ff70792391f0f, type: 2} + m_StaticLightingSkyUniqueID: 2 + m_SkySettings: {fileID: 0} + m_SkySettingsFromProfile: {fileID: 0} +--- !u!114 &361997043 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 361997041} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: fa4ec2b9b6d574840b320077b8871c38, type: 2} +--- !u!4 &361997044 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 361997041} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1000, y: 1, z: 0} + 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!1 &411464814 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 411464815} + - component: {fileID: 411464816} + m_Layer: 0 + m_Name: SceneController + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &411464815 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 411464814} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -30, y: 0, z: 0} + 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!114 &411464816 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 411464814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0a0fe6dffef10d418605b143e1a8e4f, type: 3} + m_Name: + m_EditorClassIdentifier: + dirLight: {fileID: 1036204241} + rotateLight: 1 + rotationDegPerS: 45 + sensitivity: 30 + maxX: 88 + minX: -5 + minCameraDist: 1 + maxCameraDist: 15 +--- !u!1 &420231308 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 420231309} + - component: {fileID: 420231311} + - component: {fileID: 420231310} + m_Layer: 0 + m_Name: Various + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &420231309 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 420231308} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4.91, y: -1.1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 14 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &420231310 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 420231308} + m_Text: 'Stack, Fabric, Gory Bits (Eyes and hair) + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &420231311 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 420231308} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &482586313 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 482586314} + - component: {fileID: 482586316} + - component: {fileID: 482586315} + m_Layer: 0 + m_Name: Fabric + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &482586314 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 482586313} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.47, y: -1.8399999, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 16 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &482586315 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 482586313} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7fac6689649feba43beb1a82bafb0276, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &482586316 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 482586313} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &563548582 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 563548583} + - component: {fileID: 563548585} + - component: {fileID: 563548584} + m_Layer: 0 + m_Name: VertexShader + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &563548583 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 563548582} + m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} + m_LocalPosition: {x: -2, y: -2.4, z: 0} + m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!23 &563548584 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 563548582} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4d44d890bd690ee40b18df454cc3c54e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &563548585 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 563548582} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &657075898 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 657075902} + - component: {fileID: 657075901} + - component: {fileID: 657075900} + m_Layer: 0 m_Name: SubSurfaceScattered m_TagString: Untagged m_Icon: {fileID: 0} @@ -854,6 +1470,104 @@ Transform: m_Father: {fileID: 2056951134} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &664191853 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 664191854} + - component: {fileID: 664191856} + - component: {fileID: 664191855} + m_Layer: 0 + m_Name: SubGraph1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &664191854 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 664191853} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4.38, y: 3.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &664191855 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 664191853} + m_Text: 'Stack in subgrpah + + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &664191856 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 664191853} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &698175485 GameObject: m_ObjectHideFlags: 0 @@ -1056,7 +1770,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 878058836} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.395, y: 3.7, z: 0} + m_LocalPosition: {x: 3.58, y: 3.7, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1053123895} @@ -1302,31 +2016,172 @@ Light: serializedVersion: 2 m_Bits: 4294967295 m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 2 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &1036204245 -Transform: + m_Lightmapping: 4 + m_LightShadowCasterMode: 2 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1036204245 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036204241} + m_LocalRotation: {x: 0.2981349, y: 0.124443755, z: -0.03923696, w: 0.94556326} + m_LocalPosition: {x: 0, y: 7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 35, y: 14.995001, z: 0} +--- !u!1 &1053123894 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1053123895} + m_Layer: 0 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1053123895 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1053123894} + 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: + - {fileID: 45892345} + - {fileID: 878058837} + - {fileID: 203258258} + - {fileID: 1604621049} + - {fileID: 1132552987} + - {fileID: 1179882697} + - {fileID: 1178773848} + - {fileID: 339800104} + - {fileID: 711217081} + - {fileID: 329574046} + - {fileID: 2138013990} + - {fileID: 2005760251} + - {fileID: 664191854} + - {fileID: 245866177} + - {fileID: 420231309} + m_Father: {fileID: 2056951134} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1102400181 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1102400182} + - component: {fileID: 1102400185} + - component: {fileID: 1102400184} + - component: {fileID: 1102400183} + m_Layer: 0 + m_Name: MipmapCalculation + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1102400182 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1102400181} + m_LocalRotation: {x: 0.10452855, y: -0, z: -0, w: -0.9945219} + m_LocalPosition: {x: 0, y: 4.38, z: 12.28} + m_LocalScale: {x: 0.2, y: 0.2, z: 3} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 348, y: 0, z: 0} +--- !u!64 &1102400183 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1102400181} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1102400184 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1102400181} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a548c1e35ed7ba04c89c177c3653e1df, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1102400185 +MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1036204241} - m_LocalRotation: {x: 0.2981349, y: 0.124443755, z: -0.03923696, w: 0.94556326} - m_LocalPosition: {x: 0, y: 7, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 35, y: 14.995001, z: 0} ---- !u!1 &1053123894 + m_GameObject: {fileID: 1102400181} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1131061215 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1334,37 +2189,79 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1053123895} + - component: {fileID: 1131061216} + - component: {fileID: 1131061218} + - component: {fileID: 1131061217} m_Layer: 0 - m_Name: Text + m_Name: BiasDeriv m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &1053123895 +--- !u!4 &1131061216 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1053123894} - 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: - - {fileID: 45892345} - - {fileID: 878058837} - - {fileID: 203258258} - - {fileID: 1604621049} - - {fileID: 1132552987} - - {fileID: 1179882697} - - {fileID: 1178773848} - - {fileID: 339800104} - - {fileID: 711217081} + m_GameObject: {fileID: 1131061215} + m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} + m_LocalPosition: {x: 4, y: -2.4, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] m_Father: {fileID: 2056951134} m_RootOrder: 9 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!23 &1131061217 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1131061215} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 06453d90af16bb54c9774e2fee59fe90, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1131061218 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1131061215} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1132552986 GameObject: m_ObjectHideFlags: 0 @@ -1729,7 +2626,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1303166446} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 2.3, z: 0} + m_LocalPosition: {x: 4, y: 2.3, z: 0} m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} m_Children: [] m_Father: {fileID: 2056951134} @@ -1838,37 +2735,199 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1606819160} - - component: {fileID: 1606819162} - - component: {fileID: 1606819161} + - component: {fileID: 1606819160} + - component: {fileID: 1606819162} + - component: {fileID: 1606819161} + m_Layer: 0 + m_Name: ExplicitLod + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1606819160 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1606819159} + m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} + m_LocalPosition: {x: 2, y: -2.4, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!23 &1606819161 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1606819159} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 07d9e73903bb12c47908581c233e64d8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1606819162 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1606819159} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1803598726 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1803598727} + - component: {fileID: 1803598729} + - component: {fileID: 1803598728} + m_Layer: 0 + m_Name: SubGraph2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1803598727 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1803598726} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4, y: 0, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 14 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1803598728 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1803598726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: abfb28732b269f442905a9ea2ec03577, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1803598729 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1803598726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1855075392 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1855075393} + - component: {fileID: 1855075395} + - component: {fileID: 1855075394} m_Layer: 0 - m_Name: ExplicitLod + m_Name: StackLit m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &1606819160 +--- !u!4 &1855075393 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1606819159} - m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} - m_LocalPosition: {x: 2, y: -2.4, z: 0} - m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_GameObject: {fileID: 1855075392} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4.59, y: -1.8399999, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2056951134} - m_RootOrder: 7 - m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} ---- !u!23 &1606819161 + m_RootOrder: 15 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1855075394 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1606819159} + m_GameObject: {fileID: 1855075392} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -1881,7 +2940,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 07d9e73903bb12c47908581c233e64d8, type: 2} + - {fileID: 2100000, guid: 86ca8682d76e1624496b00579837fadd, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1903,13 +2962,13 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1606819162 +--- !u!33 &1855075395 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1606819159} + m_GameObject: {fileID: 1855075392} m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1984901468 GameObject: @@ -2007,6 +3066,104 @@ MonoBehaviour: m_EditorClassIdentifier: materialToRequest: {fileID: 2100000, guid: 48186b9b44885574a9e56fd68988986d, type: 2} firstMipToRequest: 0 +--- !u!1 &2005760250 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2005760251} + - component: {fileID: 2005760253} + - component: {fileID: 2005760252} + m_Layer: 0 + m_Name: MipmapCalculation + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2005760251 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2005760250} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.56, y: 3.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &2005760252 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2005760250} + m_Text: 'Auto Mipmap Calculation + + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &2005760253 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2005760250} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &2056951133 GameObject: m_ObjectHideFlags: 0 @@ -2043,7 +3200,16 @@ Transform: - {fileID: 698175486} - {fileID: 1606819160} - {fileID: 563548583} + - {fileID: 1131061216} + - {fileID: 2147186747} + - {fileID: 1102400182} - {fileID: 1053123895} + - {fileID: 220407418} + - {fileID: 1803598727} + - {fileID: 1855075393} + - {fileID: 482586314} + - {fileID: 78105987} + - {fileID: 280369412} m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -2210,6 +3376,185 @@ Transform: m_Father: {fileID: 2056951134} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2138013989 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2138013990} + - component: {fileID: 2138013992} + - component: {fileID: 2138013991} + m_Layer: 0 + m_Name: Aniso + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2138013990 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2138013989} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 3.7, y: 1.2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1053123895} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &2138013991 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2138013989} + m_Text: 'Anisotropic + + +' + m_OffsetZ: 0 + m_CharacterSize: 0.01 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &2138013992 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2138013989} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &2147186746 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2147186747} + - component: {fileID: 2147186749} + - component: {fileID: 2147186748} + m_Layer: 0 + m_Name: Aniso + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2147186747 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2147186746} + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 4, y: 0, z: 0} + m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!23 &2147186748 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2147186746} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 13b3465dfcce31d4d9ff6ea35a65eb5d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2147186749 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2147186746} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1132393544551473 GameObject: m_ObjectHideFlags: 0 @@ -2265,7 +3610,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1132393544551473} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -30, y: 0.073, z: -6.3} + m_LocalPosition: {x: -30, y: 0.073, z: -20.71} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -2295,8 +3640,8 @@ Camera: width: 1 height: 1 near clip plane: 0.5 - far clip plane: 20 - field of view: 60 + far clip plane: 100 + field of view: 20 orthographic: 0 orthographic size: 1.2 m_Depth: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Anisotropic.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Anisotropic.shadergraph new file mode 100644 index 00000000000..e27c69863ae --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Anisotropic.shadergraph @@ -0,0 +1,241 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"0587a3f4-d6c4-454b-9a09-5fbf38b781cc\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -995.0,\n \"y\": 443.0,\n \"width\": 128.0,\n \"height\": 118.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 1.0,\\n \\\"e02\\\": 1.0,\\n \\\"e03\\\": 1.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.DDYNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"0fd0470b-6da2-4aa6-90cf-ed9bc881081f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"DDY\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1156.0,\n \"y\": 587.0,\n \"width\": 130.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTexture2DNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"12e9d939-afda-4a2f-84e6-90543eccb2ad\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture 2D\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1024.0,\n \"y\": -300.0,\n \"width\": 182.0,\n \"height\": 251.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"instanceID\\\\\\\":0}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureType\": 0,\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.DDYNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"310ca3a3-61cf-486b-ad02-d74c5fff0c9c\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"DDY\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1161.9998779296875,\n \"y\": 280.0,\n \"width\": 130.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.DDXNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"3c25cf28-ce9c-402c-9027-177ff74085ce\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"DDX\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1141.0,\n \"y\": 443.0,\n \"width\": 130.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"4ca89603-b76f-450e-b92f-bb0be3e5f062\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_BB4EA8E6\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -713.0,\n \"y\": 468.0,\n \"width\": 179.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"526f56bddea1ec94abca08e368cb7006\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Dx\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Dx\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"Dx\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Dy\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Dy\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"Dy\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 3,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.DDXNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"4e23743b-b4fb-43b4-a91b-4190fdf3aee7\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"DDX\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1147.0,\n \"y\": 136.00001525878907,\n \"width\": 130.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"54618814-da9e-4030-b146-880b18126998\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -988.0,\n \"y\": 573.0,\n \"width\": 128.0,\n \"height\": 118.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 4.0,\\n \\\"e01\\\": 4.0,\\n \\\"e02\\\": 4.0,\\n \\\"e03\\\": 4.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"630d2f2a-4a30-428c-a299-225f1484d36f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 257.0,\n \"y\": -11.0,\n \"width\": 200.0,\n \"height\": 197.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.UnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UVNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"6bfe9a0b-b37c-4c02-989f-a0a5c42d6e5a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1420.0,\n \"y\": 497.0,\n \"width\": 145.0,\n \"height\": 129.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UVNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"8952786a-5936-4b53-b9ab-4d76ffaa89bd\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1425.9998779296875,\n \"y\": 190.00003051757813,\n \"width\": 145.0,\n \"height\": 129.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UVNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"942470ed-9c80-421e-b16b-d99242b7657f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -587.9999389648438,\n \"y\": -213.99998474121095,\n \"width\": 144.99998474121095,\n \"height\": 129.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.BranchNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"bdd12f90-40d7-46b1-94d6-32e8205d9c42\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Branch\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -86.99999237060547,\n \"y\": -22.000011444091798,\n \"width\": 208.0,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.BooleanMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Predicate\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Predicate\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": false,\\n \\\"m_DefaultValue\\\": false\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"True\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"True\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"False\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"False\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Vector1Node" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"c31d49b1-ee01-46ad-ac34-bb276d63575b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Vector 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1464.0,\n \"y\": 364.0,\n \"width\": 124.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"X\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"X\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 8.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Value\": 0.0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"e27cf047-7b70-4765-a2a6-a437daa96f08\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -993.9999389648438,\n \"y\": 266.0,\n \"width\": 128.0,\n \"height\": 117.99999237060547\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 1.0,\\n \\\"e02\\\": 1.0,\\n \\\"e03\\\": 1.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"e9c0ad29-e459-4ffe-b1fd-75422913ea99\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1000.9998779296875,\n \"y\": 136.00001525878907,\n \"width\": 207.99998474121095,\n \"height\": 301.9999694824219\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 4.0,\\n \\\"e01\\\": 4.0,\\n \\\"e02\\\": 4.0,\\n \\\"e03\\\": 4.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.ComparisonNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"efc5b178-7187-4038-810f-762d192c6bb1\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Comparison\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -302.9999084472656,\n \"y\": -156.99998474121095,\n \"width\": 144.99998474121095,\n \"height\": 136.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.BooleanMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": false,\\n \\\"m_DefaultValue\\\": false\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_ComparisonType\": 4\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"f08b4b8a-d4f8-4e42-8028-6a40a4c9dfef\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_8EB725B5\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": false,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -718.9998779296875,\n \"y\": 161.0,\n \"width\": 183.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"526f56bddea1ec94abca08e368cb7006\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Dx\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Dx\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"Dx\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Dy\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Dy\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"Dy\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 3,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"0587a3f4-d6c4-454b-9a09-5fbf38b781cc\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 12,\n \"m_NodeGUIDSerialized\": \"4ca89603-b76f-450e-b92f-bb0be3e5f062\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"0fd0470b-6da2-4aa6-90cf-ed9bc881081f\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"54618814-da9e-4030-b146-880b18126998\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"310ca3a3-61cf-486b-ad02-d74c5fff0c9c\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e27cf047-7b70-4765-a2a6-a437daa96f08\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"3c25cf28-ce9c-402c-9027-177ff74085ce\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0587a3f4-d6c4-454b-9a09-5fbf38b781cc\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"4ca89603-b76f-450e-b92f-bb0be3e5f062\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"bdd12f90-40d7-46b1-94d6-32e8205d9c42\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"4e23743b-b4fb-43b4-a91b-4190fdf3aee7\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e9c0ad29-e459-4ffe-b1fd-75422913ea99\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"54618814-da9e-4030-b146-880b18126998\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 13,\n \"m_NodeGUIDSerialized\": \"4ca89603-b76f-450e-b92f-bb0be3e5f062\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"6bfe9a0b-b37c-4c02-989f-a0a5c42d6e5a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0fd0470b-6da2-4aa6-90cf-ed9bc881081f\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"6bfe9a0b-b37c-4c02-989f-a0a5c42d6e5a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"3c25cf28-ce9c-402c-9027-177ff74085ce\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"8952786a-5936-4b53-b9ab-4d76ffaa89bd\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"310ca3a3-61cf-486b-ad02-d74c5fff0c9c\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"8952786a-5936-4b53-b9ab-4d76ffaa89bd\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4e23743b-b4fb-43b4-a91b-4190fdf3aee7\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"942470ed-9c80-421e-b16b-d99242b7657f\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"efc5b178-7187-4038-810f-762d192c6bb1\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"bdd12f90-40d7-46b1-94d6-32e8205d9c42\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"630d2f2a-4a30-428c-a299-225f1484d36f\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"c31d49b1-ee01-46ad-ac34-bb276d63575b\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"54618814-da9e-4030-b146-880b18126998\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"c31d49b1-ee01-46ad-ac34-bb276d63575b\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"e9c0ad29-e459-4ffe-b1fd-75422913ea99\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"e27cf047-7b70-4765-a2a6-a437daa96f08\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 13,\n \"m_NodeGUIDSerialized\": \"f08b4b8a-d4f8-4e42-8028-6a40a4c9dfef\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"e9c0ad29-e459-4ffe-b1fd-75422913ea99\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 12,\n \"m_NodeGUIDSerialized\": \"f08b4b8a-d4f8-4e42-8028-6a40a4c9dfef\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"efc5b178-7187-4038-810f-762d192c6bb1\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"bdd12f90-40d7-46b1-94d6-32e8205d9c42\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"f08b4b8a-d4f8-4e42-8028-6a40a4c9dfef\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"bdd12f90-40d7-46b1-94d6-32e8205d9c42\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "630d2f2a-4a30-428c-a299-225f1484d36f" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Anisotropic.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Anisotropic.shadergraph.meta new file mode 100644 index 00000000000..9ed193de321 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Anisotropic.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: be450c2402fe5164ca1b2a66b69347f4 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat new file mode 100644 index 00000000000..1dfe83f75df --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: AnisotrpicMat + m_Shader: {fileID: -6465566751694194690, guid: be450c2402fe5164ca1b2a66b69347f4, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _TexStack8EB725B5_8EB725B5_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStackBB4EA8E6_BB4EA8E6_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: [] + m_Colors: [] + m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat.meta new file mode 100644 index 00000000000..7254e8d0b46 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13b3465dfcce31d4d9ff6ea35a65eb5d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraph.shadergraph new file mode 100644 index 00000000000..bdd4e303735 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraph.shadergraph @@ -0,0 +1,210 @@ +{ + "m_SerializedProperties": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty" + }, + "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"5497e486-042c-47dd-9205-e8c6f38de78b\"\n },\n \"m_Name\": \"Bias\",\n \"m_DefaultReferenceName\": \"Vector1_304AE820\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": 4.0,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" + } + ], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.BranchNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"05d61069-55b9-4f5c-addd-42da66a27201\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Branch\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -222.99998474121095,\n \"y\": 65.0,\n \"width\": 208.00001525878907,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.BooleanMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Predicate\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Predicate\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": false,\\n \\\"m_DefaultValue\\\": false\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"True\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"True\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"False\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"False\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UVNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"21f55666-6b45-414a-b499-98fe83edeab9\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2224.0,\n \"y\": -265.0,\n \"width\": 208.0,\n \"height\": 313.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"26ee4014-e917-4e17-bf4b-3f407e6e9733\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_A89EC4BF\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -613.0001220703125,\n \"y\": 12.999992370605469,\n \"width\": 186.00001525878907,\n \"height\": 125.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"526f56bddea1ec94abca08e368cb7006\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Bias\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Bias\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"Bias\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 2,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PropertyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"55cd7911-982c-44ad-9525-1f776d752522\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2033.0001220703125,\n \"y\": 174.99998474121095,\n \"width\": 97.00000762939453,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Bias\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"5497e486-042c-47dd-9205-e8c6f38de78b\"\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"588b1756-bab3-4d43-a41f-7bc208fc2470\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_D656B90C\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -595.0000610351563,\n \"y\": 313.0,\n \"width\": 186.00001525878907,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"526f56bddea1ec94abca08e368cb7006\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Dx\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Dx\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"Dx\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Dy\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Dy\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"Dy\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 3,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.ComparisonNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"74832b71-b33f-4df3-944e-e46b88ed10e6\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Comparison\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -289.0,\n \"y\": -142.0,\n \"width\": 145.0,\n \"height\": 136.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.BooleanMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": false,\\n \\\"m_DefaultValue\\\": false\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_ComparisonType\": 4\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.DDYNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"8186ddd5-97ee-4599-b304-7cea8f7d1c84\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"DDY\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1390.0,\n \"y\": 466.0,\n \"width\": 208.0,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"bc5a218f-b68d-4f3b-94a5-a59395640a16\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1027.0001220703125,\n \"y\": 217.00003051757813,\n \"width\": 208.00001525878907,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"dbec4ab3-0147-43e3-8de7-b22eb9dcb4ec\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1027.0001220703125,\n \"y\": 544.0,\n \"width\": 208.00001525878907,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PowerNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"e4f11a1e-bdbd-4f80-9585-9105c57be95f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Power\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1861.0,\n \"y\": 289.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 2.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 2.0,\\n \\\"y\\\": 2.0,\\n \\\"z\\\": 2.0,\\n \\\"w\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Vector1Node" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"e8718d91-b5be-45f9-812f-313319545c74\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Vector 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2210.0,\n \"y\": 175.0,\n \"width\": 124.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"X\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"X\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Value\": 0.0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.DDXNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"edc16a25-0edc-4e26-b35d-20436082cf8d\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"DDX\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1389.0001220703125,\n \"y\": 175.0,\n \"width\": 208.00001525878907,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"efd9328d-ca9c-4ae9-9a88-e7290c08d4d5\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 273.00006103515627,\n \"y\": 131.0,\n \"width\": 199.99998474121095,\n \"height\": 196.99998474121095\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.UnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [ + { + "m_GuidSerialized": "41b458fb-24c8-430d-85e9-b2c77974d886", + "m_Title": "What this does", + "m_Content": "We do biasing both using explicit bias sampling here and by modifying derivatives (on half of the uv space we do one on halfe the other). This should give identical results", + "m_TextSize": 0, + "m_Theme": 0, + "m_Position": { + "serializedVersion": "2", + "x": -1410.0, + "y": -141.0, + "width": 199.99996948242188, + "height": 252.99996948242188 + }, + "m_GroupGuidSerialized": "00000000-0000-0000-0000-000000000000" + } + ], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"05d61069-55b9-4f5c-addd-42da66a27201\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"efd9328d-ca9c-4ae9-9a88-e7290c08d4d5\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"21f55666-6b45-414a-b499-98fe83edeab9\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"74832b71-b33f-4df3-944e-e46b88ed10e6\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"21f55666-6b45-414a-b499-98fe83edeab9\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"8186ddd5-97ee-4599-b304-7cea8f7d1c84\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"21f55666-6b45-414a-b499-98fe83edeab9\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"edc16a25-0edc-4e26-b35d-20436082cf8d\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"26ee4014-e917-4e17-bf4b-3f407e6e9733\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"05d61069-55b9-4f5c-addd-42da66a27201\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"588b1756-bab3-4d43-a41f-7bc208fc2470\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"05d61069-55b9-4f5c-addd-42da66a27201\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"74832b71-b33f-4df3-944e-e46b88ed10e6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"05d61069-55b9-4f5c-addd-42da66a27201\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"8186ddd5-97ee-4599-b304-7cea8f7d1c84\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"dbec4ab3-0147-43e3-8de7-b22eb9dcb4ec\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"bc5a218f-b68d-4f3b-94a5-a59395640a16\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 12,\n \"m_NodeGUIDSerialized\": \"588b1756-bab3-4d43-a41f-7bc208fc2470\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"dbec4ab3-0147-43e3-8de7-b22eb9dcb4ec\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 13,\n \"m_NodeGUIDSerialized\": \"588b1756-bab3-4d43-a41f-7bc208fc2470\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"e4f11a1e-bdbd-4f80-9585-9105c57be95f\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"bc5a218f-b68d-4f3b-94a5-a59395640a16\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"e4f11a1e-bdbd-4f80-9585-9105c57be95f\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"dbec4ab3-0147-43e3-8de7-b22eb9dcb4ec\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e8718d91-b5be-45f9-812f-313319545c74\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 11,\n \"m_NodeGUIDSerialized\": \"26ee4014-e917-4e17-bf4b-3f407e6e9733\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e8718d91-b5be-45f9-812f-313319545c74\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"e4f11a1e-bdbd-4f80-9585-9105c57be95f\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"edc16a25-0edc-4e26-b35d-20436082cf8d\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"bc5a218f-b68d-4f3b-94a5-a59395640a16\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "efd9328d-ca9c-4ae9-9a88-e7290c08d4d5" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraph.shadergraph.meta new file mode 100644 index 00000000000..6942b097188 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b17bc5d4a3448094fa08df45154f1e31 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat new file mode 100644 index 00000000000..678af2605f1 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat @@ -0,0 +1,44 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BiasGraphMat + m_Shader: {fileID: -6465566751694194690, guid: b17bc5d4a3448094fa08df45154f1e31, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleTextureStack_A89EC4BF_Texture_5: + m_Texture: {fileID: 2800000, guid: a20adda6fb3420a4890b277fd47d6e05, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleTextureStack_D656B90C_Texture_5: + m_Texture: {fileID: 2800000, guid: a20adda6fb3420a4890b277fd47d6e05, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStackA89EC4BF_A89EC4BF_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStackD656B90C_D656B90C_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Vector1_304AE820: 4 + m_Colors: [] + m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat.meta new file mode 100644 index 00000000000..adc57139d86 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 06453d90af16bb54c9774e2fee59fe90 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat index 66181cdea56..d13f7aab07c 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat @@ -44,6 +44,14 @@ Material: m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TexStack164AE2E_164AE2E_Texture2_6: + m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStack164AE2E_164AE2E_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - Vector1_1EC2602A: 0.5 - Vector1_A6D4BDE2: 0.5 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat index ba7c5487565..b0b5a33b0cb 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat @@ -44,6 +44,10 @@ Material: m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TexStackE020294_E020294_Texture_5: + m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph index 422b95fd614..241a7ccf6f9 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodGraph.shadergraph @@ -4,39 +4,39 @@ "m_SerializableNodes": [ { "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.ModuloNode" + "fullName": "UnityEditor.ShaderGraph.UVNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"031d4a1b-1dd1-4ebd-9f26-c114d573a465\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Modulo\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -360.00006103515627,\n \"y\": 198.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 2.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"05ee2060-3dbb-44bc-bdc0-f8b7fec4868b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -371.0000915527344,\n \"y\": -422.0,\n \"width\": 144.99998474121095,\n \"height\": 129.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" }, { "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.MultiplyNode" + "fullName": "UnityEditor.ShaderGraph.ComparisonNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"0c062317-608d-4be8-98ae-317024aa8604\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -43.27217102050781,\n \"y\": 291.72784423828127,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 10.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"11271f9a-2f8c-446c-8ec7-bffc10c73812\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Comparison\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -86.00003814697266,\n \"y\": -365.0,\n \"width\": 144.99998474121095,\n \"height\": 136.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.BooleanMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": false,\\n \\\"m_DefaultValue\\\": false\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_ComparisonType\": 4\n}" }, { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.UVNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"12a90813-fc57-4e6b-a2ca-984d3f37e998\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1188.0001220703125,\n \"y\": 273.0,\n \"width\": 208.0,\n \"height\": 313.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"12a90813-fc57-4e6b-a2ca-984d3f37e998\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1435.0,\n \"y\": 236.0,\n \"width\": 208.0,\n \"height\": 313.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" }, { "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.RoundNode" + "fullName": "UnityEditor.ShaderGraph.BranchNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"4703b601-f0b0-466d-908f-dad70c8cd7d0\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Round\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -745.0000610351563,\n \"y\": -46.0000114440918,\n \"width\": 208.0,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"1ce7dfec-d97d-4066-b267-2b656dfe6838\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Branch\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 129.99986267089845,\n \"y\": -230.0,\n \"width\": 168.0,\n \"height\": 142.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.BooleanMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Predicate\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Predicate\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": false,\\n \\\"m_DefaultValue\\\": false\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"True\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"True\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"False\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"False\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" }, { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SplitNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"6db72112-d751-489a-afba-2aaf99fd7a0e\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Split\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -939.0000610351563,\n \"y\": 282.0,\n \"width\": 118.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"6db72112-d751-489a-afba-2aaf99fd7a0e\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Split\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1186.0,\n \"y\": 245.0,\n \"width\": 118.00000762939453,\n \"height\": 149.00001525878907\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" }, { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.MultiplyNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"706e1d01-fa79-4d97-8a46-e49d06d859d2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -746.0000610351563,\n \"y\": 310.9999694824219,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 8.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"706e1d01-fa79-4d97-8a46-e49d06d859d2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -796.0,\n \"y\": 148.99998474121095,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 5.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" }, { "typeInfo": { @@ -44,27 +44,49 @@ }, "JSONnodeData": "{\n \"m_GuidSerialized\": \"7204a8a6-53ca-499b-a124-6e2b17f89079\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 372.0,\n \"y\": -96.0,\n \"width\": 200.0,\n \"height\": 341.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 33,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 34,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"CoatMask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CoatMask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HDLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_RefractionModel\": 0,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_MaterialType\": 0,\n \"m_SSSTransmission\": true,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_DiffusionProfile\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 11\n}" }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTexture2DLODNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"8b10edbf-32a4-4259-b44c-2c78b90ff3b4\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture 2D LOD\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -444.9999694824219,\n \"y\": -203.00001525878907,\n \"width\": 197.0,\n \"height\": 251.00001525878907\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"526f56bddea1ec94abca08e368cb7006\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"LOD\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"LOD\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureType\": 0,\n \"m_NormalMapSpace\": 0\n}" + }, { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"b97e50cc-f655-4015-89d1-451ce38e12c0\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -61.0,\n \"y\": -36.0,\n \"width\": 186.0,\n \"height\": 125.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Lod\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Lod\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"Lod\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"b97e50cc-f655-4015-89d1-451ce38e12c0\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_622C0D0\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -53.00006103515625,\n \"y\": -24.999990463256837,\n \"width\": 176.0,\n \"height\": 125.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"526f56bddea1ec94abca08e368cb7006\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Lod\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Lod\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"Lod\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 1,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" } ], "m_Groups": [], - "m_StickyNotes": [], + "m_StickyNotes": [ + { + "m_GuidSerialized": "a7a6694e-f212-4334-9682-53fad661db32", + "m_Title": "What this does", + "m_Content": "Half the ball goes trhough VT the other half through regular texture sampling. This ensures vt behaves identical with explicit lod sampling.", + "m_TextSize": 0, + "m_Theme": 0, + "m_Position": { + "serializedVersion": "2", + "x": -849.0, + "y": -310.0, + "width": 200.0, + "height": 160.0 + }, + "m_GroupGuidSerialized": "00000000-0000-0000-0000-000000000000" + } + ], "m_SerializableEdges": [ { "typeInfo": { "fullName": "UnityEditor.Graphing.Edge" }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"031d4a1b-1dd1-4ebd-9f26-c114d573a465\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0c062317-608d-4be8-98ae-317024aa8604\"\n }\n}" + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"05ee2060-3dbb-44bc-bdc0-f8b7fec4868b\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"11271f9a-2f8c-446c-8ec7-bffc10c73812\"\n }\n}" }, { "typeInfo": { "fullName": "UnityEditor.Graphing.Edge" }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"0c062317-608d-4be8-98ae-317024aa8604\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 10,\n \"m_NodeGUIDSerialized\": \"b97e50cc-f655-4015-89d1-451ce38e12c0\"\n }\n}" + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"11271f9a-2f8c-446c-8ec7-bffc10c73812\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"1ce7dfec-d97d-4066-b267-2b656dfe6838\"\n }\n}" }, { "typeInfo": { @@ -76,7 +98,7 @@ "typeInfo": { "fullName": "UnityEditor.Graphing.Edge" }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"4703b601-f0b0-466d-908f-dad70c8cd7d0\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"031d4a1b-1dd1-4ebd-9f26-c114d573a465\"\n }\n}" + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"1ce7dfec-d97d-4066-b267-2b656dfe6838\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"7204a8a6-53ca-499b-a124-6e2b17f89079\"\n }\n}" }, { "typeInfo": { @@ -88,13 +110,25 @@ "typeInfo": { "fullName": "UnityEditor.Graphing.Edge" }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"706e1d01-fa79-4d97-8a46-e49d06d859d2\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4703b601-f0b0-466d-908f-dad70c8cd7d0\"\n }\n}" + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"706e1d01-fa79-4d97-8a46-e49d06d859d2\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"8b10edbf-32a4-4259-b44c-2c78b90ff3b4\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"706e1d01-fa79-4d97-8a46-e49d06d859d2\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 10,\n \"m_NodeGUIDSerialized\": \"b97e50cc-f655-4015-89d1-451ce38e12c0\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"8b10edbf-32a4-4259-b44c-2c78b90ff3b4\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"1ce7dfec-d97d-4066-b267-2b656dfe6838\"\n }\n}" }, { "typeInfo": { "fullName": "UnityEditor.Graphing.Edge" }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"b97e50cc-f655-4015-89d1-451ce38e12c0\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"7204a8a6-53ca-499b-a124-6e2b17f89079\"\n }\n}" + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"b97e50cc-f655-4015-89d1-451ce38e12c0\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"1ce7dfec-d97d-4066-b267-2b656dfe6838\"\n }\n}" } ], "m_PreviewData": { diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat index f282702d6a8..2130f10e4da 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat @@ -36,10 +36,18 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _SampleTexture2DLOD_95D04801_Texture_1: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTextureStack_622C0D0_Texture_5: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TexStack622C0D0_622C0D0_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraph.shadergraph new file mode 100644 index 00000000000..ccceea43e1b --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraph.shadergraph @@ -0,0 +1,37 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.EyeMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"29304e7a-e8b0-4281-a5f9-793a98c38ba4\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Eye Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 18,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 19,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"IrisNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"IrisNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.8999999761581421,\\n \\\"m_DefaultValue\\\": 0.8999999761581421,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"IOR\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"IOR\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.399999976158142,\\n \\\"m_DefaultValue\\\": 1.399999976158142,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"Mask\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Mask\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.EyeSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_MaterialType\": 0,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_SubsurfaceScattering\": false,\n \"m_SpecularOcclusionMode\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"ea5137b8-8393-47c0-bfb5-b72a60f1435f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_7EEFEDDA\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -419.0,\n \"y\": 98.0,\n \"width\": 182.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"ea5137b8-8393-47c0-bfb5-b72a60f1435f\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"29304e7a-e8b0-4281-a5f9-793a98c38ba4\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "29304e7a-e8b0-4281-a5f9-793a98c38ba4" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraph.shadergraph.meta new file mode 100644 index 00000000000..5c237fee3bd --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: cc4fcd59609243c4c9dc00a10f18dd3a +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat new file mode 100644 index 00000000000..98ddeb7c718 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat @@ -0,0 +1,80 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: EyeGraphMat + m_Shader: {fileID: -6465566751694194690, guid: cc4fcd59609243c4c9dc00a10f18dd3a, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _TexStackDC9225B2_DC9225B2_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 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 &8827444566161710921 +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: 2 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat.meta new file mode 100644 index 00000000000..57b802afb92 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9ea3de83b55e1f745aaa7d7a9152158a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraph.shadergraph new file mode 100644 index 00000000000..f09b935b40b --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraph.shadergraph @@ -0,0 +1,37 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.FabricMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"c80305e5-157f-4854-83a3-6dcf7c30607c\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Fabric Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 19,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 20,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 15,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"SpecularColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Specular\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.20000000298023225,\\n \\\"y\\\": 0.20000000298023225,\\n \\\"z\\\": 0.20000000298023225\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.FabricSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_AlphaTest\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_MaterialType\": 0,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnergyConservingSpecular\": true,\n \"m_Transmission\": false,\n \"m_SubsurfaceScattering\": false,\n \"m_SpecularOcclusionMode\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"dd723891-0aa0-41a0-98a1-ccb6edbcd0ba\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_7EEFEDDA\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -392.0,\n \"y\": 105.0,\n \"width\": 182.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"dd723891-0aa0-41a0-98a1-ccb6edbcd0ba\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"c80305e5-157f-4854-83a3-6dcf7c30607c\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "c80305e5-157f-4854-83a3-6dcf7c30607c" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraph.shadergraph.meta new file mode 100644 index 00000000000..5d09d81ad98 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d1bf7c67b2bdce345bad08de5899bf29 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat new file mode 100644 index 00000000000..6f140cbf5a7 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat @@ -0,0 +1,80 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-777096719594565242 +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: 2 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: FabricGraphMat + m_Shader: {fileID: -6465566751694194690, guid: d1bf7c67b2bdce345bad08de5899bf29, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _TexStack54B3324D_54B3324D_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 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: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat.meta new file mode 100644 index 00000000000..9222d385875 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7fac6689649feba43beb1a82bafb0276 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraph.shadergraph new file mode 100644 index 00000000000..9cfe52ff710 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraph.shadergraph @@ -0,0 +1,37 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"8249aade-79e8-4636-9895-89d02f940665\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_7EEFEDDA\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -486.0,\n \"y\": 107.0,\n \"width\": 182.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.HairMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"8e5f1c96-3f88-43dc-b54e-d67b079ef3a4\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Hair Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 27,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 28,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"DiffuseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Transmittance\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Transmittance\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.30000001192092898,\\n \\\"y\\\": 0.19500000774860383,\\n \\\"z\\\": 0.09000000357627869\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"RimTransmissionIntensity\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RimTransmissionIntensity\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.20000000298023225,\\n \\\"m_DefaultValue\\\": 0.20000000298023225,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"HairStrandDirection\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"HairStrandDirection\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": -1.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 18,\\n \\\"m_DisplayName\\\": \\\"SpecularTint\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SpecularTint\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 19,\\n \\\"m_DisplayName\\\": \\\"SpecularShift\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SpecularShift\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.10000000149011612,\\n \\\"m_DefaultValue\\\": 0.10000000149011612,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 20,\\n \\\"m_DisplayName\\\": \\\"SecondarySpecularTint\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SecondarySpecularTint\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 21,\\n \\\"m_DisplayName\\\": \\\"SecondarySmoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SecondarySmoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 22,\\n \\\"m_DisplayName\\\": \\\"SecondarySpecularShift\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SecondarySpecularShift\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": -0.10000000149011612,\\n \\\"m_DefaultValue\\\": -0.10000000149011612,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.HairSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_AlphaTest\": false,\n \"m_AlphaTestDepthPrepass\": false,\n \"m_AlphaTestDepthPostpass\": false,\n \"m_TransparentWritesMotionVec\": false,\n \"m_AlphaTestShadow\": false,\n \"m_BackThenFrontRendering\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_MaterialType\": 0,\n \"m_ReceiveDecals\": true,\n \"m_ReceivesSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_UseLightFacingNormal\": false,\n \"m_SpecularAA\": false,\n \"m_SpecularAAScreenSpaceVariance\": 0.0,\n \"m_SpecularAAThreshold\": 0.0,\n \"m_SpecularOcclusionMode\": 0,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 3\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"8249aade-79e8-4636-9895-89d02f940665\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"8e5f1c96-3f88-43dc-b54e-d67b079ef3a4\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "8e5f1c96-3f88-43dc-b54e-d67b079ef3a4" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraph.shadergraph.meta new file mode 100644 index 00000000000..37d8969a195 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f4da338061f75f648a7416e7b585e8db +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat new file mode 100644 index 00000000000..cf928d68ca7 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat @@ -0,0 +1,80 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-9094565611291873008 +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: 2 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HairGraphMat + m_Shader: {fileID: -6465566751694194690, guid: f4da338061f75f648a7416e7b585e8db, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _TexStack9EBCEA0_9EBCEA0_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 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: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat.meta new file mode 100644 index 00000000000..feaf62e82d3 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 68a009b14c10a24488b47dd0fb86b883 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraph.shadergraph index f798a96ddfe..27bf2611575 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraph.shadergraph @@ -12,7 +12,7 @@ "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 2\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -880.0,\n \"y\": -90.0,\n \"width\": 196.0,\n \"height\": 125.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e793b1c02c4f7ae448a9cc2c39447dd7\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 2,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"d0786215-dbe8-495e-bdf7-d0992ff23409\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_38945874\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -880.0,\n \"y\": -90.0,\n \"width\": 196.0,\n \"height\": 125.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out2\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out2\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Texture2\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e793b1c02c4f7ae448a9cc2c39447dd7\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 2,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 1,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" } ], "m_Groups": [], diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat index b37b3b39c99..18c731c73c8 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat @@ -27,7 +27,7 @@ Material: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2000 stringTagMap: MotionVector: User disabledShaderPasses: @@ -52,6 +52,14 @@ Material: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TexStack38945874_38945874_Texture2_6: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStack38945874_38945874_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalent.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalent.shadergraph new file mode 100644 index 00000000000..af1a46a707d --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalent.shadergraph @@ -0,0 +1,85 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"1b44c69d-2748-44d2-8c90-eb8d6d49ea9c\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_50FF769D\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -558.0,\n \"y\": 212.0,\n \"width\": 180.0,\n \"height\": 125.00000762939453\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"526f56bddea1ec94abca08e368cb7006\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"27256cd3-5e14-4501-98ed-223f60d95036\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.UnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UVNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"526a14f4-f901-4187-b2aa-1ee3bf6eac87\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -827.0,\n \"y\": -177.00001525878907,\n \"width\": 145.00001525878907,\n \"height\": 129.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.ComparisonNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"cb1edcef-766c-4c19-bf12-a6c58af4625f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Comparison\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -542.0000610351563,\n \"y\": -120.00000762939453,\n \"width\": 145.00001525878907,\n \"height\": 136.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.BooleanMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": false,\\n \\\"m_DefaultValue\\\": false\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_ComparisonType\": 4\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.BranchNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"dd3f9f07-ace6-47ce-ad10-05d389a546c5\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Branch\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -325.9999694824219,\n \"y\": 14.999985694885254,\n \"width\": 170.00001525878907,\n \"height\": 142.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.BooleanMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Predicate\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Predicate\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": false,\\n \\\"m_DefaultValue\\\": false\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"True\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"True\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"False\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"False\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTexture2DNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"e4452ea7-ff19-4ad5-a2d6-15a1b21f06d6\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture 2D\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -937.0,\n \"y\": 84.0,\n \"width\": 182.00001525878907,\n \"height\": 251.00001525878907\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"526f56bddea1ec94abca08e368cb7006\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureType\": 0,\n \"m_NormalMapSpace\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"1b44c69d-2748-44d2-8c90-eb8d6d49ea9c\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"dd3f9f07-ace6-47ce-ad10-05d389a546c5\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"526a14f4-f901-4187-b2aa-1ee3bf6eac87\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"cb1edcef-766c-4c19-bf12-a6c58af4625f\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"cb1edcef-766c-4c19-bf12-a6c58af4625f\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"dd3f9f07-ace6-47ce-ad10-05d389a546c5\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"dd3f9f07-ace6-47ce-ad10-05d389a546c5\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"27256cd3-5e14-4501-98ed-223f60d95036\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e4452ea7-ff19-4ad5-a2d6-15a1b21f06d6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"dd3f9f07-ace6-47ce-ad10-05d389a546c5\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "27256cd3-5e14-4501-98ed-223f60d95036" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalent.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalent.shadergraph.meta new file mode 100644 index 00000000000..974be3b78a3 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalent.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 22a88ae4e9cf3224fa65a3eadc17a1f8 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat new file mode 100644 index 00000000000..de342b72fdf --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MipEquivalentMat + m_Shader: {fileID: -6465566751694194690, guid: 22a88ae4e9cf3224fa65a3eadc17a1f8, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleTexture2D_1033C590_Texture_1: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStack50FF769D_50FF769D_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: [] + m_Colors: [] + m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat.meta new file mode 100644 index 00000000000..d9e78b0c181 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a548c1e35ed7ba04c89c177c3653e1df +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat index 6071d6c350a..5352e60a554 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat @@ -39,6 +39,14 @@ Material: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TexStack89E299BF_89E299BF_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStackC858D4E6_C858D4E6_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat index 027aea5c059..9cb742695ef 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat @@ -38,6 +38,14 @@ Material: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TexStackF6736428_F6736428_Texture2_6: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStackF6736428_F6736428_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: [] m_Colors: [] m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat index 2a358b9bc66..1ba0d430759 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat @@ -52,6 +52,14 @@ Material: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TexStack38945874_38945874_Texture2_6: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStack38945874_38945874_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraph.shadergraph new file mode 100644 index 00000000000..e2e6e16f5ff --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraph.shadergraph @@ -0,0 +1,37 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.StackLitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"a6f2b305-f95a-4ae0-86de-baf97391c151\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"StackLit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 44,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 45,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"BentNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BentNormal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Tangent\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"BaseColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"BaseColor\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"DielectricIor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"DielectricIor\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.5,\\n \\\"m_DefaultValue\\\": 1.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"SmoothnessA\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SmoothnessA\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 16,\\n \\\"m_DisplayName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AmbientOcclusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 17,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.StackLitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_BlendPreserveSpecular\": true,\n \"m_TransparencyFog\": true,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSidedMode\": 0,\n \"m_NormalDropOffSpace\": 0,\n \"m_BaseParametrization\": 0,\n \"m_EnergyConservingSpecular\": true,\n \"m_DualSpecularLobeParametrization\": 0,\n \"m_Anisotropy\": false,\n \"m_Coat\": false,\n \"m_CoatNormal\": false,\n \"m_DualSpecularLobe\": false,\n \"m_CapHazinessWrtMetallic\": true,\n \"m_Iridescence\": false,\n \"m_SubsurfaceScattering\": false,\n \"m_Transmission\": false,\n \"m_ReceiveDecals\": true,\n \"m_ReceiveSSR\": true,\n \"m_AddPrecomputedVelocity\": false,\n \"m_GeometricSpecularAA\": false,\n \"m_ScreenSpaceSpecularOcclusionBaseMode\": 1,\n \"m_DataBasedSpecularOcclusionBaseMode\": 0,\n \"m_ScreenSpaceSpecularOcclusionAOConeSize\": 0,\n \"m_ScreenSpaceSpecularOcclusionAOConeDir\": 0,\n \"m_DataBasedSpecularOcclusionAOConeSize\": 2,\n \"m_SpecularOcclusionConeFixupMethod\": 0,\n \"m_AnisotropyForAreaLights\": true,\n \"m_RecomputeStackPerLight\": false,\n \"m_HonorPerLightMinRoughness\": false,\n \"m_ShadeBaseUsingRefractedAngles\": false,\n \"m_Debug\": false,\n \"m_DevMode\": false,\n \"m_overrideBakedGI\": false,\n \"m_depthOffset\": false,\n \"m_ZWrite\": false,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_SupportLodCrossFade\": false,\n \"m_MaterialNeedsUpdateHash\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"e15e642a-7d27-4b55-98b6-651e06e5cf82\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_7EEFEDDA\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -497.0,\n \"y\": 148.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"e15e642a-7d27-4b55-98b6-651e06e5cf82\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"a6f2b305-f95a-4ae0-86de-baf97391c151\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "a6f2b305-f95a-4ae0-86de-baf97391c151" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraph.shadergraph.meta new file mode 100644 index 00000000000..4d35eb7e3de --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: afd53631b006fb34cb74b06d03be7440 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat new file mode 100644 index 00000000000..0562276d905 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat @@ -0,0 +1,80 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-702567901021856955 +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: 2 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: StackLitGraphMat + m_Shader: {fileID: -6465566751694194690, guid: afd53631b006fb34cb74b06d03be7440, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _TexStack7EEFEDDA_7EEFEDDA_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 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: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat.meta new file mode 100644 index 00000000000..abf51fcc214 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86ca8682d76e1624496b00579837fadd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/fadetored.DDS b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/fadetored.DDS new file mode 100644 index 00000000000..b28b6ebd4a3 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/fadetored.DDS @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99be0e2913029687cd1550d8278983102fcb8c2a60f32cda14b370878a6eb60b +size 5592580 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/fadetored.DDS.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/fadetored.DDS.meta new file mode 100644 index 00000000000..f0c7f83a007 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/Textures/fadetored.DDS.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 526f56bddea1ec94abca08e368cb7006 +IHVImageFormatImporter: + externalObjects: {} + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + isReadable: 0 + sRGBTexture: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraph.shadergraph index 52ab36550ca..3b04af88eed 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraph.shadergraph +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraph.shadergraph @@ -6,13 +6,13 @@ "typeInfo": { "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"1e1e86d6-8bfd-4be7-9c08-ee8a281c06a9\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -42.0,\n \"y\": -287.0,\n \"width\": 200.0,\n \"height\": 197.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.UnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"1e1e86d6-8bfd-4be7-9c08-ee8a281c06a9\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -116.0,\n \"y\": -289.0,\n \"width\": 200.0,\n \"height\": 197.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.699999988079071,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.UnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false\n}" }, { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"865f0824-8808-4f13-968c-b0225a82f740\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture Stack 1\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -491.0,\n \"y\": -247.0,\n \"width\": 195.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"062e2e8c474a74644bc719d5d294c476\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + "JSONnodeData": "{\n \"m_GuidSerialized\": \"865f0824-8808-4f13-968c-b0225a82f740\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_20847E1A\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -511.0,\n \"y\": -206.0,\n \"width\": 179.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"062e2e8c474a74644bc719d5d294c476\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" } ], "m_Groups": [], diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat index 4a91dd6b773..ac035fbfc77 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat @@ -30,6 +30,10 @@ Material: m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TexStack20847E1A_20847E1A_Texture_5: + m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: [] m_Colors: [] m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraph.shadersubgraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraph.shadersubgraph new file mode 100644 index 00000000000..1604aaf1fd1 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraph.shadersubgraph @@ -0,0 +1,56 @@ +{ + "m_SerializedProperties": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Internal.Vector2ShaderProperty" + }, + "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"ae808786-d14e-47b0-a8e5-7829934b0282\"\n },\n \"m_Name\": \"texcoord\",\n \"m_DefaultReferenceName\": \"Vector2_25694608\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"x\": 0.0,\n \"y\": 0.0,\n \"z\": 0.0,\n \"w\": 0.0\n }\n}" + } + ], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"00333018-ceac-490c-b53e-bb1824b9d557\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_791D36CD\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -298.0,\n \"y\": -62.0,\n \"width\": 183.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SubGraphOutputNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"5674e5a2-aff1-4397-a349-821e5ee95aa4\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Output\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out_Vector4\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"OutVector4\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PropertyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"8d1e0887-9779-4d20-8a32-32357f62656c\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -620.0,\n \"y\": -103.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"texcoord\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"ae808786-d14e-47b0-a8e5-7829934b0282\"\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"00333018-ceac-490c-b53e-bb1824b9d557\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"5674e5a2-aff1-4397-a349-821e5ee95aa4\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"8d1e0887-9779-4d20-8a32-32357f62656c\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"00333018-ceac-490c-b53e-bb1824b9d557\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Sub Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraph.shadersubgraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraph.shadersubgraph.meta new file mode 100644 index 00000000000..6440b4db804 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraph.shadersubgraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 68b473ff45c1c7f4ca429d614f4f91c1 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShader.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShader.shadergraph new file mode 100644 index 00000000000..a09e2b07d4e --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShader.shadergraph @@ -0,0 +1,91 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SubGraphNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"18f04621-6bb4-4066-9bd1-91775856d12e\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"VTSubGraph\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -474.00006103515627,\n \"y\": 78.99999237060547,\n \"width\": 214.0,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 130990260,\\n \\\"m_DisplayName\\\": \\\"texcoord\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vector2_25694608\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out_Vector4\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"OutVector4\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 22021982,\\n \\\"m_DisplayName\\\": \\\"VTFeedbackIn_0\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"VTFeedbackIn_0\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializedSubGraph\": \"{\\n \\\"subGraph\\\": {\\n \\\"fileID\\\": -5475051401550479605,\\n \\\"guid\\\": \\\"68b473ff45c1c7f4ca429d614f4f91c1\\\",\\n \\\"type\\\": 3\\n }\\n}\",\n \"m_PropertyGuids\": [\n \"ae808786-d14e-47b0-a8e5-7829934b0282\"\n ],\n \"m_PropertyIds\": [\n 130990260\n ]\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.AddNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"2e94f878-4e87-4d28-9204-3160c0e2393c\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -756.0001220703125,\n \"y\": 117.00000762939453,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.05000000074505806,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"4e3aa6aa-9975-49b3-91a5-32c9fa3b43e2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 223.99993896484376,\n \"y\": -94.0,\n \"width\": 200.00001525878907,\n \"height\": 197.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.UnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SubGraphNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"844493e0-19eb-495d-9d48-bf6cc556c648\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"VTSubGraph\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -474.00006103515627,\n \"y\": -219.00001525878907,\n \"width\": 214.0,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 130990260,\\n \\\"m_DisplayName\\\": \\\"texcoord\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vector2_25694608\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out_Vector4\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"OutVector4\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 22021982,\\n \\\"m_DisplayName\\\": \\\"VTFeedbackIn_0\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"VTFeedbackIn_0\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializedSubGraph\": \"{\\n \\\"subGraph\\\": {\\n \\\"fileID\\\": -5475051401550479605,\\n \\\"guid\\\": \\\"68b473ff45c1c7f4ca429d614f4f91c1\\\",\\n \\\"type\\\": 3\\n }\\n}\",\n \"m_PropertyGuids\": [\n \"ae808786-d14e-47b0-a8e5-7829934b0282\"\n ],\n \"m_PropertyIds\": [\n 130990260\n ]\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UVNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"9bde9059-445e-412b-8a95-0d13b57370bd\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1054.0001220703125,\n \"y\": -5.000022888183594,\n \"width\": 145.0,\n \"height\": 129.00001525878907\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.CombineNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"d145c351-80c8-4fa7-a932-2e4388532783\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Combine\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -168.00001525878907,\n \"y\": -82.00001525878906,\n \"width\": 208.0,\n \"height\": 350.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"RGB\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGB\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"RG\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RG\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"18f04621-6bb4-4066-9bd1-91775856d12e\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"d145c351-80c8-4fa7-a932-2e4388532783\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"2e94f878-4e87-4d28-9204-3160c0e2393c\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 130990260,\n \"m_NodeGUIDSerialized\": \"18f04621-6bb4-4066-9bd1-91775856d12e\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"844493e0-19eb-495d-9d48-bf6cc556c648\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"d145c351-80c8-4fa7-a932-2e4388532783\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"9bde9059-445e-412b-8a95-0d13b57370bd\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"2e94f878-4e87-4d28-9204-3160c0e2393c\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"9bde9059-445e-412b-8a95-0d13b57370bd\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 130990260,\n \"m_NodeGUIDSerialized\": \"844493e0-19eb-495d-9d48-bf6cc556c648\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"d145c351-80c8-4fa7-a932-2e4388532783\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4e3aa6aa-9975-49b3-91a5-32c9fa3b43e2\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "4e3aa6aa-9975-49b3-91a5-32c9fa3b43e2" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShader.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShader.shadergraph.meta new file mode 100644 index 00000000000..21b954e63b3 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShader.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0c3d8677ba25d964a89362628fa333e8 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat new file mode 100644 index 00000000000..28062c3068d --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat @@ -0,0 +1,31 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: VTSubGraphShaderMat + m_Shader: {fileID: -6465566751694194690, guid: 0c3d8677ba25d964a89362628fa333e8, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _TexStack791D36CD_791D36CD_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: [] + m_Colors: [] + m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat.meta new file mode 100644 index 00000000000..e2a427eaa4c --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ba2a5e802a9105145812d83b16e9b9e7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat index 5dbc8f10d39..22270afa456 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat @@ -31,6 +31,14 @@ Material: m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TexStack6E4297F5_6E4297F5_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TexStack92BB29F_92BB29F_Texture_5: + m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArg.shadersubgraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArg.shadersubgraph new file mode 100644 index 00000000000..c4318d29c63 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArg.shadersubgraph @@ -0,0 +1,56 @@ +{ + "m_SerializedProperties": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty" + }, + "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"7abab576-d78b-4d4f-a9e4-9af9cc6ebbdd\"\n },\n \"m_Name\": \"TexArg\",\n \"m_DefaultReferenceName\": \"Texture2D_62C5E94F\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"m_SerializedTexture\": \"{\\\"texture\\\":{\\\"fileID\\\":2800000,\\\"guid\\\":\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\",\\\"type\\\":3}}\",\n \"m_Guid\": \"\"\n },\n \"m_Modifiable\": true,\n \"m_DefaultType\": 0,\n \"m_TextureStack\": \"TexStack_F9B82B2D(0)\"\n}" + } + ], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SubGraphOutputNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"0365fd68-ced6-4711-a616-c304200d8c3d\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Output\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -78.0,\n \"y\": -104.0,\n \"width\": 119.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out_Vector4\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"OutVector4\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PropertyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"1fafeef0-2d1e-44dc-b710-716883b63919\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -504.0,\n \"y\": 1.0,\n \"width\": 121.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"TexArg\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"7abab576-d78b-4d4f-a9e4-9af9cc6ebbdd\"\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"849447f2-5232-404a-856a-ed24bd5d4437\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TexStack_F9B82B2D\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -352.0,\n \"y\": -102.0,\n \"width\": 181.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"instanceID\\\\\\\":0}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"1fafeef0-2d1e-44dc-b710-716883b63919\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 5,\n \"m_NodeGUIDSerialized\": \"849447f2-5232-404a-856a-ed24bd5d4437\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"849447f2-5232-404a-856a-ed24bd5d4437\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"0365fd68-ced6-4711-a616-c304200d8c3d\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Sub Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArg.shadersubgraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArg.shadersubgraph.meta new file mode 100644 index 00000000000..af9d80e20e9 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArg.shadersubgraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3ccd025a920312b47b51ad6a3f7a2977 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShader.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShader.shadergraph new file mode 100644 index 00000000000..c52bc00e2fe --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShader.shadergraph @@ -0,0 +1,56 @@ +{ + "m_SerializedProperties": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty" + }, + "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"7596ee74-dba5-43b0-a4d3-9fdd42d4ed7b\"\n },\n \"m_Name\": \"TexArg\",\n \"m_DefaultReferenceName\": \"Texture2D_EF924F8C\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"m_SerializedTexture\": \"{\\\"texture\\\":{\\\"fileID\\\":2800000,\\\"guid\\\":\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\",\\\"type\\\":3}}\",\n \"m_Guid\": \"\"\n },\n \"m_Modifiable\": true,\n \"m_DefaultType\": 0,\n \"m_TextureStack\": \"TexStack_F9B82B2D(0)\"\n}" + } + ], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"7160141a-79ca-490e-86b5-455360728032\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 241.0,\n \"y\": -60.0,\n \"width\": 200.0,\n \"height\": 197.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.HighDefinition.UnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SubGraphNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"bc5a534e-c091-4c9c-98cf-eb569d599ea7\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"VtSubGraphTexArg\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -213.0,\n \"y\": 13.0,\n \"width\": 211.0,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 926021860,\\n \\\"m_DisplayName\\\": \\\"TexArg\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture2D_62C5E94F\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out_Vector4\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"OutVector4\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 22021982,\\n \\\"m_DisplayName\\\": \\\"VTFeedbackIn_0\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"VTFeedbackIn_0\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializedSubGraph\": \"{\\n \\\"subGraph\\\": {\\n \\\"fileID\\\": -5475051401550479605,\\n \\\"guid\\\": \\\"3ccd025a920312b47b51ad6a3f7a2977\\\",\\n \\\"type\\\": 3\\n }\\n}\",\n \"m_PropertyGuids\": [\n \"7abab576-d78b-4d4f-a9e4-9af9cc6ebbdd\"\n ],\n \"m_PropertyIds\": [\n 926021860\n ]\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PropertyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"ea9f5029-485c-445f-b97a-e3f94de2e902\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -561.0,\n \"y\": 55.0,\n \"width\": 121.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"TexArg\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"7596ee74-dba5-43b0-a4d3-9fdd42d4ed7b\"\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"bc5a534e-c091-4c9c-98cf-eb569d599ea7\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"7160141a-79ca-490e-86b5-455360728032\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"ea9f5029-485c-445f-b97a-e3f94de2e902\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 926021860,\n \"m_NodeGUIDSerialized\": \"bc5a534e-c091-4c9c-98cf-eb569d599ea7\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "7160141a-79ca-490e-86b5-455360728032" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShader.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShader.shadergraph.meta new file mode 100644 index 00000000000..eba07e575ed --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShader.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f96791703b7c3fe469d438499f622057 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShaderMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShaderMat.mat new file mode 100644 index 00000000000..1a72eae0156 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShaderMat.mat @@ -0,0 +1,31 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: VtSubGraphTexArgShaderMat + m_Shader: {fileID: -6465566751694194690, guid: f96791703b7c3fe469d438499f622057, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - Texture2D_EF924F8C: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: [] + m_Colors: [] + m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShaderMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShaderMat.mat.meta new file mode 100644 index 00000000000..f6b4c2938dd --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VtSubGraphTexArgShaderMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: abfb28732b269f442905a9ea2ec03577 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.core/Runtime/Common/IVirtualTexturingEnabledRenderPipeline.cs b/com.unity.render-pipelines.core/Runtime/Common/IVirtualTexturingEnabledRenderPipeline.cs new file mode 100644 index 00000000000..be141578eaf --- /dev/null +++ b/com.unity.render-pipelines.core/Runtime/Common/IVirtualTexturingEnabledRenderPipeline.cs @@ -0,0 +1,10 @@ +namespace UnityEngine.Rendering +{ + /* + Render pipelines which are aware of virtual texturing and support it should implement this interface. + */ + public interface IVirtualTexturingEnabledRenderPipeline + { + bool virtualTexturingEnabled { get; } + } +} diff --git a/com.unity.render-pipelines.core/Runtime/Common/IVirtualTexturingEnabledRenderPipeline.cs.meta b/com.unity.render-pipelines.core/Runtime/Common/IVirtualTexturingEnabledRenderPipeline.cs.meta new file mode 100644 index 00000000000..4302bfee9fb --- /dev/null +++ b/com.unity.render-pipelines.core/Runtime/Common/IVirtualTexturingEnabledRenderPipeline.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: abbe08f5688bd7342b997cf075044945 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.core/ShaderLibrary/GraniteShaderLibBase.h b/com.unity.render-pipelines.core/ShaderLibrary/GraniteShaderLibBase.h new file mode 100644 index 00000000000..3a68ca94f6b --- /dev/null +++ b/com.unity.render-pipelines.core/ShaderLibrary/GraniteShaderLibBase.h @@ -0,0 +1,1252 @@ +//@IGNORE_BEGIN +/** +* Graphine Granite Runtime Shader 3.0 +* +* Copyright (c) 2017 Graphine. All Rights Reserved +* +* This shader library contains all shader functionality to sample +* Granite tile sets. It should be included in the application-specific +* shader code. +* +* -------------- +* FUNCTION CALLS +* -------------- +* +* To sample a layer from a tile set, first perform the lookup: +* +* int Granite_Lookup[_UDIM]( in GraniteConstantBuffers grCB, in gra_Float2 inputTexCoord, +* in GraniteTranslationTexture translationTable, +* out GraniteLookupData graniteLookupData, +* out gra_Float4 resolveResult); +* +* It is now possible to sample from any layer in the tile set: +* +* int Granite_Sample( in GraniteConstantBuffers grCB, +* in GraniteLookupData graniteLookupData, +* in uint layer, +* in GraniteCacheTexture cacheTexture, +* out gra_Float4 result); +* +* +* Depending on you resolve strategy, you will need to do the following +* +* - Separate Resolver: +* +* Calculate only the resolve output in the separate resolver pass: +* +* gra_Float4 Granite_ResolverPixel[_UDIM]( in GraniteConstantBuffers grCB, +* gra_Float2 inputTexCoord); +* +* You can supply a dummy resolveResult parameter to the Granite_Lookup function when sampling. +* +* - MRT Resolver: +* +* Output the resolveResult parameter given by the Granite_Lookup function to the render target. +* +* - RWTexture2D Resolver: +* +* You can write the resolveResult parameter given by the Granite_Lookup function to a RWTexture as follows: +* +* void Granite_DitherResolveOutput( in gra_Float4 resolve, +* in RWTexture2D resolveTexture, +* in gra_Float2 screenPos, +* in float alpha = 1.0f); +* +* Don't forget to set GRA_RWTEXTURE2D_SCALE to the actual scale used! +* +* +* To transform the texture coordinates when using atlassing use: +* +* gra_Float4 Granite_Transform( in GraniteStreamingTextureConstantBuffer grSTCB, +* gra_Float2 inputTexCoord); +* +* If you want to sample from a UDIM streaming texture use the Granite_Lookup_UDIM functions to perform the lookup. +* If you want to sample with explicit derivatives, use the overloaded 'Lookup' and 'Resolve' functions that take additional ddX and ddY parameters. +* If you want to sample with explicit level-of-detail, use the overloaded 'Lookup' and 'Resolve' functions that take an additional LOD parameter. Note that these take a special GraniteLodVTData parameter. +* If you do not want to have texture wrapping of streaming textures when using atlassing, use the overloaded 'PreTransformed' Lookup functions. Call Granite_Transform (or transform the UVs at the CPU) yourself! +* If you want to sample a cube map, use the appropriate 'Lookup'' and 'Sample' functions. +* Pass in the complete texture coordinate ( NOT the fractional part of it) in order to avoid discontinuities! +* +* --------------------- +* INTEGRATION CHECKLIST +* --------------------- +* +* (1.) Define the following preprocessor directives to configure the shader: +* +* define GRA_HLSL_3 1/0 +* Enable/disable HLSL 3 syntax +* Default: disabled +* +* define GRA_HLSL_4 1/0 +* Enable/disable HLSL 4 syntax +* Default: disabled +* +* define GRA_HLSL_5 1/0 +* Enable/disable HLSL 5 syntax +* Default: disabled +* +* define GRA_GLSL_120 1/0 +* Enable/disable GLSL version 1.2 syntax +* Default: disabled +* +* define GRA_GLSL_130 1/0 +* Enable/disable GLSL version 1.3 syntax +* Default: disabled +* +* define GRA_GLSL_330 1/0 +* Enable/disable GLSL version 3.2 syntax +* Default: disabled +* +* define GRA_VERTEX_SHADER 1/0 +* Define that we are compiling a vertex shader and limit the instruction set to valid instructions +* Default: disabled +* +* define GRA_PIXEL_SHADER 1/0 +* Define that we are compiling a pixel shader and limit the instruction set to valid instructions +* Default: disabled +* +* define GRA_HQ_CUBEMAPPING 1/0 +* Enable/disable high quality cubemapping +* Default: disabled +* +* define GRA_DEBUG 0 +* Enable/disable debug mode of shader. It recommended to set this to true when first integrating +* Granite into your engine. It will catch some common mistakes with passing shader parameters etc. +* Default: disabled +* +* define GRA_DEBUG_TILES 1/0 +* Enable/disable visual debug output of tiles +* Default: disabled +* +* define GRA_BGRA 1/0 +* Enable shader output in BGRA format (else RGBA is used) +* Default: disabled (rgba) +* +* define GRA_ROW_MAJOR 1/0 +* Set row major or colum major order of arrays +* Default: enabled (row major) +* +* define GRA_64BIT_RESOLVER 1/0 +* Render the resolver pass to a 64bpp resolver instead of a 32 bit per pixel format. +* Default: disabled +* +* define GRA_RWTEXTURE2D_SCALE [1,16] +* The scale we are resolving at in the RWTexture2D. Must match the resolveScale when creation the RWTexture2D resolver. +* Default: 16 +* +* define GRA_DISABLE_TEX_LOAD 1/0 +* Prefer a texture sample over a texture load (Only has effect on shader models that support the texture load/fetch instruction) +* Default: 0 +* +* define GRA_PACK_RESOLVE_OUTPUT 1/0 +* When enabled, pack the resolve output values. If disabled, you should pack the returned resolve value using Granite_PackTileId. +* Use this when performing multiple VT samples and dithering the resolve output. +* Default: 1 +* +* define GRA_TEXTURE_ARRAY_SUPPORT 1/0 +* Does the graphics API / shader model supports texture arrays ? +* Default: 1 for shader models supporting texture arrays, else 0 +* +* (2.) Include the Shader library, "GraniteShaderLib.h" +* +* (3.) Ensure a nearest-point sampler is passed for the translation texture, +* including the mipmap filter (e.g., D3DTEXF_POINT for D3D9, or +* NearestMipmapNearest for CG) +* +*/ +//@IGNORE_END +// KEEP THESE IGNORE HERE (DO NOT COLLAPSE) +//@IGNORE_BEGIN +#ifndef GRA_HLSL_3 +#define GRA_HLSL_3 0 +#endif + +#ifndef GRA_HLSL_4 +#define GRA_HLSL_4 0 +#endif + +#ifndef GRA_HLSL_5 +#define GRA_HLSL_5 0 +#endif + +#ifndef GRA_GLSL_120 +#define GRA_GLSL_120 0 +#endif + +#ifndef GRA_GLSL_130 +#define GRA_GLSL_130 0 +#endif + +#ifndef GRA_GLSL_330 +#define GRA_GLSL_330 0 +#endif + +#ifndef GRA_VERTEX_SHADER +#define GRA_VERTEX_SHADER 0 +#endif + +#ifndef GRA_PIXEL_SHADER +#define GRA_PIXEL_SHADER 0 +#endif + +#ifndef GRA_HQ_CUBEMAPPING +#define GRA_HQ_CUBEMAPPING 0 +#endif + +#ifndef GRA_DEBUG_TILES +#define GRA_DEBUG_TILES 0 +#endif + +#ifndef GRA_BGRA +#define GRA_BGRA 0 +#endif + +#ifndef GRA_ROW_MAJOR +#define GRA_ROW_MAJOR 1 +#endif + +#ifndef GRA_DEBUG +#define GRA_DEBUG 1 +#endif + +#ifndef GRA_64BIT_RESOLVER +#define GRA_64BIT_RESOLVER 0 +#endif + +#ifndef GRA_RWTEXTURE2D_SCALE +#define GRA_RWTEXTURE2D_SCALE 16 +#endif + +#ifndef GRA_DISABLE_TEX_LOAD +#define GRA_DISABLE_TEX_LOAD 0 +#endif + +#ifndef GRA_PACK_RESOLVE_OUTPUT +#define GRA_PACK_RESOLVE_OUTPUT 1 +#endif + +#ifndef GRA_FORCE_SM3 +#define GRA_FORCE_SM3 0 +#endif + +// Temp workaround for PSSL's lack of unorm. Ideally there would be a whole seperate GRA_PSSL backend. +#ifdef GRA_NO_UNORM + #define GRA_UNORM +#else + #define GRA_UNORM unorm +#endif + +#ifndef GRA_TEXTURE_ARRAY_SUPPORT + #if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) || (GRA_GLSL_330 == 1) + #define GRA_TEXTURE_ARRAY_SUPPORT 1 + #else + #define GRA_TEXTURE_ARRAY_SUPPORT 0 + #endif +#endif + +#define GRA_HLSL_FAMILY ((GRA_HLSL_3 == 1) || (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1)) +#define GRA_GLSL_FAMILY ((GRA_GLSL_120 == 1) || (GRA_GLSL_130 == 1) || (GRA_GLSL_330 == 1)) + +#if GRA_HLSL_FAMILY + #define gra_Float2 float2 + #define gra_Float3 float3 + #define gra_Float4 float4 + #define gra_Int3 int3 + #define gra_Float4x4 float4x4 + #define gra_Unroll [unroll] + #define gra_Branch [branch] +#elif GRA_GLSL_FAMILY + #if (GRA_VERTEX_SHADER == 0) && (GRA_PIXEL_SHADER ==0) + #error GLSL requires knowledge of the shader stage! Neither GRA_VERTEX_SHADER or GRA_PIXEL_SHADER are defined! + #else + #define gra_Float2 vec2 + #define gra_Float3 vec3 + #define gra_Float4 vec4 + #define gra_Int3 ivec3 + #define gra_Float4x4 mat4 + #define gra_Unroll + #define gra_Branch + #if (GRA_VERTEX_SHADER == 1) + #define ddx + #define ddy + #elif (GRA_PIXEL_SHADER == 1) + #define ddx dFdx + #define ddy dFdy + #endif + #define frac fract + #define lerp mix + /** This is not correct (http://stackoverflow.com/questions/7610631/glsl-mod-vs-hlsl-fmod) but it is for our case */ + #define fmod mod + #endif +#else + #error unknown shader architecture +#endif + +#if (GRA_DISABLE_TEX_LOAD!=1) + #if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) || (GRA_GLSL_130 == 1) || (GRA_GLSL_330 == 1) + #define GRA_LOAD_INSTR 1 + #else + #define GRA_LOAD_INSTR 0 + #endif +#else + #define GRA_LOAD_INSTR 0 +#endif + +//@IGNORE_END + +// These are special values that need to be replaced by the shader stripper +//! gra_TranslationTableBias +//! gra_MaxAnisotropyLog2 +//! gra_CalcMiplevelDeltaScale +//! gra_CalcMiplevelDeltaScaleX +//! gra_CalcMiplevelDeltaScaleY +//! gra_LodBiasPow2 +//! gra_TileToCacheScale +//! gra_TileToCacheBias +//! gra_CacheIdxToCacheScale +//! gra_CacheDeltaScale +//! gra_Level0NumTilesX +//! gra_TextureMagic +//! gra_TextureId +//! gra_TransSwiz +//! gra_NumTilesYScale +//! gra_CutoffLevel +//! gra_MetaTiles +//! gra_NumLevels +//! gra_TileContentInTiles +//! gra_RcpCacheInTiles +//! gra_BorderPixelsRcpCache +//! TranslateCoord +//! PackTileId +//! UnpackTileId +//! CalcMiplevelAnisotropic +//! DrawDebugTiles +//! TranslateCoord +//! numPagesOnLevel +//! cacheCoord +//! deltaScale +//! sampDeltaX +//! sampDeltaY +//! lenDxSqr +//! lenDySqr +//! dMaxSqr +//! dMinSqr +//! maxLevel +//! minLevel +//! anisoLog2 +//! borderTemp +//! translationData +//! virtualTilesUv +//! cache +//! ddX +//! ddY +//! faceIdx +//! resultBits +//! swiz +//! level0NumTiles +//! sourceColor +//! borderColor +//! level +//! ddxTc +//! ddyTc +//! availableMips +//! maxAvailableMip +//! lod +//! smoothLevel +//! unused_resolve +//! transform +//! textureCoord +//! resolveResult +//! GranitePrivate +//! pixelLocation +//! screenPos +//! resolveTexture +//! pixelPos +//! writePos +//! dither +//! packedTile +//! cacheOffs +//! offset +//! tileY +//! tileX +//! border +//! tex +//! scale +//! output +//! temp +//! value +//! LOD +//! graniteLookupData +//! numTilesOnLevel +//! cacheX +//! cacheY +//! contTexCoord +//! derivX +//! derivY +//! dVx +//! dVy +//! majorAxis +//! GranitePrivate_CalcMiplevelAnisotropic +//! GranitePrivate_PackTileId +//! GranitePrivate_UnpackTileId +//! GranitePrivate_TranslateCoord +//! GranitePrivate_DrawDebugTiles +//! GranitePrivate_Sample +//! GranitePrivate_SampleLevel +//! GranitePrivate_SampleGrad +//! GranitePrivate_SampleArray +//! GranitePrivate_SampleLevelArray +//! GranitePrivate_SampleGradArray +//! GranitePrivate_SampleBias +//! GranitePrivate_Saturate +//! GranitePrivate_CalculateLevelOfDetail +//! GranitePrivate_Gather +//! GranitePrivate_Load +//! GranitePrivate_FloatAsUint +//! GranitePrivate_Pow2 +//! GranitePrivate_CalcMiplevelLinear +//! GranitePrivate_ResolverPixel +//! GranitePrivate_DitherResolveOutput +//! GranitePrivate_CalculateCubemapCoordinates +//! GranitePrivate_MakeResolveOutput +//! exponent +//! gra_TilesetBuffer +//! gra_TilesetBufferInternal +//! gra_TilesetCacheBuffer +//! gra_StreamingTextureCB +//! gra_StreamingTextureCubeCB +//! gra_Transform +//! gra_CubeTransform +//! gra_StreamingTextureTransform +//! gra_StreamingTextureInfo +//! grCB +//! tsCB +//! grSTCB +//! tileTexCoord +//! transforms +//! GranitePrivate_RepeatUV +//! GranitePrivate_UdimUV +//! GranitePrivate_ClampUV +//! GranitePrivate_MirrorUV +//! gra_AssetWidthRcp +//! gra_AssetHeightRcp + +// These are special values that need to be defined by the shader stripper +//! d floor +//! d frac +//! d fmod +//! d dot +//! d max +//! d min +//! d log2 +//! d ddx +//! d ddy +//! d pow +//! d smoothstep +//! d sqrt +//! d saturate +//! d clamp +//! d float +//! d gra_Float2 +//! d gra_Float3 +//! d gra_Float4 +//! d gra_Float4x4 +//! d int +//! d int2 +//! d uint2 +//! d const +//! d bool +//! d if +//! d else +//! d for +//! d translationTable +//! d cacheTexture +//! d inputTexCoord +//! d tileXY +//! d resolveOutput +//! d result +//! d texCoord +//! d return +//! d paramBlock0 +//! d paramBlock1 +//! d class +//! d in +//! d out +//! d inout +//! d Texture +//! d TextureArray +//! d Sampler +//! d GraniteCacheTexture +//! d GraniteTranslationTexture +//! d GraniteLookupData +//! d GraniteLODLookupData +//! d RWTexture2D +//! d tex2Dlod +//! d tex2D +//! d tex2Dbias +//! d dX +//! d dY +//! d textureCoordinates +//! d translationTableData +//! d layer +//! d cacheLevel +//! d StreamingTextureConstantBuffer +//! d StreamingTextureCubeConstantBuffer +//! d TilesetConstantBuffer +//! d GraniteConstantBuffers +//! d GraniteCubeConstantBuffers + +//@IGNORE_BEGIN + +/** + a cross API texture handle +*/ +#if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + struct GraniteTranslationTexture + { + SamplerState Sampler; + Texture2D Texture; + }; + struct GraniteCacheTexture + { + SamplerState Sampler; + + #if GRA_TEXTURE_ARRAY_SUPPORT + Texture2DArray TextureArray; + #else + Texture2D Texture; + #endif + }; +#elif (GRA_HLSL_3 == 1) || (GRA_GLSL_120 == 1) || (GRA_GLSL_130 == 1) || (GRA_GLSL_330 == 1) + #define GraniteTranslationTexture sampler2D + + #if GRA_TEXTURE_ARRAY_SUPPORT + #define GraniteCacheTexture sampler2DArray + #else + #define GraniteCacheTexture sampler2D + #endif + +#else + #error unknow shader archtecture +#endif + +/** + Struct defining the constant buffer for each streaming texture. + Use IStreamingTexture::GetConstantBuffer to fill this struct. +*/ +struct GraniteStreamingTextureConstantBuffer +{ + #define _grStreamingTextureCBSize 2 + gra_Float4 data[_grStreamingTextureCBSize]; +}; + +/** + Struct defining the constant buffer for each cube streaming texture. + Use multiple calls to IStreamingTexture::GetConstantBuffer this struct (one call for each face). + */ +struct GraniteStreamingTextureCubeConstantBuffer +{ + #define _grStreamingTextureCubeCBSize 6 + GraniteStreamingTextureConstantBuffer data[_grStreamingTextureCubeCBSize]; +}; + +/** + Struct defining the constant buffer for each tileset. + Use ITileSet::GetConstantBuffer to fill this struct. +*/ +struct GraniteTilesetConstantBuffer +{ + #define _grTilesetCBSize 2 + gra_Float4x4 data[_grTilesetCBSize]; +}; + +/** + Utility struct used by the shaderlib to wrap up all required constant buffers needed to perform a VT lookup/sample. + */ +struct GraniteConstantBuffers +{ + GraniteTilesetConstantBuffer tilesetBuffer; + GraniteStreamingTextureConstantBuffer streamingTextureBuffer; +}; + +/** + Utility struct used by the shaderlib to wrap up all required constant buffers needed to perform a Cube VT lookup/sample. + */ +struct GraniteCubeConstantBuffers +{ + GraniteTilesetConstantBuffer tilesetBuffer; + GraniteStreamingTextureCubeConstantBuffer streamingTextureCubeBuffer; +}; + +/** + The Granite lookup data for the different sampling functions. +*/ + +// Granite lookup data for automatic mip level selecting sampling +struct GraniteLookupData +{ + gra_Float4 translationTableData; + gra_Float2 textureCoordinates; + gra_Float2 dX; + gra_Float2 dY; +}; + +// Granite lookup data for explicit level-of-detail sampling +struct GraniteLODLookupData +{ + gra_Float4 translationTableData; + gra_Float2 textureCoordinates; + float cacheLevel; +}; +//@IGNORE_END + +// public interface + +/* + END OF PUBLIC INTERFACE + Everything below this point should be treated as private to GraniteShaderLib.h +*/ + +//@INSERT_DEFINES +#define gra_TilesetBuffer grCB.tilesetBuffer +#define gra_TilesetBufferInternal tsCB.data[0] +#define gra_TilesetCacheBuffer tsCB.data[1] + +#define gra_StreamingTextureCB grCB.streamingTextureBuffer +#define gra_StreamingTextureCubeCB grCB.streamingTextureCubeBuffer + +#define gra_Transform grCB.streamingTextureBuffer.data[0] +#define gra_CubeTransform grCB.streamingTextureCubeBuffer.data + +#define gra_StreamingTextureTransform grSTCB.data[0] +#define gra_StreamingTextureInfo grSTCB.data[1] + +#define gra_NumLevels gra_StreamingTextureInfo.x +#define gra_AssetWidthRcp gra_StreamingTextureInfo.y +#define gra_AssetHeightRcp gra_StreamingTextureInfo.z + +#if GRA_ROW_MAJOR == 1 + + #define gra_TranslationTableBias gra_TilesetBufferInternal[0][0] + #define gra_MaxAnisotropyLog2 gra_TilesetBufferInternal[1][0] + #define gra_CalcMiplevelDeltaScale gra_Float2(gra_TilesetBufferInternal[2][0], gra_TilesetBufferInternal[3][0]) + #define gra_CalcMiplevelDeltaScaleX gra_TilesetBufferInternal[2][0] + #define gra_CalcMiplevelDeltaScaleY gra_TilesetBufferInternal[3][0] + #define gra_LodBiasPow2 gra_TilesetBufferInternal[0][1] + #define gra_TrilinearOffset gra_TilesetBufferInternal[0][2] + #define gra_TileContentInTiles gra_Float2(gra_TilesetBufferInternal[0][2], gra_TilesetBufferInternal[1][2]) + #define gra_Level0NumTilesX gra_TilesetBufferInternal[0][3] + #define gra_NumTilesYScale gra_TilesetBufferInternal[1][3] + #define gra_TextureMagic gra_TilesetBufferInternal[2][3] + #define gra_TextureId gra_TilesetBufferInternal[3][3] + + #define gra_RcpCacheInTiles(l) gra_Float2(gra_TilesetCacheBuffer[0][l], gra_TilesetCacheBuffer[1][l]) + #define gra_BorderPixelsRcpCache(l) gra_Float2(gra_TilesetCacheBuffer[2][l], gra_TilesetCacheBuffer[3][l]) + +#else + + #define gra_TranslationTableBias gra_TilesetBufferInternal[0][0] + #define gra_MaxAnisotropyLog2 gra_TilesetBufferInternal[0][1] + #define gra_CalcMiplevelDeltaScale gra_Float2(gra_TilesetBufferInternal[0][2], gra_TilesetBufferInternal[0][3]) + #define gra_CalcMiplevelDeltaScaleX gra_TilesetBufferInternal[0][2] + #define gra_CalcMiplevelDeltaScaleY gra_TilesetBufferInternal[0][3] + #define gra_LodBiasPow2 gra_TilesetBufferInternal[1][0] + #define gra_TrilinearOffset gra_TilesetBufferInternal[2][0] + #define gra_TileContentInTiles gra_Float2(gra_TilesetBufferInternal[2][0], gra_TilesetBufferInternal[2][1]) + #define gra_Level0NumTilesX gra_TilesetBufferInternal[3][0] + #define gra_NumTilesYScale gra_TilesetBufferInternal[3][1] + #define gra_TextureMagic gra_TilesetBufferInternal[3][2] + #define gra_TextureId gra_TilesetBufferInternal[3][3] + + #define gra_RcpCacheInTiles(l) gra_Float2(gra_TilesetCacheBuffer[l][0], gra_TilesetCacheBuffer[l][1]) + #define gra_BorderPixelsRcpCache(l) gra_Float2(gra_TilesetCacheBuffer[l][2], gra_TilesetCacheBuffer[l][3]) + +#endif + +#if (GRA_GLSL_120==1) + // Extension needed for texture2DLod + #extension GL_ARB_shader_texture_lod : enable + // Extensions needed fot texture2DGrad + #extension GL_EXT_gpu_shader4 : enable + // Extensions needed for bit manipulation + #extension GL_ARB_shader_bit_encoding : enable +#endif + + +#if (GRA_TEXTURE_ARRAY_SUPPORT==1) + gra_Float4 GranitePrivate_SampleArray(in GraniteCacheTexture tex, in gra_Float3 texCoord) + { + #if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + return tex.TextureArray.Sample(tex.Sampler, texCoord); + #elif (GRA_GLSL_330 == 1) + return texture(tex, texCoord); + #else + #error using unsupported function + #endif + } + + gra_Float4 GranitePrivate_SampleGradArray(in GraniteCacheTexture tex, in gra_Float3 texCoord, in gra_Float2 dX, in gra_Float2 dY) + { + #if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + return tex.TextureArray.SampleGrad(tex.Sampler,texCoord,dX,dY); + #elif (GRA_GLSL_330 == 1) + return textureGrad(tex, texCoord, dX, dY); + #else + #error using unsupported function + #endif + } + + gra_Float4 GranitePrivate_SampleLevelArray(in GraniteCacheTexture tex, in gra_Float3 texCoord, in float level) + { + #if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + return tex.TextureArray.SampleLevel(tex.Sampler, texCoord, level); + #elif (GRA_GLSL_330 == 1) + return textureLod(tex, texCoord, level); + #else + #error using unsupported function + #endif + } +#else + gra_Float4 GranitePrivate_Sample(in GraniteCacheTexture tex, in gra_Float2 texCoord) + { + #if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + return tex.Texture.Sample(tex.Sampler,texCoord); + #elif (GRA_HLSL_3 == 1) + return tex2D(tex,texCoord); + #elif (GRA_GLSL_120 == 1) || (GRA_GLSL_130 == 1) + return texture2D(tex, texCoord); + #elif (GRA_GLSL_330 == 1) + return texture(tex, texCoord); + #endif + } + + gra_Float4 GranitePrivate_SampleLevel(in GraniteCacheTexture tex, in gra_Float2 texCoord, in float level) + { + #if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + return tex.Texture.SampleLevel(tex.Sampler, texCoord, level); + #elif (GRA_HLSL_3 == 1) + return tex2Dlod(tex,gra_Float4(texCoord,0.0,level)); + #elif (GRA_GLSL_120 == 1) + return texture2DLod(tex, texCoord, level); + #elif (GRA_GLSL_130 == 1) || (GRA_GLSL_330 == 1) + return textureLod(tex, texCoord, level); + #endif + } + + gra_Float4 GranitePrivate_SampleGrad(in GraniteCacheTexture tex, in gra_Float2 texCoord, in gra_Float2 dX, in gra_Float2 dY) + { + #if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + return tex.Texture.SampleGrad(tex.Sampler,texCoord,dX,dY); + #elif (GRA_HLSL_3 == 1) + return tex2D(tex,texCoord,dX,dY); + #elif (GRA_GLSL_120 == 1) + return texture2DGrad(tex, texCoord, dX, dY); + #elif (GRA_GLSL_130 == 1) || (GRA_GLSL_330 == 1) + return textureGrad(tex, texCoord, dX, dY); + #endif + } +#endif //#if (GRA_TEXTURE_ARRAY_SUPPORT==1) + +#if (GRA_LOAD_INSTR==1) +gra_Float4 GranitePrivate_Load(in GraniteTranslationTexture tex, in gra_Int3 location) +{ +#if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + return tex.Texture.Load(location); +#elif (GRA_GLSL_130 == 1) || (GRA_GLSL_330 == 1) + return texelFetch(tex, location.xy, location.z); +#elif (GRA_HLSL_3 == 1) || (GRA_GLSL_120 == 1) + #error using unsupported function +#endif +} +#endif + +//work-around shader compiler bug +//compiler gets confused with GranitePrivate_SampleLevel taking a GraniteCacheTexture as argument when array support is disabled +//Without array support, GraniteCacheTexture and GraniteTranslationTexture are the same (but still different types!) +//compiler is confused (ERR_AMBIGUOUS_FUNCTION_CALL). Looks like somebody is over enthusiastic optimizing... +gra_Float4 GranitePrivate_SampleLevel_Translation(in GraniteTranslationTexture tex, in gra_Float2 texCoord, in float level) +{ +#if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + return tex.Texture.SampleLevel(tex.Sampler, texCoord, level); +#elif (GRA_HLSL_3 == 1) + return tex2Dlod(tex,gra_Float4(texCoord,0.0,level)); +#elif (GRA_GLSL_120 == 1) + return texture2DLod(tex, texCoord, level); +#elif (GRA_GLSL_130 == 1) || (GRA_GLSL_330 == 1) + return textureLod(tex, texCoord, level); +#endif +} + +float GranitePrivate_Saturate(in float value) +{ +#if GRA_HLSL_FAMILY + return saturate(value); +#elif GRA_GLSL_FAMILY + return clamp(value, 0.0f, 1.0f); +#endif +} + +#if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) || (GRA_GLSL_330 == 1) +uint GranitePrivate_FloatAsUint(float value) +{ +#if (GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) + return asuint(value); +#elif (GRA_GLSL_330 == 1) + return floatBitsToUint(value); +#endif +} +#endif + +float GranitePrivate_Pow2(int exponent) +{ +#if GRA_HLSL_FAMILY + return pow(2.0, exponent); +#else + return pow(2.0, float(exponent)); +#endif +} + +float GranitePrivate_Pow2(uint exponent) +{ +#if GRA_HLSL_FAMILY + return pow(2.0, exponent); +#else + return pow(2.0, float(exponent)); +#endif +} + +gra_Float2 GranitePrivate_RepeatUV(in gra_Float2 uv, in GraniteStreamingTextureConstantBuffer grSTCB) +{ + return frac(uv); +} + +gra_Float2 GranitePrivate_UdimUV(in gra_Float2 uv, in GraniteStreamingTextureConstantBuffer grSTCB) +{ + return uv; +} + +gra_Float2 GranitePrivate_ClampUV(in gra_Float2 uv, in GraniteStreamingTextureConstantBuffer grSTCB) +{ + gra_Float2 epsilon2 = gra_Float2(gra_AssetWidthRcp, gra_AssetHeightRcp); + return clamp(uv, epsilon2, gra_Float2(1,1) - epsilon2); +} + +gra_Float2 GranitePrivate_MirrorUV(in gra_Float2 uv, in GraniteStreamingTextureConstantBuffer grSTCB) +{ + gra_Float2 t = frac(uv*0.5)*2.0; + gra_Float2 l = gra_Float2(1.0,1.0); + return l-abs(t-l); +} + +// function definitons for private functions +gra_Float4 GranitePrivate_PackTileId(in gra_Float2 tileXY, in float level, in float textureID); + +gra_Float4 Granite_DebugPackedTileId64(in gra_Float4 PackedTile) +{ +#if GRA_64BIT_RESOLVER + gra_Float4 output; + + const float scale = 1.0f / 65535.0f; + gra_Float4 temp = PackedTile / scale; + + output.x = fmod(temp.x, 256.0f); + output.y = floor(temp.x / 256.0f) + fmod(temp.y, 16.0f) * 16.0f; + output.z = floor(temp.y / 16.0f); + output.w = temp.z + temp.a * 16.0f; + + return gra_Float4 + ( + (float)output.x / 255.0f, + (float)output.y / 255.0f, + (float)output.z / 255.0f, + (float)output.w / 255.0f + ); +#else + return PackedTile; +#endif +} + +gra_Float3 Granite_UnpackNormal(in gra_Float4 PackedNormal, float scale) +{ + gra_Float2 reconstructed = gra_Float2(PackedNormal.x * PackedNormal.a, PackedNormal.y) * 2.0f - 1.0f; + reconstructed *= scale; + float z = sqrt(1.0f - GranitePrivate_Saturate(dot(reconstructed, reconstructed))); + return gra_Float3(reconstructed, z); +} + +gra_Float3 Granite_UnpackNormal(in gra_Float4 PackedNormal) +{ + return Granite_UnpackNormal(PackedNormal, 1.0); +} + +#if GRA_HLSL_FAMILY +GraniteTilesetConstantBuffer Granite_ApplyResolutionOffset(in GraniteTilesetConstantBuffer INtsCB, in float resolutionOffsetPow2) +{ + GraniteTilesetConstantBuffer tsCB = INtsCB; + gra_LodBiasPow2 *= resolutionOffsetPow2; + //resolutionOffsetPow2 *= resolutionOffsetPow2; //Square it before multiplying it in below + gra_CalcMiplevelDeltaScaleX *= resolutionOffsetPow2; + gra_CalcMiplevelDeltaScaleY *= resolutionOffsetPow2; + return tsCB; +} + +GraniteTilesetConstantBuffer Granite_SetMaxAnisotropy(in GraniteTilesetConstantBuffer INtsCB, in float maxAnisotropyLog2) +{ + GraniteTilesetConstantBuffer tsCB = INtsCB; + gra_MaxAnisotropyLog2 = min(gra_MaxAnisotropyLog2, maxAnisotropyLog2); + return tsCB; +} +#else +void Granite_ApplyResolutionOffset(inout GraniteTilesetConstantBuffer tsCB, in float resolutionOffsetPow2) +{ + gra_LodBiasPow2 *= resolutionOffsetPow2; + //resolutionOffsetPow2 *= resolutionOffsetPow2; //Square it before multiplying it in below + gra_CalcMiplevelDeltaScaleX *= resolutionOffsetPow2; + gra_CalcMiplevelDeltaScaleY *= resolutionOffsetPow2; +} + +void Granite_SetMaxAnisotropy(inout GraniteTilesetConstantBuffer tsCB, in float maxAnisotropyLog2) +{ + gra_MaxAnisotropyLog2 = min(gra_MaxAnisotropyLog2, maxAnisotropyLog2); +} +#endif + +gra_Float2 Granite_Transform(in GraniteStreamingTextureConstantBuffer grSTCB, in gra_Float2 textureCoord) +{ + return textureCoord * gra_StreamingTextureTransform.zw + gra_StreamingTextureTransform.xy; +} + +gra_Float4 Granite_MergeResolveOutputs(in gra_Float4 resolve0, in gra_Float4 resolve1, in gra_Float2 pixelLocation) +{ + gra_Float2 screenPos = frac(pixelLocation * 0.5f); + bool dither = (screenPos.x != screenPos.y); + return (dither) ? resolve0 : resolve1; +} + +gra_Float4 Granite_PackTileId(in gra_Float4 unpackedTileID) +{ + return GranitePrivate_PackTileId(unpackedTileID.xy, unpackedTileID.z, unpackedTileID.w); +} + +#if (GRA_HLSL_5 == 1) +void Granite_DitherResolveOutput(in gra_Float4 resolve, in RWTexture2D resolveTexture, in gra_Float2 screenPos, in float alpha) +{ + const uint2 pixelPos = int2(screenPos); + const uint2 pixelLocation = pixelPos % GRA_RWTEXTURE2D_SCALE; + bool dither = (pixelLocation.x == 0) && (pixelLocation.y == 0); + uint2 writePos = pixelPos / GRA_RWTEXTURE2D_SCALE; + + if ( alpha == 0 ) + { + dither = false; + } + else if (alpha != 1.0) + { + // Do a 4x4 dither patern so alternating pixels resolve to the first or the second texture + gra_Float2 pixelLocationAlpha = frac(screenPos * 0.25f); // We don't scale after the frac so this will give coords 0, 0.25, 0.5, 0.75 + int pixelId = (int)(pixelLocationAlpha.y * 16 + pixelLocationAlpha.x * 4); //faster as a dot2 ? + + // Clamp + // This ensures that for example alpha=0.95 still resolves some tiles of the surfaces behind it + // and alpha=0.05 still resolves some tiles of this surface + alpha = min(max(alpha, 0.0625), 0.9375); + + // Modern hardware supports array indexing with per pixel varying indexes + // on old hardware this will be expanded to a conditional tree by the compiler + const float thresholdMaxtrix[16] = { 1.0f / 17.0f, 9.0f / 17.0f, 3.0f / 17.0f, 11.0f / 17.0f, + 13.0f / 17.0f, 5.0f / 17.0f, 15.0f / 17.0f, 7.0f / 17.0f, + 4.0f / 17.0f, 12.0f / 17.0f, 2.0f / 17.0f, 10.0f / 17.0f, + 16.0f / 17.0f, 8.0f / 17.0f, 14.0f / 17.0f, 6.0f / 17.0f}; + float threshold = thresholdMaxtrix[pixelId]; + + if (alpha < threshold) + { + dither = false; + } + } + + gra_Branch if (dither) + { +#if (GRA_PACK_RESOLVE_OUTPUT==0) + resolveTexture[writePos] = Granite_PackTileId(resolve); +#else + resolveTexture[writePos] = resolve; +#endif + } +} +#endif + +float GranitePrivate_CalcMiplevelAnisotropic(in GraniteTilesetConstantBuffer tsCB, in GraniteStreamingTextureConstantBuffer grSTCB, in gra_Float2 ddxTc, in gra_Float2 ddyTc) +{ + // Calculate the required mipmap level, this uses a similar + // formula as the GL spec. + // To reduce sqrt's and log2's we do some stuff in squared space here and further below in log space + // i.e. we wait with the sqrt untill we can do it for 'free' later during the log2 + + ddxTc *= gra_CalcMiplevelDeltaScale; + ddyTc *= gra_CalcMiplevelDeltaScale; + + float lenDxSqr = dot(ddxTc, ddxTc); + float lenDySqr = dot(ddyTc, ddyTc); + float dMaxSqr = max(lenDxSqr, lenDySqr); + float dMinSqr = min(lenDxSqr, lenDySqr); + + // Calculate mipmap levels directly from sqared distances. This uses log2(sqrt(x)) = 0.5 * log2(x) to save some sqrt's + float maxLevel = 0.5 * log2( dMaxSqr ); + float minLevel = 0.5 * log2( dMinSqr ); + + // Calculate the log2 of the anisotropy and clamp it by the max supported. This uses log2(a/b) = log2(a)-log2(b) and min(log(a),log(b)) = log(min(a,b)) + float anisoLog2 = maxLevel - minLevel; + anisoLog2 = min( anisoLog2, gra_MaxAnisotropyLog2 ); + + // Adjust for anisotropy & clamp to level 0 + float result = max(maxLevel - anisoLog2 - 0.5f, 0.0f); //Subtract 0.5 to compensate for trilinear mipmapping + + // Added clamping to avoid "hot pink" on small tilesets that try to sample past the 1x1 tile miplevel + // This happens if you for example import a relatively small texture and zoom out + return min(result, gra_NumLevels); +} + +float GranitePrivate_CalcMiplevelLinear(in GraniteTilesetConstantBuffer tsCB, in GraniteStreamingTextureConstantBuffer grSTCB, in gra_Float2 ddxTc, in gra_Float2 ddyTc) +{ + // Calculate the required mipmap level, this uses a similar + // formula as the GL spec. + // To reduce sqrt's and log2's we do some stuff in squared space here and further below in log space + // i.e. we wait with the sqrt untill we can do it for 'free' later during the log2 + + ddxTc *= gra_CalcMiplevelDeltaScale; + ddyTc *= gra_CalcMiplevelDeltaScale; + + float lenDxSqr = dot(ddxTc, ddxTc); + float lenDySqr = dot(ddyTc, ddyTc); + float dMaxSqr = max(lenDxSqr, lenDySqr); + + // Calculate mipmap levels directly from squared distances. This uses log2(sqrt(x)) = 0.5 * log2(x) to save some sqrt's + float maxLevel = 0.5 * log2(dMaxSqr) - 0.5f; //Subtract 0.5 to compensate for trilinear mipmapping + + return clamp(maxLevel, 0.0f, gra_NumLevels); +} + +gra_Float4 GranitePrivate_PackTileId(in gra_Float2 tileXY, in float level, in float textureID) +{ +#if GRA_64BIT_RESOLVER == 0 + gra_Float4 resultBits; + + resultBits.x = fmod(tileXY.x, 256.0f); + resultBits.y = floor(tileXY.x / 256.0f) + fmod(tileXY.y, 32.0f) * 8.0f; + resultBits.z = floor(tileXY.y / 32.0f) + fmod(level, 4.0f) * 64.0f; + resultBits.w = floor(level / 4.0f) + textureID * 4.0f; + + const float scale = 1.0f / 255.0f; + +#if GRA_BGRA == 0 + return scale * gra_Float4 + ( + float(resultBits.x), + float(resultBits.y), + float(resultBits.z), + float(resultBits.w) + ); +#else + return scale * gra_Float4 + ( + float(resultBits.z), + float(resultBits.y), + float(resultBits.x), + float(resultBits.w) + ); +#endif +#else + const float scale = 1.0f / 65535.0f; + return gra_Float4(tileXY.x, tileXY.y, level, textureID) * scale; +#endif + +} + +gra_Float4 GranitePrivate_UnpackTileId(in gra_Float4 packedTile) +{ + gra_Float4 swiz; +#if GRA_BGRA == 0 + swiz = packedTile; +#else + swiz = packedTile.zyxw; +#endif + swiz *= 255.0f; + + float tileX = swiz.x + fmod(swiz.y, 16.0f) * 256.0f; + float tileY = floor(swiz.y / 16.0f) + swiz.z * 16.0f; + float level = fmod(swiz.w, 16.0f); + float tex = floor(swiz.w / 16.0f); + + return gra_Float4(tileX, tileY, level, tex); +} + +gra_Float3 GranitePrivate_TranslateCoord(in GraniteTilesetConstantBuffer tsCB, in gra_Float2 inputTexCoord, in gra_Float4 translationData, in int layer, out gra_Float2 numPagesOnLevel) +{ +#if (GRA_FORCE_SM3 == 0) && ((GRA_HLSL_5 == 1) || (GRA_HLSL_4 == 1) || (GRA_GLSL_330 == 1)) + // The translation table contains uint32_t values so we have to get to the individual bits of the float data + uint data = GranitePrivate_FloatAsUint(translationData[layer]); + + // Slice Index: 7 bits, Cache X: 10 bits, Cache Y: 10 bits, Tile Level: 4 bits + uint slice = (data >> 24u) & 0x7Fu; + uint cacheX = (data >> 14u) & 0x3FFu; + uint cacheY = (data >> 4u) & 0x3FFu; + uint revLevel = data & 0xFu; +#else + // The translation table contains integer float values so we have to cast the float value to an int (which works up to 24-bit integer values) + int data = int(translationData[layer]); + + int slice = 0; + int cacheX = (data / 16384); + int cacheY = (data % 16384) / 16; + int revLevel = (data % 16); +#endif + + gra_Float2 numTilesOnLevel; + numTilesOnLevel.x = GranitePrivate_Pow2(revLevel); + numTilesOnLevel.y = numTilesOnLevel.x * gra_NumTilesYScale; + + gra_Float2 tileTexCoord = frac(inputTexCoord * numTilesOnLevel); + + gra_Float2 tileTexCoordCache = tileTexCoord * gra_TileContentInTiles + gra_Float2(cacheX, cacheY); + gra_Float3 final = gra_Float3(tileTexCoordCache * gra_RcpCacheInTiles(layer) + gra_BorderPixelsRcpCache(layer), slice); + + numPagesOnLevel = numTilesOnLevel * gra_TileContentInTiles * gra_RcpCacheInTiles(layer); + + return final; +} + +gra_Float4 GranitePrivate_DrawDebugTiles(in gra_Float4 sourceColor, in gra_Float2 textureCoord, in gra_Float2 numPagesOnLevel) +{ + // Calculate the border values + gra_Float2 cacheOffs = frac(textureCoord * numPagesOnLevel); + float borderTemp = max(cacheOffs.x, 1.0-cacheOffs.x); + borderTemp = max(max(cacheOffs.y, 1.0-cacheOffs.y), borderTemp); + float border = smoothstep(0.98, 0.99, borderTemp); + + // White + gra_Float4 borderColor = gra_Float4(1,1,1,1); + + //Lerp it over the source color + return lerp(sourceColor, borderColor, border); +} + +gra_Float4 GranitePrivate_MakeResolveOutput(in GraniteTilesetConstantBuffer tsCB, in gra_Float2 tileXY, in float level) +{ +#if GRA_PACK_RESOLVE_OUTPUT + return GranitePrivate_PackTileId(tileXY, level, gra_TextureId); +#else + return gra_Float4(tileXY, level, gra_TextureId); +#endif +} + +gra_Float4 GranitePrivate_ResolverPixel(in GraniteTilesetConstantBuffer tsCB, in gra_Float2 inputTexCoord, in float LOD) +{ + float level = floor(LOD + 0.5f); + + // Number of tiles on level zero + gra_Float2 level0NumTiles; + level0NumTiles.x = gra_Level0NumTilesX; + level0NumTiles.y = gra_Level0NumTilesX * gra_NumTilesYScale; + + // Calculate xy of the tiles to load + gra_Float2 virtualTilesUv = floor(inputTexCoord * level0NumTiles * pow(0.5, level)); + + return GranitePrivate_MakeResolveOutput(tsCB, virtualTilesUv, level); +} + +void GranitePrivate_CalculateCubemapCoordinates(in gra_Float3 inputTexCoord, in gra_Float3 dVx, in gra_Float3 dVy, in GraniteStreamingTextureCubeConstantBuffer transforms, out int faceIdx, out gra_Float2 texCoord, out gra_Float2 dX, out gra_Float2 dY) +{ + gra_Float2 contTexCoord; + gra_Float3 derivX; + gra_Float3 derivY; + + float majorAxis; + if (abs(inputTexCoord.z) >= abs(inputTexCoord.x) && abs(inputTexCoord.z) >= abs(inputTexCoord.y)) + { + // Z major axis + if(inputTexCoord.z < 0.0) + { + faceIdx = 5; + texCoord.x = -inputTexCoord.x; + } + else + { + faceIdx = 4; + texCoord.x = inputTexCoord.x; + } + texCoord.y = -inputTexCoord.y; + majorAxis = inputTexCoord.z; + + contTexCoord = gra_Float2(inputTexCoord.x, inputTexCoord.y); + derivX = gra_Float3(dVx.x, dVx.y, dVx.z); + derivY = gra_Float3(dVy.x, dVy.y, dVy.z); + } + else if (abs(inputTexCoord.y) >= abs(inputTexCoord.x)) + { + // Y major axis + if(inputTexCoord.y < 0.0) + { + faceIdx = 3; + texCoord.y = -inputTexCoord.z; + } + else + { + faceIdx = 2; + texCoord.y = inputTexCoord.z; + } + texCoord.x = inputTexCoord.x; + majorAxis = inputTexCoord.y; + + contTexCoord = gra_Float2(inputTexCoord.x, inputTexCoord.z); + derivX = gra_Float3(dVx.x, dVx.z, dVx.y); + derivY = gra_Float3(dVy.x, dVy.z, dVy.y); + } + else + { + // X major axis + if(inputTexCoord.x < 0.0) + { + faceIdx = 1; + texCoord.x = inputTexCoord.z; + } + else + { + faceIdx = 0; + texCoord.x = -inputTexCoord.z; + } + texCoord.y = -inputTexCoord.y; + majorAxis = inputTexCoord.x; + + contTexCoord = gra_Float2(inputTexCoord.z, inputTexCoord.y); + derivX = gra_Float3(dVx.z, dVx.y, dVx.x); + derivY = gra_Float3(dVy.z, dVy.y, dVy.x); + } + texCoord = (texCoord + majorAxis) / (2.0 * abs(majorAxis)); + +#if GRA_HQ_CUBEMAPPING + dX = /*contTexCoord **/ ((contTexCoord + derivX.xy) / ( 2.0 * (majorAxis + derivX.z)) - (contTexCoord / (2.0 * majorAxis))); + dY = /*contTexCoord **/ ((contTexCoord + derivY.xy) / ( 2.0 * (majorAxis + derivY.z)) - (contTexCoord / (2.0 * majorAxis))); +#else + dX = ((/*contTexCoord **/ derivX.xy) / (2.0 * abs(majorAxis))); + dY = ((/*contTexCoord **/ derivY.xy) / (2.0 * abs(majorAxis))); +#endif + + // Now scale the derivatives with the texture transform scale + dX *= transforms.data[faceIdx].data[0].zw; + dY *= transforms.data[faceIdx].data[0].zw; +} + +// Auto-level +void GranitePrivate_CalculateCubemapCoordinates(in gra_Float3 inputTexCoord, in GraniteStreamingTextureCubeConstantBuffer transforms, out int faceIdx, out gra_Float2 texCoord, out gra_Float2 dX, out gra_Float2 dY) +{ + gra_Float3 dVx = ddx(inputTexCoord); + gra_Float3 dVy = ddy(inputTexCoord); + + GranitePrivate_CalculateCubemapCoordinates(inputTexCoord, dVx, dVy, transforms, faceIdx, texCoord, dX, dY); +} + +gra_Float2 Granite_GetTextureDimensions(in GraniteStreamingTextureConstantBuffer grSTCB) +{ + return gra_Float2(1.0 / gra_AssetWidthRcp, 1.0 / gra_AssetHeightRcp); //TODO(ddebaets) use HLSL rcp here +} diff --git a/com.unity.render-pipelines.core/ShaderLibrary/GraniteShaderLibBase.h.meta b/com.unity.render-pipelines.core/ShaderLibrary/GraniteShaderLibBase.h.meta new file mode 100644 index 00000000000..916b7f92db2 --- /dev/null +++ b/com.unity.render-pipelines.core/ShaderLibrary/GraniteShaderLibBase.h.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: c5520328ccc5d6c4e8a923677cbb21cf +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index ffa042f2027..a1390126ac8 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -8,7 +8,7 @@ #if SHADER_API_PSSL #define GRA_NO_UNORM 1 #endif -#include "GraniteShaderLib3.cginc" +#include "VirtualTexturing.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" @@ -66,7 +66,7 @@ */ -#ifdef UNITY_VIRTUAL_TEXTURING +#if defined(UNITY_VIRTUAL_TEXTURING) && !defined(FORCE_VIRTUAL_TEXTURING_OFF) struct StackInfo { @@ -103,54 +103,32 @@ GraniteTilesetConstantBuffer GetConstantBuffer_##stackName() \ GraniteTilesetConstantBuffer graniteParamBlock; \ graniteParamBlock = _VTTilesetBuffer[idx]; \ \ - /* hack resolve scale into constant buffer here */\ graniteParamBlock.data[0][2][0] *= RESOLVE_SCALE_OVERRIDE.x; \ graniteParamBlock.data[0][3][0] *= RESOLVE_SCALE_OVERRIDE.y; \ \ return graniteParamBlock; \ } \ -StackInfo PrepareVT_##stackName(float2 uv)\ - {\ - GraniteStreamingTextureConstantBuffer textureParamBlock;\ - textureParamBlock.data[0] = stackName##_atlasparams[0];\ - textureParamBlock.data[1] = stackName##_atlasparams[1];\ -\ - GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ -\ - GraniteConstantBuffers grCB;\ - grCB.tilesetBuffer = graniteParamBlock;\ - grCB.streamingTextureBuffer = textureParamBlock;\ -\ - GraniteTranslationTexture translationTable;\ - translationTable.Texture = stackName##_transtab;\ - translationTable.Sampler = sampler##stackName##_transtab;\ -\ - StackInfo info;\ - GR_LOOKUP(grCB, translationTable, uv, info.lookupData, info.resolveOutput);\ - info.lookupDataLod = (GraniteLODLookupData)0; \ - return info;\ -} \ -StackInfo PrepareVTLod_##stackName(float2 uv, float mip) \ -{ \ - GraniteStreamingTextureConstantBuffer textureParamBlock;\ - textureParamBlock.data[0] = stackName##_atlasparams[0];\ - textureParamBlock.data[1] = stackName##_atlasparams[1];\ +StackInfo PrepareVT_##stackName(VtInputParameters par)\ +{\ + GraniteStreamingTextureConstantBuffer textureParamBlock;\ + textureParamBlock.data[0] = stackName##_atlasparams[0];\ + textureParamBlock.data[1] = stackName##_atlasparams[1];\ \ GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ \ - GraniteConstantBuffers grCB;\ - grCB.tilesetBuffer = graniteParamBlock;\ - grCB.streamingTextureBuffer = textureParamBlock;\ + GraniteConstantBuffers grCB;\ + grCB.tilesetBuffer = graniteParamBlock;\ + grCB.streamingTextureBuffer = textureParamBlock;\ \ - GraniteTranslationTexture translationTable;\ - translationTable.Texture = stackName##_transtab;\ - translationTable.Sampler = sampler##stackName##_transtab;\ + GraniteTranslationTexture translationTable;\ + translationTable.Texture = stackName##_transtab;\ + translationTable.Sampler = sampler##stackName##_transtab;\ \ StackInfo info;\ - GR_LOOKUP_LOD(grCB, translationTable, uv, mip, info.lookupDataLod, info.resolveOutput);\ - info.lookupData = (GraniteLookupData)0; \ + VirtualTexturingLookup(grCB, translationTable, par, info.lookupData, info.resolveOutput);\ return info;\ } + #define jj2(a, b) a##b #define jj(a, b) jj2(a, b) @@ -158,69 +136,31 @@ StackInfo PrepareVTLod_##stackName(float2 uv, float mip) \ TEXTURE2D_ARRAY(stackName##_c##layerIndex);\ SAMPLER(sampler##stackName##_c##layerIndex);\ \ -float4 SampleVT_##layerSamplerName(StackInfo info)\ -{\ - GraniteStreamingTextureConstantBuffer textureParamBlock;\ - textureParamBlock.data[0] = stackName##_atlasparams[0];\ - textureParamBlock.data[1] = stackName##_atlasparams[1];\ -\ - GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ -\ - GraniteConstantBuffers grCB;\ - grCB.tilesetBuffer = graniteParamBlock;\ - grCB.streamingTextureBuffer = textureParamBlock;\ -\ - GraniteCacheTexture cache;\ - cache.TextureArray = stackName##_c##layerIndex;\ - cache.Sampler = sampler##stackName##_c##layerIndex;\ -\ - float4 output;\ - Granite_Sample_HQ(grCB, info.lookupData, cache, layerIndex, output);\ - return output;\ -} \ -float3 SampleVT_Normal_##layerSamplerName(StackInfo info, float scale)\ -{\ - return Granite_UnpackNormal( jj(SampleVT_,layerSamplerName)( info ), scale ); \ -} \ -float4 SampleVTLod_##layerSamplerName(StackInfo info)\ +float4 SampleVT_##layerSamplerName(StackInfo info, int lodCalculation, int quality)\ {\ - GraniteStreamingTextureConstantBuffer textureParamBlock;\ - textureParamBlock.data[0] = stackName##_atlasparams[0];\ - textureParamBlock.data[1] = stackName##_atlasparams[1];\ + GraniteStreamingTextureConstantBuffer textureParamBlock;\ + textureParamBlock.data[0] = stackName##_atlasparams[0];\ + textureParamBlock.data[1] = stackName##_atlasparams[1];\ \ GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ \ - GraniteConstantBuffers grCB;\ - grCB.tilesetBuffer = graniteParamBlock;\ - grCB.streamingTextureBuffer = textureParamBlock;\ + GraniteConstantBuffers grCB;\ + grCB.tilesetBuffer = graniteParamBlock;\ + grCB.streamingTextureBuffer = textureParamBlock;\ \ GraniteCacheTexture cache;\ cache.TextureArray = stackName##_c##layerIndex;\ cache.Sampler = sampler##stackName##_c##layerIndex;\ \ float4 output;\ - Granite_Sample(grCB, info.lookupDataLod, cache, layerIndex, output);\ + VirtualTexturingSample(grCB.tilesetBuffer, info.lookupData, cache, layerIndex, lodCalculation, quality, output);\ return output;\ -} \ -float3 SampleVTLod_Normal_##layerSamplerName(StackInfo info, float scale)\ -{\ - return Granite_UnpackNormal( jj(SampleVTLod_,layerSamplerName)( info ), scale ); \ } #define DECLARE_STACK_RESOLVE(stackName)\ float4 ResolveVT_##stackName(float2 uv)\ {\ - GraniteStreamingTextureConstantBuffer textureParamBlock;\ - textureParamBlock.data[0] = stackName##_atlasparams[0];\ - textureParamBlock.data[1] = stackName##_atlasparams[1];\ -\ - GraniteTilesetConstantBuffer graniteParamBlock = GetConstantBuffer_##stackName(); \ -\ - GraniteConstantBuffers grCB;\ - grCB.tilesetBuffer = graniteParamBlock;\ - grCB.streamingTextureBuffer = textureParamBlock;\ -\ - return Granite_ResolverPixel_Anisotropic(grCB, uv);\ + return float4(0.0f,0.0f, 0.0f, 0.0f);\ } #define DECLARE_STACK(stackName, layer0SamplerName)\ @@ -249,12 +189,8 @@ float4 ResolveVT_##stackName(float2 uv)\ DECLARE_STACK_LAYER(stackName, layer2SamplerName,2)\ DECLARE_STACK_LAYER(stackName, layer3SamplerName,3) -#define PrepareStack(uv, stackName) PrepareVT_##stackName(uv) -#define PrepareStackLod(uv, stackName, mip) PrepareVTLod_##stackName(uv, mip) -#define SampleStack(info, textureName) SampleVT_##textureName(info) -#define SampleStackLod(info, textureName) SampleVTLod_##textureName(info) -#define SampleStackNormal(info, textureName, scale) (SampleVT_Normal_##textureName(info, scale)).xyz -#define SampleStackLodNormal(info, textureName, scale) SampleVTLod_Normal_##textureName(info, scale) +#define PrepareStack(inputParams, stackName) PrepareVT_##stackName(inputParams) +#define SampleStack(info, lodMode, quality, textureName) SampleVT_##textureName(info, lodMode, quality) #define GetResolveOutput(info) info.resolveOutput #define PackResolveOutput(output) Granite_PackTileId(output) #define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) @@ -264,6 +200,8 @@ float4 GetPackedVTFeedback(float4 feedback) return Granite_PackTileId(feedback); } +#define VIRTUAL_TEXTURING_SHADER_ENABLED + #else // Stacks amount to nothing when VT is off @@ -278,40 +216,37 @@ float4 GetPackedVTFeedback(float4 feedback) // and allows us to do things like function overloads,... struct StackInfo { - float2 uv; - float lod; + VtInputParameters vt; }; -StackInfo MakeStackInfo(float2 uv) +StackInfo MakeStackInfo(VtInputParameters vt) { StackInfo result; - result.uv = uv; - result.lod = 0; - return result; -} -StackInfo MakeStackInfoLod(float2 uv, float lod) -{ - StackInfo result; - result.uv = uv; - result.lod = lod; + result.vt = vt; return result; } // Prepare just passes the texture coord around -#define PrepareStack(uv, stackName) MakeStackInfo(uv) -#define PrepareStackLod(uv, stackName, mip) MakeStackInfoLod(uv, mip) +#define PrepareStack(inputParams, stackName) MakeStackInfo(inputParams) // Sample just samples the texture -#define SampleStack(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) -#define SampleStackNormal(info, texture) SAMPLE_TEXTURE2D(texture, sampler##texture, info.uv) - -#define SampleStackLod(info, texture) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) -#define SampleStackLodNormal(info, texture) SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.uv, info.lod) +#define SampleStack(info, lodMode, quality, texture) \ + (lodMode == VtLevel_Automatic) ?\ + SAMPLE_TEXTURE2D(texture, sampler##texture, info.vt.uv)\ + :( (lodMode == VtLevel_Lod) ?\ + SAMPLE_TEXTURE2D_LOD(texture, sampler##texture, info.vt.uv, info.vt.lodOrOffset)\ + :( (lodMode == VtLevel_Bias) ?\ + SAMPLE_TEXTURE2D_BIAS(texture, sampler##texture, info.vt.uv, info.vt.lodOrOffset)\ + :( /*(lodMode == /VtLevel_Derivatives)*/\ + SAMPLE_TEXTURE2D_GRAD(texture, sampler##texture, info.vt.uv, info.vt.dx, info.vt.dy)\ + ))); // Resolve does nothing #define GetResolveOutput(info) float4(1,1,1,1) #define ResolveStack(uv, stackName) float4(1,1,1,1) #define PackResolveOutput(output) output +#define GetPackedVTFeedback(feedback) feedback + #endif diff --git a/com.unity.render-pipelines.core/ShaderLibrary/VirtualTexturing.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/VirtualTexturing.hlsl new file mode 100644 index 00000000000..9b86e4df97c --- /dev/null +++ b/com.unity.render-pipelines.core/ShaderLibrary/VirtualTexturing.hlsl @@ -0,0 +1,206 @@ +#include "GraniteShaderLibBase.h" + +#define VtAddressMode_Wrap 0 +#define VtAddressMode_Clamp 1 +#define VtAddressMode_Udim 2 + +#define VtFilter_Anisotropic 0 + +#define VtLevel_Automatic 0 +#define VtLevel_Lod 1 +#define VtLevel_Bias 2 +#define VtLevel_Derivatives 3 + +#define VtUvSpace_Regular 0 +#define VtUvSpace_PreTransformed 1 + +#define VtSampleQuality_Low 0 +#define VtSampleQuality_High 1 + +struct VtInputParameters +{ + float2 uv; + float lodOrOffset; + float2 dx; + float2 dy; + int addressMode; + int filterMode; + int levelMode; + int uvMode; + int sampleQuality; +}; + +int VirtualTexturingLookup( + in GraniteConstantBuffers grCB, + in GraniteTranslationTexture translationTable, + in VtInputParameters input, + out GraniteLookupData graniteLookupData, + out float4 resolveResult +) +{ + GraniteStreamingTextureConstantBuffer grSTCB = grCB.streamingTextureBuffer; + GraniteTilesetConstantBuffer tsCB = grCB.tilesetBuffer; + + float2 texCoord = input.uv; + float2 dx; + float2 dy; + float mipLevel; //interger + + if (input.levelMode == VtLevel_Automatic) + { + dx = ddx(texCoord); + dy = ddy(texCoord); + } + else if (input.levelMode == VtLevel_Bias) + { + // We can't simply add the bias after the mip-calculation since the derivatives + // are also used when sampling the cache so make sure we apply bias by scaling derivatives + if ( input.sampleQuality == VtSampleQuality_High ) + { + float offsetPow2 = pow(2.0f, input.lodOrOffset); + dx = ddx(texCoord) * offsetPow2; + dy = ddy(texCoord) * offsetPow2; + } + // In low qauality we don't care about cache derivatives and will add the bias later + else + { + dx = ddx(texCoord); + dy = ddy(texCoord); + } + } + else if (input.levelMode == VtLevel_Derivatives) + { + dx = input.dx; + dy = input.dy; + } + else /*input.levelMode == VtLevel_Lod*/ + { + //gra_TrilinearOffset ensures we do round-nearest for no-trilinear and + //round-floor for trilinear. + float clampedLevel = clamp(input.lodOrOffset + gra_TrilinearOffset, 0.0f, gra_NumLevels); + mipLevel = floor(clampedLevel); + dx = float2(frac(clampedLevel), 0.0f); // trilinear blend ratio + dy = float2(0.0f,0.0f); + } + + // Transform the derivatives to atlas space if needed + if (input.uvMode == VtUvSpace_Regular && input.levelMode != VtLevel_Lod) + { + dx = gra_Transform.zw * dx; + dy = gra_Transform.zw * dy; + } + + if (input.levelMode != VtLevel_Lod) + { + mipLevel = GranitePrivate_CalcMiplevelAnisotropic(grCB.tilesetBuffer, grCB.streamingTextureBuffer, dx, dy); + + // Simply add it here derivatives are wrong from this point onwards but not used anymore + if ( input.sampleQuality == VtSampleQuality_Low && input.levelMode == VtLevel_Bias) + { + mipLevel += input.lodOrOffset; + } + + mipLevel = floor(mipLevel + 0.5f); //round nearest + } + + // Apply clamp/wrap mode if needed and transform into atlas space + // If the user passes in pre-transformed texture coords clamping and wrapping should be handled by the user + if (input.uvMode == VtUvSpace_Regular) + { + if (input.addressMode == VtAddressMode_Wrap) + { + texCoord = frac(input.uv); + } + else if (input.addressMode == VtAddressMode_Clamp) + { + float2 epsilon2 = float2(gra_AssetWidthRcp, gra_AssetHeightRcp); + texCoord = clamp(input.uv, epsilon2, float2(1,1) - epsilon2); + } + else if (input.addressMode == VtAddressMode_Udim) + { + // not modified (i.e outside of the 0-1 range, atlas transform below will take care of it) + texCoord = input.uv; + } + + texCoord = Granite_Transform(gra_StreamingTextureCB, texCoord); + } + + // calculate resolver data + float2 level0NumTiles = float2(gra_Level0NumTilesX, gra_Level0NumTilesX*gra_NumTilesYScale); + float2 virtualTilesUv = floor(texCoord * level0NumTiles * pow(0.5, mipLevel)); + resolveResult = GranitePrivate_MakeResolveOutput(tsCB, virtualTilesUv, mipLevel); + + float4 translationTableData; + if (input.levelMode != VtLevel_Lod) + { + // Look up the physical page indexes and the number of pages on the mipmap + // level of the page in the translation texture + // Note: this is equal for both anisotropic and linear sampling + // We could use a sample bias here for 'auto' mip level detection +#if (GRA_LOAD_INSTR==0) + translationTableData = GranitePrivate_SampleLevel_Translation(translationTable, texCoord, mipLevel); +#else + translationTableData = GranitePrivate_Load(translationTable, gra_Int3(virtualTilesUv, mipLevel)); +#endif + } + else + { + // Look up the physical page indexes and the number of pages on the mipmap + // level of the page in the translation texture + // Note: this is equal for both anisotropic and linear sampling + // We could use a sample bias here for 'auto' mip level detection +#if (GRA_LOAD_INSTR==0) + translationTableData = GranitePrivate_SampleLevel_Translation(translationTable, texCoord, mipLevel); +#else + translationTableData = GranitePrivate_Load(translationTable, gra_Int3(virtualTilesUv, mipLevel)); +#endif + } + + graniteLookupData.translationTableData = translationTableData; + graniteLookupData.textureCoordinates = texCoord; + graniteLookupData.dX = dx; + graniteLookupData.dY = dy; + + return 1; +} + +int VirtualTexturingSample( + in GraniteTilesetConstantBuffer tsCB, + in GraniteLookupData graniteLookupData, + in GraniteCacheTexture cacheTexture, + in int layer, + in int levelMode, + in int quality, + out float4 result) +{ + // Convert from pixels to [0-1] and look up in the physical page texture + float2 deltaScale; + float3 cacheCoord = GranitePrivate_TranslateCoord(tsCB, graniteLookupData.textureCoordinates, graniteLookupData.translationTableData, layer, deltaScale); + + if ( levelMode != VtLevel_Lod ) + { + if ( quality == VtSampleQuality_Low ) + { + // This leads to small artefacts at tile borders but is generally not noticable unless the texture + // is greatly magnified + result = GranitePrivate_SampleArray(cacheTexture, cacheCoord); + } + else /* quality == VtSampleQuality_High */ + { + deltaScale *= gra_LodBiasPow2; + + // Calculate the delta scale this works by first converting the [0-1] texcoord deltas to + // pixel deltas on the current mip level, then dividing by the cache size to convert to [0-1] cache deltas + float2 sampDeltaX = graniteLookupData.dX*deltaScale; + float2 sampDeltaY = graniteLookupData.dY*deltaScale; + + result = GranitePrivate_SampleGradArray(cacheTexture, cacheCoord, sampDeltaX, sampDeltaY); + } + } + else + { + result = GranitePrivate_SampleLevelArray(cacheTexture, cacheCoord, graniteLookupData.dX.x); + } + + return 1; +} diff --git a/com.unity.render-pipelines.core/ShaderLibrary/VirtualTexturing.hlsl.meta b/com.unity.render-pipelines.core/ShaderLibrary/VirtualTexturing.hlsl.meta new file mode 100644 index 00000000000..b1533e5f115 --- /dev/null +++ b/com.unity.render-pipelines.core/ShaderLibrary/VirtualTexturing.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6f22d4e29906d3c47892e0c92874b752 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template index b34e8cafd94..b50790b66d5 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template @@ -80,7 +80,6 @@ Pass //------------------------------------------------------------------------------------- $splice(DotsInstancedVars) - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #ifdef DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs index 435899c88a7..0338dfd4fd5 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs @@ -786,5 +786,10 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } + + public override bool SupportsVirtualTexturing() + { + return true; + } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs index 3a2d9a96fe5..cbd5fc79a06 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs @@ -797,5 +797,10 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } + + public override bool SupportsVirtualTexturing() + { + return true; + } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template index cfd65096eb2..1f425e0e4da 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template @@ -123,7 +123,6 @@ Pass #ifdef DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" #endif - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" @@ -371,7 +370,7 @@ Pass $DepthOffset: builtinData.depthOffset = surfaceDescription.DepthOffset; #if !defined(_SURFACE_TYPE_TRANSPARENT) - $SurfaceDescription.VTFeedback: builtinData.vtFeedback = surfaceDescription.VTFeedback; + $SurfaceDescription.VTPackedFeedback: builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback; #endif $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs index a00d74b704c..76932eb0261 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs @@ -902,5 +902,10 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } + + public override bool SupportsVirtualTexturing() + { + return true; + } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs index eb0f4b9afe1..26750c41981 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs @@ -1137,5 +1137,10 @@ public override void ValidateNode() base.ValidateNode(); } + + public override bool SupportsVirtualTexturing() + { + return true; + } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template index facfbb86db7..ae0ad7056c8 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template @@ -132,7 +132,6 @@ Pass #if !defined(SHADER_STAGE_RAY_TRACING) - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #ifdef DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" @@ -409,7 +408,7 @@ Pass //Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define) //We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved //This is a limitation of the current MRT approach. - $SurfaceDescription.VTFeedback: builtinData.vtFeedback = surfaceDescription.VTFeedback; + $SurfaceDescription.VTPackedFeedback: builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback; $DepthOffset: builtinData.depthOffset = surfaceDescription.DepthOffset; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template index 19cdf9b5769..77b51f6e4fb 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template @@ -92,7 +92,6 @@ Pass //------------------------------------------------------------------------------------- $splice(DotsInstancedVars) - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #ifdef DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" @@ -240,7 +239,7 @@ $include("SharedCode.template.hlsl") $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; #if !defined(_SURFACE_TYPE_TRANSPARENT) - $SurfaceDescription.VTFeedback: builtinData.vtFeedback = surfaceDescription.VTFeedback; + $SurfaceDescription.VTPackedFeedback: builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback; #endif PostInitBuiltinData(V, posInput, surfaceData, builtinData); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs index 83d0ececc71..0a774362533 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs @@ -1427,5 +1427,10 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } + + public override bool SupportsVirtualTexturing() + { + return true; + } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template index bdd8ad0d56e..41080a13f3f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template @@ -288,7 +288,6 @@ Pass #define DISABLE_MODIFY_BAKED_DIFFUSE_LIGHTING #endif - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #ifdef DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl" @@ -571,7 +570,7 @@ $include("SharedCode.template.hlsl") $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; #if !defined(_SURFACE_TYPE_TRANSPARENT) - $SurfaceDescription.VTFeedback: builtinData.vtFeedback = surfaceDescription.VTFeedback; + $SurfaceDescription.VTPackedFeedback: builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback; #endif $DepthOffset: builtinData.depthOffset = surfaceDescription.DepthOffset; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs index 13f68642558..09a37791308 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs @@ -498,5 +498,10 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } + + public override bool SupportsVirtualTexturing() + { + return true; + } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template index f45de7365a1..c434f285bd6 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template @@ -60,7 +60,6 @@ Pass $splice(ShaderStages) #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" @@ -228,7 +227,7 @@ $include("SharedCode.template.hlsl") $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; #if !defined(_SURFACE_TYPE_TRANSPARENT) - $SurfaceDescription.VTFeedback: builtinData.vtFeedback = surfaceDescription.VTFeedback; + $SurfaceDescription.VTPackedFeedback: builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback; #endif #if (SHADERPASS == SHADERPASS_DISTORTION) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template index 6cdf37d0994..7fdaed909f4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template @@ -43,7 +43,6 @@ Pass #pragma fragment Frag #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" @@ -142,7 +141,7 @@ $include("SharedCode.template.hlsl") builtinData.opacity = surfaceDescription.Alpha; #if !defined(_SURFACE_TYPE_TRANSPARENT) - $SurfaceDescription.VTFeedback: builtinData.vtFeedback = surfaceDescription.VTFeedback; + $SurfaceDescription.VTPackedFeedback: builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback; #endif } diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs index f80875fd754..74d4a38caa4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs @@ -601,6 +601,10 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass ShaderGraphRequirementsPerKeyword vertexRequirements = new ShaderGraphRequirementsPerKeyword(); ShaderGraphRequirementsPerKeyword graphRequirements = new ShaderGraphRequirementsPerKeyword(); + // Include Registry tracks includes to remove duplicates, it wraps a string builder that stores the combined function string + ShaderStringBuilder graphIncludes = new ShaderStringBuilder(); + var includeRegistry = new IncludeRegistry(graphIncludes); + // Function Registry tracks functions to remove duplicates, it wraps a string builder that stores the combined function string ShaderStringBuilder graphNodeFunctions = new ShaderStringBuilder(); graphNodeFunctions.IncreaseIndent(); @@ -705,6 +709,7 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass masterNode, masterNode.owner as GraphData, pixelGraphEvalFunction, + includeRegistry, functionRegistry, sharedProperties, sharedKeywords, @@ -736,6 +741,7 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass SubShaderGenerator.GenerateVertexDescriptionFunction( masterNode.owner as GraphData, vertexGraphEvalFunction, + includeRegistry, functionRegistry, sharedProperties, sharedKeywords, @@ -898,6 +904,9 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass // build graph code var graph = new ShaderGenerator(); { + graph.AddShaderChunk("// Graph includes"); + graph.AddShaderChunk(graphIncludes.ToString()); + graph.AddShaderChunk("// Shared Graph Properties (uniform inputs)"); graph.AddShaderChunk(shaderPropertyUniforms.ToString()); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs index 9e86cfd3000..8f509c44b23 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs @@ -61,8 +61,8 @@ public struct BuiltinData [SurfaceDataAttributes("Depth Offset")] public float depthOffset; // define the depth in unity unit to add in Z forward direction - [SurfaceDataAttributes("VTFeedback", precision = FieldPrecision.Real)] - public Vector4 vtFeedback; + [SurfaceDataAttributes("VT Packed Feedback", precision = FieldPrecision.Real)] + public Vector4 vtPackedFeedback; }; //----------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl index 4044d2bd278..4a8d619f1c1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl @@ -20,7 +20,7 @@ #define DEBUGVIEW_BUILTIN_BUILTINDATA_DISTORTION_BLUR (110) #define DEBUGVIEW_BUILTIN_BUILTINDATA_RENDERING_LAYERS (111) #define DEBUGVIEW_BUILTIN_BUILTINDATA_DEPTH_OFFSET (112) -#define DEBUGVIEW_BUILTIN_BUILTINDATA_VTFEEDBACK (113) +#define DEBUGVIEW_BUILTIN_BUILTINDATA_VT_PACKED_FEEDBACK (113) // Generated from UnityEngine.Rendering.HighDefinition.Builtin+BuiltinData // PackingRules = Exact @@ -39,7 +39,7 @@ struct BuiltinData real distortionBlur; uint renderingLayers; float depthOffset; - real4 vtFeedback; + real4 vtPackedFeedback; }; // Generated from UnityEngine.Rendering.HighDefinition.Builtin+LightTransportData @@ -98,8 +98,8 @@ void GetGeneratedBuiltinDataDebug(uint paramId, BuiltinData builtindata, inout f case DEBUGVIEW_BUILTIN_BUILTINDATA_DEPTH_OFFSET: result = builtindata.depthOffset.xxx; break; - case DEBUGVIEW_BUILTIN_BUILTINDATA_VTFEEDBACK: - result = builtindata.vtFeedback.xyz; + case DEBUGVIEW_BUILTIN_BUILTINDATA_VT_PACKED_FEEDBACK: + result = builtindata.vtPackedFeedback.xyz; break; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index a054288c7df..b2bcca8b265 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -11,10 +11,6 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/VolumeRendering.hlsl" -#ifdef UNITY_VIRTUAL_TEXTURING -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" -#endif - //----------------------------------------------------------------------------- // Configuration //----------------------------------------------------------------------------- @@ -653,7 +649,7 @@ void EncodeIntoGBuffer( SurfaceData surfaceData #endif #ifdef UNITY_VIRTUAL_TEXTURING - OUT_GBUFFER_VTFEEDBACK = GetPackedVTFeedback(builtinData.vtFeedback); + OUT_GBUFFER_VTFEEDBACK = builtinData.vtPackedFeedback; #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index 3645a2b3ae8..0426c5ce4c1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -16,7 +16,7 @@ enum ShaderVariantLogLevel /// High Definition Render Pipeline asset. /// [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "HDRP-Asset" + Documentation.endURL)] - public partial class HDRenderPipelineAsset : RenderPipelineAsset + public partial class HDRenderPipelineAsset : RenderPipelineAsset, IVirtualTexturingEnabledRenderPipeline { HDRenderPipelineAsset() @@ -371,5 +371,8 @@ internal bool AddDiffusionProfile(DiffusionProfileSettings profile) } } #endif + + // Implement IVirtualTexturingEnabledRenderPipeline + public bool virtualTexturingEnabled { get { return true; } } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl index 55545fd28ed..9edc5621e72 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl @@ -60,10 +60,6 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/TessellationShare.hlsl" #endif -#ifdef UNITY_VIRTUAL_TEXTURING -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" -#endif - #ifdef UNITY_VIRTUAL_TEXTURING #define VT_BUFFER_TARGET SV_Target1 #define EXTRA_BUFFER_TARGET SV_Target2 @@ -250,6 +246,6 @@ void Frag(PackedVaryingsToPS packedInput, #endif #ifdef UNITY_VIRTUAL_TEXTURING - outVTFeedback = GetPackedVTFeedback(builtinData.vtFeedback); + outVTFeedback = builtinData.vtPackedFeedback; #endif } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl index 28e468c9b50..2b5fe734c0c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl @@ -2,10 +2,6 @@ #error SHADERPASS_is_not_correctly_define #endif -#ifdef UNITY_VIRTUAL_TEXTURING -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" -#endif - #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl" PackedVaryingsType Vert(AttributesMesh inputMesh) @@ -105,6 +101,6 @@ void Frag(PackedVaryingsToPS packedInput, outResult = outColor; #ifdef UNITY_VIRTUAL_TEXTURING - outVTFeedback = GetPackedVTFeedback(builtinData.vtFeedback); + outVTFeedback = builtinData.vtPackedFeedback; #endif } diff --git a/com.unity.render-pipelines.high-definition/package.json b/com.unity.render-pipelines.high-definition/package.json index 079b777f77c..39613565aea 100644 --- a/com.unity.render-pipelines.high-definition/package.json +++ b/com.unity.render-pipelines.high-definition/package.json @@ -3,7 +3,7 @@ "description": "The High Definition Render Pipeline (HDRP) is a high-fidelity Scriptable Render Pipeline built by Unity to target modern (Compute Shader compatible) platforms. HDRP utilizes Physically-Based Lighting techniques, linear lighting, HDR lighting, and a configurable hybrid Tile/Cluster deferred/Forward lighting architecture and gives you the tools you need to create games, technical demos, animations, and more to a high graphical standard.", "version": "9.0.0-preview.0", "unity": "2020.1", - "unityRelease": "0a23", + "unityRelease": "0b1", "displayName": "High Definition RP", "dependencies": { "com.unity.render-pipelines.core": "9.0.0-preview.0", diff --git a/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl b/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl index 6c5f328c58b..d8a05e0c0bd 100644 --- a/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl +++ b/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl @@ -1,6 +1,10 @@ #ifndef UNIVERSAL_PIPELINE_CORE_INCLUDED #define UNIVERSAL_PIPELINE_CORE_INCLUDED +// VT is not supported in URP (for now) this ensures any shaders using the VT +// node work by falling to regular texture sampling. +#define FORCE_VIRTUAL_TEXTURING_OFF 1 + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Version.hlsl" diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index f714e56e7cc..d0a81d22923 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] ### Added +- Added new graph nodes that allow sampling Virtual Textures - Added samples for Procedural Patterns to the package. - You can now use the right-click context menu to delete Sticky Notes. - You can now save your graph as a new Asset. diff --git a/com.unity.shadergraph/Editor/CodeGen/GenerationUtils.cs b/com.unity.shadergraph/Editor/CodeGen/GenerationUtils.cs index 2f78fc64748..86e643ad820 100644 --- a/com.unity.shadergraph/Editor/CodeGen/GenerationUtils.cs +++ b/com.unity.shadergraph/Editor/CodeGen/GenerationUtils.cs @@ -61,6 +61,10 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, ShaderPas var pixelSlots = FindMaterialSlotsOnNode(pass.pixelPorts, masterNode); var vertexSlots = FindMaterialSlotsOnNode(pass.vertexPorts, masterNode); + // Include Registry + var includeBuilder = new ShaderStringBuilder(); + var includeRegistry = new IncludeRegistry(includeBuilder); + // Function Registry var functionBuilder = new ShaderStringBuilder(); var functionRegistry = new FunctionRegistry(functionBuilder); @@ -179,6 +183,7 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, ShaderPas SubShaderGenerator.GenerateVertexDescriptionFunction( masterNode.owner as GraphData, vertexGraphFunctionBuilder, + includeRegistry, functionRegistry, propertyCollector, keywordCollector, @@ -229,6 +234,7 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, ShaderPas masterNode, masterNode.owner as GraphData, pixelGraphFunctionBuilder, + includeRegistry, functionRegistry, propertyCollector, keywordCollector, @@ -295,6 +301,13 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, ShaderPas spliceCommands.Add("GraphPixel", pixelBuilder.ToCodeBlack()); } + // -------------------------------------------------- + // Graph Includes + + if(includeBuilder.length == 0) + includeBuilder.AppendLine("// GraphIncludes: "); + spliceCommands.Add("GraphIncludes", includeBuilder.ToCodeBlack()); + // -------------------------------------------------- // Graph Functions diff --git a/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs b/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs index cf8f4f8b31f..b667864c87a 100644 --- a/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs +++ b/com.unity.shadergraph/Editor/CodeGen/SubShaderGenerator.cs @@ -69,6 +69,9 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial var shaderKeywordDeclarations = new ShaderStringBuilder(); var shaderKeywordPermutations = new ShaderStringBuilder(1); + var includeBuilder = new ShaderStringBuilder(); + var includeRegistry = new IncludeRegistry(includeBuilder); + var functionBuilder = new ShaderStringBuilder(); var functionRegistry = new FunctionRegistry(functionBuilder); @@ -196,6 +199,7 @@ public static GenerationResults GetShader(this GraphData graph, AbstractMaterial node, graph, surfaceDescriptionFunction, + includeRegistry, functionRegistry, shaderProperties, shaderKeywords, @@ -374,6 +378,7 @@ public static void GenerateSurfaceDescriptionFunction( AbstractMaterialNode rootNode, GraphData graph, ShaderStringBuilder surfaceDescriptionFunction, + IncludeRegistry includeRegistry, FunctionRegistry functionRegistry, PropertyCollector shaderProperties, KeywordCollector shaderKeywords, @@ -395,11 +400,12 @@ public static void GenerateSurfaceDescriptionFunction( surfaceDescriptionFunction.AppendLine("{0} surface = ({0})0;", surfaceDescriptionName); for(int i = 0; i < nodes.Count; i++) { - GenerateDescriptionForNode(nodes[i], keywordPermutationsPerNode[i], functionRegistry, surfaceDescriptionFunction, + GenerateDescriptionForNode(nodes[i], keywordPermutationsPerNode[i], includeRegistry, functionRegistry, surfaceDescriptionFunction, shaderProperties, shaderKeywords, graph, mode); } + includeRegistry.builder.currentNode = null; functionRegistry.builder.currentNode = null; surfaceDescriptionFunction.currentNode = null; @@ -413,6 +419,7 @@ public static void GenerateSurfaceDescriptionFunction( static void GenerateDescriptionForNode( AbstractMaterialNode activeNode, List keywordPermutations, + IncludeRegistry includeRegistry, FunctionRegistry functionRegistry, ShaderStringBuilder descriptionFunction, PropertyCollector shaderProperties, @@ -420,13 +427,19 @@ static void GenerateDescriptionForNode( GraphData graph, GenerationMode mode) { + if (activeNode is IGeneratesInclude includeNode) + { + includeRegistry.builder.currentNode = activeNode; + includeNode.GenerateNodeInclude(includeRegistry, mode); + } + if (activeNode is IGeneratesFunction functionNode) { functionRegistry.builder.currentNode = activeNode; functionNode.GenerateNodeFunction(functionRegistry, mode); functionRegistry.builder.ReplaceInCurrentMapping(PrecisionUtil.Token, activeNode.concretePrecision.ToShaderString()); } - + if (activeNode is IGeneratesBodyCode bodyNode) { if(keywordPermutations != null) @@ -516,6 +529,7 @@ public static void GenerateVertexDescriptionStruct(ShaderStringBuilder builder, public static void GenerateVertexDescriptionFunction( GraphData graph, ShaderStringBuilder builder, + IncludeRegistry includeRegistry, FunctionRegistry functionRegistry, PropertyCollector shaderProperties, KeywordCollector shaderKeywords, @@ -539,11 +553,12 @@ public static void GenerateVertexDescriptionFunction( builder.AppendLine("{0} description = ({0})0;", graphOutputStructName); for(int i = 0; i < nodes.Count; i++) { - GenerateDescriptionForNode(nodes[i], keywordPermutationsPerNode[i], functionRegistry, builder, + GenerateDescriptionForNode(nodes[i], keywordPermutationsPerNode[i], includeRegistry, functionRegistry, builder, shaderProperties, shaderKeywords, graph, mode); } + includeRegistry.builder.currentNode = null; functionRegistry.builder.currentNode = null; builder.currentNode = null; diff --git a/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesFunction.cs.meta b/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesFunction.cs.meta index c2800954837..77333ef0f67 100644 --- a/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesFunction.cs.meta +++ b/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesFunction.cs.meta @@ -1,8 +1,11 @@ fileFormatVersion: 2 guid: cd53f18c76af5ab40bad30c1af8e06a0 MonoImporter: + externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs b/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs new file mode 100644 index 00000000000..92cc0b7d587 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs @@ -0,0 +1,7 @@ +namespace UnityEditor.ShaderGraph +{ + interface IGeneratesInclude + { + void GenerateNodeInclude(IncludeRegistry registry, GenerationMode generationMode); + } +} diff --git a/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs.meta b/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs.meta new file mode 100644 index 00000000000..4f5151a70da --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fbd98c96da729b24ea19fdfd3ba3196a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs index 95ee3fcecef..24a3bb6c582 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs @@ -237,5 +237,12 @@ public NeededCoordinateSpace RequiresTangent(ShaderStageCapability stageCapabili } return validSlots.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresTangent(stageCapability)); } + + public override bool SupportsVirtualTexturing() + { + // This means if a render pipeline clams to support vt it at least needs to support the PBRMasterNode with VT + var vtRp = UnityEngine.Rendering.GraphicsSettings.currentRenderPipeline as UnityEngine.Rendering.IVirtualTexturingEnabledRenderPipeline; + return (vtRp != null) && vtRp.virtualTexturingEnabled; + } } } diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs index 9a10987cd48..b4c957bf68d 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs @@ -173,5 +173,12 @@ public NeededCoordinateSpace RequiresTangent(ShaderStageCapability stageCapabili } return validSlots.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresTangent(stageCapability)); } + + public override bool SupportsVirtualTexturing() + { + // This means if a render pipeline clams to support vt it at least needs to support the PBRMasterNode with VT + var vtRp = UnityEngine.Rendering.GraphicsSettings.currentRenderPipeline as UnityEngine.Rendering.IVirtualTexturingEnabledRenderPipeline; + return (vtRp != null) && vtRp.virtualTexturingEnabled; + } } } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/IMasterNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/IMasterNode.cs index f6e807ef5c0..da7336dd4ef 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/IMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/IMasterNode.cs @@ -8,6 +8,7 @@ interface IMasterNode { string GetShader(GenerationMode mode, string name, out List configuredTextures, List sourceAssetDependencyPaths = null); bool IsPipelineCompatible(RenderPipelineAsset renderPipelineAsset); + bool SupportsVirtualTexturing(); int GetPreviewPassIndex(); void ProcessPreviewMaterial(Material material); } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index da982b87727..5023249698e 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -4,48 +4,94 @@ using System.Collections.Generic; using System; using System.Globalization; -using UnityEditor.ShaderGraph.Drawing.Controls; +using UnityEditor.ShaderGraph.Drawing; using UnityEditor.ShaderGraph.Internal; using UnityEditor.Rendering; using UnityEngine.UIElements; -using UnityEditor.ShaderGraph.Drawing; using UnityEditor.Graphing.Util; +using UnityEngine.Rendering; namespace UnityEditor.ShaderGraph { - [Title("Input", "Texture", "Sample VT Stack")] + [Title("Input", "Texture", SampleTextureStackNode.DefaultNodeTitle)] [FormerName("UnityEditor.ShaderGraph.SampleTextureStackNodeBase")] [FormerName("UnityEditor.ShaderGraph.SampleTextureStackNode2")] [FormerName("UnityEditor.ShaderGraph.SampleTextureStackNode3")] [FormerName("UnityEditor.ShaderGraph.SampleTextureStackNode4")] - class SampleTextureStackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV, IHasSettings + class SampleTextureStackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV, IHasSettings, IGeneratesInclude, IMayRequireTime { + public const string DefaultNodeTitle = "Sample VT Stack"; + public const int UVInputId = 0; [NonSerialized] public readonly int[] OutputSlotIds = new int[] { 1, 2, 3, 4 }; [NonSerialized] - public readonly int [] TextureInputIds = new int[] { 5, 6, 7, 8 }; + public readonly int[] TextureInputIds = new int[] { 5, 6, 7, 8 }; public const int FeedbackSlotId = 9; public const int LODInputId = 10; + public const int BiasInputId = 11; + public const int DxInputId = 12; + public const int DyInputId = 13; static string[] OutputSlotNames = { "Out", "Out2", "Out3", "Out4" }; static string[] TextureInputNames = { "Texture", "Texture2", "Texture3", "Texture4" }; const string UVInputNAme = "UV"; const string FeedbackSlotName = "Feedback"; const string LODSlotName = "Lod"; + const string BiasSlotName = "Bias"; + const string DxSlotName = "Dx"; + const string DySlotName = "Dy"; public override bool hasPreview { get { return false; } } bool isProcedural;// set internally only + // Keep these in sync with "VirtualTexturing.hlsl" public enum LodCalculation { - Automatic, - Explicit, - //Biased, //TODO: Add support to TextureStack.hlsl first + [InspectorName("Automatic")] + VtLevel_Automatic = 0, + [InspectorName("Lod Level")] + VtLevel_Lod = 1, + [InspectorName("Lod Bias")] + VtLevel_Bias = 2, + [InspectorName("Derivatives")] + VtLevel_Derivatives = 3 + } + + public enum AddresMode + { + [InspectorName("Wrap")] + VtAddressMode_Wrap = 0, + [InspectorName("Clamp")] + VtAddressMode_Clamp = 1, + [InspectorName("Udim")] + VtAddressMode_Udim = 2 + } + + public enum FilterMode + { + [InspectorName("Anisotropic")] + VtFilter_Anisotropic = 0 + } + + public enum UvSpace + { + [InspectorName("Regular")] + VtUvSpace_Regular = 0, + [InspectorName("Pre Transformed")] + VtUvSpace_PreTransformed = 1 + } + + public enum QualityMode + { + [InspectorName("Low")] + VtSampleQuality_Low = 0, + [InspectorName("High")] + VtSampleQuality_High = 1 } [SerializeField] - LodCalculation m_LodCalculation = LodCalculation.Automatic; + LodCalculation m_LodCalculation = LodCalculation.VtLevel_Automatic; public LodCalculation lodCalculation { get @@ -63,6 +109,24 @@ public LodCalculation lodCalculation } } + [SerializeField] + QualityMode m_SampleQuality = QualityMode.VtSampleQuality_High; + public QualityMode sampleQuality + { + get + { + return m_SampleQuality; + } + set + { + if (m_SampleQuality == value) + return; + + m_SampleQuality = value; + Dirty(ModificationScope.Node); + } + } + [SerializeField] int m_NumSlots = 1; @@ -108,6 +172,26 @@ public bool noFeedback } } + [SerializeField] + string m_StackName = ""; + + public string stackName + { + get + { + return m_StackName; + } + set + { + if (m_StackName == value) + return; + + m_StackName = value; + UpdateNodeAfterDeserialization(); + Dirty(ModificationScope.Topological); + } + } + [SerializeField] protected TextureType[] m_TextureTypes = { TextureType.Default, TextureType.Default, TextureType.Default, TextureType.Default }; @@ -129,6 +213,57 @@ public NormalMapSpace normalMapSpace } } + protected string CleanupStackName(string name) + { + // Procedural stacks allow sharing the same name. This means they will sample the same data as well. + // This also allows sampling the same stack both from VS and PS. + + if (isProcedural) return name; + + // Make sure there is no other node with the same name + // if there is patch the current name by adding "_" so it's unique + var stacks = owner.GetNodes(); + int tries = stacks.Count(); + + for (int i = 0; i < tries; i++) + { + bool conflict = false; + foreach (var node in stacks) + { + if (node == this) continue; + // Check if the names as emitted in the shader will clash + if (node.GetStackName() == this.ProcessStackName(name) ) + { + conflict = true; + break; + } + } + if (!conflict) + { + return name; + } + // Try again to find a free one + name = name + "_"; + } + + return name; + } + + /* + True if the masternode of the graph this node is currently in supports virtual texturing. + */ + private bool supportedByMasterNode + { + get + { + var masterNode = owner?.GetNodes().FirstOrDefault(); + return masterNode?.SupportsVirtualTexturing() ?? false; + } + } + + /* + The panel behind the cogweel node settings + */ class TextureStackNodeSettingsView : VisualElement { SampleTextureStackNode m_Node; @@ -138,12 +273,54 @@ public TextureStackNodeSettingsView(SampleTextureStackNode node) PropertySheet ps = new PropertySheet(); + ps.Add(new PropertyRow(new Label("Stack Name")), (row) => + { + row.Add(new IdentifierField(), (field) => + { + field.value = m_Node.stackName; + field.isDelayed = true; + field.RegisterValueChangedCallback(evt => + { + var clean = m_Node.CleanupStackName(evt.newValue); + if (m_Node.stackName == clean) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Stack Name Change"); + m_Node.stackName = (string)clean; + field.SetValueWithoutNotify(m_Node.stackName);// Make sure the cleaned up name is used + }); + }); + }); + ps.Add(new PropertyRow(new Label("Lod Mode")), (row) => { row.Add(new UIElements.EnumField(m_Node.lodCalculation), (field) => { field.value = m_Node.lodCalculation; - field.RegisterValueChangedCallback(ChangeLod); + field.RegisterValueChangedCallback(evt => + { + if (m_Node.lodCalculation == (LodCalculation)evt.newValue) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Lod Mode Change"); + m_Node.lodCalculation = (LodCalculation)evt.newValue; + }); + }); + }); + + ps.Add(new PropertyRow(new Label("Quality")), (row) => + { + row.Add(new UIElements.EnumField(m_Node.sampleQuality), (field) => + { + field.value = m_Node.sampleQuality; + field.RegisterValueChangedCallback(evt => + { + if (m_Node.sampleQuality == (QualityMode)evt.newValue) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Quality Change"); + m_Node.sampleQuality = (QualityMode)evt.newValue; + }); }); }); @@ -152,28 +329,52 @@ public TextureStackNodeSettingsView(SampleTextureStackNode node) row.Add(new UIElements.IntegerField(), (field) => { field.value = m_Node.numSlots; - field.RegisterValueChangedCallback(ChangeNumSlots); + field.isDelayed = true; + field.RegisterValueChangedCallback(evt => + { + if (Equals(m_Node.numSlots, evt.newValue)) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("NumSlots Flow Change"); + m_Node.numSlots = evt.newValue; + field.SetValueWithoutNotify(m_Node.numSlots);//This may be clamped + }); }); }); - ps.Add(new PropertyRow(new Label("No Resolve")), (row) => + ps.Add(new PropertyRow(new Label("No Feedback")), (row) => { row.Add(new UnityEngine.UIElements.Toggle(), (field) => { field.value = m_Node.noFeedback; - field.RegisterValueChangedCallback(ChangeFeedback); + field.RegisterValueChangedCallback(evt => + { + if (m_Node.noFeedback == evt.newValue) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Feedback Settings Change"); + m_Node.noFeedback = evt.newValue; + }); }); }); - for (int i=0; i + ps.Add(new PropertyRow(new Label("Layer " + (i + 1) + " Type")), (row) => { row.Add(new UIElements.EnumField(m_Node.m_TextureTypes[i]), (field) => { field.value = m_Node.m_TextureTypes[i]; - field.RegisterValueChangedCallback(evt => { ChangeTextureType(evt, currentIndex); } ); + field.RegisterValueChangedCallback(evt => + { + if (m_Node.m_TextureTypes[currentIndex] == (TextureType)evt.newValue) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Texture Type Change"); + m_Node.m_TextureTypes[currentIndex] = (TextureType)evt.newValue; + m_Node.Dirty(ModificationScope.Graph); + }); }); }); } @@ -183,56 +384,32 @@ public TextureStackNodeSettingsView(SampleTextureStackNode node) row.Add(new UIElements.EnumField(m_Node.normalMapSpace), (field) => { field.value = m_Node.normalMapSpace; - field.RegisterValueChangedCallback(ChangeNormalMapSpace); + field.RegisterValueChangedCallback(evt => + { + if (m_Node.normalMapSpace == (NormalMapSpace)evt.newValue) + return; + + m_Node.owner.owner.RegisterCompleteObjectUndo("Normal Map space Change"); + m_Node.normalMapSpace = (NormalMapSpace)evt.newValue; + }); }); }); - Add(ps); - } - - void ChangeNumSlots(ChangeEvent evt) - { - if (Equals(m_Node.numSlots, evt.newValue)) - return; - - m_Node.owner.owner.RegisterCompleteObjectUndo("NumSlots Flow Change"); - m_Node.numSlots = evt.newValue; - } - - void ChangeLod(ChangeEvent evt) - { - if (m_Node.lodCalculation == (LodCalculation)evt.newValue) - return; - - m_Node.owner.owner.RegisterCompleteObjectUndo("Lod Mode Change"); - m_Node.lodCalculation = (LodCalculation)evt.newValue; - } - - void ChangeTextureType(ChangeEvent evt, int index) - { - if (m_Node.m_TextureTypes[index] == (TextureType)evt.newValue) - return; - - m_Node.owner.owner.RegisterCompleteObjectUndo("Texture Type Change"); - m_Node.m_TextureTypes[index] = (TextureType)evt.newValue; - } - - void ChangeFeedback(ChangeEvent evt) - { - if (m_Node.noFeedback == evt.newValue) - return; - - m_Node.owner.owner.RegisterCompleteObjectUndo("Feedback Settings Change"); - m_Node.noFeedback = evt.newValue; - } +#if !ENABLE_VIRTUALTEXTURES + ps.Add(new HelpBoxRow(MessageType.Warning), (row) => row.Add(new Label("VT is disabled, this node will do regular 2D sampling."))); +#endif + if (!m_Node.supportedByMasterNode) + { + ps.Add(new HelpBoxRow(MessageType.Warning), (row) => row.Add(new Label("The current master node does not support VT, this node will do regular 2D sampling."))); + } - void ChangeNormalMapSpace(ChangeEvent evt) - { - if (m_Node.normalMapSpace == (NormalMapSpace)evt.newValue) - return; + IVirtualTexturingEnabledRenderPipeline vtRp = GraphicsSettings.currentRenderPipeline as IVirtualTexturingEnabledRenderPipeline; + if (vtRp == null || vtRp.virtualTexturingEnabled == false) + { + ps.Add(new HelpBoxRow(MessageType.Warning), (row) => row.Add(new Label("The current render pipeline does not support VT." + ((vtRp ==null) ? "(Interface not implemented by" + GraphicsSettings.currentRenderPipeline.GetType().Name + ")" : "(virtualTexturingEnabled == false)")))); + } - m_Node.owner.owner.RegisterCompleteObjectUndo("Normal Map space Change"); - m_Node.normalMapSpace = (NormalMapSpace)evt.newValue; + Add(ps); } } @@ -241,7 +418,7 @@ public VisualElement CreateSettingsElement() return new TextureStackNodeSettingsView(this); } - public SampleTextureStackNode() : this(1) {} + public SampleTextureStackNode() : this(1) { } public SampleTextureStackNode(int numSlots, bool procedural = false, bool isLod = false, bool noResolve = false) { @@ -273,19 +450,13 @@ public override void UpdateNodeAfterDeserialization() { usedSlots.Add(FeedbackSlotId); } - if (m_LodCalculation != LodCalculation.Automatic) - { - usedSlots.Add(LODInputId); - } - - usedSlots.ToArray(); // Create slots AddSlot(new UVMaterialSlot(UVInputId, UVInputNAme, UVInputNAme, UVChannel.UV0)); for (int i = 0; i < numSlots; i++) { - AddSlot(new Vector4MaterialSlot(OutputSlotIds[i], OutputSlotNames[i], OutputSlotNames[i], SlotType.Output, Vector4.zero, (noFeedback && m_LodCalculation == LodCalculation.Explicit) ? ShaderStageCapability.All : ShaderStageCapability.Fragment)); + AddSlot(new Vector4MaterialSlot(OutputSlotIds[i], OutputSlotNames[i], OutputSlotNames[i], SlotType.Output, Vector4.zero, (noFeedback && m_LodCalculation == LodCalculation.VtLevel_Lod) ? ShaderStageCapability.All : ShaderStageCapability.Fragment)); } if (!isProcedural) @@ -296,12 +467,30 @@ public override void UpdateNodeAfterDeserialization() } } - if (m_LodCalculation != LodCalculation.Automatic) + if (m_LodCalculation == LodCalculation.VtLevel_Lod) { var slot = new Vector1MaterialSlot(LODInputId, LODSlotName, LODSlotName, SlotType.Input, 0.0f, ShaderStageCapability.All, LODSlotName); + usedSlots.Add(LODInputId); + AddSlot(slot); + } + + if (m_LodCalculation == LodCalculation.VtLevel_Bias) + { + var slot = new Vector1MaterialSlot(BiasInputId, BiasSlotName, BiasSlotName, SlotType.Input, 0.0f, ShaderStageCapability.Fragment, BiasSlotName); + usedSlots.Add(BiasInputId); AddSlot(slot); } + if (m_LodCalculation == LodCalculation.VtLevel_Derivatives) + { + var slot1 = new Vector2MaterialSlot(DxInputId, DxSlotName, DxSlotName, SlotType.Input, Vector2.one, ShaderStageCapability.All, DxSlotName); + var slot2 = new Vector2MaterialSlot(DyInputId, DySlotName, DySlotName, SlotType.Input, Vector2.one, ShaderStageCapability.All, DySlotName); + usedSlots.Add(DxInputId); + usedSlots.Add(DyInputId); + AddSlot(slot1); + AddSlot(slot2); + } + if (!noFeedback) { var slot = new Vector4MaterialSlot(FeedbackSlotId, FeedbackSlotName, FeedbackSlotName, SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment); @@ -310,19 +499,63 @@ public override void UpdateNodeAfterDeserialization() } RemoveSlotsNameNotMatching(usedSlots, true); + name = String.IsNullOrEmpty(m_StackName) ? DefaultNodeTitle : m_StackName; + } + + public static bool SubGraphHasStacks(SubGraphNode node) + { + var asset = node.asset; + foreach (var input in asset.inputs) + { + var texInput = input as Texture2DShaderProperty; + if (texInput != null && !string.IsNullOrEmpty(texInput.textureStack)) + { + return true; + } + } + return false; + } + + public static List GetSubGraphInputStacks(SubGraphNode node) + { + // There could be more stacks in the subgraph but as they are not part of inputs they don't + // leak out so we don't case about those. + List result = new List(); //todo pooled list + var asset = node.asset; + foreach (var input in asset.inputs) + { + var texInput = input as Texture2DShaderProperty; + if (texInput != null && !string.IsNullOrEmpty(texInput.textureStack)) + { + result.Add(texInput.textureStack); + } + } + return result; } public static void ValidatNodes(GraphData d) { - ValidatNodes(d.GetNodes()); + ValidatNodes(d.GetNodes(), d.GetNodes()); } - public static void ValidatNodes(IEnumerable nodes) + public static void ValidatNodes(IEnumerable nodes, IEnumerable subNodes) { - List> slotNames = new List>(); + var valueNameLookup = new Dictionary(); + var nodeNames = new HashSet(); foreach (SampleTextureStackNode node in nodes) { + if (nodeNames.Contains(node.GetStackName()) && !node.isProcedural) + { + // Add a validation error, values need to be unique + node.owner.AddValidationError(node.tempId, $"Some stack nodes have the same name '{node.GetStackName()}', please ensure all stack nodes have unique names.", ShaderCompilerMessageSeverity.Error); + } + else + { + // Procedural nodes are still added here as we disallow procedural and regular nodes with the same name... + nodeNames.Add(node.GetStackName()); + } + for (int i = 0; i < node.numSlots; i++) { if (!node.isProcedural) @@ -331,40 +564,52 @@ public static void ValidatNodes(IEnumerable nodes) string name = node.FindSlot(node.TextureInputIds[i]).displayName; // Check if there is already a slot with the same value - int found = slotNames.FindIndex(elem => elem.Key == value); - if (found >= 0) + string displayName; + if (valueNameLookup.TryGetValue(value, out displayName)) { // Add a validation error, values need to be unique - node.owner.AddValidationError(node.tempId, $"Slot stack input slot '{value}' shares it's input with another stack input '{slotNames[found].Value}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); + node.owner.AddValidationError(node.tempId, $"Input slot '{name}' shares it's value '{value}' with another stack '{displayName}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); } else { // Save it for checking against other slots - slotNames.Add(new KeyValuePair(value, name)); + valueNameLookup.Add(value, node.GetStackName() + " (slot " + name + ")"); } } + } + } -#if PROCEDURAL_VT_IN_GRAPH - // Check if there is already a node with the same sampleid - SampleTextureStackProceduralNode ssp = node as SampleTextureStackProceduralNode; - if (ssp != null) + foreach (SubGraphNode node in subNodes) + { + var subStacks = GetSubGraphInputStacks(node); + foreach (var subStack in subStacks) + { + // Todo how to exclude procedurals in subgraphs? + if (nodeNames.Contains(subStack)) { - string value = ssp.GetStackName(); - string name = ssp.GetStackName(); - // Check if there is already a slot with the same value - int found = slotNames.FindIndex(elem => elem.Key == value); - if (found >= 0) - { - // Add a validation error, values need to be unique - node.owner.AddValidationError(node.tempId, $"This node has the same procedural ID as another node. Nodes need to have different procedural IDs.", ShaderCompilerMessageSeverity.Error); - } - else - { - // Save it for checking against other slots - slotNames.Add(new KeyValuePair(value, name)); - } + node.owner.AddValidationError(node.tempId, $"A stack node in a subgraph which is exposed through a texture argument has the same name '{subStack}', please ensure all stack nodes have unique names across the whole shader using them.", ShaderCompilerMessageSeverity.Error); + } + else + { + nodeNames.Add(subStack); + } + } + + Dictionary valueToStackLookup = node.GetValueToTextureStackDictionary(GenerationMode.ForReals); + foreach (var kvp in valueToStackLookup) + { + // Check if there is already a slot with the same value + string stackName; + if (valueNameLookup.TryGetValue(kvp.Key, out stackName)) + { + // Add a validation error, values need to be unique + node.owner.AddValidationError(node.tempId, $"Stack '{kvp.Value}' shares it's value '{kvp.Key}' with another stack '{stackName}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); + } + else + { + // Save it for checking against other slots + valueNameLookup.Add(kvp.Key, kvp.Value); } -#endif } } } @@ -389,10 +634,23 @@ public override PreviewMode previewMode get { return PreviewMode.Preview3D; } } + protected virtual string ProcessStackName(string potentialName) + { + // We do a poor man's namespacing here since the user's entered name could clash with existing symbols defined in the shaders or templates + // adding variables in templates later could also suddenly break user's stacks so any stacks are prefixed by a "namespace". + if (!string.IsNullOrEmpty(potentialName)) + { + return "StackNodeNamespace_" + potentialName; + } + else + { + return string.Format("TexStack_{0}", GuidEncoder.Encode(guid)); + } + } protected virtual string GetStackName() { - return GetVariableNameForSlot(OutputSlotIds[0]) + "_texturestack"; + return ProcessStackName(m_StackName); } private string GetTextureName(int layerIndex, GenerationMode generationMode) @@ -407,39 +665,56 @@ private string GetTextureName(int layerIndex, GenerationMode generationMode) } } - private string GetSampleFunction() + string MakeVtParameters(string variableName, string uvExpr, string lodExpr, string dxExpr, string dyExpr, AddresMode address, FilterMode filter, LodCalculation lod, UvSpace space, QualityMode quality) { - if (m_LodCalculation != LodCalculation.Automatic) - { - return "SampleStackLod"; - } - else - { - return "SampleStack"; - } + const string VTParametersInputTemplate = @" + VtInputParameters {0}; + {0}.uv = {1}; + {0}.lodOrOffset = {2}; + {0}.dx = {3}; + {0}.dy = {4}; + {0}.addressMode = {5}; + {0}.filterMode = {6}; + {0}.levelMode = {7}; + {0}.uvMode = {8}; + {0}.sampleQuality = {9}; + "; + + return string.Format(VTParametersInputTemplate, + variableName, + uvExpr, + (string.IsNullOrEmpty(lodExpr)) ? "0.0f" : lodExpr, + (string.IsNullOrEmpty(dxExpr)) ? "float2(0.0f, 0.0f)" : dxExpr, + (string.IsNullOrEmpty(dyExpr)) ? "float2(0.0f, 0.0f)" : dyExpr, + address.ToString(), + filter.ToString(), + lod.ToString(), + space.ToString(), + quality.ToString()); + } + + string MakeVtSample(string infoVariable, string textureName, string outputVariableName, LodCalculation lod, QualityMode quality) + { + const string SampleTemplate = @"$precision4 {0} = SampleStack({1}, {2}, {3}, {4});"; + + return string.Format(SampleTemplate, + outputVariableName, + infoVariable, + lod.ToString(), + quality.ToString(), + textureName); } // Node generations public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) { - // This is not in templates or headers so this error only gets checked in shaders actually using the VT node - // as vt headers get included even if there are no vt nodes yet. - sb.AppendLine("#if defined(_SURFACE_TYPE_TRANSPARENT)"); - sb.AppendLine("#error VT cannot be used on transparent surfaces."); - sb.AppendLine("#endif"); - sb.AppendLine("#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_DBUFFER_PROJECTOR)"); //SHADERPASS is not defined for preview materials so check this first. - sb.AppendLine("#error VT cannot be used on decals. (DBuffer)"); - sb.AppendLine("#endif"); - sb.AppendLine("#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_DBUFFER_MESH)"); - sb.AppendLine("#error VT cannot be used on decals. (Mesh)"); - sb.AppendLine("#endif"); - sb.AppendLine("#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_FORWARD_EMISSIVE_PROJECTOR)"); - sb.AppendLine("#error VT cannot be used on decals. (Projector)"); - sb.AppendLine("#endif"); - // Not all outputs may be connected (well one is or we wouldn't get called) so we are careful to // only generate code for connected outputs + string stackName = GetStackName(); + string localVariablePrefix = GetVariableNameForNode(); + string parametersVariableNme = localVariablePrefix + "_pars"; + string infoVariableName = localVariablePrefix + "_info"; bool anyConnected = false; for (int i = 0; i < numSlots; i++) @@ -455,34 +730,36 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene if (anyConnected) { - if (m_LodCalculation == LodCalculation.Automatic) - { - string result = string.Format("StackInfo {0}_info = PrepareStack({1}, {0});" - , stackName - , GetSlotValue(UVInputId, generationMode)); - sb.AppendLine(result); - } - else - { - string result = string.Format("StackInfo {0}_info = PrepareStackLod({1}, {0}, {2});" - , stackName - , GetSlotValue(UVInputId, generationMode) - , GetSlotValue(LODInputId, generationMode)); - sb.AppendLine(result); - } + sb.Append(MakeVtParameters( + parametersVariableNme, + GetSlotValue(UVInputId, generationMode), + (lodCalculation == LodCalculation.VtLevel_Lod) ? GetSlotValue(LODInputId, generationMode) : GetSlotValue(BiasInputId, generationMode), + GetSlotValue(DxInputId, generationMode), + GetSlotValue(DyInputId, generationMode), + AddresMode.VtAddressMode_Wrap, + FilterMode.VtFilter_Anisotropic, + m_LodCalculation, + UvSpace.VtUvSpace_Regular, + m_SampleQuality)); + + sb.AppendLine(string.Format("StackInfo {0} = PrepareStack({1}, {2});" + , infoVariableName + , parametersVariableNme + , stackName)); } for (int i = 0; i < numSlots; i++) { if (IsSlotConnected(OutputSlotIds[i])) { - var id = GetTextureName(i, generationMode); - string resultLayer = string.Format("$precision4 {1} = {3}({0}_info, {2});" + var textureName = GetTextureName(i, generationMode); + /*string resultLayer = string.Format("$precision4 {1} = {3}({0}_info, {2});" , stackName , GetVariableNameForSlot(OutputSlotIds[i]) - , id + , textureName , GetSampleFunction()); - sb.AppendLine(resultLayer); + sb.AppendLine(resultLayer);*/ + sb.AppendLine(MakeVtSample(infoVariableName, textureName, GetVariableNameForSlot(OutputSlotIds[i]), m_LodCalculation, m_SampleQuality)); } } @@ -508,13 +785,42 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene if (!noFeedback && feedbackConnected) { //TODO: Investigate if the feedback pass can use halfs - string feedBackCode = string.Format("float4 {0} = GetResolveOutput({1}_info);", + string feedBackCode = string.Format("float4 {0} = GetResolveOutput({1});", GetVariableNameForSlot(FeedbackSlotId), - stackName); + infoVariableName); sb.AppendLine(feedBackCode); } } + public void GenerateNodeInclude(IncludeRegistry registry, GenerationMode generationMode) + { + // This is not in templates or headers so this error only gets checked in shaders actually using the VT node + // as vt headers get included even if there are no vt nodes yet. + IVirtualTexturingEnabledRenderPipeline vtRp = GraphicsSettings.currentRenderPipeline as IVirtualTexturingEnabledRenderPipeline; + + if (!supportedByMasterNode) + { + // The master node is not white listed for VT just use regular textures even if vt is on for this project. + registry.ProvideIncludeBlock("disable-vt-if-unsupported-node", "#define FORCE_VIRTUAL_TEXTURING_OFF 1"); + } + else if (vtRp == null || vtRp.virtualTexturingEnabled == false) + { + // The master render pipeline does not support VT just use regular textures even if vt is on for this project. + registry.ProvideIncludeBlock("disable-vt-if-unsupported-node", "#define FORCE_VIRTUAL_TEXTURING_OFF 1"); + } + else + { + // The master node supports VT but certain keyword settings in child materials may still break it. We catch this here. + registry.ProvideIncludeBlock("disable-vt-if-unsupported", @"#if defined(_SURFACE_TYPE_TRANSPARENT) +#define FORCE_VIRTUAL_TEXTURING_OFF 1 +#error VT cannot be used on transparent surfaces. +#endif"); + } + + // Always include the header even if vt is off this ensures the macros providing fallbacks are existing. + registry.ProvideInclude("Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"); + } + public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode) { base.CollectShaderProperties(properties, generationMode); @@ -579,6 +885,11 @@ public bool RequiresMeshUV(Internal.UVChannel channel, ShaderStageCapability sta return false; } } + + public bool RequiresTime() + { + return true; //HACK: This ensures we repaint in shadergraph so data that gets streamed in also becomes visible. + } } class TextureStackAggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireRequirePixelCoordinate @@ -620,7 +931,7 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene if (numSlots == 1) { - string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = {GetSlotValue(AggregateInputFirstId, generationMode)};"; + string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = GetPackedVTFeedback({GetSlotValue(AggregateInputFirstId, generationMode)});"; sb.AppendLine(feedBackCode); } else if (numSlots > 1) @@ -636,7 +947,7 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene arrayIndex++; } - string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = {arrayName}[ (IN.{ShaderGeneratorNames.PixelCoordinate}.x + _FrameCount )% (uint){numSlots}];"; + string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = GetPackedVTFeedback({arrayName}[ (IN.{ShaderGeneratorNames.PixelCoordinate}.x + _FrameCount )% (uint){numSlots}]);"; sb.AppendLine(feedBackCode); } @@ -654,15 +965,21 @@ public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) static class VirtualTexturingFeedback { public const int OutputSlotID = 22021982; + public const string subgraphOutputFrefix = "VTFeedbackIn_"; // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output public static IMasterNode AutoInject(IMasterNode iMasterNode) { + Debug.Log("Inject vt feedback"); var masterNode = iMasterNode as AbstractMaterialNode; var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); + var subgraphNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); + Debug.Log("SubgraphNodes: " + subgraphNodes.Count); - // Early out if there are no VT nodes in the graph - if (stackNodes.Count <= 0) + + // Try to find out early if there are no nodes doing VT feedback in the graph + // this avoids unnecessary work of copying the graph and patching it. + if (stackNodes.Count <= 0 && subgraphNodes.Count <= 0) { return iMasterNode; } @@ -670,13 +987,28 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) bool hasFeedback = false; foreach (var node in stackNodes) { - if ( !node.noFeedback ) + if (!node.noFeedback) { hasFeedback = true; + break; } } + + if (!hasFeedback) foreach (var node in subgraphNodes) + { + foreach (var slot in node.GetOutputSlots()) + { + if (slot.shaderOutputName.StartsWith(subgraphOutputFrefix)) + { + hasFeedback = true; + break; + } + } + } + if (!hasFeedback) { + Debug.Log("No vt feedback early out"); return iMasterNode; } @@ -684,7 +1016,7 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) var workingMasterNode = masterNode.owner.ScratchCopy().GetNodeFromGuid(masterNode.guid); // inject VTFeedback output slot - var vtFeedbackSlot = new Vector4MaterialSlot(OutputSlotID, "VTFeedback", "VTFeedback", SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); + var vtFeedbackSlot = new Vector4MaterialSlot(OutputSlotID, "VTPackedFeedback", "VTPackedFeedback", SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); vtFeedbackSlot.hidden = true; workingMasterNode.AddSlot(vtFeedbackSlot); @@ -714,6 +1046,23 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) i++; } + foreach (var node in subgraphNodes) + { + foreach (var slot in node.GetOutputSlots()) + { + if (!slot.shaderOutputName.StartsWith(subgraphOutputFrefix)) continue; + + // Create a new slot on the aggregate that is similar to the uv input slot + string name = "FeedIn_" + i; + var newSlot = new Vector4MaterialSlot(TextureStackAggregateFeedbackNode.AggregateInputFirstId + i, name, name, SlotType.Input, Vector4.zero, ShaderStageCapability.Fragment); + newSlot.owner = feedbackNode; + feedbackNode.AddSlot(newSlot); + + feedbackNode.owner.Connect(slot.slotReference, newSlot.slotReference); + i++; + } + } + // Add input to master node var feedbackInputSlot = workingMasterNode.FindInputSlot(OutputSlotID); if (feedbackInputSlot == null) @@ -734,6 +1083,66 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) return workingMasterNode as IMasterNode; } + + // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output + public static SubGraphOutputNode AutoInjectSubgraph(SubGraphOutputNode masterNode) + { + var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); + + // Early out if there are no VT nodes in the graph + if (stackNodes.Count <= 0) + { + Debug.Log("No vt in subgr"); + return masterNode; + } + + bool hasFeedback = false; + foreach (var node in stackNodes) + { + if (!node.noFeedback) + { + hasFeedback = true; + } + } + if (!hasFeedback) + { + Debug.Log("No feedback in subgr"); + return masterNode; + } + + // Duplicate the Graph so we can modify it + Debug.Log("clonign graph"); + var workingMasterNode = masterNode.owner.ScratchCopy().GetNodeFromGuid(masterNode.guid); + + // Add inputs to feedback node + int i = 0; + foreach (var node in stackNodes) + { + // Find feedback output slot on the vt node + var stackFeedbackOutputSlot = (node.FindOutputSlot(SampleTextureStackNode.FeedbackSlotId)) as Vector4MaterialSlot; + if (stackFeedbackOutputSlot == null) + { + // Nodes which are noResolve don't have a resolve slot so just skip them + Debug.Log("No feedback slot on node, skipping"); + continue; + } + + // Create a new slot on the master node for each vt feedback + string name = subgraphOutputFrefix + i; + var newSlot = new Vector4MaterialSlot(OutputSlotID + i, name, name, SlotType.Input, Vector4.zero, ShaderStageCapability.Fragment); + newSlot.owner = workingMasterNode; + newSlot.hidden = true; + workingMasterNode.AddSlot(newSlot); + + workingMasterNode.owner.Connect(stackFeedbackOutputSlot.slotReference, newSlot.slotReference); + i++; + + Debug.Log("Added feedback " + name); + } + + workingMasterNode.owner.ClearChanges(); + return workingMasterNode as SubGraphOutputNode; + } } #if PROCEDURAL_VT_IN_GRAPH @@ -744,30 +1153,6 @@ class SampleTextureStackProceduralNode : SampleTextureStackNode { public SampleTextureStackProceduralNode() : base(1, true) { } - - [IntegerControl("Sample ID")] - public int sampleID - { - get { return m_sampleId; } - set - { - if (m_sampleId == value) - return; - - m_sampleId = value; - Dirty(ModificationScope.Graph); - - ValidateNode(); - } - } - - [SerializeField] - int m_sampleId = 0; - - protected override string GetStackName() - { - return "Procedural" + m_sampleId; - } } #endif } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/MasterNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/MasterNode.cs index e858032c127..4e279a3beed 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/MasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/MasterNode.cs @@ -65,6 +65,8 @@ protected virtual VisualElement CreateCommonSettingsElement() public virtual object saveContext => null; public virtual void ProcessPreviewMaterial(Material Material) {} + + public virtual bool SupportsVirtualTexturing() { return false; } } [Serializable] diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs index 30541c4a20d..44d7e32ca25 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs @@ -13,6 +13,7 @@ class SubGraphNode : AbstractMaterialNode , IGeneratesBodyCode , IOnAssetEnabled , IGeneratesFunction + , IGeneratesInclude , IMayRequireNormal , IMayRequireTangent , IMayRequireBitangent @@ -398,8 +399,10 @@ public virtual void UpdateSlots() foreach (var slot in asset.outputs) { - AddSlot(MaterialSlot.CreateMaterialSlot(slot.valueType, slot.id, slot.RawDisplayName(), - slot.shaderOutputName, SlotType.Output, Vector4.zero, outputStage)); + var newSlot = MaterialSlot.CreateMaterialSlot(slot.valueType, slot.id, slot.RawDisplayName(), + slot.shaderOutputName, SlotType.Output, Vector4.zero, outputStage); + newSlot.hidden = slot.hidden; + AddSlot(newSlot); validNames.Add(slot.id); } @@ -455,6 +458,28 @@ public override void ValidateNode() ValidateShaderStage(); } + public Dictionary GetValueToTextureStackDictionary(GenerationMode generationMode) + { + // Get the stack names for the texture values conected to inputs of the sub graph + Dictionary valueToStackLookup = new Dictionary(); + for (int propertyIndex = 0; propertyIndex < m_PropertyIds.Count; propertyIndex++) + { + int slotId = m_PropertyIds[propertyIndex]; + if (FindInputSlot(slotId) != null) + { + var value = GetSlotValue(slotId, generationMode); + var guid = m_PropertyGuids[propertyIndex]; + var input = asset.inputs.First(el => el.guid == Guid.Parse(guid)) as Texture2DShaderProperty; + if (input != null && !string.IsNullOrEmpty(input.textureStack)) + { + valueToStackLookup.Add(value, input.textureStack); + } + + } + } + return valueToStackLookup; + } + public override void CollectShaderProperties(PropertyCollector visitor, GenerationMode generationMode) { base.CollectShaderProperties(visitor, generationMode); @@ -466,6 +491,19 @@ public override void CollectShaderProperties(PropertyCollector visitor, Generati { visitor.AddShaderProperty(property); } + + // Get the stack names for the texture values conected to inputs of the sub graph + Dictionary valueToStackLookup = GetValueToTextureStackDictionary(generationMode); + + // Set textureStacks of any texture properties matching the connected textures + foreach (var prop in visitor.properties.OfType()) + { + string stackName; + if (valueToStackLookup.TryGetValue(prop.referenceName, out stackName)) + { + prop.textureStack = stackName; + } + } } public void CollectShaderKeywords(KeywordCollector keywords, GenerationMode generationMode) @@ -506,6 +544,17 @@ public virtual void GenerateNodeFunction(FunctionRegistry registry, GenerationMo } } + public virtual void GenerateNodeInclude(IncludeRegistry registry, GenerationMode generationMode) + { + if (asset == null || hasError) + return; + + foreach (var function in asset.includes) + { + registry.ProvideIncludeBlock(function.key, function.value); + } + } + public NeededCoordinateSpace RequiresNormal(ShaderStageCapability stageCapability) { if (asset == null) diff --git a/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs b/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs index 7b461c45db3..08d27437612 100644 --- a/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs +++ b/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs @@ -42,6 +42,8 @@ class SubGraphAsset : ScriptableObject, ISerializationCallbackReceiver public List functions = new List(); + public List includes = new List(); + [NonSerialized] public List inputs = new List(); @@ -93,4 +95,4 @@ public void OnAfterDeserialize() outputs = SerializationHelper.Deserialize(m_SerializedOutputs, typeSerializationInfos); } } -} \ No newline at end of file +} diff --git a/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs b/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs new file mode 100644 index 00000000000..f6b743c9dab --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEditor.ShaderGraph +{ + struct IncludeInfo + { + public string code; + public HashSet nodes; + } + + class IncludeRegistry + { + Dictionary m_Includes = new Dictionary(); + ShaderStringBuilder m_Builder; + + public IncludeRegistry(ShaderStringBuilder builder) + { + m_Builder = builder; + } + + internal ShaderStringBuilder builder => m_Builder; + + public Dictionary includes => m_Includes; + + public IEnumerable names { get { return m_Includes.Keys; } } + + public void ProvideInclude(string fileName) + { + ProvideIncludeBlock(fileName, "#include \"" + fileName + "\""); + } + + public void ProvideIncludeBlock(string uniqueIdentifier, string blockCode) + { + IncludeInfo existingInfo; + if (m_Includes.TryGetValue(uniqueIdentifier, out existingInfo)) + { + existingInfo.nodes.Add(m_Builder.currentNode); + } + else + { + m_Builder.AppendLine(blockCode); + m_Includes.Add(uniqueIdentifier, new IncludeInfo { code = blockCode, nodes = new HashSet { builder.currentNode } }); + } + } + } +} diff --git a/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs.meta b/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs.meta new file mode 100644 index 00000000000..2757c8decdf --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 741c61621e6db90488d8aae5127973c4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Drawing/PreviewManager.cs b/com.unity.shadergraph/Editor/Drawing/PreviewManager.cs index 45cf11c5b36..e765b2bba0b 100644 --- a/com.unity.shadergraph/Editor/Drawing/PreviewManager.cs +++ b/com.unity.shadergraph/Editor/Drawing/PreviewManager.cs @@ -494,6 +494,43 @@ void UpdateTimedNodeList() m_RefreshTimedNodes = false; } + void RequestVTData(Material mat) + { +#if ENABLE_VIRTUALTEXTURES + Shader shad = mat.shader; + for (int i = 0; i < shad.GetPropertyCount(); i++) + { + if (shad.GetPropertyType(i) != UnityEngine.Rendering.ShaderPropertyType.Texture) continue; + + string name; + int layer; + + if (shad.FindTextureStack(i, out name, out layer)) + { + int stackPropertyId = Shader.PropertyToID(name); + try + { + // Ensure we always request the mip sized 256x256 + int width, height; + UnityEngine.Rendering.VirtualTexturing.System.GetTextureStackSize(mat, stackPropertyId, out width, out height); + int textureMip = (int)Math.Max(Mathf.Log(width, 2f), Mathf.Log(height, 2f)); + const int baseMip = 8; + int mip = Math.Max(textureMip - baseMip, 0); + UnityEngine.Rendering.VirtualTexturing.System.RequestRegion(mat, stackPropertyId, new Rect(0.0f, 0.0f, 1.0f, 1.0f), mip, UnityEngine.Rendering.VirtualTexturing.System.AllMips); + } + catch (InvalidOperationException) + { + // This gets thrown when the system is in an indeterminate state (like a material with no textures assigned which can obviously never have a texture stack streamed). + // This is valid in this case as we're still authoring the material. + } + } + } + + // If only shadergraph windows are visible HDRP will may render cameras and VT won't tick. So always to a tick here just to be sure. + UnityEngine.Rendering.VirtualTexturing.System.Update(); +#endif + } + void RenderPreview(PreviewRenderData renderData, Mesh mesh, Matrix4x4 transform) { var node = renderData.shaderData.node; @@ -505,6 +542,8 @@ void RenderPreview(PreviewRenderData renderData, Mesh mesh, Matrix4x4 transform) return; } + RequestVTData(renderData.shaderData.mat); + var previousRenderTexture = RenderTexture.active; //Temp workaround for alpha previews... diff --git a/com.unity.shadergraph/Editor/Drawing/Views/HelpBoxRow.cs b/com.unity.shadergraph/Editor/Drawing/Views/HelpBoxRow.cs new file mode 100644 index 00000000000..321f897a082 --- /dev/null +++ b/com.unity.shadergraph/Editor/Drawing/Views/HelpBoxRow.cs @@ -0,0 +1,49 @@ +using System.Linq; +using UnityEngine; +using UnityEngine.UIElements; + +namespace UnityEditor.ShaderGraph.Drawing +{ + // Similar in function to the old EditorGUILayout.HelpBox + class HelpBoxRow : VisualElement + { + VisualElement m_ContentContainer; + VisualElement m_LabelContainer; + + public override VisualElement contentContainer + { + get { return m_ContentContainer; } + } + + public HelpBoxRow(MessageType type) + { + styleSheets.Add(Resources.Load("Styles/HelpBoxRow")); + VisualElement container = new VisualElement {name = "container"}; + m_ContentContainer = new VisualElement { name = "content" }; + m_LabelContainer = new VisualElement {name = "label" }; + + switch (type) + { + case MessageType.None: + container.AddToClassList("help-box-row-style-info"); + break; + case MessageType.Info: + container.AddToClassList("help-box-row-style-info"); + break; + case MessageType.Warning: + container.AddToClassList("help-box-row-style-warning"); + break; + case MessageType.Error: + container.AddToClassList("help-box-row-style-error"); + break; + default: + break; + } + + container.Add(m_LabelContainer); + container.Add(m_ContentContainer); + + hierarchy.Add(container); + } + } +} diff --git a/com.unity.shadergraph/Editor/Drawing/Views/HelpBoxRow.cs.meta b/com.unity.shadergraph/Editor/Drawing/Views/HelpBoxRow.cs.meta new file mode 100644 index 00000000000..61da493f791 --- /dev/null +++ b/com.unity.shadergraph/Editor/Drawing/Views/HelpBoxRow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2193a2e210bbc714d9db73d1ba2c6587 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs b/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs new file mode 100644 index 00000000000..82553e8f086 --- /dev/null +++ b/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs @@ -0,0 +1,94 @@ +using System; +using UnityEngine; +using UnityEngine.UIElements; + +namespace UnityEditor.ShaderGraph.Drawing +{ + /* + Field that allows entering a valid HLSL identifier. + (variable name, function name, ...) this means + no spaces, no funny characters, never starts with a number, ... + */ + public class IdentifierField : UIElements.TextValueField + { + IdentifierInput tsInput => (IdentifierInput)textInputBase; + + public new class UxmlFactory : UxmlFactory { } + public new class UxmlTraits : UIElements.TextValueFieldTraits { } + + protected override string ValueToString(string v) + { + return v; + } + + protected override string StringToValue(string str) + { + // Make sure this is a valid hlsl identifier. Allowed characters already ensures the characters are valid + // but identifiers can't start with a number so fix this here. + if (Char.IsDigit(str[0])) + { + return "_" + str; + } + else + { + return str; + } + } + + public new static readonly string ussClassName = "unity-identifierfield-field"; + public new static readonly string labelUssClassName = ussClassName + "__label"; + public new static readonly string inputUssClassName = ussClassName + "__input"; + + public IdentifierField() : this((string)null) { } + + public IdentifierField(string label) : base(label, -1, new IdentifierInput()) + { + AddToClassList(ussClassName); + labelElement.AddToClassList(labelUssClassName); + tsInput.AddToClassList(inputUssClassName); + } + + public override void ApplyInputDeviceDelta(Vector3 delta, UIElements.DeltaSpeed speed, string startValue) + { + tsInput.ApplyInputDeviceDelta(delta, speed, startValue); + } + + class IdentifierInput : TextValueInput + { + IdentifierField parentField => (IdentifierField)parent; + + internal IdentifierInput() + { + formatString = null; + } + + protected override string allowedCharacters + { + get { return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; } + } + + public override void ApplyInputDeviceDelta(Vector3 delta, UIElements.DeltaSpeed speed, string startValue) + { + } + + protected override string ValueToString(string v) + { + return v; + } + + protected override string StringToValue(string str) + { + // Make sure this is a valid hlsl identifier. Allowed characters already ensures the characters are valid + // but identifiers can't start with a number so fix this here. + if (Char.IsDigit(str[0])) + { + return "_" + str; + } + else + { + return str; + } + } + } + } +} diff --git a/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs.meta b/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs.meta new file mode 100644 index 00000000000..7c07d8ea4ff --- /dev/null +++ b/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 991f68f49473a9d45a1586045c1e649c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs b/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs index 116bbbc7c94..6a783d5073f 100644 --- a/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs +++ b/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs @@ -76,8 +76,10 @@ public override void OnImportAsset(AssetImportContext ctx) static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) { + var includes = new IncludeRegistry(new ShaderStringBuilder()); var registry = new FunctionRegistry(new ShaderStringBuilder(), true); registry.names.Clear(); + asset.includes.Clear(); asset.functions.Clear(); asset.nodeProperties.Clear(); asset.isValid = true; @@ -93,6 +95,7 @@ static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) asset.path = graph.path; var outputNode = (SubGraphOutputNode)graph.outputNode; + outputNode = VirtualTexturingFeedback.AutoInjectSubgraph(outputNode); asset.outputs.Clear(); outputNode.GetInputSlots(asset.outputs); @@ -160,6 +163,11 @@ static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) generatesFunction.GenerateNodeFunction(registry, GenerationMode.ForReals); registry.builder.ReplaceInCurrentMapping(PrecisionUtil.Token, node.concretePrecision.ToShaderString()); } + if (node is IGeneratesInclude generatesInclude) + { + includes.builder.currentNode = node; + generatesInclude.GenerateNodeInclude(includes, GenerationMode.ForReals); + } } registry.ProvideFunction(asset.functionName, sb => @@ -208,6 +216,7 @@ static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) } }); + asset.includes.AddRange(includes.names.Select(x => new FunctionPair(x, includes.includes[x].code))); asset.functions.AddRange(registry.names.Select(x => new FunctionPair(x, registry.sources[x].code))); var collector = new PropertyCollector(); diff --git a/com.unity.shadergraph/Editor/Resources/Styles/HelpBoxRow.uss b/com.unity.shadergraph/Editor/Resources/Styles/HelpBoxRow.uss new file mode 100644 index 00000000000..d090df104f1 --- /dev/null +++ b/com.unity.shadergraph/Editor/Resources/Styles/HelpBoxRow.uss @@ -0,0 +1,54 @@ +HelpBoxRow > #container{ + flex-grow: 1; + padding-left: 8px; + padding-right: 8px; + flex-direction: row; +} + +HelpBoxRow > #container > #label { + width : 20px; + height : 20px; + align-self: center; + margin-right: 8px; +} + +HelpBoxRow > #container > #content { + flex-grow: 1; + justify-content: center; +} + +HelpBoxRow > * +{ + color:#584308; + white-space: normal; +} + +.help-box-row-style-info +{ + background-color: #6ed7fc; +} + +.help-box-row-style-info #label +{ + background-image : resource("console.infoicon"); +} + +.help-box-row-style-warning +{ + background-color: #fcd76e; +} + +.help-box-row-style-warning #label +{ + background-image : resource("console.warnicon"); +} + +.help-box-row-style-error +{ + background-color: #fc6e6e; +} + +.help-box-row-style-error #label +{ + background-image : resource("console.erroricon"); +} diff --git a/com.unity.shadergraph/Editor/Resources/Styles/HelpBoxRow.uss.meta b/com.unity.shadergraph/Editor/Resources/Styles/HelpBoxRow.uss.meta new file mode 100644 index 00000000000..68ff459546d --- /dev/null +++ b/com.unity.shadergraph/Editor/Resources/Styles/HelpBoxRow.uss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c0c3b27af341d91469183b16b7d6638b +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 diff --git a/com.unity.shadergraph/Editor/Templates/PassMesh.template b/com.unity.shadergraph/Editor/Templates/PassMesh.template index 65d75ffc54d..c5b0a15e8af 100644 --- a/com.unity.shadergraph/Editor/Templates/PassMesh.template +++ b/com.unity.shadergraph/Editor/Templates/PassMesh.template @@ -72,6 +72,9 @@ Pass // -------------------------------------------------- // Graph + // Graph Includes + $splice(GraphIncludes) + // Graph Properties $splice(GraphProperties) diff --git a/com.unity.shadergraph/package.json b/com.unity.shadergraph/package.json index ebeab1bb30f..fa29789c7b0 100644 --- a/com.unity.shadergraph/package.json +++ b/com.unity.shadergraph/package.json @@ -3,7 +3,7 @@ "description": "The Shader Graph package adds a visual Shader editing tool to Unity. You can use this tool to create Shaders in a visual way instead of writing code. Specific render pipelines can implement specific graph features. Currently, both the High Definition Rendering Pipeline and the Universal Rendering Pipeline support Shader Graph.", "version": "9.0.0-preview.0", "unity": "2020.1", - "unityRelease": "0a23", + "unityRelease": "0b1", "displayName": "Shader Graph", "dependencies": { "com.unity.render-pipelines.core": "9.0.0-preview.0", From d988d1e1ca3d4a5f19b2f79b71755f39194ff7df Mon Sep 17 00:00:00 2001 From: NicoLeyman <49522355+NicoLeyman@users.noreply.github.com> Date: Tue, 17 Mar 2020 10:45:37 +0100 Subject: [PATCH 118/143] Virtual Texturing Settings integration (#5971) * VT: default cache size values and default settings object. * Initial GPU Cache size overrides UI * VT GPU cache size overrides layout scaling improvements. * More layout improvements and settings update simplification. * Split GPU cache size overrides into a list per usage. * Changed data being serialized to match the GUI 1:1, overlap warning for overrides. * Fixed new overrides using existing formats * OnValidate applies changes to VT Settings object. cleanup of applying of properties. * VirtualTexturingSettings.GetSettings() -> VirtualTexturingSettings.Settings * Moved VT settings from PipelineAsset to VolumeProfile * Changed Getter of native settings objet to allow collapsing multiple settings objects based on overrides. * Moved VirtualTexturingSettings into the HDRP settings. * Cleanup, include guards. * Added include guards for latest HDRP settings. * Merge fix * Removal of shared and procedural override lists. * Label tweak and clamping of cache sizes (min value). * Tweaked min CPU cache size and exposed HDRPAsset.VTSettings * Renamed VirtualTexturingSettings SRP class to avoid conflict with native class. * Added [Serializable] back to VirtualTexturingSettingsSRP * Removed label from overrides list and offset overrides to the left. * Transform combobox entries are now sorted alphabetically. Co-authored-by: Nico Leyman --- .../HDRenderPipelineMenuItems.cs | 15 -- .../RenderPipeline/HDRenderPipelineUI.Skin.cs | 1 + .../RenderPipeline/HDRenderPipelineUI.cs | 22 +- .../SerializedHDRenderPipelineAsset.cs | 9 +- .../SerializedVirtualTexturingSettings.cs | 25 ++ ...erializedVirtualTexturingSettings.cs.meta} | 2 +- .../VirtualTexturingSettingsEditor.cs | 124 --------- .../VirtualTexturingSettingsUI.cs | 255 ++++++++++++++++++ .../VirtualTexturingSettingsUI.cs.meta} | 2 +- .../DefaultSettingsVolumeProfile.asset | 27 ++ .../RenderPipeline/HDRenderPipeline.cs | 6 +- .../RenderPipeline/HDRenderPipelineAsset.cs | 9 +- .../VirtualTexturingSettings.cs | 25 -- .../VirtualTexturingSettingsSRP.cs | 48 ++++ .../VirtualTexturingSettingsSRP.cs.meta | 11 + 15 files changed, 399 insertions(+), 182 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs rename com.unity.render-pipelines.high-definition/Editor/RenderPipeline/{VirtualTexturingSettingsEditor.cs.meta => Settings/SerializedVirtualTexturingSettings.cs.meta} (83%) delete mode 100644 com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs create mode 100644 com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs rename com.unity.render-pipelines.high-definition/{Runtime/RenderPipeline/VirtualTexturingSettings.cs.meta => Editor/RenderPipeline/VirtualTexturingSettingsUI.cs.meta} (83%) delete mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs create mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs create mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs.meta diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs index 719aa3dbee0..2442a0e2f5f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs @@ -274,14 +274,6 @@ protected override void PostCreateAssetWork(DiffusionProfileSettings asset) } } - class DoCreateNewAssetVirtualTexturingSettings : DoCreateNewAsset - { - protected override void PostCreateAssetWork(VirtualTexturingSettings asset) - { - - } - } - [MenuItem("Assets/Create/Rendering/Diffusion Profile", priority = CoreUtils.assetCreateMenuPriority2)] static void MenuCreateDiffusionProfile() { @@ -289,13 +281,6 @@ static void MenuCreateDiffusionProfile() ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance(), "New Diffusion Profile.asset", icon, null); } - [MenuItem("Assets/Create/Rendering/Virtual Texturing Settings", priority = CoreUtils.assetCreateMenuPriority2)] - static void MenuCreateVirtualTexturingSettings() - { - var icon = EditorGUIUtility.FindTexture("ScriptableObject Icon"); - ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance(), "New Virtual Texturing Settings.asset", icon, null); - } - [MenuItem("Assets/Create/Shader/HDRP/Custom FullScreen Pass")] static void MenuCreateCustomFullScreenPassShader() { diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index e78b1a0adf4..c1013ce325d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -23,6 +23,7 @@ public class GeneralSection public static readonly GUIContent materialSectionTitle = EditorGUIUtility.TrTextContent("Material"); public static readonly GUIContent postProcessSectionTitle = EditorGUIUtility.TrTextContent("Post-processing"); public static readonly GUIContent xrTitle = EditorGUIUtility.TrTextContent("XR"); + public static readonly GUIContent virtualTexturingTitle = EditorGUIUtility.TrTextContent("Virtual Texturing"); public static readonly GUIContent lightLoopSubTitle = EditorGUIUtility.TrTextContent("Lights"); public static readonly GUIContent postProcessQualitySubTitle = EditorGUIUtility.TrTextContent("Post-processing Quality Settings"); public static readonly GUIContent lightingQualitySettings = EditorGUIUtility.TrTextContent("Lighting Quality Settings"); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index 7736f158ca3..340d009b552 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -69,6 +69,10 @@ internal enum SelectedFrameSettings internal static SelectedFrameSettings selectedFrameSettings; +#if ENABLE_VIRTUALTEXTURES + internal static VirtualTexturingSettingsUI virtualTexturingSettingsUI = new VirtualTexturingSettingsUI(); +#endif + static HDRenderPipelineUI() { Inspector = CED.Group( @@ -100,8 +104,10 @@ static HDRenderPipelineUI() CED.FoldoutGroup(Styles.bloomQualitySettings, Expandable.BloomQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionBloomQualitySettings), CED.FoldoutGroup(Styles.chromaticAberrationQualitySettings, Expandable.ChromaticAberrationQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionChromaticAberrationQualitySettings) ), - CED.FoldoutGroup(Styles.xrTitle, Expandable.XR, k_ExpandedState, Drawer_SectionXRSettings), - CED.FoldoutGroup(EditorGUIUtility.TrTextContent("Virtual Texturing"), Expandable.VirtualTexturing, k_ExpandedState, Drawer_VirtualTexturingSettings) + CED.FoldoutGroup(Styles.xrTitle, Expandable.XR, k_ExpandedState, Drawer_SectionXRSettings) +#if ENABLE_VIRTUALTEXTURES + ,CED.FoldoutGroup(Styles.virtualTexturingTitle, Expandable.VirtualTexturing, k_ExpandedState, Drawer_SectionVTSettings) +#endif ); // fix init of selection along what is serialized @@ -573,6 +579,13 @@ static void Drawer_SectionXRSettings(SerializedHDRenderPipelineAsset serialized, EditorGUILayout.PropertyField(serialized.renderPipelineSettings.xrSettings.occlusionMesh, Styles.XROcclusionMesh); } +#if ENABLE_VIRTUALTEXTURES + static void Drawer_SectionVTSettings(SerializedHDRenderPipelineAsset serialized, Editor owner) + { + virtualTexturingSettingsUI.OnGUI(serialized, owner); + } +#endif + static private bool m_ShowDoFLowQualitySection = false; static private bool m_ShowDoFMediumQualitySection = false; static private bool m_ShowDoFHighQualitySection = false; @@ -899,11 +912,6 @@ static void DrawDiffusionProfileElement(SerializedProperty element, Rect rect, i EditorGUI.ObjectField(rect, element, EditorGUIUtility.TrTextContent("Profile " + index)); } - static void Drawer_VirtualTexturingSettings(SerializedHDRenderPipelineAsset serialized, Editor owner) - { - EditorGUILayout.PropertyField(serialized.virtualTexturingSettings, EditorGUIUtility.TrTextContent("Virtual Texturing Settings")); - } - const string supportedFormaterMultipleValue = "\u2022 {0} --Multiple different values--"; const string supportedFormater = "\u2022 {0} ({1})"; const string supportedLitShaderModeFormater = "\u2022 {0}: {1} ({2})"; diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs index b7f6f84de14..d5b08d67af1 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs @@ -16,11 +16,13 @@ class SerializedHDRenderPipelineAsset public SerializedProperty allowShaderVariantStripping; public SerializedProperty enableSRPBatcher; public SerializedProperty shaderVariantLogLevel; - public SerializedProperty virtualTexturingSettings; public SerializedRenderPipelineSettings renderPipelineSettings; public SerializedFrameSettings defaultFrameSettings; public SerializedFrameSettings defaultBakedOrCustomReflectionFrameSettings; public SerializedFrameSettings defaultRealtimeReflectionFrameSettings; +#if ENABLE_VIRTUALTEXTURES + public SerializedVirtualTexturingSettings virtualTexturingSettings; +#endif //RenderPipelineResources not always exist and thus cannot be serialized normally. public bool editorResourceHasMultipleDifferentValues @@ -59,12 +61,15 @@ public SerializedHDRenderPipelineAsset(SerializedObject serializedObject) allowShaderVariantStripping = serializedObject.Find((HDRenderPipelineAsset s) => s.allowShaderVariantStripping); enableSRPBatcher = serializedObject.Find((HDRenderPipelineAsset s) => s.enableSRPBatcher); shaderVariantLogLevel = serializedObject.Find((HDRenderPipelineAsset s) => s.shaderVariantLogLevel); - virtualTexturingSettings = serializedObject.Find((HDRenderPipelineAsset s) => s.virtualTexturingSettings); renderPipelineSettings = new SerializedRenderPipelineSettings(serializedObject.FindProperty("m_RenderPipelineSettings")); defaultFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultCameraFrameSettings"), null); //no overrides in HDRPAsset defaultBakedOrCustomReflectionFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultBakedOrCustomReflectionFrameSettings"), null); //no overrides in HDRPAsset defaultRealtimeReflectionFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultRealtimeReflectionFrameSettings"), null); //no overrides in HDRPAsset + +#if ENABLE_VIRTUALTEXTURES + virtualTexturingSettings = new SerializedVirtualTexturingSettings(serializedObject.FindProperty("virtualTexturingSettings")); +#endif } public void Update() diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs new file mode 100644 index 00000000000..034eecb0004 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs @@ -0,0 +1,25 @@ +using UnityEditor.Rendering; +using UnityEngine.Rendering.HighDefinition; + +namespace UnityEditor.Rendering.HighDefinition +{ +#if ENABLE_VIRTUALTEXTURES + public sealed class SerializedVirtualTexturingSettings + { + public SerializedProperty root; + + public SerializedProperty cpuCacheSizeInMegaBytes; + public SerializedProperty gpuCacheSizeInMegaBytes; + public SerializedProperty gpuCacheSizeOverridesStreaming; + + public SerializedVirtualTexturingSettings(SerializedProperty root) + { + this.root = root; + + cpuCacheSizeInMegaBytes = root.Find((VirtualTexturingSettingsSRP s) => s.cpuCacheSizeInMegaBytes); + gpuCacheSizeInMegaBytes = root.Find((VirtualTexturingSettingsSRP s) => s.gpuCacheSizeInMegaBytes); + gpuCacheSizeOverridesStreaming = root.Find((VirtualTexturingSettingsSRP s) => s.gpuCacheSizeOverridesStreaming); + } + } +#endif +} diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs.meta b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs.meta similarity index 83% rename from com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs.meta rename to com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs.meta index 4ae04e21758..d2b9c82d69a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs.meta +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 70f0b6c3ec6c0204cb6c42d12a295533 +guid: 2b6b35c2a70589145b2353009c41ecf8 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs deleted file mode 100644 index 178e6c3d607..00000000000 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsEditor.cs +++ /dev/null @@ -1,124 +0,0 @@ -using UnityEditor.Rendering; -using UnityEngine; -using UnityEngine.Experimental.Rendering; -using UnityEngine.Rendering; -using VirtualTexturingSettings = UnityEngine.Rendering.HighDefinition.VirtualTexturingSettings; - -#if ENABLE_VIRTUALTEXTURES -namespace UnityEditor.Rendering.HighDefinition -{ - [CustomEditor(typeof(VirtualTexturingSettings))] - partial class VirtualTexturingSettingsEditor : HDBaseEditor - { - sealed class Settings - { - internal SerializedProperty self; - internal UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings objReference; - - internal SerializedProperty cpuCacheSize; - internal SerializedProperty gpuCacheSize; - internal SerializedProperty gpuCacheSizeOverrides; - } - - Settings m_Settings; - - private bool m_Dirty = false; - - protected override void OnEnable() - { - base.OnEnable(); - - var serializedSettings = properties.Find(x => x.settings); - - var rp = new RelativePropertyFetcher(serializedSettings); - - m_Settings = new Settings - { - self = serializedSettings, - objReference = m_Target.settings, - - cpuCacheSize = rp.Find(x => x.cpuCache.sizeInMegaBytes), - gpuCacheSize = rp.Find(x => x.gpuCache.sizeInMegaBytes), - gpuCacheSizeOverrides = rp.Find(x => x.gpuCache.sizeOverrides), - }; - - Undo.undoRedoPerformed += UpdateSettings; - } - - void OnDisable() - { - Undo.undoRedoPerformed -= UpdateSettings; - } - - void ApplyChanges() - { - UnityEngine.Rendering.VirtualTexturing.System.ApplyVirtualTexturingSettings(m_Settings.objReference); - } - - public override void OnInspectorGUI() - { - CheckStyles(); - - serializedObject.Update(); - - EditorGUILayout.Space(); - - EditorGUI.indentLevel++; - - using (var scope = new EditorGUI.ChangeCheckScope()) - { - EditorGUILayout.PropertyField(m_Settings.cpuCacheSize, s_Styles.cpuCacheSize); - EditorGUILayout.PropertyField(m_Settings.gpuCacheSize, s_Styles.gpuCacheSize); - - serializedObject.ApplyModifiedProperties(); - - if (scope.changed) - { - m_Dirty = true; - } - } - - EditorGUILayout.Space(); - - if (m_Dirty) - { - if (GUILayout.Button("Apply")) - { - ApplyChanges(); - m_Dirty = false; - } - } - - EditorGUILayout.Space(); - EditorGUI.indentLevel--; - - serializedObject.ApplyModifiedProperties(); - } - - void UpdateSettings() - { - //m_Target.settings.Validate(); - } - sealed class Styles - { - public readonly GUIContent cpuCacheSize = new GUIContent("CPU Cache Size"); - public readonly GUIContent gpuCacheSize = new GUIContent("GPU Cache Size"); - - public Styles() - { - - } - } - - static Styles s_Styles; - - // Can't use a static initializer in case we need to create GUIStyle in the Styles class as - // these can only be created with an active GUI rendering context - void CheckStyles() - { - if (s_Styles == null) - s_Styles = new Styles(); - } - } -} -#endif diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs new file mode 100644 index 00000000000..7d562e0727d --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs @@ -0,0 +1,255 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering.VirtualTexturing; + +#if ENABLE_VIRTUALTEXTURES +namespace UnityEditor.Rendering.HighDefinition +{ + class VirtualTexturingSettingsUI + { + private ReorderableList m_GPUCacheSizeOverrideListStreaming; + private SerializedProperty m_GPUCacheSizeOverridesPropertyStreaming; + + public SerializedObject serializedObject; + private SerializedHDRenderPipelineAsset serializedRPAsset; + + private const int CPUCacheSizeMinValue = 64; + private const int GPUCacheSizeMinValue = 32; + + public void OnGUI(SerializedHDRenderPipelineAsset serialized, Editor owner) + { + CheckStyles(); + + serializedObject = serialized.serializedObject; + serializedRPAsset = serialized; + + serializedObject.Update(); + + EditorGUILayout.Space(); + + using (var scope = new EditorGUI.ChangeCheckScope()) + { + serialized.virtualTexturingSettings.cpuCacheSizeInMegaBytes.intValue = Mathf.Max(CPUCacheSizeMinValue, EditorGUILayout.DelayedIntField(s_Styles.cpuCacheSize, serialized.virtualTexturingSettings.cpuCacheSizeInMegaBytes.intValue)); + serialized.virtualTexturingSettings.gpuCacheSizeInMegaBytes.intValue = Mathf.Max(GPUCacheSizeMinValue, EditorGUILayout.DelayedIntField(s_Styles.gpuCacheSize, serialized.virtualTexturingSettings.gpuCacheSizeInMegaBytes.intValue)); + + // GPU Cache size overrides + if (m_GPUCacheSizeOverrideListStreaming == null || + m_GPUCacheSizeOverridesPropertyStreaming != serialized.virtualTexturingSettings.gpuCacheSizeOverridesStreaming) + { + m_GPUCacheSizeOverridesPropertyStreaming = serialized.virtualTexturingSettings.gpuCacheSizeOverridesStreaming; + m_GPUCacheSizeOverrideListStreaming = CreateGPUCacheSizeOverrideList(m_GPUCacheSizeOverridesPropertyStreaming, DrawStreamingOverrideElement); + } + + m_GPUCacheSizeOverrideListStreaming.DoLayoutList(); + } + + serialized.serializedObject.ApplyModifiedProperties(); + } + + VirtualTexturingGPUCacheSizeOverride[] GetGPUCacheSizeOverrideArrayFromProperty(SerializedProperty property) + { + List overrides = new List(); + for (int i = 0; i < property.arraySize; ++i) + { + SerializedProperty overrideProperty = property.GetArrayElementAtIndex(i); + overrides.Add(new VirtualTexturingGPUCacheSizeOverride() + { format = (GraphicsFormat)overrideProperty.FindPropertyRelative("format").intValue, usage = (VirtualTexturingCacheUsage)overrideProperty.FindPropertyRelative("usage").intValue, sizeInMegaBytes = (uint)overrideProperty.FindPropertyRelative("sizeInMegaBytes").intValue }); + } + + return overrides.ToArray(); + } + + ReorderableList CreateGPUCacheSizeOverrideList(SerializedProperty property, ReorderableList.ElementCallbackDelegate drawCallback) + { + ReorderableList list = new ReorderableList(property.serializedObject, property); + + list.drawHeaderCallback = + (Rect rect) => + { + }; + + list.drawElementCallback = drawCallback; + + list.onAddCallback = (l) => + { + List availableFormats = new List(EditorHelpers.QuerySupportedFormats()); + + // We can't just pass in existing overrides as a parameter to CreateGPUCacheSizeOverrideList() because lambdas can't capture ref params. + VirtualTexturingGPUCacheSizeOverride[] existingOverrides = GetGPUCacheSizeOverrideArrayFromProperty(serializedRPAsset.virtualTexturingSettings.gpuCacheSizeOverridesStreaming); + RemoveOverriddenFormats(availableFormats, existingOverrides); + + int index = property.arraySize; + property.InsertArrayElementAtIndex(index); + var newItemProperty = property.GetArrayElementAtIndex(index); + newItemProperty.FindPropertyRelative("format").intValue = availableFormats.Count > 0 ? (int)availableFormats[0] : 0; + newItemProperty.FindPropertyRelative("usage").intValue = (int)VirtualTexturingCacheUsage.Streaming; + newItemProperty.FindPropertyRelative("sizeInMegaBytes").intValue = 64; + }; + + return list; + } + + void GraphicsFormatToFormatAndChannelTransformString(GraphicsFormat graphicsFormat, out string format, out string channelTransform) + { + string formatString = graphicsFormat.ToString(); + int lastUnderscore = formatString.LastIndexOf('_'); + if (lastUnderscore < 0) + { + format = "None"; + channelTransform = "None"; + return; + } + format = formatString.Substring(0, lastUnderscore); + channelTransform = formatString.Substring(lastUnderscore + 1); + } + GraphicsFormat FormatAndChannelTransformStringToGraphicsFormat(string format, string channelTransform) + { + return (GraphicsFormat)Enum.Parse(typeof(GraphicsFormat), $"{format}_{channelTransform}"); + } + + void RemoveOverriddenFormats(List formats, VirtualTexturingGPUCacheSizeOverride[] overrides) + { + foreach (var existingCacheSizeOverride in overrides) + { + formats.Remove(existingCacheSizeOverride.format); + } + } + + void GPUCacheSizeOverridesGUI(Rect rect, int overrideIdx, SerializedProperty overrideListProperty, VirtualTexturingGPUCacheSizeOverride[] overrideList) + { + var cacheSizeOverrideProperty = overrideListProperty.GetArrayElementAtIndex(overrideIdx); + var cacheSizeOverride = overrideList[overrideIdx]; + + List availableFormats = new List(EditorHelpers.QuerySupportedFormats()); + + RemoveOverriddenFormats(availableFormats, overrideList); + + // Group formats + Dictionary> formatGroups = new Dictionary>(); + foreach (GraphicsFormat graphicsFormat in availableFormats) + { + GraphicsFormatToFormatAndChannelTransformString(graphicsFormat, out var format, out var channelTransform); + if (!formatGroups.ContainsKey(format)) + { + formatGroups.Add(format, new List()); + } + formatGroups[format].Add(channelTransform); + } + + GraphicsFormatToFormatAndChannelTransformString((GraphicsFormat)cacheSizeOverrideProperty.FindPropertyRelative("format").intValue, out string formatString, out string channelTransformString); + + // GUI Drawing + + float overrideWidth = rect.width; + + float spacing = Math.Min(5, overrideWidth * 0.02f); + + overrideWidth -= 2 * spacing; + + float formatLabelWidth = Math.Min(60, overrideWidth * 0.25f); + float formatWidth = overrideWidth * 0.3f; + float channelTransformWidth = overrideWidth * 0.25f; + float sizeLabelWidth = Math.Min(45, overrideWidth * 0.2f); + float sizeWidth = overrideWidth * 0.15f; + + // Format + rect.width = formatLabelWidth; + rect.position += new Vector2(-15, 0); + EditorGUI.LabelField(rect, s_Styles.gpuCacheSizeOverrideFormat); + + rect.position += new Vector2(formatLabelWidth, 0); + rect.width = formatWidth; + if (EditorGUI.DropdownButton(rect, new GUIContent(formatString), FocusType.Keyboard)) + { + GenericMenu menu = new GenericMenu(); + foreach (string possibleFormat in formatGroups.Keys) + { + string localFormat = possibleFormat; + menu.AddItem(new GUIContent(localFormat), formatString == localFormat, () => + { + // Make sure the channelTransform is valid for the format. + List formatGroup = formatGroups[localFormat]; + if (formatGroup.FindIndex((string possibleChannelTransform) => { return possibleChannelTransform == channelTransformString; }) == -1) + { + channelTransformString = formatGroup[0]; + } + + cacheSizeOverrideProperty.FindPropertyRelative("format").intValue = (int)FormatAndChannelTransformStringToGraphicsFormat(localFormat, channelTransformString); + serializedObject.ApplyModifiedProperties(); + }); + } + + menu.ShowAsContext(); + } + + // Channel transform + rect.position += new Vector2(formatWidth, 0); + rect.width = channelTransformWidth; + if (EditorGUI.DropdownButton(rect, new GUIContent(channelTransformString), FocusType.Keyboard)) + { + GenericMenu menu = new GenericMenu(); + if (formatGroups.ContainsKey(formatString)) + { + List possibleChannelTransforms = formatGroups[formatString]; + possibleChannelTransforms.Add(channelTransformString); + possibleChannelTransforms.Sort(); + + foreach (string possibleChannelTransform in possibleChannelTransforms) + { + string localChannelTransform = possibleChannelTransform; + menu.AddItem(new GUIContent(localChannelTransform), localChannelTransform == channelTransformString, () => + { + GraphicsFormat format = FormatAndChannelTransformStringToGraphicsFormat(formatString, localChannelTransform); + cacheSizeOverrideProperty.FindPropertyRelative("format").intValue = (int)format; + serializedObject.ApplyModifiedProperties(); + }); + } + } + menu.ShowAsContext(); + } + + // Size + rect.position += new Vector2(channelTransformWidth + spacing, 0); + rect.width = sizeLabelWidth; + + EditorGUI.LabelField(rect, s_Styles.gpuCacheSizeOverrideSize); + + rect.position += new Vector2(sizeLabelWidth, 0); + rect.width = sizeWidth; + + cacheSizeOverride.sizeInMegaBytes = (uint) Mathf.Max(GPUCacheSizeMinValue, + EditorGUI.DelayedIntField(rect, (int) cacheSizeOverride.sizeInMegaBytes)); + cacheSizeOverrideProperty.FindPropertyRelative("sizeInMegaBytes").intValue = + (int) cacheSizeOverride.sizeInMegaBytes; + } + + void DrawStreamingOverrideElement(Rect rect, int overrideIdx, bool active, bool focused) + { + GPUCacheSizeOverridesGUI(rect, overrideIdx, m_GPUCacheSizeOverridesPropertyStreaming, GetGPUCacheSizeOverrideArrayFromProperty(serializedRPAsset.virtualTexturingSettings.gpuCacheSizeOverridesStreaming)); + } + + sealed class Styles + { + public readonly GUIContent cpuCacheSize = new GUIContent("CPU Cache Size", "Amount of CPU memory (in MB) that can be allocated by the Virtual Texturing system to use to cache texture data."); + public readonly GUIContent gpuCacheSize = new GUIContent("GPU Cache Size per Format", "Amount of GPU memory (in MB) that can be allocated per format by the Virtual Texturing system to cache texture data. Can be overridden to use a different size per format."); + + public readonly GUIContent gpuCacheSizeOverrideFormat = new GUIContent("Format", "Format and channel transform that will be overridden."); + public readonly GUIContent gpuCacheSizeOverrideSize = new GUIContent("Size", "Size (in MB) of the override."); + } + + static Styles s_Styles; + + // Can't use a static initializer in case we need to create GUIStyle in the Styles class as + // these can only be created with an active GUI rendering context + void CheckStyles() + { + if (s_Styles == null) + s_Styles = new Styles(); + } + } +} +#endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs.meta b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs.meta similarity index 83% rename from com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs.meta rename to com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs.meta index 46d3b4a8af0..0df3a0bc55d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs.meta +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 06bf2c1824f37b0408dc260f4cdd7d98 +guid: 33b486c1a65371b4391f4e7c4c53f658 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset index a5fe482a2e2..54cdc85056f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset @@ -48,6 +48,32 @@ MonoBehaviour: m_OverrideState: 0 m_Value: 8 min: 2 +--- !u!114 &-2292924983350074914 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 06bf2c1824f37b0408dc260f4cdd7d98, type: 3} + m_Name: VirtualTexturingSettings + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + cpuCacheSizeInMegaBytes: + m_OverrideState: 0 + m_Value: 256 + min: 2 + gpuCacheSizeInMegaBytes: + m_OverrideState: 1 + m_Value: 128 + min: 2 + gpuCacheSizeOverridesOverridden: 0 + gpuCacheSizeOverridesShared: [] + gpuCacheSizeOverridesStreaming: [] + gpuCacheSizeOverridesProcedural: [] --- !u!114 &-1016694868962581565 MonoBehaviour: m_ObjectHideFlags: 3 @@ -118,6 +144,7 @@ MonoBehaviour: - {fileID: 1932259527246508038} - {fileID: 448115243408767295} - {fileID: -7089757308646879465} + - {fileID: -2292924983350074914} --- !u!114 &448115243408767295 MonoBehaviour: m_ObjectHideFlags: 3 diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 0dfec8112b0..290c22937e4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -360,13 +360,13 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau #endif #if ENABLE_VIRTUALTEXTURES - if (asset.virtualTexturingSettings) + if (asset.virtualTexturingSettings != null) { - VirtualTexturing.System.ApplyVirtualTexturingSettings(asset.virtualTexturingSettings.settings); + VirtualTexturing.System.ApplyVirtualTexturingSettings(asset.virtualTexturingSettings.GetSettings()); } else { - VirtualTexturing.System.ApplyVirtualTexturingSettings(VirtualTexturingSettings.Default); + VirtualTexturing.System.ApplyVirtualTexturingSettings(VirtualTexturingSettingsSRP.Default); } #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index 0426c5ce4c1..cb3d89af577 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -26,7 +26,7 @@ public partial class HDRenderPipelineAsset : RenderPipelineAsset, IVirtualTextur public void OnEnable() { - //virtualTexturingSettings = new VirtualTexturingSettings(); + } void Reset() => OnValidate(); @@ -183,9 +183,6 @@ internal ReflectionSystemParameters reflectionSystemParameters [SerializeField] internal DiffusionProfileSettings[] diffusionProfileSettingsList = new DiffusionProfileSettings[0]; - [SerializeField] - internal VirtualTexturingSettings virtualTexturingSettings; - void UpdateRenderingLayerNames() { m_RenderingLayerNames = new string[32]; @@ -261,6 +258,10 @@ public override Shader defaultShader internal List beforePostProcessCustomPostProcesses = new List(); [SerializeField] internal List afterPostProcessCustomPostProcesses = new List(); +#if ENABLE_VIRTUALTEXTURES + [SerializeField] + public VirtualTexturingSettingsSRP virtualTexturingSettings; +#endif #if UNITY_EDITOR /// HDRP default material. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs deleted file mode 100644 index 73a1d3c6787..00000000000 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettings.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.IO; -using UnityEditor; - -namespace UnityEngine.Rendering.HighDefinition -{ - [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "VirtualTexturing - Settings" + Documentation.endURL)] - public sealed class VirtualTexturingSettings : ScriptableObject - { -#if ENABLE_VIRTUALTEXTURES - public UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings settings = new UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings(); - - public static UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings Default - { - get - { - UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings settings = new UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings(); - settings.cpuCache.sizeInMegaBytes = 64; - settings.gpuCache.sizeInMegaBytes = 128; - return settings; - } - } -#endif - } -} diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs new file mode 100644 index 00000000000..4edc475f96e --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEditor.Rendering; +using UnityEngine.Rendering.VirtualTexturing; + +namespace UnityEngine.Rendering.HighDefinition +{ +#if ENABLE_VIRTUALTEXTURES + [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "VirtualTexturing - Settings" + Documentation.endURL)] + [Serializable] + public sealed class VirtualTexturingSettingsSRP + { + public int cpuCacheSizeInMegaBytes = 256; + public int gpuCacheSizeInMegaBytes = 64; + + // On the UI side we only expose the overrides used for streaming. + public List gpuCacheSizeOverridesStreaming = new List(); + + // Returns settings as passed to the Virtual Texturing API. + public VirtualTexturing.VirtualTexturingSettings GetSettings() + { + VirtualTexturing.VirtualTexturingSettings settings = new VirtualTexturing.VirtualTexturingSettings(); + + settings.cpuCache.sizeInMegaBytes = (uint) cpuCacheSizeInMegaBytes; + + List overrides = new List(); + overrides.AddRange(gpuCacheSizeOverridesStreaming); + settings.gpuCache.sizeOverrides = overrides.ToArray(); + + settings.gpuCache.sizeInMegaBytes = (uint) gpuCacheSizeInMegaBytes; + + return settings; + } + + public static UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings Default + { + get + { + UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings settings = new UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings(); + settings.cpuCache.sizeInMegaBytes = 64; + settings.gpuCache.sizeInMegaBytes = 256; + return settings; + } + } + } +#endif +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs.meta new file mode 100644 index 00000000000..392dfcfb8b0 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b0f8c6d5fdfd2044f8b9c09a8fc27ebc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 0bec9ad67a40f45213d3c4e613678debc81e245d Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Thu, 19 Mar 2020 11:09:40 +0100 Subject: [PATCH 119/143] Fix VT shadergraph after merge Needs more texting works for simple shaders. --- .../Decal/ShaderGraph/DecalMasterNode.cs | 8 ++ .../Material/Eye/ShaderGraph/EyeMasterNode.cs | 7 +- .../Fabric/ShaderGraph/FabricMasterNode.cs | 7 +- .../Hair/ShaderGraph/HairMasterNode.cs | 7 +- .../Lit/ShaderGraph/HDLitMasterNode.cs | 7 +- .../Material/Lit/ShaderGraph/LitPass.template | 5 ++ .../ShaderGraph/StackLitMasterNode.cs | 7 +- .../Unlit/ShaderGraph/HDUnlitMasterNode.cs | 7 +- .../Editor/ShaderGraph/HDPasses.cs | 8 +- .../Editor/ShaderGraph/HDPortMasks.cs | 46 ++++++++++ .../Runtime/Debug/LightingDebug.cs.hlsl | 13 +++ .../RenderPipeline/HDRenderPipelineAsset.cs | 5 -- .../Editor/Data/Graphs/GraphData.cs | 1 + .../Data/Interfaces/IGeneratesInclude.cs | 2 +- .../Editor/Data/MasterNodes/PBRMasterNode.cs | 11 ++- .../Data/MasterNodes/UnlitMasterNode.cs | 10 ++- .../Editor/Data/MasterNodes/VfxMasterNode.cs | 8 ++ .../Nodes/Input/Texture/TextureStackNode.cs | 33 ++++---- .../Editor/Data/Nodes/Utility/SubGraphNode.cs | 14 +++- .../Editor/Data/SubGraph/SubGraphAsset.cs | 17 +++- .../Generation/Interface/IMasterNode.cs | 1 + .../Generation/Processors/GenerationUtils.cs | 12 ++- .../Editor/Generation/Processors/Generator.cs | 83 +++++++++++-------- .../Importers/ShaderSubGraphImporter.cs | 5 +- 24 files changed, 235 insertions(+), 89 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalMasterNode.cs index 57e3aaa431e..687f585367f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalMasterNode.cs @@ -451,5 +451,13 @@ public ToggleData dotsInstancing Dirty(ModificationScope.Graph); } } + + public bool virtualTexturingEnabled + { + get + { + return false; + } + } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs index 8e84d6da77b..642a5585ed8 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs @@ -865,9 +865,12 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } - public override bool SupportsVirtualTexturing() + public bool virtualTexturingEnabled { - return true; + get + { + return true; + } } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs index a4b4b7d8bff..057b5d7238b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs @@ -880,9 +880,12 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } - public override bool SupportsVirtualTexturing() + public bool virtualTexturingEnabled { - return true; + get + { + return true; + } } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs index 7b943d34a33..85a2dd9b03d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs @@ -999,9 +999,12 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } - public override bool SupportsVirtualTexturing() + public bool virtualTexturingEnabled { - return true; + get + { + return true; + } } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs index 7b8756a0178..7c88c230d05 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs @@ -1321,9 +1321,12 @@ public override void ValidateNode() base.ValidateNode(); } - public override bool SupportsVirtualTexturing() + public bool virtualTexturingEnabled { - return true; + get + { + return true; + } } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/LitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/LitPass.template index 66be8b735b1..8683c7c2020 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/LitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/LitPass.template @@ -321,6 +321,11 @@ Pass $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; + //Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define) + //We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved + //This is a limitation of the current MRT approach. + $SurfaceDescription.VTPackedFeedback: builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback; + $DepthOffset: builtinData.depthOffset = surfaceDescription.DepthOffset; #if (SHADERPASS == SHADERPASS_DISTORTION) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs index 8877afd7d50..b5172d9ba6b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs @@ -1734,9 +1734,12 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } - public override bool SupportsVirtualTexturing() + public bool virtualTexturingEnabled { - return true; + get + { + return true; + } } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs index e8ee94decc0..fb9e2404d37 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs @@ -554,9 +554,12 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera base.CollectShaderProperties(collector, generationMode); } - public override bool SupportsVirtualTexturing() + public bool virtualTexturingEnabled { - return true; + get + { + return true; + } } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPasses.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPasses.cs index 6afe77b34c4..fafb588dc9b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPasses.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPasses.cs @@ -182,7 +182,7 @@ public static class PBR // Port Mask vertexPorts = HDPortMasks.Vertex.PBRDefault, - pixelPorts = HDPortMasks.Pixel.PBRDefault, + pixelPorts = HDPortMasks.Pixel.PBRDefaultWithVt, // Collections structs = HDStructCollections.Default, @@ -334,7 +334,7 @@ public static class PBR // Port Mask vertexPorts = HDPortMasks.Vertex.PBRDefault, - pixelPorts = HDPortMasks.Pixel.PBRDefault, + pixelPorts = HDPortMasks.Pixel.PBRDefaultWithVt, // Collections structs = HDStructCollections.Default, @@ -545,7 +545,7 @@ public static class HDLit // Port Mask vertexPorts = HDPortMasks.Vertex.HDLitDefault, - pixelPorts = HDPortMasks.Pixel.HDLitDefault, + pixelPorts = HDPortMasks.Pixel.HDLitDefaultWithVt, // Collections structs = HDStructCollections.Default, @@ -774,7 +774,7 @@ public static class HDLit // Port Mask vertexPorts = HDPortMasks.Vertex.HDLitDefault, - pixelPorts = HDPortMasks.Pixel.HDLitDefault, + pixelPorts = HDPortMasks.Pixel.HDLitDefaultWithVt, // Collections structs = HDStructCollections.Default, diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPortMasks.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPortMasks.cs index 7a61c879d1f..6e2525a2573 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPortMasks.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPortMasks.cs @@ -97,6 +97,20 @@ public static class Pixel PBRMasterNode.AlphaThresholdSlotId, }; + public static int[] PBRDefaultWithVt = new int[] + { + PBRMasterNode.AlbedoSlotId, + PBRMasterNode.NormalSlotId, + PBRMasterNode.MetallicSlotId, + PBRMasterNode.SpecularSlotId, + PBRMasterNode.EmissionSlotId, + PBRMasterNode.SmoothnessSlotId, + PBRMasterNode.OcclusionSlotId, + PBRMasterNode.AlphaSlotId, + PBRMasterNode.AlphaThresholdSlotId, + VirtualTexturingFeedback.OutputSlotID, + }; + public static int[] PBROnlyAlpha = new int[] { PBRMasterNode.AlphaSlotId, @@ -173,6 +187,38 @@ public static class Pixel HDLitMasterNode.DepthOffsetSlotId, }; + public static int[] HDLitDefaultWithVt = new int[] + { + HDLitMasterNode.AlbedoSlotId, + HDLitMasterNode.NormalSlotId, + HDLitMasterNode.BentNormalSlotId, + HDLitMasterNode.TangentSlotId, + HDLitMasterNode.SubsurfaceMaskSlotId, + HDLitMasterNode.ThicknessSlotId, + HDLitMasterNode.DiffusionProfileHashSlotId, + HDLitMasterNode.IridescenceMaskSlotId, + HDLitMasterNode.IridescenceThicknessSlotId, + HDLitMasterNode.SpecularColorSlotId, + HDLitMasterNode.CoatMaskSlotId, + HDLitMasterNode.MetallicSlotId, + HDLitMasterNode.EmissionSlotId, + HDLitMasterNode.SmoothnessSlotId, + HDLitMasterNode.AmbientOcclusionSlotId, + HDLitMasterNode.SpecularOcclusionSlotId, + HDLitMasterNode.AlphaSlotId, + HDLitMasterNode.AlphaThresholdSlotId, + HDLitMasterNode.AnisotropySlotId, + HDLitMasterNode.SpecularAAScreenSpaceVarianceSlotId, + HDLitMasterNode.SpecularAAThresholdSlotId, + HDLitMasterNode.RefractionIndexSlotId, + HDLitMasterNode.RefractionColorSlotId, + HDLitMasterNode.RefractionDistanceSlotId, + HDLitMasterNode.LightingSlotId, + HDLitMasterNode.BackLightingSlotId, + HDLitMasterNode.DepthOffsetSlotId, + VirtualTexturingFeedback.OutputSlotID, + }; + public static int[] HDLitMeta = new int[] { HDLitMasterNode.AlbedoSlotId, diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/LightingDebug.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Debug/LightingDebug.cs.hlsl index 03c4e919259..a2206be2f19 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/LightingDebug.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/LightingDebug.cs.hlsl @@ -32,6 +32,19 @@ #define DEBUGLIGHTFILTERMODE_INDIRECT_REFLECTION_PROBE (128) #define DEBUGLIGHTFILTERMODE_INDIRECT_PLANAR_PROBE (256) +// +// UnityEngine.Rendering.HighDefinition.DebugLightLayersMask: static fields +// +#define DEBUGLIGHTLAYERSMASK_NONE (0) +#define DEBUGLIGHTLAYERSMASK_LIGHT_LAYER1 (1) +#define DEBUGLIGHTLAYERSMASK_LIGHT_LAYER2 (2) +#define DEBUGLIGHTLAYERSMASK_LIGHT_LAYER3 (4) +#define DEBUGLIGHTLAYERSMASK_LIGHT_LAYER4 (8) +#define DEBUGLIGHTLAYERSMASK_LIGHT_LAYER5 (16) +#define DEBUGLIGHTLAYERSMASK_LIGHT_LAYER6 (32) +#define DEBUGLIGHTLAYERSMASK_LIGHT_LAYER7 (64) +#define DEBUGLIGHTLAYERSMASK_LIGHT_LAYER8 (128) + // // UnityEngine.Rendering.HighDefinition.ShadowMapDebugMode: static fields // diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index cb3d89af577..cc1909b3592 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -24,11 +24,6 @@ public partial class HDRenderPipelineAsset : RenderPipelineAsset, IVirtualTextur } - public void OnEnable() - { - - } - void Reset() => OnValidate(); /// diff --git a/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs b/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs index fcb9ec6a5ba..227d058bc53 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs @@ -340,6 +340,7 @@ public GraphData ScratchCopy() string serialized = EditorJsonUtility.ToJson(this, false); GraphData dataCopy = new GraphData(); EditorJsonUtility.FromJsonOverwrite(serialized, dataCopy); + dataCopy.UpdateTargets(); return dataCopy; } diff --git a/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs b/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs index 92cc0b7d587..0c3d2ca9473 100644 --- a/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs +++ b/com.unity.shadergraph/Editor/Data/Interfaces/IGeneratesInclude.cs @@ -2,6 +2,6 @@ namespace UnityEditor.ShaderGraph { interface IGeneratesInclude { - void GenerateNodeInclude(IncludeRegistry registry, GenerationMode generationMode); + void GenerateNodeInclude(IncludeCollection registry, GenerationMode generationMode); } } diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs index 27dfa5f2ad0..e30c52ade2f 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs @@ -326,11 +326,14 @@ public NeededCoordinateSpace RequiresTangent(ShaderStageCapability stageCapabili return validSlots.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresTangent(stageCapability)); } - public override bool SupportsVirtualTexturing() + public bool virtualTexturingEnabled { - // This means if a render pipeline clams to support vt it at least needs to support the PBRMasterNode with VT - var vtRp = UnityEngine.Rendering.GraphicsSettings.currentRenderPipeline as UnityEngine.Rendering.IVirtualTexturingEnabledRenderPipeline; - return (vtRp != null) && vtRp.virtualTexturingEnabled; + get + { + // This means if a render pipeline clams to support vt it at least needs to support the PBRMasterNode with VT + var vtRp = UnityEngine.Rendering.GraphicsSettings.currentRenderPipeline as UnityEngine.Rendering.IVirtualTexturingEnabledRenderPipeline; + return (vtRp != null) && vtRp.virtualTexturingEnabled; + } } } } diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs index 8920f012f97..d2f736ff20c 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs @@ -249,11 +249,13 @@ public NeededCoordinateSpace RequiresTangent(ShaderStageCapability stageCapabili return validSlots.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresTangent(stageCapability)); } - public override bool SupportsVirtualTexturing() + public bool virtualTexturingEnabled { - // This means if a render pipeline clams to support vt it at least needs to support the PBRMasterNode with VT - var vtRp = UnityEngine.Rendering.GraphicsSettings.currentRenderPipeline as UnityEngine.Rendering.IVirtualTexturingEnabledRenderPipeline; - return (vtRp != null) && vtRp.virtualTexturingEnabled; + get { + // This means if a render pipeline clams to support vt it at least needs to support the PBRMasterNode with VT + var vtRp = UnityEngine.Rendering.GraphicsSettings.currentRenderPipeline as UnityEngine.Rendering.IVirtualTexturingEnabledRenderPipeline; + return (vtRp != null) && vtRp.virtualTexturingEnabled; + } } } } diff --git a/com.unity.shadergraph/Editor/Data/MasterNodes/VfxMasterNode.cs b/com.unity.shadergraph/Editor/Data/MasterNodes/VfxMasterNode.cs index 2e7b9ac714d..7ecf09112be 100644 --- a/com.unity.shadergraph/Editor/Data/MasterNodes/VfxMasterNode.cs +++ b/com.unity.shadergraph/Editor/Data/MasterNodes/VfxMasterNode.cs @@ -177,5 +177,13 @@ public NeededCoordinateSpace RequiresPosition(ShaderStageCapability stageCapabil } return validSlots.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresPosition(stageCapability)); } + + public bool virtualTexturingEnabled + { + get + { + return false; + } + } } } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 5023249698e..742d642c009 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -257,7 +257,7 @@ private bool supportedByMasterNode get { var masterNode = owner?.GetNodes().FirstOrDefault(); - return masterNode?.SupportsVirtualTexturing() ?? false; + return masterNode?.virtualTexturingEnabled ?? false; } } @@ -548,7 +548,7 @@ public static void ValidatNodes(IEnumerable nodes, IEnum if (nodeNames.Contains(node.GetStackName()) && !node.isProcedural) { // Add a validation error, values need to be unique - node.owner.AddValidationError(node.tempId, $"Some stack nodes have the same name '{node.GetStackName()}', please ensure all stack nodes have unique names.", ShaderCompilerMessageSeverity.Error); + node.owner.AddValidationError(node.guid, $"Some stack nodes have the same name '{node.GetStackName()}', please ensure all stack nodes have unique names.", ShaderCompilerMessageSeverity.Error); } else { @@ -568,7 +568,7 @@ public static void ValidatNodes(IEnumerable nodes, IEnum if (valueNameLookup.TryGetValue(value, out displayName)) { // Add a validation error, values need to be unique - node.owner.AddValidationError(node.tempId, $"Input slot '{name}' shares it's value '{value}' with another stack '{displayName}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); + node.owner.AddValidationError(node.guid, $"Input slot '{name}' shares it's value '{value}' with another stack '{displayName}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); } else { @@ -587,7 +587,7 @@ public static void ValidatNodes(IEnumerable nodes, IEnum // Todo how to exclude procedurals in subgraphs? if (nodeNames.Contains(subStack)) { - node.owner.AddValidationError(node.tempId, $"A stack node in a subgraph which is exposed through a texture argument has the same name '{subStack}', please ensure all stack nodes have unique names across the whole shader using them.", ShaderCompilerMessageSeverity.Error); + node.owner.AddValidationError(node.guid, $"A stack node in a subgraph which is exposed through a texture argument has the same name '{subStack}', please ensure all stack nodes have unique names across the whole shader using them.", ShaderCompilerMessageSeverity.Error); } else { @@ -603,7 +603,7 @@ public static void ValidatNodes(IEnumerable nodes, IEnum if (valueNameLookup.TryGetValue(kvp.Key, out stackName)) { // Add a validation error, values need to be unique - node.owner.AddValidationError(node.tempId, $"Stack '{kvp.Value}' shares it's value '{kvp.Key}' with another stack '{stackName}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); + node.owner.AddValidationError(node.guid, $"Stack '{kvp.Value}' shares it's value '{kvp.Key}' with another stack '{stackName}'. Please make sure every slot has unique input textures attached to it.", ShaderCompilerMessageSeverity.Error); } else { @@ -792,13 +792,13 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene } } - public void GenerateNodeInclude(IncludeRegistry registry, GenerationMode generationMode) + public void GenerateNodeInclude(IncludeCollection registry, GenerationMode generationMode) { // This is not in templates or headers so this error only gets checked in shaders actually using the VT node // as vt headers get included even if there are no vt nodes yet. IVirtualTexturingEnabledRenderPipeline vtRp = GraphicsSettings.currentRenderPipeline as IVirtualTexturingEnabledRenderPipeline; - if (!supportedByMasterNode) + /*if (!supportedByMasterNode) { // The master node is not white listed for VT just use regular textures even if vt is on for this project. registry.ProvideIncludeBlock("disable-vt-if-unsupported-node", "#define FORCE_VIRTUAL_TEXTURING_OFF 1"); @@ -815,10 +815,10 @@ public void GenerateNodeInclude(IncludeRegistry registry, GenerationMode generat #define FORCE_VIRTUAL_TEXTURING_OFF 1 #error VT cannot be used on transparent surfaces. #endif"); - } + }*/ // Always include the header even if vt is off this ensures the macros providing fallbacks are existing. - registry.ProvideInclude("Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"); + registry.Add("Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl", IncludeLocation.Pregraph); } public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode) @@ -922,6 +922,7 @@ public override PreviewMode previewMode // Node generations public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) { + Debug.Log("Aggregate generate code"); var slots = this.GetInputSlots(); int numSlots = slots.Count(); if (numSlots == 0) @@ -968,10 +969,10 @@ static class VirtualTexturingFeedback public const string subgraphOutputFrefix = "VTFeedbackIn_"; // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output - public static IMasterNode AutoInject(IMasterNode iMasterNode) + public static AbstractMaterialNode AutoInject(AbstractMaterialNode masterNode) { Debug.Log("Inject vt feedback"); - var masterNode = iMasterNode as AbstractMaterialNode; + //var masterNode = iMasterNode as AbstractMaterialNode; var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); var subgraphNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); Debug.Log("SubgraphNodes: " + subgraphNodes.Count); @@ -981,7 +982,7 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) // this avoids unnecessary work of copying the graph and patching it. if (stackNodes.Count <= 0 && subgraphNodes.Count <= 0) { - return iMasterNode; + return masterNode; } bool hasFeedback = false; @@ -1009,7 +1010,7 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) if (!hasFeedback) { Debug.Log("No vt feedback early out"); - return iMasterNode; + return masterNode; } // Duplicate the Graph so we can modify it @@ -1068,20 +1069,20 @@ public static IMasterNode AutoInject(IMasterNode iMasterNode) if (feedbackInputSlot == null) { Debug.LogWarning("Could not find the VT feedback input slot on the master node."); - return iMasterNode; + return masterNode; } var feedbackOutputSlot = feedbackNode.FindOutputSlot(TextureStackAggregateFeedbackNode.AggregateOutputId); if (feedbackOutputSlot == null) { Debug.LogWarning("Could not find the VT feedback output slot on the aggregate node."); - return iMasterNode; + return masterNode; } workingMasterNode.owner.Connect(feedbackOutputSlot.slotReference, feedbackInputSlot.slotReference); workingMasterNode.owner.ClearChanges(); - return workingMasterNode as IMasterNode; + return workingMasterNode; } // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs index 93e57b5fa83..97a8376764b 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs @@ -544,14 +544,22 @@ public virtual void GenerateNodeFunction(FunctionRegistry registry, GenerationMo } } - public virtual void GenerateNodeInclude(IncludeRegistry registry, GenerationMode generationMode) + public virtual void GenerateNodeInclude(IncludeCollection registry, GenerationMode generationMode) { if (asset == null || hasError) return; - foreach (var function in asset.includes) + foreach (var include in asset.includes) { - registry.ProvideIncludeBlock(function.key, function.value); + IncludeLocation location; + if ( Enum.TryParse(include.location, out location) ) + { + registry.Add(include.value, location); + } + else + { + Debug.LogError($"Error in Graph at \"{AssetDatabase.GUIDToAssetPath(subGraphGuid)}\": Sub Graph contains an include with an unknown include location {include.location}.", asset); + } } } diff --git a/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs b/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs index 08d27437612..6dbdfea6ba2 100644 --- a/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs +++ b/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs @@ -19,7 +19,20 @@ public FunctionPair(string key, string value) this.value = value; } } - + + [Serializable] + struct SubGraphInclude + { + public string value; + public string location; + + public SubGraphInclude(string value, string location) + { + this.value = value; + this.location = location; + } + } + class SubGraphAsset : ScriptableObject, ISerializationCallbackReceiver { public bool isValid; @@ -42,7 +55,7 @@ class SubGraphAsset : ScriptableObject, ISerializationCallbackReceiver public List functions = new List(); - public List includes = new List(); + public List includes = new List(); [NonSerialized] public List inputs = new List(); diff --git a/com.unity.shadergraph/Editor/Generation/Interface/IMasterNode.cs b/com.unity.shadergraph/Editor/Generation/Interface/IMasterNode.cs index 5d89a845bb4..8ee6c9acf8b 100644 --- a/com.unity.shadergraph/Editor/Generation/Interface/IMasterNode.cs +++ b/com.unity.shadergraph/Editor/Generation/Interface/IMasterNode.cs @@ -10,6 +10,7 @@ internal interface IMasterNode { string renderQueueTag { get; } string renderTypeTag { get; } + bool virtualTexturingEnabled { get; } ConditionalField[] GetConditionalFields(PassDescriptor pass); void ProcessPreviewMaterial(Material material); } diff --git a/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs b/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs index 5a89614e17e..efadec38537 100644 --- a/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs +++ b/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs @@ -729,6 +729,7 @@ internal static void GenerateSurfaceDescriptionFunction( AbstractMaterialNode rootNode, GraphData graph, ShaderStringBuilder surfaceDescriptionFunction, + IncludeCollection includes, FunctionRegistry functionRegistry, PropertyCollector shaderProperties, KeywordCollector shaderKeywords, @@ -750,7 +751,7 @@ internal static void GenerateSurfaceDescriptionFunction( surfaceDescriptionFunction.AppendLine("{0} surface = ({0})0;", surfaceDescriptionName); for(int i = 0; i < nodes.Count; i++) { - GenerateDescriptionForNode(nodes[i], keywordPermutationsPerNode[i], functionRegistry, surfaceDescriptionFunction, + GenerateDescriptionForNode(nodes[i], keywordPermutationsPerNode[i], includes, functionRegistry, surfaceDescriptionFunction, shaderProperties, shaderKeywords, graph, mode); } @@ -768,6 +769,7 @@ internal static void GenerateSurfaceDescriptionFunction( static void GenerateDescriptionForNode( AbstractMaterialNode activeNode, List keywordPermutations, + IncludeCollection includes, FunctionRegistry functionRegistry, ShaderStringBuilder descriptionFunction, PropertyCollector shaderProperties, @@ -775,6 +777,11 @@ static void GenerateDescriptionForNode( GraphData graph, GenerationMode mode) { + if (activeNode is IGeneratesInclude includeNode) + { + includeNode.GenerateNodeInclude(includes, mode); + } + if (activeNode is IGeneratesFunction functionNode) { functionRegistry.builder.currentNode = activeNode; @@ -874,6 +881,7 @@ internal static void GenerateVertexDescriptionStruct(ShaderStringBuilder builder internal static void GenerateVertexDescriptionFunction( GraphData graph, ShaderStringBuilder builder, + IncludeCollection includes, FunctionRegistry functionRegistry, PropertyCollector shaderProperties, KeywordCollector shaderKeywords, @@ -897,7 +905,7 @@ internal static void GenerateVertexDescriptionFunction( builder.AppendLine("{0} description = ({0})0;", graphOutputStructName); for(int i = 0; i < nodes.Count; i++) { - GenerateDescriptionForNode(nodes[i], keywordPermutationsPerNode[i], functionRegistry, builder, + GenerateDescriptionForNode(nodes[i], keywordPermutationsPerNode[i], includes, functionRegistry, builder, shaderProperties, shaderKeywords, graph, mode); } diff --git a/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs b/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs index c1eb2023107..753ef94d22c 100644 --- a/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs +++ b/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.IO; @@ -30,7 +30,8 @@ class Generator public Generator(GraphData graphData, AbstractMaterialNode outputNode, GenerationMode mode, string name) { m_GraphData = graphData; - m_OutputNode = outputNode; + m_OutputNode = VirtualTexturingFeedback.AutoInject(outputNode); + m_GraphData = m_OutputNode.owner; m_Mode = mode; m_Name = name; @@ -222,6 +223,7 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ // Function Registry var functionBuilder = new ShaderStringBuilder(); var functionRegistry = new FunctionRegistry(functionBuilder); + var graphIncludes = new IncludeCollection(); // Hash table of named $splice(name) commands // Key: splice token @@ -305,36 +307,6 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ spliceCommands.Add("PassPragmas", command); } - // Includes - using (var preGraphIncludeBuilder = new ShaderStringBuilder()) - { - if(pass.includes != null) - { - foreach(IncludeCollection.Item include in pass.includes.Where(x => x.descriptor.location == IncludeLocation.Pregraph)) - { - if(include.TestActive(activeFields)) - preGraphIncludeBuilder.AppendLine(include.value); - } - } - - string command = GenerationUtils.GetSpliceCommand(preGraphIncludeBuilder.ToCodeBlock(), "PreGraphIncludes"); - spliceCommands.Add("PreGraphIncludes", command); - } - using (var postGraphIncludeBuilder = new ShaderStringBuilder()) - { - if(pass.includes != null) - { - foreach(IncludeCollection.Item include in pass.includes.Where(x => x.descriptor.location == IncludeLocation.Postgraph)) - { - if(include.TestActive(activeFields)) - postGraphIncludeBuilder.AppendLine(include.value); - } - } - - string command = GenerationUtils.GetSpliceCommand(postGraphIncludeBuilder.ToCodeBlock(), "PostGraphIncludes"); - spliceCommands.Add("PostGraphIncludes", command); - } - // Keywords using (var passKeywordBuilder = new ShaderStringBuilder()) { @@ -454,6 +426,7 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ GenerationUtils.GenerateVertexDescriptionFunction( m_GraphData, vertexGraphFunctionBuilder, + graphIncludes, functionRegistry, propertyCollector, keywordCollector, @@ -501,6 +474,7 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ m_OutputNode, m_GraphData, pixelGraphFunctionBuilder, + graphIncludes, functionRegistry, propertyCollector, keywordCollector, @@ -524,10 +498,53 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ spliceCommands.Add("GraphPixel", pixelBuilder.ToCodeBlock()); } + // -------------------------------------------------- + // Includes (including Graph Includes) + using (var preGraphIncludeBuilder = new ShaderStringBuilder()) + { + if (pass.includes != null) + { + foreach (IncludeCollection.Item include in pass.includes.Where(x => x.descriptor.location == IncludeLocation.Pregraph)) + { + if (include.TestActive(activeFields)) + preGraphIncludeBuilder.AppendLine(include.value); + } + } + + foreach (IncludeCollection.Item include in graphIncludes.Where(x => x.descriptor.location == IncludeLocation.Pregraph)) + { + if (include.TestActive(activeFields)) + preGraphIncludeBuilder.AppendLine(include.value); + } + + string command = GenerationUtils.GetSpliceCommand(preGraphIncludeBuilder.ToCodeBlock(), "PreGraphIncludes"); + spliceCommands.Add("PreGraphIncludes", command); + } + using (var postGraphIncludeBuilder = new ShaderStringBuilder()) + { + if (pass.includes != null) + { + foreach (IncludeCollection.Item include in pass.includes.Where(x => x.descriptor.location == IncludeLocation.Postgraph)) + { + if (include.TestActive(activeFields)) + postGraphIncludeBuilder.AppendLine(include.value); + } + } + + foreach (IncludeCollection.Item include in graphIncludes.Where(x => x.descriptor.location == IncludeLocation.Pregraph)) + { + if (include.TestActive(activeFields)) + postGraphIncludeBuilder.AppendLine(include.value); + } + + string command = GenerationUtils.GetSpliceCommand(postGraphIncludeBuilder.ToCodeBlock(), "PostGraphIncludes"); + spliceCommands.Add("PostGraphIncludes", command); + } + // -------------------------------------------------- // Graph Functions - if(functionBuilder.length == 0) + if (functionBuilder.length == 0) functionBuilder.AppendLine("// GraphFunctions: "); spliceCommands.Add("GraphFunctions", functionBuilder.ToCodeBlock()); diff --git a/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs b/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs index 9891383b11f..f5f62c52d05 100644 --- a/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs +++ b/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs @@ -77,7 +77,7 @@ public override void OnImportAsset(AssetImportContext ctx) static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) { - var includes = new IncludeRegistry(new ShaderStringBuilder()); + var includes = new IncludeCollection(); var registry = new FunctionRegistry(new ShaderStringBuilder(), true); registry.names.Clear(); asset.includes.Clear(); @@ -166,7 +166,6 @@ static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) } if (node is IGeneratesInclude generatesInclude) { - includes.builder.currentNode = node; generatesInclude.GenerateNodeInclude(includes, GenerationMode.ForReals); } } @@ -217,7 +216,7 @@ static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) } }); - asset.includes.AddRange(includes.names.Select(x => new FunctionPair(x, includes.includes[x].code))); + asset.includes.AddRange(includes.Select(x => new SubGraphInclude(x.descriptor.value, "" + x.descriptor.location))); asset.functions.AddRange(registry.names.Select(x => new FunctionPair(x, registry.sources[x].code))); var collector = new PropertyCollector(); From 8c1fcf38cd2b93183be2a264515c460a205d8cb5 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 20 Mar 2020 16:14:01 +0100 Subject: [PATCH 120/143] Update vt feedback code Feedback used to work by modifying the graph in a temporary copy. This is slow, generated garbage and was error prone. We now generate vt feedback as a "first class citizen" of the shader as part of the code generation. --- .../Editor/ShaderGraph/HDPasses.cs | 20 +- .../Editor/ShaderGraph/HDPortMasks.cs | 46 --- .../Editor/Data/Graphs/GraphData.cs | 12 - .../Data/Graphs/ShaderGraphRequirements.cs | 6 +- .../Editor/Data/Nodes/AbstractMaterialNode.cs | 2 +- .../Nodes/Input/Texture/TextureStackNode.cs | 269 +++++------------- .../Editor/Data/Nodes/Utility/SubGraphNode.cs | 7 + .../Editor/Data/SubGraph/SubGraphAsset.cs | 2 + .../Generation/Descriptors/PassDescriptor.cs | 3 +- .../Generation/Processors/GenerationUtils.cs | 31 +- .../Editor/Generation/Processors/Generator.cs | 11 +- .../Importers/ShaderSubGraphImporter.cs | 14 +- 12 files changed, 139 insertions(+), 284 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPasses.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPasses.cs index fafb588dc9b..ced79072d67 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPasses.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPasses.cs @@ -165,6 +165,8 @@ public static class Unlit // Custom Template passTemplatePath = GetPassTemplatePath("Unlit"), + + virtualTextureFeedback = true, }; } #endregion @@ -182,7 +184,7 @@ public static class PBR // Port Mask vertexPorts = HDPortMasks.Vertex.PBRDefault, - pixelPorts = HDPortMasks.Pixel.PBRDefaultWithVt, + pixelPorts = HDPortMasks.Pixel.PBRDefault, // Collections structs = HDStructCollections.Default, @@ -195,6 +197,8 @@ public static class PBR // Custom Template passTemplatePath = GetPassTemplatePath("PBR"), + + virtualTextureFeedback = true, }; public static PassDescriptor META = new PassDescriptor() @@ -334,7 +338,7 @@ public static class PBR // Port Mask vertexPorts = HDPortMasks.Vertex.PBRDefault, - pixelPorts = HDPortMasks.Pixel.PBRDefaultWithVt, + pixelPorts = HDPortMasks.Pixel.PBRDefault, // Collections structs = HDStructCollections.Default, @@ -348,6 +352,8 @@ public static class PBR // Custom Template passTemplatePath = GetPassTemplatePath("PBR"), + + virtualTextureFeedback = true, }; } #endregion @@ -528,6 +534,8 @@ public static class HDUnlit // Custom Template passTemplatePath = $"{HDUtils.GetHDRenderPipelinePath()}Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template", + + virtualTextureFeedback = true, }; } #endregion @@ -545,7 +553,7 @@ public static class HDLit // Port Mask vertexPorts = HDPortMasks.Vertex.HDLitDefault, - pixelPorts = HDPortMasks.Pixel.HDLitDefaultWithVt, + pixelPorts = HDPortMasks.Pixel.HDLitDefault, // Collections structs = HDStructCollections.Default, @@ -559,6 +567,8 @@ public static class HDLit // Custom Template passTemplatePath = GetPassTemplatePath("Lit"), + + virtualTextureFeedback = true, }; public static PassDescriptor META = new PassDescriptor() @@ -774,7 +784,7 @@ public static class HDLit // Port Mask vertexPorts = HDPortMasks.Vertex.HDLitDefault, - pixelPorts = HDPortMasks.Pixel.HDLitDefaultWithVt, + pixelPorts = HDPortMasks.Pixel.HDLitDefault, // Collections structs = HDStructCollections.Default, @@ -788,6 +798,8 @@ public static class HDLit // Custom Template passTemplatePath = GetPassTemplatePath("Lit"), + + virtualTextureFeedback = true, }; public static PassDescriptor TransparentDepthPostpass = new PassDescriptor() diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPortMasks.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPortMasks.cs index 6e2525a2573..7a61c879d1f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPortMasks.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDPortMasks.cs @@ -97,20 +97,6 @@ public static class Pixel PBRMasterNode.AlphaThresholdSlotId, }; - public static int[] PBRDefaultWithVt = new int[] - { - PBRMasterNode.AlbedoSlotId, - PBRMasterNode.NormalSlotId, - PBRMasterNode.MetallicSlotId, - PBRMasterNode.SpecularSlotId, - PBRMasterNode.EmissionSlotId, - PBRMasterNode.SmoothnessSlotId, - PBRMasterNode.OcclusionSlotId, - PBRMasterNode.AlphaSlotId, - PBRMasterNode.AlphaThresholdSlotId, - VirtualTexturingFeedback.OutputSlotID, - }; - public static int[] PBROnlyAlpha = new int[] { PBRMasterNode.AlphaSlotId, @@ -187,38 +173,6 @@ public static class Pixel HDLitMasterNode.DepthOffsetSlotId, }; - public static int[] HDLitDefaultWithVt = new int[] - { - HDLitMasterNode.AlbedoSlotId, - HDLitMasterNode.NormalSlotId, - HDLitMasterNode.BentNormalSlotId, - HDLitMasterNode.TangentSlotId, - HDLitMasterNode.SubsurfaceMaskSlotId, - HDLitMasterNode.ThicknessSlotId, - HDLitMasterNode.DiffusionProfileHashSlotId, - HDLitMasterNode.IridescenceMaskSlotId, - HDLitMasterNode.IridescenceThicknessSlotId, - HDLitMasterNode.SpecularColorSlotId, - HDLitMasterNode.CoatMaskSlotId, - HDLitMasterNode.MetallicSlotId, - HDLitMasterNode.EmissionSlotId, - HDLitMasterNode.SmoothnessSlotId, - HDLitMasterNode.AmbientOcclusionSlotId, - HDLitMasterNode.SpecularOcclusionSlotId, - HDLitMasterNode.AlphaSlotId, - HDLitMasterNode.AlphaThresholdSlotId, - HDLitMasterNode.AnisotropySlotId, - HDLitMasterNode.SpecularAAScreenSpaceVarianceSlotId, - HDLitMasterNode.SpecularAAThresholdSlotId, - HDLitMasterNode.RefractionIndexSlotId, - HDLitMasterNode.RefractionColorSlotId, - HDLitMasterNode.RefractionDistanceSlotId, - HDLitMasterNode.LightingSlotId, - HDLitMasterNode.BackLightingSlotId, - HDLitMasterNode.DepthOffsetSlotId, - VirtualTexturingFeedback.OutputSlotID, - }; - public static int[] HDLitMeta = new int[] { HDLitMasterNode.AlbedoSlotId, diff --git a/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs b/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs index 227d058bc53..65b776fc6ba 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs @@ -332,18 +332,6 @@ public GraphData() m_GroupItems[Guid.Empty] = new List(); } - // Make a deep copy of the graph through serialization. This means that the returned - // copy will be fully detached from the existing graph including things like registered callbacks... - // Any modifications will remain local to the scratch copy only - public GraphData ScratchCopy() - { - string serialized = EditorJsonUtility.ToJson(this, false); - GraphData dataCopy = new GraphData(); - EditorJsonUtility.FromJsonOverwrite(serialized, dataCopy); - dataCopy.UpdateTargets(); - return dataCopy; - } - public void ClearChanges() { m_AddedNodes.Clear(); diff --git a/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs b/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs index 25e9016a59f..d329648d784 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs @@ -153,7 +153,7 @@ internal ShaderGraphRequirements Union(ShaderGraphRequirements other) return newReqs; } - internal static ShaderGraphRequirements FromNodes(List nodes, ShaderStageCapability stageCapability = ShaderStageCapability.All, bool includeIntermediateSpaces = true) + internal static ShaderGraphRequirements FromNodes(List nodes, ShaderStageCapability stageCapability = ShaderStageCapability.All, bool includeIntermediateSpaces = true, bool vtFeedbackRequiresScreenposition = false) where T : AbstractMaterialNode { NeededCoordinateSpace requiresNormal = nodes.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresNormal(stageCapability)); @@ -161,7 +161,7 @@ internal static ShaderGraphRequirements FromNodes(List nodes, ShaderStageC NeededCoordinateSpace requiresTangent = nodes.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresTangent(stageCapability)); NeededCoordinateSpace requiresViewDir = nodes.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresViewDirection(stageCapability)); NeededCoordinateSpace requiresPosition = nodes.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresPosition(stageCapability)); - bool requiresScreenPosition = nodes.OfType().Any(x => x.RequiresScreenPosition()); + bool requiresScreenPosition = nodes.OfType().Any(x => x.RequiresScreenPosition()) || vtFeedbackRequiresScreenposition; bool requiresVertexColor = nodes.OfType().Any(x => x.RequiresVertexColor()); bool requiresFaceSign = nodes.OfType().Any(x => x.RequiresFaceSign()); bool requiresDepthTexture = nodes.OfType().Any(x => x.RequiresDepthTexture()); @@ -216,4 +216,4 @@ internal static ShaderGraphRequirements FromNodes(List nodes, ShaderStageC return reqs; } } -} \ No newline at end of file +} diff --git a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs index 4b89e00ed5f..039d6151bf2 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs @@ -639,7 +639,7 @@ protected virtual void OnSlotsChanged() public void RemoveSlotsNameNotMatching(IEnumerable slotIds, bool supressWarnings = false) { - var invalidSlots = m_Slots.Select(x => x.id).Except(slotIds).Where( x => x != VirtualTexturingFeedback.OutputSlotID); + var invalidSlots = m_Slots.Select(x => x.id).Except(slotIds); foreach (var invalidSlot in invalidSlots.ToArray()) { diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 742d642c009..896db4e60b1 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -653,6 +653,11 @@ protected virtual string GetStackName() return ProcessStackName(m_StackName); } + public string GetFeedbackVariableName() + { + return GetVariableNameForNode() + "_fb"; + } + private string GetTextureName(int layerIndex, GenerationMode generationMode) { if (isProcedural) @@ -782,11 +787,11 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene } } - if (!noFeedback && feedbackConnected) + if (!noFeedback) { //TODO: Investigate if the feedback pass can use halfs string feedBackCode = string.Format("float4 {0} = GetResolveOutput({1});", - GetVariableNameForSlot(FeedbackSlotId), + GetFeedbackVariableName(), infoVariableName); sb.AppendLine(feedBackCode); } @@ -892,257 +897,113 @@ public bool RequiresTime() } } - class TextureStackAggregateFeedbackNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireRequirePixelCoordinate + static class VirtualTexturingFeedbackUtils { - public const int AggregateOutputId = 0; - const string AggregateOutputName = "FeedbackAggregateOut"; - - public const int AggregateInputFirstId = 1; - - public override bool hasPreview { get { return false; } } - - public TextureStackAggregateFeedbackNode() - { - name = "Feedback Aggregate"; - UpdateNodeAfterDeserialization(); - } - + public const string FeedbackSurfaceDescriptionVariableName = "VTPackedFeedback"; - public override void UpdateNodeAfterDeserialization() - { - AddSlot(new Vector4MaterialSlot(AggregateOutputId, AggregateOutputName, AggregateOutputName, SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment)); - RemoveSlotsNameNotMatching(new int[] { AggregateOutputId }); - } - - public override PreviewMode previewMode - { - get { return PreviewMode.Preview3D; } - } - - // Node generations - public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) + public static int CountFeedbackVariables( + List activeNodesForPass) { - Debug.Log("Aggregate generate code"); - var slots = this.GetInputSlots(); - int numSlots = slots.Count(); - if (numSlots == 0) - { - return; - } + int result = 0; - if (numSlots == 1) - { - string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = GetPackedVTFeedback({GetSlotValue(AggregateInputFirstId, generationMode)});"; - sb.AppendLine(feedBackCode); - } - else if (numSlots > 1) + foreach (var node in activeNodesForPass) { - string arrayName = $"{GetVariableNameForSlot(AggregateOutputId)}_array"; - sb.AppendLine($"float4 {arrayName}[{numSlots}];"); - - int arrayIndex = 0; - foreach (var slot in slots) + if (node is SampleTextureStackNode stNode) { - string code = $"{arrayName}[{arrayIndex}] = {GetSlotValue(AggregateInputFirstId + arrayIndex, generationMode)};"; - sb.AppendLine(code); - arrayIndex++; + result += (stNode.noFeedback) ? 0 : 1; } - string feedBackCode = $"float4 {GetVariableNameForSlot(AggregateOutputId)} = GetPackedVTFeedback({arrayName}[ (IN.{ShaderGeneratorNames.PixelCoordinate}.x + _FrameCount )% (uint){numSlots}]);"; - - sb.AppendLine(feedBackCode); + if (node is SubGraphNode sgNode) + { + if (sgNode.asset == null) continue; + result += sgNode.asset.vtFeedbackVariables.Count; + } } - } - public bool RequiresPixelCoordinate(ShaderStageCapability stageCapability) - { - var slots = this.GetInputSlots(); - int numSlots = slots.Count(); - return numSlots > 1; + return result; } - } - - static class VirtualTexturingFeedback - { - public const int OutputSlotID = 22021982; - public const string subgraphOutputFrefix = "VTFeedbackIn_"; - - // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output - public static AbstractMaterialNode AutoInject(AbstractMaterialNode masterNode) + public static void GenerateVirtualTextureFeedback( + List downstreamNodesIncludingRoot, + List[] keywordPermutationsPerNode, + ShaderStringBuilder surfaceDescriptionFunction) { - Debug.Log("Inject vt feedback"); - //var masterNode = iMasterNode as AbstractMaterialNode; - var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); - var subgraphNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); - Debug.Log("SubgraphNodes: " + subgraphNodes.Count); - - - // Try to find out early if there are no nodes doing VT feedback in the graph - // this avoids unnecessary work of copying the graph and patching it. - if (stackNodes.Count <= 0 && subgraphNodes.Count <= 0) + using (var feedbackVariables = PooledList.Get()) { - return masterNode; - } - - bool hasFeedback = false; - foreach (var node in stackNodes) - { - if (!node.noFeedback) + foreach (var node in downstreamNodesIncludingRoot) { - hasFeedback = true; - break; - } - } + if (node is SampleTextureStackNode stNode) + { + if (stNode.noFeedback) continue; + feedbackVariables.Add(stNode.GetFeedbackVariableName()); + } - if (!hasFeedback) foreach (var node in subgraphNodes) - { - foreach (var slot in node.GetOutputSlots()) + if (node is SubGraphNode sgNode) { - if (slot.shaderOutputName.StartsWith(subgraphOutputFrefix)) + if (sgNode.asset == null) continue; + foreach (var feedbackSlot in sgNode.asset.vtFeedbackVariables) { - hasFeedback = true; - break; + feedbackVariables.Add(node.GetVariableNameForNode() + "_" + feedbackSlot); } } } - if (!hasFeedback) - { - Debug.Log("No vt feedback early out"); - return masterNode; - } - - // Duplicate the Graph so we can modify it - var workingMasterNode = masterNode.owner.ScratchCopy().GetNodeFromGuid(masterNode.guid); - - // inject VTFeedback output slot - var vtFeedbackSlot = new Vector4MaterialSlot(OutputSlotID, "VTPackedFeedback", "VTPackedFeedback", SlotType.Input, Vector4.one, ShaderStageCapability.Fragment); - vtFeedbackSlot.hidden = true; - workingMasterNode.AddSlot(vtFeedbackSlot); - - // Inject Aggregate node - var feedbackNode = new TextureStackAggregateFeedbackNode(); - workingMasterNode.owner.AddNode(feedbackNode); - - // Add inputs to feedback node - int i = 0; - foreach (var node in stackNodes) - { - // Find feedback output slot on the vt node - var stackFeedbackOutputSlot = (node.FindOutputSlot(SampleTextureStackNode.FeedbackSlotId)) as Vector4MaterialSlot; - if (stackFeedbackOutputSlot == null) + if (feedbackVariables.Count == 1) { - // Nodes which are noResolve don't have a resolve slot so just skip them - continue; + string feedBackCode = $"surface.VTPackedFeedback = GetPackedVTFeedback({feedbackVariables[0]});"; + surfaceDescriptionFunction.AppendLine(feedBackCode); } - - // Create a new slot on the aggregate that is similar to the uv input slot - string name = "FeedIn_" + i; - var newSlot = new Vector4MaterialSlot(TextureStackAggregateFeedbackNode.AggregateInputFirstId + i, name, name, SlotType.Input, Vector4.zero, ShaderStageCapability.Fragment); - newSlot.owner = feedbackNode; - feedbackNode.AddSlot(newSlot); - - feedbackNode.owner.Connect(stackFeedbackOutputSlot.slotReference, newSlot.slotReference); - i++; - } - - foreach (var node in subgraphNodes) - { - foreach (var slot in node.GetOutputSlots()) + else if (feedbackVariables.Count > 1) { - if (!slot.shaderOutputName.StartsWith(subgraphOutputFrefix)) continue; - - // Create a new slot on the aggregate that is similar to the uv input slot - string name = "FeedIn_" + i; - var newSlot = new Vector4MaterialSlot(TextureStackAggregateFeedbackNode.AggregateInputFirstId + i, name, name, SlotType.Input, Vector4.zero, ShaderStageCapability.Fragment); - newSlot.owner = feedbackNode; - feedbackNode.AddSlot(newSlot); + string arrayName = $"VTFeedback_array"; + surfaceDescriptionFunction.AppendLine($"float4 {arrayName}[{feedbackVariables.Count}];"); - feedbackNode.owner.Connect(slot.slotReference, newSlot.slotReference); - i++; - } - } + int arrayIndex = 0; + foreach (var variable in feedbackVariables) + { + string code = $"{arrayName}[{arrayIndex}] = {variable};"; + surfaceDescriptionFunction.AppendLine(code); + arrayIndex++; + } - // Add input to master node - var feedbackInputSlot = workingMasterNode.FindInputSlot(OutputSlotID); - if (feedbackInputSlot == null) - { - Debug.LogWarning("Could not find the VT feedback input slot on the master node."); - return masterNode; - } + string feedBackCode = $"surface.{FeedbackSurfaceDescriptionVariableName} = GetPackedVTFeedback({arrayName}[ (IN.{ShaderGeneratorNames.ScreenPosition}.x + _FrameCount )% (uint){feedbackVariables.Count}]);"; - var feedbackOutputSlot = feedbackNode.FindOutputSlot(TextureStackAggregateFeedbackNode.AggregateOutputId); - if (feedbackOutputSlot == null) - { - Debug.LogWarning("Could not find the VT feedback output slot on the aggregate node."); - return masterNode; + surfaceDescriptionFunction.AppendLine(feedBackCode); + } } - - workingMasterNode.owner.Connect(feedbackOutputSlot.slotReference, feedbackInputSlot.slotReference); - workingMasterNode.owner.ClearChanges(); - - return workingMasterNode; } // Automatically add a streaming feedback node and correctly connect it to stack samples are connected to it and it is connected to the master node output - public static SubGraphOutputNode AutoInjectSubgraph(SubGraphOutputNode masterNode) + public static List GetFeedbackVariables(SubGraphOutputNode masterNode) { var stackNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); + var subGraphNodes = GraphUtil.FindDownStreamNodesOfType(masterNode); + List result = new List(); // Early out if there are no VT nodes in the graph - if (stackNodes.Count <= 0) + if (stackNodes.Count <= 0 && subGraphNodes.Count <= 0) { Debug.Log("No vt in subgr"); - return masterNode; + return result; } - bool hasFeedback = false; + // Add inputs to feedback node foreach (var node in stackNodes) { - if (!node.noFeedback) - { - hasFeedback = true; - } - } - if (!hasFeedback) - { - Debug.Log("No feedback in subgr"); - return masterNode; + if (node.noFeedback) continue; + result.Add(node.GetFeedbackVariableName()); } - // Duplicate the Graph so we can modify it - Debug.Log("clonign graph"); - var workingMasterNode = masterNode.owner.ScratchCopy().GetNodeFromGuid(masterNode.guid); - - // Add inputs to feedback node - int i = 0; - foreach (var node in stackNodes) + foreach (var node in subGraphNodes) { - // Find feedback output slot on the vt node - var stackFeedbackOutputSlot = (node.FindOutputSlot(SampleTextureStackNode.FeedbackSlotId)) as Vector4MaterialSlot; - if (stackFeedbackOutputSlot == null) + if (node.asset == null) continue; + foreach (var feedbackSlot in node.asset.vtFeedbackVariables) { - // Nodes which are noResolve don't have a resolve slot so just skip them - Debug.Log("No feedback slot on node, skipping"); - continue; + result.Add(node.GetVariableNameForNode() + "_" + feedbackSlot); } - - // Create a new slot on the master node for each vt feedback - string name = subgraphOutputFrefix + i; - var newSlot = new Vector4MaterialSlot(OutputSlotID + i, name, name, SlotType.Input, Vector4.zero, ShaderStageCapability.Fragment); - newSlot.owner = workingMasterNode; - newSlot.hidden = true; - workingMasterNode.AddSlot(newSlot); - - workingMasterNode.owner.Connect(stackFeedbackOutputSlot.slotReference, newSlot.slotReference); - i++; - - Debug.Log("Added feedback " + name); } - workingMasterNode.owner.ClearChanges(); - return workingMasterNode as SubGraphOutputNode; + return result; } } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs index 97a8376764b..473a5217630 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs @@ -225,6 +225,13 @@ public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMo foreach (var outSlot in asset.outputs) arguments.Add(GetVariableNameForSlot(outSlot.id)); + foreach (var feedbackSlot in asset.vtFeedbackVariables) + { + string feedbackVar = GetVariableNameForNode() + "_" + feedbackSlot; + sb.AppendLine("{0} {1};", ConcreteSlotValueType.Vector4.ToShaderString(ConcretePrecision.Float), feedbackVar); + arguments.Add(feedbackVar); + } + sb.AppendLine("{0}({1});", asset.functionName, arguments.Aggregate((current, next) => string.Format("{0}, {1}", current, next))); } diff --git a/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs b/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs index 6dbdfea6ba2..4e8a34efe46 100644 --- a/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs +++ b/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphAsset.cs @@ -57,6 +57,8 @@ class SubGraphAsset : ScriptableObject, ISerializationCallbackReceiver public List includes = new List(); + public List vtFeedbackVariables = new List(); + [NonSerialized] public List inputs = new List(); diff --git a/com.unity.shadergraph/Editor/Generation/Descriptors/PassDescriptor.cs b/com.unity.shadergraph/Editor/Generation/Descriptors/PassDescriptor.cs index cbb3aafc2ad..7991862fd00 100644 --- a/com.unity.shadergraph/Editor/Generation/Descriptors/PassDescriptor.cs +++ b/com.unity.shadergraph/Editor/Generation/Descriptors/PassDescriptor.cs @@ -1,4 +1,4 @@ -namespace UnityEditor.ShaderGraph +namespace UnityEditor.ShaderGraph { [GenerationAPI] internal struct PassDescriptor @@ -8,6 +8,7 @@ internal struct PassDescriptor public string referenceName; public string lightMode; public bool useInPreview; + public bool virtualTextureFeedback; // Port mask public int[] vertexPorts; diff --git a/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs b/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs index efadec38537..bb9b990d8d5 100644 --- a/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs +++ b/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs @@ -282,6 +282,8 @@ internal static void GetActiveFieldsAndPermutationsForNodes(AbstractMaterialNode NodeUtils.DepthFirstCollectNodesFromNode(localVertexNodes, outputNode, NodeUtils.IncludeSelf.Include, pass.vertexPorts, keywordCollector.permutations[i]); NodeUtils.DepthFirstCollectNodesFromNode(localPixelNodes, outputNode, NodeUtils.IncludeSelf.Include, pass.pixelPorts, keywordCollector.permutations[i]); + bool vtFeedbackRequiresScreenPos = VirtualTexturingFeedbackUtils.CountFeedbackVariables(localPixelNodes) > 0; + // Track each vertex node in this permutation foreach(AbstractMaterialNode vertexNode in localVertexNodes) { @@ -304,7 +306,7 @@ internal static void GetActiveFieldsAndPermutationsForNodes(AbstractMaterialNode // Get requirements for this permutation vertexRequirements[i].SetRequirements(ShaderGraphRequirements.FromNodes(localVertexNodes, ShaderStageCapability.Vertex, false)); - pixelRequirements[i].SetRequirements(ShaderGraphRequirements.FromNodes(localPixelNodes, ShaderStageCapability.Fragment, false)); + pixelRequirements[i].SetRequirements(ShaderGraphRequirements.FromNodes(localPixelNodes, ShaderStageCapability.Fragment, false, vtFeedbackRequiresScreenPos)); // Add active fields var conditionalFields = GetActiveFieldsFromConditionals(GetConditionalFieldsFromGraphRequirements(vertexRequirements[i].requirements, activeFields[i])); @@ -318,9 +320,11 @@ internal static void GetActiveFieldsAndPermutationsForNodes(AbstractMaterialNode // No Keywords else { + bool vtFeedbackRequiresScreenPos = VirtualTexturingFeedbackUtils.CountFeedbackVariables(pixelNodes) > 0; + // Get requirements vertexRequirements.baseInstance.SetRequirements(ShaderGraphRequirements.FromNodes(vertexNodes, ShaderStageCapability.Vertex, false)); - pixelRequirements.baseInstance.SetRequirements(ShaderGraphRequirements.FromNodes(pixelNodes, ShaderStageCapability.Fragment, false)); + pixelRequirements.baseInstance.SetRequirements(ShaderGraphRequirements.FromNodes(pixelNodes, ShaderStageCapability.Fragment, false, vtFeedbackRequiresScreenPos)); // Add active fields var conditionalFields = GetActiveFieldsFromConditionals(GetConditionalFieldsFromGraphRequirements(vertexRequirements.baseInstance.requirements, activeFields.baseInstance)); @@ -690,7 +694,7 @@ internal static void GenerateSurfaceInputTransferCode(ShaderStringBuilder sb, Sh } } - internal static void GenerateSurfaceDescriptionStruct(ShaderStringBuilder surfaceDescriptionStruct, List slots, string structName = "SurfaceDescription", IActiveFieldsSet activeFields = null, bool isSubgraphOutput = false) + internal static void GenerateSurfaceDescriptionStruct(ShaderStringBuilder surfaceDescriptionStruct, List slots, string structName = "SurfaceDescription", IActiveFieldsSet activeFields = null, bool isSubgraphOutput = false, bool virtualTextureFeedback = false) { surfaceDescriptionStruct.AppendLine("struct {0}", structName); using (surfaceDescriptionStruct.BlockSemicolonScope()) @@ -720,6 +724,17 @@ internal static void GenerateSurfaceDescriptionStruct(ShaderStringBuilder surfac } } } + + if (virtualTextureFeedback) + { + surfaceDescriptionStruct.AppendLine("{0} {1};", ConcreteSlotValueType.Vector4.ToShaderString(ConcretePrecision.Float), VirtualTexturingFeedbackUtils.FeedbackSurfaceDescriptionVariableName); + + if (!isSubgraphOutput && activeFields != null) + { + var structField = new FieldDescriptor(structName, VirtualTexturingFeedbackUtils.FeedbackSurfaceDescriptionVariableName, ""); + activeFields.AddAll(structField); + } + } } } @@ -738,7 +753,8 @@ internal static void GenerateSurfaceDescriptionFunction( string surfaceDescriptionName = "SurfaceDescription", Vector1ShaderProperty outputIdProperty = null, IEnumerable slots = null, - string graphInputStructName = "SurfaceDescriptionInputs") + string graphInputStructName = "SurfaceDescriptionInputs", + bool virtualTextureFeedback = false) { if (graph == null) return; @@ -762,6 +778,13 @@ internal static void GenerateSurfaceDescriptionFunction( GenerateSurfaceDescriptionRemap(graph, rootNode, slots, surfaceDescriptionFunction, mode); + if (virtualTextureFeedback) + { + VirtualTexturingFeedbackUtils.GenerateVirtualTextureFeedback(nodes, + keywordPermutationsPerNode, + surfaceDescriptionFunction); + } + surfaceDescriptionFunction.AppendLine("return surface;"); } } diff --git a/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs b/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs index 753ef94d22c..c7ccaeff925 100644 --- a/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs +++ b/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs @@ -30,8 +30,7 @@ class Generator public Generator(GraphData graphData, AbstractMaterialNode outputNode, GenerationMode mode, string name) { m_GraphData = graphData; - m_OutputNode = VirtualTexturingFeedback.AutoInject(outputNode); - m_GraphData = m_OutputNode.owner; + m_OutputNode = outputNode; m_Mode = mode; m_Name = name; @@ -462,10 +461,7 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ // Build pixel graph outputs // Add struct fields to active fields - if (m_OutputNode is SubGraphOutputNode) - GenerationUtils.GenerateSurfaceDescriptionStruct(pixelGraphOutputBuilder, pixelSlots, pixelGraphOutputName, activeFields.baseInstance, true); - else - GenerationUtils.GenerateSurfaceDescriptionStruct(pixelGraphOutputBuilder, pixelSlots, pixelGraphOutputName, activeFields.baseInstance); + GenerationUtils.GenerateSurfaceDescriptionStruct(pixelGraphOutputBuilder, pixelSlots, pixelGraphOutputName, activeFields.baseInstance, m_OutputNode is SubGraphOutputNode, pass.virtualTextureFeedback); // Build pixel graph functions from ShaderPass pixel port mask GenerationUtils.GenerateSurfaceDescriptionFunction( @@ -483,7 +479,8 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ pixelGraphOutputName, null, pixelSlots, - pixelGraphInputName); + pixelGraphInputName, + pass.virtualTextureFeedback); using (var pixelBuilder = new ShaderStringBuilder()) { diff --git a/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs b/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs index f5f62c52d05..1cef108f318 100644 --- a/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs +++ b/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs @@ -96,7 +96,6 @@ static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) asset.path = graph.path; var outputNode = (SubGraphOutputNode)graph.outputNode; - outputNode = VirtualTexturingFeedback.AutoInjectSubgraph(outputNode); asset.outputs.Clear(); outputNode.GetInputSlots(asset.outputs); @@ -115,7 +114,9 @@ static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) } } - asset.requirements = ShaderGraphRequirements.FromNodes(nodes, asset.effectiveShaderStage, false); + asset.vtFeedbackVariables = VirtualTexturingFeedbackUtils.GetFeedbackVariables(outputNode); + + asset.requirements = ShaderGraphRequirements.FromNodes(nodes, asset.effectiveShaderStage, false, asset.vtFeedbackVariables.Count > 1); asset.inputs = graph.properties.ToList(); asset.keywords = graph.keywords.ToList(); asset.graphPrecision = graph.concretePrecision; @@ -190,6 +191,10 @@ static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) foreach (var output in asset.outputs) arguments.Add($"out {output.concreteValueType.ToShaderString(asset.outputPrecision)} {output.shaderOutputName}_{output.id}"); + // Vt Feedback arguments + foreach (var output in asset.vtFeedbackVariables) + arguments.Add($"out {ConcreteSlotValueType.Vector4.ToShaderString(ConcretePrecision.Float)} {output}_out"); + // Create the function prototype from the arguments sb.AppendLine("void {0}({1})" , asset.functionName @@ -213,6 +218,11 @@ static void ProcessSubGraph(SubGraphAsset asset, GraphData graph) { sb.AppendLine($"{slot.shaderOutputName}_{slot.id} = {outputNode.GetSlotValue(slot.id, GenerationMode.ForReals, asset.outputPrecision)};"); } + + foreach (var slot in asset.vtFeedbackVariables) + { + sb.AppendLine($"{slot}_out = {slot};"); + } } }); From 3154d21ee55bed22655d94a55caa987ea63d5932 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 23 Mar 2020 16:03:03 +0100 Subject: [PATCH 121/143] Fix graph validation after latest master merge. --- .../Editor/Data/Graphs/GraphValidation.cs | 1 + .../Nodes/Input/Texture/TextureStackNode.cs | 23 ++++++++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Graphs/GraphValidation.cs b/com.unity.shadergraph/Editor/Data/Graphs/GraphValidation.cs index 42bc474bb24..b444569dc7c 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/GraphValidation.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/GraphValidation.cs @@ -14,6 +14,7 @@ public static void ValidateNode(AbstractMaterialNode node) public static void ValidateGraph(GraphData graph) { GraphDataUtils.ApplyActionLeafFirst(graph, ValidateNode); + SampleTextureStackNode.ValidateTextureStacks(graph); } } } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 896db4e60b1..aef33e541a3 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -1,15 +1,14 @@ +using System; +using System.Collections.Generic; using System.Linq; -using UnityEngine; using UnityEditor.Graphing; -using System.Collections.Generic; -using System; -using System.Globalization; +using UnityEditor.Graphing.Util; +using UnityEditor.Rendering; using UnityEditor.ShaderGraph.Drawing; using UnityEditor.ShaderGraph.Internal; -using UnityEditor.Rendering; -using UnityEngine.UIElements; -using UnityEditor.Graphing.Util; +using UnityEngine; using UnityEngine.Rendering; +using UnityEngine.UIElements; namespace UnityEditor.ShaderGraph { @@ -533,13 +532,11 @@ public static List GetSubGraphInputStacks(SubGraphNode node) return result; } - public static void ValidatNodes(GraphData d) - { - ValidatNodes(d.GetNodes(), d.GetNodes()); - } - - public static void ValidatNodes(IEnumerable nodes, IEnumerable subNodes) + // Texture stacks have some additional 'global' validation to do on the whole graph. This validates this. + public static void ValidateTextureStacks(GraphData d) { + var nodes = d.GetNodes(); + var subNodes = d.GetNodes(); var valueNameLookup = new Dictionary(); var nodeNames = new HashSet(); From 5a94443356eb330a76341bfcb9379a418830fb36 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 24 Mar 2020 09:59:32 +0100 Subject: [PATCH 122/143] Fix compilation of URP, add simple VT sample test to shadergraph tests --- .../Assets/Scenes/InputNodes.unity | 341 +++++++++++++++++- .../Input/Texture/SampleVirtualTexture.mat | 29 ++ .../Texture/SampleVirtualTexture.mat.meta | 8 + .../Texture/SampleVirtualTexture.shadergraph | 37 ++ .../SampleVirtualTexture.shadergraph.meta | 10 + .../MasterNodes/SpriteLitMasterNode.cs | 8 + .../MasterNodes/SpriteUnlitMasterNode.cs | 8 + 7 files changed, 439 insertions(+), 2 deletions(-) create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat.meta create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph.meta diff --git a/TestProjects/ShaderGraph/Assets/Scenes/InputNodes.unity b/TestProjects/ShaderGraph/Assets/Scenes/InputNodes.unity index 6c59d4c1004..f1fd40ec35c 100644 --- a/TestProjects/ShaderGraph/Assets/Scenes/InputNodes.unity +++ b/TestProjects/ShaderGraph/Assets/Scenes/InputNodes.unity @@ -43,7 +43,7 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 1 m_GISettings: serializedVersion: 2 @@ -99,7 +99,8 @@ LightmapSettings: m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 112000000, guid: ccd04a1b46622d842a16aa4d9df371fa, type: 2} - m_UseShadowmask: 0 + m_LightingSettings: {fileID: 4890085278179872738, guid: 71d345a19eeef944088678035dd9cf90, + type: 2} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -119,6 +120,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -169,6 +172,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -193,6 +197,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &577818 MeshFilter: m_ObjectHideFlags: 0 @@ -263,6 +268,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -287,6 +293,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1221712 SphereCollider: m_ObjectHideFlags: 0 @@ -356,6 +363,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -380,6 +388,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &17182308 SphereCollider: m_ObjectHideFlags: 0 @@ -448,6 +457,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -472,6 +482,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &29891251 MeshFilter: m_ObjectHideFlags: 0 @@ -542,6 +553,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -566,6 +578,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &42793508 SphereCollider: m_ObjectHideFlags: 0 @@ -635,6 +648,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -659,6 +673,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &53016697 SphereCollider: m_ObjectHideFlags: 0 @@ -728,6 +743,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -752,6 +768,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &83771984 SphereCollider: m_ObjectHideFlags: 0 @@ -821,6 +838,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -845,6 +863,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &97661565 SphereCollider: m_ObjectHideFlags: 0 @@ -914,6 +933,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -938,6 +958,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &100390684 SphereCollider: m_ObjectHideFlags: 0 @@ -1044,6 +1065,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1068,6 +1090,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &147557062 MeshFilter: m_ObjectHideFlags: 0 @@ -1138,6 +1161,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1162,6 +1186,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &172255954 SphereCollider: m_ObjectHideFlags: 0 @@ -1231,6 +1256,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1255,6 +1281,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &207413613 SphereCollider: m_ObjectHideFlags: 0 @@ -1324,6 +1351,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1348,6 +1376,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &212523233 SphereCollider: m_ObjectHideFlags: 0 @@ -1417,6 +1446,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1441,6 +1471,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &227977878 SphereCollider: m_ObjectHideFlags: 0 @@ -1509,6 +1540,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1533,6 +1565,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &238486951 MeshFilter: m_ObjectHideFlags: 0 @@ -1663,6 +1696,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1687,6 +1721,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &250086848 SphereCollider: m_ObjectHideFlags: 0 @@ -1756,6 +1791,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1780,6 +1816,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &283589528 SphereCollider: m_ObjectHideFlags: 0 @@ -1849,6 +1886,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1873,6 +1911,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &285294294 SphereCollider: m_ObjectHideFlags: 0 @@ -1992,6 +2031,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2016,6 +2056,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &315644276 SphereCollider: m_ObjectHideFlags: 0 @@ -2234,6 +2275,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2258,6 +2300,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &371422991 SphereCollider: m_ObjectHideFlags: 0 @@ -2327,6 +2370,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2351,6 +2395,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &414293742 SphereCollider: m_ObjectHideFlags: 0 @@ -2420,6 +2465,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2444,6 +2490,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &414435822 SphereCollider: m_ObjectHideFlags: 0 @@ -2513,6 +2560,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2537,6 +2585,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &460208045 SphereCollider: m_ObjectHideFlags: 0 @@ -2606,6 +2655,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2630,6 +2680,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &462242930 SphereCollider: m_ObjectHideFlags: 0 @@ -2699,6 +2750,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2723,6 +2775,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &480521287 SphereCollider: m_ObjectHideFlags: 0 @@ -2792,6 +2845,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2816,6 +2870,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &485539996 SphereCollider: m_ObjectHideFlags: 0 @@ -2929,6 +2984,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2953,6 +3009,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &507897637 SphereCollider: m_ObjectHideFlags: 0 @@ -3022,6 +3079,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3046,6 +3104,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &510972452 SphereCollider: m_ObjectHideFlags: 0 @@ -3115,6 +3174,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3139,6 +3199,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &513781238 SphereCollider: m_ObjectHideFlags: 0 @@ -3208,6 +3269,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3232,6 +3294,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &524449750 SphereCollider: m_ObjectHideFlags: 0 @@ -3301,6 +3364,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3325,6 +3389,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &529652658 SphereCollider: m_ObjectHideFlags: 0 @@ -3394,6 +3459,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3418,6 +3484,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &574756866 SphereCollider: m_ObjectHideFlags: 0 @@ -3487,6 +3554,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3511,6 +3579,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &582133713 SphereCollider: m_ObjectHideFlags: 0 @@ -3580,6 +3649,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3604,6 +3674,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &585441713 SphereCollider: m_ObjectHideFlags: 0 @@ -3669,6 +3740,7 @@ Transform: - {fileID: 1704958864} - {fileID: 1976893045} - {fileID: 697337478} + - {fileID: 775953114} m_Father: {fileID: 134715868} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -3720,6 +3792,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3744,6 +3817,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &628137915 SphereCollider: m_ObjectHideFlags: 0 @@ -3812,6 +3886,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3836,6 +3911,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &644476904 MeshFilter: m_ObjectHideFlags: 0 @@ -3906,6 +3982,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3930,6 +4007,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &661742760 SphereCollider: m_ObjectHideFlags: 0 @@ -3999,6 +4077,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4023,6 +4102,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &697337480 SphereCollider: m_ObjectHideFlags: 0 @@ -4092,6 +4172,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4116,6 +4197,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &715693414 SphereCollider: m_ObjectHideFlags: 0 @@ -4184,6 +4266,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4208,6 +4291,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &735557293 MeshFilter: m_ObjectHideFlags: 0 @@ -4278,6 +4362,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4302,6 +4387,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &738840891 SphereCollider: m_ObjectHideFlags: 0 @@ -4370,6 +4456,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4394,6 +4481,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &770505458 MeshFilter: m_ObjectHideFlags: 0 @@ -4416,6 +4504,101 @@ Transform: m_Father: {fileID: 303484558} m_RootOrder: 10 m_LocalEulerAnglesHint: {x: -90, y: 180, z: -90} +--- !u!1 &775953113 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 775953114} + - component: {fileID: 775953117} + - component: {fileID: 775953116} + - component: {fileID: 775953115} + m_Layer: 0 + m_Name: SamplerStateLinearMirrorOnceTexture2D (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &775953114 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 775953113} + m_LocalRotation: {x: -0, y: -0, z: 1, w: -0.00000035762784} + m_LocalPosition: {x: 3, y: -0, z: -2} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 596523079} + m_RootOrder: 17 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 179.99998} +--- !u!23 &775953115 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 775953113} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8619824a6872a6d46beb954a2f44f534, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!135 &775953116 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 775953113} + 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!33 &775953117 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 775953113} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &801207484 GameObject: m_ObjectHideFlags: 0 @@ -4464,6 +4647,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4488,6 +4672,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &801207487 SphereCollider: m_ObjectHideFlags: 0 @@ -4557,6 +4742,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4581,6 +4767,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &804860715 SphereCollider: m_ObjectHideFlags: 0 @@ -4650,6 +4837,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4674,6 +4862,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &820177706 SphereCollider: m_ObjectHideFlags: 0 @@ -4743,6 +4932,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4767,6 +4957,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &840653960 SphereCollider: m_ObjectHideFlags: 0 @@ -4836,6 +5027,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4860,6 +5052,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &841185861 SphereCollider: m_ObjectHideFlags: 0 @@ -4929,6 +5122,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4953,6 +5147,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &853683123 SphereCollider: m_ObjectHideFlags: 0 @@ -5022,6 +5217,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5046,6 +5242,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &871278867 SphereCollider: m_ObjectHideFlags: 0 @@ -5115,6 +5312,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5139,6 +5337,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &919728591 SphereCollider: m_ObjectHideFlags: 0 @@ -5208,6 +5407,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5232,6 +5432,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &925157437 SphereCollider: m_ObjectHideFlags: 0 @@ -5301,6 +5502,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5325,6 +5527,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &991341885 SphereCollider: m_ObjectHideFlags: 0 @@ -5394,6 +5597,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5418,6 +5622,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1029832736 SphereCollider: m_ObjectHideFlags: 0 @@ -5487,6 +5692,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5511,6 +5717,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1029851379 SphereCollider: m_ObjectHideFlags: 0 @@ -5580,6 +5787,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5604,6 +5812,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1050940237 SphereCollider: m_ObjectHideFlags: 0 @@ -5672,6 +5881,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5696,6 +5906,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1051528461 MeshFilter: m_ObjectHideFlags: 0 @@ -5766,6 +5977,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5790,6 +6002,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1059825223 SphereCollider: m_ObjectHideFlags: 0 @@ -5859,6 +6072,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5883,6 +6097,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1077364020 SphereCollider: m_ObjectHideFlags: 0 @@ -5952,6 +6167,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5976,6 +6192,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1114000236 SphereCollider: m_ObjectHideFlags: 0 @@ -6045,6 +6262,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6069,6 +6287,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1126344843 SphereCollider: m_ObjectHideFlags: 0 @@ -6138,6 +6357,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6162,6 +6382,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1136984179 SphereCollider: m_ObjectHideFlags: 0 @@ -6231,6 +6452,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6255,6 +6477,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1182234435 SphereCollider: m_ObjectHideFlags: 0 @@ -6324,6 +6547,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6348,6 +6572,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1222953126 SphereCollider: m_ObjectHideFlags: 0 @@ -6417,6 +6642,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6441,6 +6667,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1235329771 SphereCollider: m_ObjectHideFlags: 0 @@ -6510,6 +6737,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6534,6 +6762,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1290363524 SphereCollider: m_ObjectHideFlags: 0 @@ -6603,6 +6832,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6627,6 +6857,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1290626768 SphereCollider: m_ObjectHideFlags: 0 @@ -6695,6 +6926,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6719,6 +6951,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1311165579 MeshFilter: m_ObjectHideFlags: 0 @@ -6789,6 +7022,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6813,6 +7047,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1315568619 SphereCollider: m_ObjectHideFlags: 0 @@ -6882,6 +7117,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6906,6 +7142,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1322529935 SphereCollider: m_ObjectHideFlags: 0 @@ -6975,6 +7212,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6999,6 +7237,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1324643245 SphereCollider: m_ObjectHideFlags: 0 @@ -7068,6 +7307,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7092,6 +7332,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1327032209 SphereCollider: m_ObjectHideFlags: 0 @@ -7161,6 +7402,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7185,6 +7427,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1343815778 SphereCollider: m_ObjectHideFlags: 0 @@ -7254,6 +7497,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7278,6 +7522,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1383437970 SphereCollider: m_ObjectHideFlags: 0 @@ -7347,6 +7592,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7371,6 +7617,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1425383531 SphereCollider: m_ObjectHideFlags: 0 @@ -7475,6 +7722,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7499,6 +7747,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1452926176 SphereCollider: m_ObjectHideFlags: 0 @@ -7568,6 +7817,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7592,6 +7842,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1462505747 SphereCollider: m_ObjectHideFlags: 0 @@ -7661,6 +7912,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7685,6 +7937,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1467200803 SphereCollider: m_ObjectHideFlags: 0 @@ -7754,6 +8007,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7778,6 +8032,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1469504154 SphereCollider: m_ObjectHideFlags: 0 @@ -7847,6 +8102,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7871,6 +8127,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1471236226 SphereCollider: m_ObjectHideFlags: 0 @@ -7939,6 +8196,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7963,6 +8221,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1475762080 MeshFilter: m_ObjectHideFlags: 0 @@ -8032,6 +8291,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8056,6 +8316,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1506539578 MeshFilter: m_ObjectHideFlags: 0 @@ -8126,6 +8387,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8150,6 +8412,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1536751011 SphereCollider: m_ObjectHideFlags: 0 @@ -8219,6 +8482,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8243,6 +8507,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1545791080 SphereCollider: m_ObjectHideFlags: 0 @@ -8348,6 +8613,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8372,6 +8638,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1606512716 SphereCollider: m_ObjectHideFlags: 0 @@ -8441,6 +8708,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8465,6 +8733,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1610334440 SphereCollider: m_ObjectHideFlags: 0 @@ -8533,6 +8802,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8557,6 +8827,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1619359163 MeshFilter: m_ObjectHideFlags: 0 @@ -8627,6 +8898,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8651,6 +8923,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1701306557 SphereCollider: m_ObjectHideFlags: 0 @@ -8720,6 +8993,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8744,6 +9018,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1704958866 SphereCollider: m_ObjectHideFlags: 0 @@ -8877,6 +9152,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8901,6 +9177,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1718807272 SphereCollider: m_ObjectHideFlags: 0 @@ -8969,6 +9246,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8993,6 +9271,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1739134292 MeshFilter: m_ObjectHideFlags: 0 @@ -9063,6 +9342,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9087,6 +9367,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1765169125 SphereCollider: m_ObjectHideFlags: 0 @@ -9156,6 +9437,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9180,6 +9462,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1770065823 SphereCollider: m_ObjectHideFlags: 0 @@ -9248,6 +9531,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9272,6 +9556,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1770552485 MeshFilter: m_ObjectHideFlags: 0 @@ -9342,6 +9627,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9366,6 +9652,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1785428293 SphereCollider: m_ObjectHideFlags: 0 @@ -9435,6 +9722,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9459,6 +9747,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1787014627 SphereCollider: m_ObjectHideFlags: 0 @@ -9528,6 +9817,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9552,6 +9842,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1806418204 SphereCollider: m_ObjectHideFlags: 0 @@ -9620,6 +9911,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9644,6 +9936,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1808814367 MeshFilter: m_ObjectHideFlags: 0 @@ -9713,6 +10006,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9737,6 +10031,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1813021371 MeshFilter: m_ObjectHideFlags: 0 @@ -9806,6 +10101,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9830,6 +10126,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1824269726 MeshFilter: m_ObjectHideFlags: 0 @@ -9900,6 +10197,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9924,6 +10222,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1840713833 SphereCollider: m_ObjectHideFlags: 0 @@ -9993,6 +10292,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10017,6 +10317,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1856304762 SphereCollider: m_ObjectHideFlags: 0 @@ -10086,6 +10387,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10110,6 +10412,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1887502894 SphereCollider: m_ObjectHideFlags: 0 @@ -10178,6 +10481,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10202,6 +10506,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1888281877 MeshFilter: m_ObjectHideFlags: 0 @@ -10272,6 +10577,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10296,6 +10602,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1889255734 SphereCollider: m_ObjectHideFlags: 0 @@ -10365,6 +10672,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10389,6 +10697,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1894348793 SphereCollider: m_ObjectHideFlags: 0 @@ -10458,6 +10767,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10482,6 +10792,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1908664928 SphereCollider: m_ObjectHideFlags: 0 @@ -10550,6 +10861,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10574,6 +10886,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1909678460 MeshFilter: m_ObjectHideFlags: 0 @@ -10644,6 +10957,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10668,6 +10982,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1926593707 SphereCollider: m_ObjectHideFlags: 0 @@ -10737,6 +11052,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10761,6 +11077,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1947256755 SphereCollider: m_ObjectHideFlags: 0 @@ -10871,6 +11188,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10895,6 +11213,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1976893047 SphereCollider: m_ObjectHideFlags: 0 @@ -10964,6 +11283,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10988,6 +11308,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1981582517 SphereCollider: m_ObjectHideFlags: 0 @@ -11057,6 +11378,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11081,6 +11403,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1990772824 SphereCollider: m_ObjectHideFlags: 0 @@ -11150,6 +11473,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11174,6 +11498,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2006496221 SphereCollider: m_ObjectHideFlags: 0 @@ -11243,6 +11568,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11267,6 +11593,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2011343687 SphereCollider: m_ObjectHideFlags: 0 @@ -11336,6 +11663,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11360,6 +11688,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2048688198 SphereCollider: m_ObjectHideFlags: 0 @@ -11428,6 +11757,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11452,6 +11782,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &2064675060 MeshFilter: m_ObjectHideFlags: 0 @@ -11522,6 +11853,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11546,6 +11878,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2076468049 SphereCollider: m_ObjectHideFlags: 0 @@ -11615,6 +11948,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11639,6 +11973,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2087670892 SphereCollider: m_ObjectHideFlags: 0 @@ -11708,6 +12043,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11732,6 +12068,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2140997635 SphereCollider: m_ObjectHideFlags: 0 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat new file mode 100644 index 00000000000..8eb500f0263 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat @@ -0,0 +1,29 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SampleVirtualTexture + m_Shader: {fileID: -6465566751694194690, guid: 2c905ae6cf05d1045be9bd0cb88dcfc8, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleVTStack_3B9C242F_Texture_5: + m_Texture: {fileID: 2800000, guid: e18a7160005114c41b390e35a3f4acdc, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: [] + m_Colors: [] + m_BuildTextureStacks: [] diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat.meta new file mode 100644 index 00000000000..4a49b24445c --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8619824a6872a6d46beb954a2f44f534 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph new file mode 100644 index 00000000000..2184b3dc6a7 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph @@ -0,0 +1,37 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"2a18df7a-e934-4be8-ad48-cbcfe54857b9\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample VT Stack\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -345.0,\n \"y\": 70.0,\n \"width\": 167.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e18a7160005114c41b390e35a3f4acdc\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"d496da89-7d87-4d24-a396-1d3737e64412\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false,\n \"m_DOTSInstancing\": false,\n \"m_ShaderGUIOverride\": \"\",\n \"m_OverrideEnabled\": false\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"2a18df7a-e934-4be8-ad48-cbcfe54857b9\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"d496da89-7d87-4d24-a396-1d3737e64412\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "d496da89-7d87-4d24-a396-1d3737e64412" +} \ No newline at end of file diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph.meta new file mode 100644 index 00000000000..6c24fd3d21b --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 2c905ae6cf05d1045be9bd0cb88dcfc8 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteLitMasterNode.cs b/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteLitMasterNode.cs index b97d65ead9e..31d5f9870f2 100644 --- a/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteLitMasterNode.cs +++ b/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteLitMasterNode.cs @@ -150,5 +150,13 @@ public NeededCoordinateSpace RequiresTangent(ShaderStageCapability stageCapabili } return validSlots.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresTangent(stageCapability)); } + + public bool virtualTexturingEnabled + { + get + { + return false; + } + } } } diff --git a/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteUnlitMasterNode.cs b/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteUnlitMasterNode.cs index eb0b3850c50..1747de8f049 100644 --- a/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteUnlitMasterNode.cs +++ b/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteUnlitMasterNode.cs @@ -142,5 +142,13 @@ public NeededCoordinateSpace RequiresTangent(ShaderStageCapability stageCapabili } return validSlots.OfType().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresTangent(stageCapability)); } + + public bool virtualTexturingEnabled + { + get + { + return false; + } + } } } From fb69ed8cdb1718e4766b60d50f7b89a0a8961c7a Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 24 Mar 2020 13:06:57 +0100 Subject: [PATCH 123/143] Reviewer feedback: Rename enableMSAA to isMSAAEnabled and add missing doc. --- .../VFXSpawnerTest_AAAA.expected.txt.meta | 7 ++++ .../VFXSpawnerTest_BCAA.expected.txt.meta | 7 ++++ .../VFXSpawnerTest_CAAA.expected.txt.meta | 7 ++++ .../VFXSpawnerTest_CACA.expected.txt.meta | 7 ++++ .../{Shaders.meta => ParticleRibbonLit.meta} | 2 +- .../Shadergraph/SampleScene/SampleScene.vfx | 41 +++++++++++++++++++ .../Shadergraph/Unlit/AllUVs.vfx | 41 +++++++++++++++++++ .../Shadergraph/Unlit/RandomColor.vfx | 41 +++++++++++++++++++ .../Shadergraph/Unlit/RandomColorClipped.vfx | 41 +++++++++++++++++++ .../Shadergraph/Unlit/ShaderGraphShadow.vfx | 41 +++++++++++++++++++ .../Shadergraph/Unlit/VertexColor.vfx | 41 +++++++++++++++++++ .../SubgraphContextWithSubgraphBlock.meta | 8 ++++ .../Linear/LinuxEditor/Vulkan/None.meta | 8 ++++ .../Linear/OSXEditor/Metal/None.meta | 8 ++++ .../Linear/WindowsEditor/Direct3D11/None.meta | 8 ++++ .../Linear/WindowsPlayer/Direct3D11/None.meta | 8 ++++ .../ProjectSettings/GraphicsSettings.asset | 2 +- .../ProjectSettings/VFXManager.asset | 8 ++-- .../VersionControlSettings.asset | 8 ++++ .../UserSettings/EditorUserSettings.asset | 19 +++++++++ .../Runtime/Textures/RTHandle.cs | 5 ++- .../Runtime/Material/VTBufferManager.cs | 4 +- 22 files changed, 353 insertions(+), 9 deletions(-) create mode 100644 TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta create mode 100644 TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta create mode 100644 TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta create mode 100644 TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta rename TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/{Shaders.meta => ParticleRibbonLit.meta} (77%) create mode 100644 TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/SubgraphContextWithSubgraphBlock.meta create mode 100644 TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None.meta create mode 100644 TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/OSXEditor/Metal/None.meta create mode 100644 TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None.meta create mode 100644 TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None.meta create mode 100644 TestProjects/VisualEffectGraph/ProjectSettings/VersionControlSettings.asset create mode 100644 TestProjects/VisualEffectGraph/UserSettings/EditorUserSettings.asset diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta new file mode 100644 index 00000000000..4182552a52b --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f4f2d97b51cbb8d46a1e3d51a71a0b67 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta new file mode 100644 index 00000000000..dbe6038ad3b --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 363d992636e59ba49bec13eced2deab0 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta new file mode 100644 index 00000000000..29643c473f8 --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: caa8690cde0555843bd51995ad0bc468 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta new file mode 100644 index 00000000000..10062e0d800 --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b15aea2d59df5404eb631845a01a6e03 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shaders.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/ParticleRibbonLit.meta similarity index 77% rename from TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shaders.meta rename to TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/ParticleRibbonLit.meta index adb9355cacc..3ae486ed749 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shaders.meta +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/ParticleRibbonLit.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bb3dd0042c101fa49becde1ec3f2bc09 +guid: bc1716d945e191a46ab252693effef18 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/SampleScene/SampleScene.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/SampleScene/SampleScene.vfx index caaf9ed271e..ad444d0cb95 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/SampleScene/SampleScene.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/SampleScene/SampleScene.vfx @@ -2329,6 +2329,7 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: + - {fileID: 8926484042661614687} - {fileID: 8926484042661614653} - {fileID: 8926484042661614654} - {fileID: 8926484042661614685} @@ -3459,3 +3460,43 @@ MonoBehaviour: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] +--- !u!114 &8926484042661614687 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614687} + m_MasterData: + m_Owner: {fileID: 8926484042661614651} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' + m_Space: 2147483647 + m_Property: + name: mainTexture + m_serializedType: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. + m_Regex: + m_RegexMaxLength: 0 + m_Direction: 0 + m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/AllUVs.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/AllUVs.vfx index edb54b49729..0cfa432edda 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/AllUVs.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/AllUVs.vfx @@ -1106,6 +1106,7 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: + - {fileID: 8926484042661614568} - {fileID: 8926484042661614555} - {fileID: 8926484042661614556} - {fileID: 8926484042661614567} @@ -1417,3 +1418,43 @@ MonoBehaviour: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] +--- !u!114 &8926484042661614568 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614568} + m_MasterData: + m_Owner: {fileID: 8926484042661614553} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' + m_Space: 2147483647 + m_Property: + name: mainTexture + m_serializedType: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. + m_Regex: + m_RegexMaxLength: 0 + m_Direction: 0 + m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColor.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColor.vfx index 018b66e86a1..5f947342f3d 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColor.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColor.vfx @@ -2610,6 +2610,7 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: + - {fileID: 8926484042661614817} - {fileID: 8926484042661614766} - {fileID: 8926484042661614767} - {fileID: 8926484042661614816} @@ -3710,3 +3711,43 @@ MonoBehaviour: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] +--- !u!114 &8926484042661614817 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614817} + m_MasterData: + m_Owner: {fileID: 8926484042661614764} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' + m_Space: 2147483647 + m_Property: + name: mainTexture + m_serializedType: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. + m_Regex: + m_RegexMaxLength: 0 + m_Direction: 0 + m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColorClipped.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColorClipped.vfx index 5aaa5e0580a..5f3d5c3e773 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColorClipped.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColorClipped.vfx @@ -2609,6 +2609,7 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: + - {fileID: 8926484042661614813} - {fileID: 8926484042661614766} - {fileID: 8926484042661614767} - {fileID: 8926484042661614790} @@ -3616,3 +3617,43 @@ MonoBehaviour: attributes: [] m_Direction: 1 m_LinkedSlots: [] +--- !u!114 &8926484042661614813 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614813} + m_MasterData: + m_Owner: {fileID: 8926484042661614764} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' + m_Space: 2147483647 + m_Property: + name: mainTexture + m_serializedType: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. + m_Regex: + m_RegexMaxLength: 0 + m_Direction: 0 + m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/ShaderGraphShadow.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/ShaderGraphShadow.vfx index 482408c0f2b..e1d2ef6893d 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/ShaderGraphShadow.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/ShaderGraphShadow.vfx @@ -1239,6 +1239,7 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: + - {fileID: 8926484042661614569} - {fileID: 8926484042661614557} - {fileID: 8926484042661614558} m_OutputSlots: [] @@ -1643,3 +1644,43 @@ MonoBehaviour: attributes: [] m_Direction: 0 m_LinkedSlots: [] +--- !u!114 &8926484042661614569 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614569} + m_MasterData: + m_Owner: {fileID: 8926484042661614555} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' + m_Space: 2147483647 + m_Property: + name: mainTexture + m_serializedType: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. + m_Regex: + m_RegexMaxLength: 0 + m_Direction: 0 + m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/VertexColor.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/VertexColor.vfx index d6f2884ed54..6b077f4dfc1 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/VertexColor.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/VertexColor.vfx @@ -1106,6 +1106,7 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: + - {fileID: 8926484042661614568} - {fileID: 8926484042661614555} - {fileID: 8926484042661614556} - {fileID: 8926484042661614567} @@ -1417,3 +1418,43 @@ MonoBehaviour: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] +--- !u!114 &8926484042661614568 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614568} + m_MasterData: + m_Owner: {fileID: 8926484042661614553} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' + m_Space: 2147483647 + m_Property: + name: mainTexture + m_serializedType: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. + m_Regex: + m_RegexMaxLength: 0 + m_Direction: 0 + m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/SubgraphContextWithSubgraphBlock.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/SubgraphContextWithSubgraphBlock.meta new file mode 100644 index 00000000000..d796192f530 --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/SubgraphContextWithSubgraphBlock.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc647e7ff50ab564ba36143fbf71ac26 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None.meta b/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None.meta new file mode 100644 index 00000000000..22b7f64a424 --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aab3ec8487b58364e9743755cb5bb00f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/OSXEditor/Metal/None.meta b/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/OSXEditor/Metal/None.meta new file mode 100644 index 00000000000..cd51a024e10 --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/OSXEditor/Metal/None.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aff5cb7fea3db464f87b3954f95696ba +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None.meta b/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None.meta new file mode 100644 index 00000000000..b3dc45258cf --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 89ae6026a0666aa4294c19c72ecd9c89 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None.meta b/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None.meta new file mode 100644 index 00000000000..880d3d4f730 --- /dev/null +++ b/TestProjects/VisualEffectGraph/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2969c92aea621b84398891a49450924b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph/ProjectSettings/GraphicsSettings.asset b/TestProjects/VisualEffectGraph/ProjectSettings/GraphicsSettings.asset index 0ab3adb1f69..ec10a9247ca 100644 --- a/TestProjects/VisualEffectGraph/ProjectSettings/GraphicsSettings.asset +++ b/TestProjects/VisualEffectGraph/ProjectSettings/GraphicsSettings.asset @@ -28,6 +28,7 @@ GraphicsSettings: m_LensFlare: m_Mode: 1 m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} + m_VideoShadersIncludeMode: 2 m_AlwaysIncludedShaders: - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} @@ -166,4 +167,3 @@ GraphicsSettings: m_LightsUseLinearIntensity: 1 m_LightsUseColorTemperature: 1 m_LogWhenShaderIsCompiled: 0 - m_AllowEnlightenSupportForUpgradedProject: 1 diff --git a/TestProjects/VisualEffectGraph/ProjectSettings/VFXManager.asset b/TestProjects/VisualEffectGraph/ProjectSettings/VFXManager.asset index 727d3d75d94..e8fa2256bb0 100644 --- a/TestProjects/VisualEffectGraph/ProjectSettings/VFXManager.asset +++ b/TestProjects/VisualEffectGraph/ProjectSettings/VFXManager.asset @@ -3,10 +3,10 @@ --- !u!937362698 &1 VFXManager: m_ObjectHideFlags: 0 - m_IndirectShader: {fileID: 7200000, guid: 84a17cfa13e40ae4082ef42714f0a81c, type: 3} - m_CopyBufferShader: {fileID: 7200000, guid: 23c51f21a3503f6428b527b01f8a2f4e, type: 3} - m_SortShader: {fileID: 7200000, guid: ea257ca3cfb12a642a5025e612af6b2a, type: 3} - m_StripUpdateShader: {fileID: 7200000, guid: 8fa6c4009fe2a4d4486c62736fc30ad8, type: 3} + m_IndirectShader: {fileID: 0} + m_CopyBufferShader: {fileID: 0} + m_SortShader: {fileID: 0} + m_StripUpdateShader: {fileID: 0} m_RenderPipeSettingsPath: Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP m_FixedTimeStep: 0.016666668 m_MaxDeltaTime: 0.05 diff --git a/TestProjects/VisualEffectGraph/ProjectSettings/VersionControlSettings.asset b/TestProjects/VisualEffectGraph/ProjectSettings/VersionControlSettings.asset new file mode 100644 index 00000000000..dca288142fc --- /dev/null +++ b/TestProjects/VisualEffectGraph/ProjectSettings/VersionControlSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!890905787 &1 +VersionControlSettings: + m_ObjectHideFlags: 0 + m_Mode: Visible Meta Files + m_CollabEditorSettings: + inProgressEnabled: 1 diff --git a/TestProjects/VisualEffectGraph/UserSettings/EditorUserSettings.asset b/TestProjects/VisualEffectGraph/UserSettings/EditorUserSettings.asset new file mode 100644 index 00000000000..4681d1d2cf5 --- /dev/null +++ b/TestProjects/VisualEffectGraph/UserSettings/EditorUserSettings.asset @@ -0,0 +1,19 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!162 &1 +EditorUserSettings: + m_ObjectHideFlags: 0 + serializedVersion: 4 + m_ConfigSettings: + vcSharedLogLevel: + value: 0d5e400f0650 + flags: 0 + m_VCAutomaticAdd: 1 + m_VCDebugCom: 0 + m_VCDebugCmd: 0 + m_VCDebugOut: 0 + m_SemanticMergeMode: 2 + m_VCShowFailedCheckout: 1 + m_VCOverwriteFailedCheckoutAssets: 1 + m_VCOverlayIcons: 1 + m_VCAllowAsyncUpdate: 0 diff --git a/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs b/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs index 806875420bc..9a87fa0c8d3 100644 --- a/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs +++ b/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs @@ -50,7 +50,10 @@ public class RTHandle /// public string name { get { return m_Name; } } - public bool enableMSAA { get { return m_EnableMSAA; } } + /// + /// Returns true is MSAA is enabled, false otherwise. + /// + public bool isMSAAEnabled { get { return m_EnableMSAA; } } // Keep constructor private internal RTHandle(RTHandleSystem owner) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs index fa9eceab0ea..1ec4e4e4b2b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/VTBufferManager.cs @@ -66,8 +66,8 @@ void ResolveVTDispatch(CommandBuffer cmd, RTHandle buffer, int width, int height Debug.Assert(lowResWidth <= m_Resolver.CurrentWidth && lowResHeight <= m_Resolver.CurrentHeight); Debug.Assert(lowResWidth <= lowresResolver.referenceSize.x && lowResHeight <= lowresResolver.referenceSize.y); - string mainFunction = (buffer.enableMSAA) ? "KMainMSAA" : "KMain"; - int inputID = (buffer.enableMSAA) ? HDShaderIDs._InputTextureMSAA : HDShaderIDs._InputTexture; + string mainFunction = (buffer.isMSAAEnabled) ? "KMainMSAA" : "KMain"; + int inputID = (buffer.isMSAAEnabled) ? HDShaderIDs._InputTextureMSAA : HDShaderIDs._InputTexture; int kernel = downSampleCS.FindKernel(mainFunction); cmd.SetComputeTextureParam(downSampleCS, kernel, inputID, buffer.nameID); From 8f2a552c972766fc44e3aadbf488faf4c0c417c6 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 24 Mar 2020 13:45:18 +0100 Subject: [PATCH 124/143] Reviewer Feedback: Remove unused ResolveStack function --- .../ShaderLibrary/TextureStack.hlsl | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index a1390126ac8..0417f402064 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -157,33 +157,23 @@ float4 SampleVT_##layerSamplerName(StackInfo info, int lodCalculation, int quali return output;\ } -#define DECLARE_STACK_RESOLVE(stackName)\ -float4 ResolveVT_##stackName(float2 uv)\ -{\ - return float4(0.0f,0.0f, 0.0f, 0.0f);\ -} - #define DECLARE_STACK(stackName, layer0SamplerName)\ DECLARE_STACK_BASE(stackName)\ - DECLARE_STACK_RESOLVE(stackName)\ DECLARE_STACK_LAYER(stackName, layer0SamplerName,0) #define DECLARE_STACK2(stackName, layer0SamplerName, layer1SamplerName)\ DECLARE_STACK_BASE(stackName)\ - DECLARE_STACK_RESOLVE(stackName)\ DECLARE_STACK_LAYER(stackName, layer0SamplerName,0)\ DECLARE_STACK_LAYER(stackName, layer1SamplerName,1) #define DECLARE_STACK3(stackName, layer0SamplerName, layer1SamplerName, layer2SamplerName)\ DECLARE_STACK_BASE(stackName)\ - DECLARE_STACK_RESOLVE(stackName)\ DECLARE_STACK_LAYER(stackName, layer0SamplerName,0)\ DECLARE_STACK_LAYER(stackName, layer1SamplerName,1)\ DECLARE_STACK_LAYER(stackName, layer2SamplerName,2) #define DECLARE_STACK4(stackName, layer0SamplerName, layer1SamplerName, layer2SamplerName, layer3SamplerName)\ DECLARE_STACK_BASE(stackName)\ - DECLARE_STACK_RESOLVE(stackName)\ DECLARE_STACK_LAYER(stackName, layer0SamplerName,0)\ DECLARE_STACK_LAYER(stackName, layer1SamplerName,1)\ DECLARE_STACK_LAYER(stackName, layer2SamplerName,2)\ @@ -193,7 +183,6 @@ float4 ResolveVT_##stackName(float2 uv)\ #define SampleStack(info, lodMode, quality, textureName) SampleVT_##textureName(info, lodMode, quality) #define GetResolveOutput(info) info.resolveOutput #define PackResolveOutput(output) Granite_PackTileId(output) -#define ResolveStack(uv, stackName) ResolveVT_##stackName(uv) float4 GetPackedVTFeedback(float4 feedback) { @@ -243,7 +232,6 @@ StackInfo MakeStackInfo(VtInputParameters vt) // Resolve does nothing #define GetResolveOutput(info) float4(1,1,1,1) -#define ResolveStack(uv, stackName) float4(1,1,1,1) #define PackResolveOutput(output) output #define GetPackedVTFeedback(feedback) feedback From 73fd5dfd328d9b343282bdf35d21e05626ef3de6 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 24 Mar 2020 13:45:35 +0100 Subject: [PATCH 125/143] Reviewer Feedback: Move compute shader to more suitable folder. --- .../Runtime/RenderPipeline/RenderPipelineResources.cs | 2 +- .../Runtime/VirtualTexturing.meta | 8 ++++++++ .../Runtime/VirtualTexturing/Shaders.meta | 8 ++++++++ .../Shaders}/DownsampleVTFeedback.compute | 0 .../Shaders}/DownsampleVTFeedback.compute.meta | 0 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing.meta create mode 100644 com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing/Shaders.meta rename com.unity.render-pipelines.high-definition/Runtime/{ShaderLibrary => VirtualTexturing/Shaders}/DownsampleVTFeedback.compute (100%) rename com.unity.render-pipelines.high-definition/Runtime/{ShaderLibrary => VirtualTexturing/Shaders}/DownsampleVTFeedback.compute.meta (100%) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs index ff5a0d8252e..0359a2b8db4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs @@ -249,7 +249,7 @@ public sealed class ShaderResources [Reload("Runtime/PostProcessing/Shaders/ContrastAdaptiveSharpen.compute")] public ComputeShader contrastAdaptiveSharpenCS; #if ENABLE_VIRTUALTEXTURES - [Reload("Runtime/ShaderLibrary/DownsampleVTFeedback.compute")] + [Reload("Runtime/VirtualTexturing/Shaders/DownsampleVTFeedback.compute")] public ComputeShader VTFeedbackDownsample; #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing.meta b/com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing.meta new file mode 100644 index 00000000000..b045541faa8 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 81f992beea544eb4f83796d5f75cd799 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing/Shaders.meta b/com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing/Shaders.meta new file mode 100644 index 00000000000..2fd8fad0054 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 968a10978df084e459eb939d1458edbf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute b/com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing/Shaders/DownsampleVTFeedback.compute similarity index 100% rename from com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute rename to com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing/Shaders/DownsampleVTFeedback.compute diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta b/com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing/Shaders/DownsampleVTFeedback.compute.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleVTFeedback.compute.meta rename to com.unity.render-pipelines.high-definition/Runtime/VirtualTexturing/Shaders/DownsampleVTFeedback.compute.meta From 00e2b1d572f659e352ec1f6328408f08df3a63fe Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 25 Mar 2020 11:16:00 +0100 Subject: [PATCH 126/143] Fix VT Feedback with PBR master node not working. --- .../Editor/Material/PBR/ShaderGraph/PBRPass.template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/PBRPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/PBRPass.template index 1e70670f549..d7d8c934ce7 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/PBRPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/PBRPass.template @@ -201,6 +201,11 @@ Pass $SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission; + //Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define) + //We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved + //This is a limitation of the current MRT approach. + $SurfaceDescription.VTPackedFeedback: builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback; + PostInitBuiltinData(V, posInput, surfaceData, builtinData); } From 78ebc2051cc01f901d126e15597bc190e6ba7376 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 25 Mar 2020 11:17:20 +0100 Subject: [PATCH 127/143] Do not include "Common.hlsl" in TextureStack.hlsl Common.hlsl explicitly states this shouln't be done: headers from ShaderLibrary do not include "common.hlsl", this should be included in the .shader using it (or Material.hlsl) --- .../ShaderLibrary/TextureStack.hlsl | 3 --- 1 file changed, 3 deletions(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl index 0417f402064..81c026df138 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl @@ -10,9 +10,6 @@ #endif #include "VirtualTexturing.hlsl" -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" - - /* This header adds the following pseudo definitions. Actual types etc may vary depending on vt- being on or off. From 097204aab9ca777f9db1588cffb0acef3fbdbbb2 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 27 Mar 2020 10:57:04 +0100 Subject: [PATCH 128/143] Fix support for Keyword graph Nodes with VT - Added a Keyword Graph test sphere to the sample - Update sample upgraded serialized assets --- .../9x_Other/9713_VirtualTexturing.unity | 294 +++++++++++------- .../9713_VirtualTexturing/AnisotrpicMat.mat | 8 + .../9713_VirtualTexturing/BiasGraphMat.mat | 8 + .../9713_VirtualTexturing/CloudGraphMat.mat | 9 + .../9713_VirtualTexturing/DecalGraphMat.mat | 4 + .../9713_VirtualTexturing/EmisUnlitMat.mat | 5 + .../9713_VirtualTexturing/ExplicitLodMat.mat | 5 + .../9713_VirtualTexturing/EyeGraphMat.mat | 5 + .../9713_VirtualTexturing/FabricGraphMat.mat | 5 + .../9713_VirtualTexturing/HairGraphMat.mat | 5 + .../KeywordGraph.shadergraph | 104 +++++++ .../KeywordGraph.shadergraph.meta | 10 + .../9713_VirtualTexturing/KeywordGraphMat.mat | 95 ++++++ .../KeywordGraphMat.mat.meta | 8 + .../KeywordGraphMat_Variant.mat | 95 ++++++ .../KeywordGraphMat_Variant.mat.meta | 8 + .../9713_VirtualTexturing/LitGraphMat.mat | 9 + .../MipEquivalentMat.mat | 4 + .../MultiSampleGraphMat.mat | 9 + .../9713_VirtualTexturing/PBRGraphMat.mat | 8 + .../9713_VirtualTexturing/SSSGraphMat.mat | 9 + .../StackLitGraphMat.mat | 5 + .../9713_VirtualTexturing/UnlitGraphMat.mat | 4 + .../VTSubGraphShaderMat.mat | 4 + .../9713_VirtualTexturing/VertexShaderMat.mat | 9 + .../Nodes/Input/Texture/TextureStackNode.cs | 82 +++-- .../Editor/Data/Util/KeywordUtil.cs | 5 + .../Generation/Processors/GenerationUtils.cs | 4 +- 28 files changed, 689 insertions(+), 131 deletions(-) create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraph.shadergraph create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraph.shadergraph.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat_Variant.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat_Variant.mat.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity index bc1d3d72cb3..5ae7503f24e 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.unity @@ -248,7 +248,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 78105986} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -3.47, y: -2.93, z: 0} + m_LocalPosition: {x: -3.5, y: -3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2056951134} @@ -507,8 +507,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 220407417} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -4, y: 2.3, z: 0} - m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_LocalPosition: {x: -4.5, y: -0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2056951134} m_RootOrder: 13 @@ -592,7 +592,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1053123895} - m_RootOrder: 13 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!102 &245866178 TextMesh: @@ -602,7 +602,11 @@ TextMesh: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 245866176} - m_Text: Stack exposed from subgraph + m_Text: 'Special Graphs (Subgraphs + + , Keword) + +' m_OffsetZ: 0 m_CharacterSize: 0.01 m_LineSpacing: 1 @@ -683,7 +687,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 280369411} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -4.64, y: -2.93, z: 0} + m_LocalPosition: {x: -4.5, y: -3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2056951134} @@ -1079,6 +1083,168 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &386950478 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 386950479} + - component: {fileID: 386950481} + - component: {fileID: 386950480} + m_Layer: 0 + m_Name: SubGraph3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &386950479 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 386950478} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.5, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 19 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &386950480 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 386950478} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 2330b7f72cb6e414e988ee52d6d1ef8a, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &386950481 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 386950478} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &404777708 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 404777709} + - component: {fileID: 404777711} + - component: {fileID: 404777710} + m_Layer: 0 + m_Name: SubGraph4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &404777709 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 404777708} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.5, y: -0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2056951134} + m_RootOrder: 20 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &404777710 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 404777708} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: fd32f17d440606a4087c07273ee5978c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &404777711 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 404777708} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &411464814 GameObject: m_ObjectHideFlags: 0 @@ -1160,7 +1326,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1053123895} - m_RootOrder: 14 + m_RootOrder: 13 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!102 &420231310 TextMesh: @@ -1253,7 +1419,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 482586313} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -3.47, y: -1.8399999, z: 0} + m_LocalPosition: {x: -3.5, y: -2, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2056951134} @@ -1470,104 +1636,6 @@ Transform: m_Father: {fileID: 2056951134} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &664191853 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 664191854} - - component: {fileID: 664191856} - - component: {fileID: 664191855} - m_Layer: 0 - m_Name: SubGraph1 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &664191854 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 664191853} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -4.38, y: 3.7, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1053123895} - m_RootOrder: 12 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!102 &664191855 -TextMesh: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 664191853} - m_Text: 'Stack in subgrpah - - -' - m_OffsetZ: 0 - m_CharacterSize: 0.01 - m_LineSpacing: 1 - m_Anchor: 0 - m_Alignment: 1 - m_TabSize: 4 - m_FontSize: 100 - m_FontStyle: 0 - m_RichText: 1 - m_Font: {fileID: 0} - m_Color: - serializedVersion: 2 - rgba: 4294967295 ---- !u!23 &664191856 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 664191853} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 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 - m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &698175485 GameObject: m_ObjectHideFlags: 0 @@ -1869,7 +1937,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 9 + m_Version: 10 m_ObsoleteShadowResolutionTier: 1 m_ObsoleteUseShadowQualitySettings: 0 m_ObsoleteCustomShadowResolution: 512 @@ -1917,6 +1985,7 @@ MonoBehaviour: m_LightShadowRadius: 0.5 m_SemiTransparentShadow: 0 m_ColorShadow: 1 + m_DistanceBasedFiltering: 0 m_EvsmExponent: 15 m_EvsmLightLeakBias: 0 m_EvsmVarianceBias: 0.00001 @@ -1965,6 +2034,8 @@ MonoBehaviour: useVolumetric: 1 featuresFoldout: 1 showAdditionalSettings: 0 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 --- !u!108 &1036204244 Light: m_ObjectHideFlags: 0 @@ -2079,7 +2150,6 @@ Transform: - {fileID: 329574046} - {fileID: 2138013990} - {fileID: 2005760251} - - {fileID: 664191854} - {fileID: 245866177} - {fileID: 420231309} m_Father: {fileID: 2056951134} @@ -2834,8 +2904,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1803598726} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -4, y: 0, z: 0} - m_LocalScale: {x: 1.9, y: 1.9, z: 1.9} + m_LocalPosition: {x: -4.5, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2056951134} m_RootOrder: 14 @@ -2915,7 +2985,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1855075392} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -4.59, y: -1.8399999, z: 0} + m_LocalPosition: {x: -4.5, y: -2, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2056951134} @@ -3210,6 +3280,8 @@ Transform: - {fileID: 482586314} - {fileID: 78105987} - {fileID: 280369412} + - {fileID: 386950479} + - {fileID: 404777709} m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat index 1dfe83f75df..4c89ae619be 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/AnisotrpicMat.mat @@ -22,6 +22,14 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _SampleVTStack_8EB725B5_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_BB4EA8E6_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack8EB725B5_8EB725B5_Texture_5: m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} m_Scale: {x: 1, y: 1} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat index 678af2605f1..33a6e98d567 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/BiasGraphMat.mat @@ -30,6 +30,14 @@ Material: m_Texture: {fileID: 2800000, guid: a20adda6fb3420a4890b277fd47d6e05, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_A89EC4BF_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_D656B90C_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStackA89EC4BF_A89EC4BF_Texture_5: m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} m_Scale: {x: 1, y: 1} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat index d13f7aab07c..3935fc8eb13 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/CloudGraphMat.mat @@ -44,6 +44,14 @@ Material: m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_164AE2E_Texture2_6: + m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_164AE2E_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack164AE2E_164AE2E_Texture2_6: m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} m_Scale: {x: 1, y: 1} @@ -66,6 +74,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 0 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 1 - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraphMat.mat index 40f31f4a07c..d56d660bad6 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/DecalGraphMat.mat @@ -28,6 +28,10 @@ Material: m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_F1146E9_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _DecalMeshDepthBias: 0 - _DrawOrder: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat index b0b5a33b0cb..a559a527837 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EmisUnlitMat.mat @@ -44,6 +44,10 @@ Material: m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_E020294_Texture_5: + m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStackE020294_E020294_Texture_5: m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} m_Scale: {x: 1, y: 1} @@ -60,6 +64,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat index 2130f10e4da..1424297188a 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/ExplicitLodMat.mat @@ -44,6 +44,10 @@ Material: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_622C0D0_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack622C0D0_622C0D0_Texture_5: m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} m_Scale: {x: 1, y: 1} @@ -60,6 +64,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 1 - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat index 98ddeb7c718..6e11e09dfbe 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/EyeGraphMat.mat @@ -23,6 +23,10 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _SampleVTStack_DC9225B2_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStackDC9225B2_DC9225B2_Texture_5: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} @@ -39,6 +43,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 - _RequireSplitLighting: 0 - _SrcBlend: 1 - _StencilRef: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat index 6f140cbf5a7..e713626c976 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/FabricGraphMat.mat @@ -36,6 +36,10 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _SampleVTStack_54B3324D_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack54B3324D_54B3324D_Texture_5: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} @@ -52,6 +56,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 - _RequireSplitLighting: 0 - _SrcBlend: 1 - _StencilRef: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat index cf928d68ca7..1c360a9e680 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/HairGraphMat.mat @@ -36,6 +36,10 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _SampleVTStack_9EBCEA0_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack9EBCEA0_9EBCEA0_Texture_5: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} @@ -52,6 +56,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 - _RequireSplitLighting: 0 - _SrcBlend: 1 - _StencilRef: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraph.shadergraph b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraph.shadergraph new file mode 100644 index 00000000000..a66402f88f0 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraph.shadergraph @@ -0,0 +1,104 @@ +{ + "m_SerializedProperties": [], + "m_SerializedKeywords": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.ShaderKeyword" + }, + "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"804b9e83-d235-4490-8b98-782f9c9f3e88\"\n },\n \"m_Name\": \"TestKeyword\",\n \"m_DefaultReferenceName\": \"ENUM_4BFCF0BD\",\n \"m_OverrideReferenceName\": \"TESTKEYWORD\",\n \"m_GeneratePropertyBlock\": true,\n \"m_KeywordType\": 1,\n \"m_KeywordDefinition\": 1,\n \"m_KeywordScope\": 0,\n \"m_Entries\": [\n {\n \"id\": 1,\n \"displayName\": \"TwoStacks\",\n \"referenceName\": \"TWOSTACKS\"\n },\n {\n \"id\": 2,\n \"displayName\": \"OneStack\",\n \"referenceName\": \"ONESTACK\"\n },\n {\n \"id\": 3,\n \"displayName\": \"NoStack\",\n \"referenceName\": \"NOSTACK\"\n }\n ],\n \"m_Value\": 0,\n \"m_IsEditable\": true\n}" + } + ], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"0de74125-13e7-49d6-abd0-1b9521a47360\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample VT Stack\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -633.0000610351563,\n \"y\": 179.00001525878907,\n \"width\": 167.0,\n \"height\": 101.00000762939453\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"3a5dd8b426778e14cb9f1f2e716841f8\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Rendering.HighDefinition.HDUnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"460c3a5f-e447-4f24-8bb5-4437eaa84765\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 123.0000228881836,\n \"y\": 39.00001907348633,\n \"width\": 200.00001525878907,\n \"height\": 221.00001525878907\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 13,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 14,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 12,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 1\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_RenderingPass\": 1,\n \"m_TransparencyFog\": true,\n \"m_DrawBeforeRefraction\": false,\n \"m_Distortion\": false,\n \"m_DistortionMode\": 0,\n \"m_DistortionOnly\": true,\n \"m_DistortionDepthTest\": true,\n \"m_AlphaTest\": false,\n \"m_SortPriority\": 0,\n \"m_DoubleSided\": false,\n \"m_ZWrite\": true,\n \"m_transparentCullMode\": 2,\n \"m_ZTest\": 4,\n \"m_AddPrecomputedVelocity\": false,\n \"m_EnableShadowMatte\": false,\n \"m_DOTSInstancing\": false,\n \"m_ShaderGUIOverride\": \"\",\n \"m_OverrideEnabled\": false\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.LerpNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"661f2595-8787-4372-bf04-4cad07da380a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Lerp\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -388.99993896484377,\n \"y\": 16.999998092651368,\n \"width\": 208.00001525878907,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"T\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"T\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5,\\n \\\"w\\\": 0.5\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTexture2DNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"790b4cc8-d868-4be2-b504-399bf80dfb06\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture 2D\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -651.0,\n \"y\": 302.0,\n \"width\": 182.0,\n \"height\": 251.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"63ca992c464c234489312adaa6c517fb\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureType\": 0,\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.KeywordNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"90bf3a2f-56ba-4fca-9d8f-295ecf0c9af7\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"TestKeyword\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -217.0,\n \"y\": 155.0,\n \"width\": 208.0,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"TwoStacks\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"TWOSTACKS\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"OneStack\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"ONESTACK\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"NoStack\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"NOSTACK\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_KeywordGuidSerialized\": \"804b9e83-d235-4490-8b98-782f9c9f3e88\"\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"b33ff9b1-4eb2-47b3-86ba-129963ba58bd\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample VT Stack\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -628.9999389648438,\n \"y\": 56.00002670288086,\n \"width\": 167.0,\n \"height\": 101.00000762939453\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"526f56bddea1ec94abca08e368cb7006\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"b8836192-7daa-4fe9-9d73-d3433334fb5a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample VT Stack\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -615.9999389648438,\n \"y\": -56.9999885559082,\n \"width\": 167.0,\n \"height\": 101.00000762939453\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"45616a16dd1d6db4c8b22f5f0963c86a\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"0de74125-13e7-49d6-abd0-1b9521a47360\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"90bf3a2f-56ba-4fca-9d8f-295ecf0c9af7\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"661f2595-8787-4372-bf04-4cad07da380a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"90bf3a2f-56ba-4fca-9d8f-295ecf0c9af7\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"790b4cc8-d868-4be2-b504-399bf80dfb06\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"90bf3a2f-56ba-4fca-9d8f-295ecf0c9af7\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"90bf3a2f-56ba-4fca-9d8f-295ecf0c9af7\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"460c3a5f-e447-4f24-8bb5-4437eaa84765\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"b33ff9b1-4eb2-47b3-86ba-129963ba58bd\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"661f2595-8787-4372-bf04-4cad07da380a\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"b8836192-7daa-4fe9-9d73-d3433334fb5a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"661f2595-8787-4372-bf04-4cad07da380a\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "460c3a5f-e447-4f24-8bb5-4437eaa84765" +} \ No newline at end of file diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraph.shadergraph.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraph.shadergraph.meta new file mode 100644 index 00000000000..079714c629f --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraph.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: be5619756dc67924a96b8c42d04163ef +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat.mat new file mode 100644 index 00000000000..3a242015285 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat.mat @@ -0,0 +1,95 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-212447893603212950 +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: 2 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: KeywordGraphMat + m_Shader: {fileID: -6465566751694194690, guid: be5619756dc67924a96b8c42d04163ef, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleTexture2D_E61CDA67_Texture_1: + m_Texture: {fileID: 2800000, guid: 63ca992c464c234489312adaa6c517fb, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_10927F28_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_15ED268D_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_9915F6DF_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - TESTKEYWORD: 0 + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 + - _RenderQueueType: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 2 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 0 + - _TransparentZWrite: 1 + - _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: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat.mat.meta new file mode 100644 index 00000000000..23d4d7bec0c --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2330b7f72cb6e414e988ee52d6d1ef8a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat_Variant.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat_Variant.mat new file mode 100644 index 00000000000..59bf8f79d9f --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat_Variant.mat @@ -0,0 +1,95 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-212447893603212950 +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: 2 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: KeywordGraphMat_Variant + m_Shader: {fileID: -6465566751694194690, guid: be5619756dc67924a96b8c42d04163ef, + type: 3} + m_ShaderKeywords: TESTKEYWORD_ONESTACK + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _SampleTexture2D_E61CDA67_Texture_1: + m_Texture: {fileID: 2800000, guid: 63ca992c464c234489312adaa6c517fb, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_10927F28_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_15ED268D_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_9915F6DF_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - TESTKEYWORD: 1 + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableFogOnTransparent: 1 + - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 + - _RenderQueueType: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 2 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentSortPriority: 0 + - _TransparentZWrite: 1 + - _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: [] diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat_Variant.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat_Variant.mat.meta new file mode 100644 index 00000000000..036e5b9ffcc --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/KeywordGraphMat_Variant.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fd32f17d440606a4087c07273ee5978c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat index 18c731c73c8..ccbbd15a519 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/LitGraphMat.mat @@ -52,6 +52,14 @@ Material: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_38945874_Texture2_6: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_38945874_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack38945874_38945874_Texture2_6: m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} m_Scale: {x: 1, y: 1} @@ -72,6 +80,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 1 - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat index de342b72fdf..dd5f5e688d9 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MipEquivalentMat.mat @@ -26,6 +26,10 @@ Material: m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_50FF769D_Texture_5: + m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack50FF769D_50FF769D_Texture_5: m_Texture: {fileID: 2800000, guid: 526f56bddea1ec94abca08e368cb7006, type: 3} m_Scale: {x: 1, y: 1} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat index 5352e60a554..1adfccd7ab6 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/MultiSampleGraphMat.mat @@ -39,6 +39,14 @@ Material: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_89E299BF_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_C858D4E6_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack89E299BF_89E299BF_Texture_5: m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} m_Scale: {x: 1, y: 1} @@ -59,6 +67,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 1 - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat index 9cb742695ef..e59f95a3380 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/PBRGraphMat.mat @@ -38,6 +38,14 @@ Material: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_F6736428_Texture2_6: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_F6736428_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStackF6736428_F6736428_Texture2_6: m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} m_Scale: {x: 1, y: 1} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat index 1ba0d430759..3fa99cd9b8b 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/SSSGraphMat.mat @@ -52,6 +52,14 @@ Material: m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_38945874_Texture2_6: + m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_38945874_Texture_5: + m_Texture: {fileID: 2800000, guid: 3a5dd8b426778e14cb9f1f2e716841f8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack38945874_38945874_Texture2_6: m_Texture: {fileID: 2800000, guid: e793b1c02c4f7ae448a9cc2c39447dd7, type: 3} m_Scale: {x: 1, y: 1} @@ -73,6 +81,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 1 - _RenderQueueType: 1 - _RequireSplitLighting: 1 - _SrcBlend: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat index 0562276d905..647c81fdde1 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/StackLitGraphMat.mat @@ -36,6 +36,10 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _SampleVTStack_7EEFEDDA_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack7EEFEDDA_7EEFEDDA_Texture_5: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} @@ -52,6 +56,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 - _RequireSplitLighting: 0 - _SrcBlend: 1 - _StencilRef: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat index ac035fbfc77..aa43a84cf0b 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/UnlitGraphMat.mat @@ -30,6 +30,10 @@ Material: m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_20847E1A_Texture_5: + m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack20847E1A_20847E1A_Texture_5: m_Texture: {fileID: 2800000, guid: 062e2e8c474a74644bc719d5d294c476, type: 3} m_Scale: {x: 1, y: 1} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat index 28062c3068d..02988c1753d 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VTSubGraphShaderMat.mat @@ -22,6 +22,10 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _SampleVTStack_791D36CD_Texture_5: + m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack791D36CD_791D36CD_Texture_5: m_Texture: {fileID: 2800000, guid: 45616a16dd1d6db4c8b22f5f0963c86a, type: 3} m_Scale: {x: 1, y: 1} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat index 22270afa456..12bb06a2029 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing/VertexShaderMat.mat @@ -31,6 +31,14 @@ Material: m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleVTStack_6E4297F5_Texture_5: + m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleVTStack_92BB29F_Texture_5: + m_Texture: {fileID: 2800000, guid: 312de1f115b043b42804703d66a0e4b8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _TexStack6E4297F5_6E4297F5_Texture_5: m_Texture: {fileID: 2800000, guid: 402f77c2ec784934a884d97647d9fe9b, type: 3} m_Scale: {x: 1, y: 1} @@ -51,6 +59,7 @@ Material: - _DstBlend: 0 - _EnableFogOnTransparent: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 1 - _RenderQueueType: 1 - _RequireSplitLighting: 0 - _SrcBlend: 1 diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index aef33e541a3..86478168b86 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -923,16 +923,32 @@ public static int CountFeedbackVariables( public static void GenerateVirtualTextureFeedback( List downstreamNodesIncludingRoot, List[] keywordPermutationsPerNode, - ShaderStringBuilder surfaceDescriptionFunction) + ShaderStringBuilder surfaceDescriptionFunction, + KeywordCollector shaderKeywords) { - using (var feedbackVariables = PooledList.Get()) + // A note on how we handle vt feedback in combination with keywords: + // We essentially generate a fully separate feedback path for each permutation of keywords + // so per permutation we gather variables contribution to feedback and we generate + // feedback gathering for each permutation individually. + + var feedbackVariablesPerPermutation = PooledList>.Get(); + try { + for ( int i=0;i< shaderKeywords.permutations.Count; i++) + { + feedbackVariablesPerPermutation.Add(PooledList.Get()); + } + + int index = 0; //for keywordPermutationsPerNode foreach (var node in downstreamNodesIncludingRoot) { if (node is SampleTextureStackNode stNode) { if (stNode.noFeedback) continue; - feedbackVariables.Add(stNode.GetFeedbackVariableName()); + foreach (int perm in keywordPermutationsPerNode[index]) + { + feedbackVariablesPerPermutation[perm].Add(stNode.GetFeedbackVariableName()); + } } if (node is SubGraphNode sgNode) @@ -940,33 +956,61 @@ public static void GenerateVirtualTextureFeedback( if (sgNode.asset == null) continue; foreach (var feedbackSlot in sgNode.asset.vtFeedbackVariables) { - feedbackVariables.Add(node.GetVariableNameForNode() + "_" + feedbackSlot); + foreach (int perm in keywordPermutationsPerNode[index]) + { + feedbackVariablesPerPermutation[perm].Add(node.GetVariableNameForNode() + "_" + feedbackSlot); + } } } - } - if (feedbackVariables.Count == 1) - { - string feedBackCode = $"surface.VTPackedFeedback = GetPackedVTFeedback({feedbackVariables[0]});"; - surfaceDescriptionFunction.AppendLine(feedBackCode); + index++; } - else if (feedbackVariables.Count > 1) + + index = 0; + foreach (var feedbackVariables in feedbackVariablesPerPermutation) { - string arrayName = $"VTFeedback_array"; - surfaceDescriptionFunction.AppendLine($"float4 {arrayName}[{feedbackVariables.Count}];"); + surfaceDescriptionFunction.AppendLine(KeywordUtil.GetKeywordPermutationConditional(index)); - int arrayIndex = 0; - foreach (var variable in feedbackVariables) + if (feedbackVariables.Count == 0) + { + string feedBackCode = $"surface.VTPackedFeedback = float4(1.0f,1.0f,1.0f,.0f);"; + surfaceDescriptionFunction.AppendLine(feedBackCode); + } + else if (feedbackVariables.Count == 1) { - string code = $"{arrayName}[{arrayIndex}] = {variable};"; - surfaceDescriptionFunction.AppendLine(code); - arrayIndex++; + string feedBackCode = $"surface.VTPackedFeedback = GetPackedVTFeedback({feedbackVariables[0]});"; + surfaceDescriptionFunction.AppendLine(feedBackCode); } + else if (feedbackVariables.Count > 1) + { + string arrayName = $"VTFeedback_array"; + surfaceDescriptionFunction.AppendLine($"float4 {arrayName}[{feedbackVariables.Count}];"); + + int arrayIndex = 0; + foreach (var variable in feedbackVariables) + { + string code = $"{arrayName}[{arrayIndex}] = {variable};"; + surfaceDescriptionFunction.AppendLine(code); + arrayIndex++; + } + + string feedBackCode = $"surface.{FeedbackSurfaceDescriptionVariableName} = GetPackedVTFeedback({arrayName}[ (IN.{ShaderGeneratorNames.ScreenPosition}.x + _FrameCount )% (uint){feedbackVariables.Count}]);"; - string feedBackCode = $"surface.{FeedbackSurfaceDescriptionVariableName} = GetPackedVTFeedback({arrayName}[ (IN.{ShaderGeneratorNames.ScreenPosition}.x + _FrameCount )% (uint){feedbackVariables.Count}]);"; + surfaceDescriptionFunction.AppendLine(feedBackCode); + } - surfaceDescriptionFunction.AppendLine(feedBackCode); + surfaceDescriptionFunction.AppendLine("#endif"); + + index++; + } + } + finally + { + foreach (var list in feedbackVariablesPerPermutation) + { + list.Dispose(); } + feedbackVariablesPerPermutation.Dispose(); } } diff --git a/com.unity.shadergraph/Editor/Data/Util/KeywordUtil.cs b/com.unity.shadergraph/Editor/Data/Util/KeywordUtil.cs index 491083eeed7..4cd748d2c63 100644 --- a/com.unity.shadergraph/Editor/Data/Util/KeywordUtil.cs +++ b/com.unity.shadergraph/Editor/Data/Util/KeywordUtil.cs @@ -143,6 +143,11 @@ public static string GetKeywordPermutationSetConditional(List permutationSe return sb.ToString(); } + public static string GetKeywordPermutationConditional(int permutation) + { + return $"#if defined(KEYWORD_PERMUTATION_{permutation})"; + } + public static void GetKeywordPermutationDeclarations(ShaderStringBuilder sb, List>> permutations) { if (permutations.Count == 0) diff --git a/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs b/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs index c275710724c..f3e6211ff4b 100644 --- a/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs +++ b/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs @@ -282,6 +282,7 @@ internal static void GetActiveFieldsAndPermutationsForNodes(AbstractMaterialNode NodeUtils.DepthFirstCollectNodesFromNode(localVertexNodes, outputNode, NodeUtils.IncludeSelf.Include, pass.vertexPorts, keywordCollector.permutations[i]); NodeUtils.DepthFirstCollectNodesFromNode(localPixelNodes, outputNode, NodeUtils.IncludeSelf.Include, pass.pixelPorts, keywordCollector.permutations[i]); + // This will ensure we only need screenpos for permutations that need vt feedback for more than one sample bool vtFeedbackRequiresScreenPos = VirtualTexturingFeedbackUtils.CountFeedbackVariables(localPixelNodes) > 0; // Track each vertex node in this permutation @@ -782,7 +783,8 @@ internal static void GenerateSurfaceDescriptionFunction( { VirtualTexturingFeedbackUtils.GenerateVirtualTextureFeedback(nodes, keywordPermutationsPerNode, - surfaceDescriptionFunction); + surfaceDescriptionFunction, + shaderKeywords); } surfaceDescriptionFunction.AppendLine("return surface;"); From 72a7e54eec2b0c63caa13da2af3ba4d6b55efdf4 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Fri, 27 Mar 2020 14:55:24 +0100 Subject: [PATCH 129/143] Fix VT Feedback generation null pointer exception when generating shaders without keywors. --- .../Nodes/Input/Texture/TextureStackNode.cs | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index 86478168b86..d8a3dfbfd17 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -934,8 +934,16 @@ public static void GenerateVirtualTextureFeedback( var feedbackVariablesPerPermutation = PooledList>.Get(); try { - for ( int i=0;i< shaderKeywords.permutations.Count; i++) + if (shaderKeywords.permutations.Count >= 1) { + for (int i = 0; i < shaderKeywords.permutations.Count; i++) + { + feedbackVariablesPerPermutation.Add(PooledList.Get()); + } + } + else + { + // Create a dummy single permutation feedbackVariablesPerPermutation.Add(PooledList.Get()); } @@ -945,20 +953,40 @@ public static void GenerateVirtualTextureFeedback( if (node is SampleTextureStackNode stNode) { if (stNode.noFeedback) continue; - foreach (int perm in keywordPermutationsPerNode[index]) + if (keywordPermutationsPerNode[index] == null) { - feedbackVariablesPerPermutation[perm].Add(stNode.GetFeedbackVariableName()); + Debug.Assert(shaderKeywords.permutations.Count == 1);//If there is more than one keywordPermutationsPerNode should be filled in + feedbackVariablesPerPermutation[0].Add(stNode.GetFeedbackVariableName()); + } + else + { + foreach (int perm in keywordPermutationsPerNode[index]) + { + feedbackVariablesPerPermutation[perm].Add(stNode.GetFeedbackVariableName()); + } } } if (node is SubGraphNode sgNode) { if (sgNode.asset == null) continue; - foreach (var feedbackSlot in sgNode.asset.vtFeedbackVariables) + if (keywordPermutationsPerNode[index] == null) { - foreach (int perm in keywordPermutationsPerNode[index]) + Debug.Assert(shaderKeywords.permutations.Count == 1);//If there is more than one keywordPermutationsPerNode should be filled in + foreach (var feedbackSlot in sgNode.asset.vtFeedbackVariables) { - feedbackVariablesPerPermutation[perm].Add(node.GetVariableNameForNode() + "_" + feedbackSlot); + + feedbackVariablesPerPermutation[0].Add(node.GetVariableNameForNode() + "_" + feedbackSlot); + } + } + else + { + foreach (var feedbackSlot in sgNode.asset.vtFeedbackVariables) + { + foreach (int perm in keywordPermutationsPerNode[index]) + { + feedbackVariablesPerPermutation[perm].Add(node.GetVariableNameForNode() + "_" + feedbackSlot); + } } } } @@ -969,7 +997,11 @@ public static void GenerateVirtualTextureFeedback( index = 0; foreach (var feedbackVariables in feedbackVariablesPerPermutation) { - surfaceDescriptionFunction.AppendLine(KeywordUtil.GetKeywordPermutationConditional(index)); + // If it's a dummy single always-on permutation don't put an ifdef around the code + if (shaderKeywords.permutations.Count >= 1) + { + surfaceDescriptionFunction.AppendLine(KeywordUtil.GetKeywordPermutationConditional(index)); + } if (feedbackVariables.Count == 0) { @@ -999,7 +1031,10 @@ public static void GenerateVirtualTextureFeedback( surfaceDescriptionFunction.AppendLine(feedBackCode); } - surfaceDescriptionFunction.AppendLine("#endif"); + if (shaderKeywords.permutations.Count >= 1) + { + surfaceDescriptionFunction.AppendLine("#endif"); + } index++; } From 7be551711e1cd2828506c09873ad50f6bafbb791 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 30 Mar 2020 10:16:26 +0200 Subject: [PATCH 130/143] Don't call VT functions when the package is disabled. --- .../Scripts/VirtualTexturingTestSceneController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs b/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs index d049d573ff3..b3699a14e20 100644 --- a/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs +++ b/com.unity.testing.hdrp/Scripts/VirtualTexturingTestSceneController.cs @@ -61,7 +61,9 @@ public void Update() } if (Input.GetKeyDown("t")) { +#if ENABLE_VIRTUALTEXTURES UnityEngine.Rendering.VirtualTexturing.Debugging.debugTilesEnabled = !UnityEngine.Rendering.VirtualTexturing.Debugging.debugTilesEnabled; +#endif } if (dirLight != null && rotateLight) From c9e70919f468e48eb7adce96856542cf5ff2a84e Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Mon, 30 Mar 2020 11:28:24 +0200 Subject: [PATCH 131/143] Fix Assert (num permutations is 0 when no keywords exist in the graph). --- .../Editor/Data/Nodes/Input/Texture/TextureStackNode.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index d8a3dfbfd17..d0fa6664977 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -955,7 +955,7 @@ public static void GenerateVirtualTextureFeedback( if (stNode.noFeedback) continue; if (keywordPermutationsPerNode[index] == null) { - Debug.Assert(shaderKeywords.permutations.Count == 1);//If there is more than one keywordPermutationsPerNode should be filled in + Debug.Assert(shaderKeywords.permutations.Count == 0, $"Shader has {shaderKeywords.permutations.Count} permutations but keywordPermutationsPerNode of some nodes are null." ); feedbackVariablesPerPermutation[0].Add(stNode.GetFeedbackVariableName()); } else @@ -972,7 +972,7 @@ public static void GenerateVirtualTextureFeedback( if (sgNode.asset == null) continue; if (keywordPermutationsPerNode[index] == null) { - Debug.Assert(shaderKeywords.permutations.Count == 1);//If there is more than one keywordPermutationsPerNode should be filled in + Debug.Assert(shaderKeywords.permutations.Count == 0, $"Shader has {shaderKeywords.permutations.Count} permutations but keywordPermutationsPerNode of some nodes are null."); foreach (var feedbackSlot in sgNode.asset.vtFeedbackVariables) { From 50201cef3dc9d43c6c5134d928bff1d033b180a3 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 1 Apr 2020 15:21:41 +0200 Subject: [PATCH 132/143] Regenerate shader includes after merge. --- .../Runtime/Material/Builtin/BuiltinData.cs.hlsl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl index e0736c8e31d..e87a10187bf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl @@ -21,6 +21,7 @@ #define DEBUGVIEW_BUILTIN_BUILTINDATA_DISTORTION_BLUR (111) #define DEBUGVIEW_BUILTIN_BUILTINDATA_RENDERING_LAYERS (112) #define DEBUGVIEW_BUILTIN_BUILTINDATA_DEPTH_OFFSET (113) +#define DEBUGVIEW_BUILTIN_BUILTINDATA_VT_PACKED_FEEDBACK (114) // Generated from UnityEngine.Rendering.HighDefinition.Builtin+BuiltinData // PackingRules = Exact @@ -40,6 +41,7 @@ struct BuiltinData real distortionBlur; uint renderingLayers; float depthOffset; + real4 vtPackedFeedback; }; // Generated from UnityEngine.Rendering.HighDefinition.Builtin+LightTransportData @@ -101,6 +103,9 @@ void GetGeneratedBuiltinDataDebug(uint paramId, BuiltinData builtindata, inout f case DEBUGVIEW_BUILTIN_BUILTINDATA_DEPTH_OFFSET: result = builtindata.depthOffset.xxx; break; + case DEBUGVIEW_BUILTIN_BUILTINDATA_VT_PACKED_FEEDBACK: + result = builtindata.vtPackedFeedback.xyz; + break; } } From c7bc5976d80adc4293eac277be1bfb43418196b7 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Tue, 7 Apr 2020 10:02:47 +0200 Subject: [PATCH 133/143] Remove accidentally comitted file. --- .../ProjectSettings/EditorSettings.asset | 36 ------------------- .../VersionControlSettings.asset | 8 ----- 2 files changed, 44 deletions(-) delete mode 100644 TestProjects/VisualEffectGraph/ProjectSettings/EditorSettings.asset delete mode 100644 TestProjects/VisualEffectGraph/ProjectSettings/VersionControlSettings.asset diff --git a/TestProjects/VisualEffectGraph/ProjectSettings/EditorSettings.asset b/TestProjects/VisualEffectGraph/ProjectSettings/EditorSettings.asset deleted file mode 100644 index e41f0bca1b0..00000000000 --- a/TestProjects/VisualEffectGraph/ProjectSettings/EditorSettings.asset +++ /dev/null @@ -1,36 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!159 &1 -EditorSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_SerializationMode: 2 - m_LineEndingsForNewScripts: 1 - m_DefaultBehaviorMode: 0 - m_PrefabRegularEnvironment: {fileID: 0} - m_PrefabUIEnvironment: {fileID: 0} - m_SpritePackerMode: 0 - m_SpritePackerPaddingPower: 1 - m_EtcTextureCompressorBehavior: 0 - m_EtcTextureFastCompressor: 2 - m_EtcTextureNormalCompressor: 2 - m_EtcTextureBestCompressor: 5 - m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmref - m_ProjectGenerationRootNamespace: - m_EnableTextureStreamingInEditMode: 1 - m_EnableTextureStreamingInPlayMode: 1 - m_AsyncShaderCompilation: 0 - m_CachingShaderPreprocessor: 0 - m_EnterPlayModeOptionsEnabled: 0 - m_EnterPlayModeOptions: 3 - m_UseLegacyProbeSampleCount: 1 - m_SerializeInlineMappingsOnOneLine: 0 - m_DisableCookiesInLightmapper: 1 - m_AssetPipelineMode: 1 - m_CacheServerMode: 0 - m_CacheServerEndpoint: - m_CacheServerNamespacePrefix: default - m_CacheServerEnableDownload: 1 - m_CacheServerEnableUpload: 1 - m_CacheServerEnableAuth: 0 - m_CacheServerEnableTls: 0 diff --git a/TestProjects/VisualEffectGraph/ProjectSettings/VersionControlSettings.asset b/TestProjects/VisualEffectGraph/ProjectSettings/VersionControlSettings.asset deleted file mode 100644 index dca288142fc..00000000000 --- a/TestProjects/VisualEffectGraph/ProjectSettings/VersionControlSettings.asset +++ /dev/null @@ -1,8 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!890905787 &1 -VersionControlSettings: - m_ObjectHideFlags: 0 - m_Mode: Visible Meta Files - m_CollabEditorSettings: - inProgressEnabled: 1 From b15c325b52ce6ebe8d80458c68b454fca65451bc Mon Sep 17 00:00:00 2001 From: Nico Leyman Date: Tue, 7 Apr 2020 15:35:41 +0200 Subject: [PATCH 134/143] Made VT settings object mirrored on the HDRP side so there VT settings are always available. --- .../VirtualTexturingSettingsUI.cs | 15 ++++---- .../RenderPipeline/HDRenderPipelineAsset.cs | 2 -- .../VirtualTexturingSettingsSRP.cs | 36 +++++++++++++++++-- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs index 7d562e0727d..61f535d67f7 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs @@ -4,6 +4,7 @@ using UnityEditorInternal; using UnityEngine; using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering.HighDefinition; using UnityEngine.Rendering.VirtualTexturing; #if ENABLE_VIRTUALTEXTURES @@ -50,14 +51,14 @@ public void OnGUI(SerializedHDRenderPipelineAsset serialized, Editor owner) serialized.serializedObject.ApplyModifiedProperties(); } - VirtualTexturingGPUCacheSizeOverride[] GetGPUCacheSizeOverrideArrayFromProperty(SerializedProperty property) + VirtualTexturingGPUCacheSizeOverrideSRP[] GetGPUCacheSizeOverrideArrayFromProperty(SerializedProperty property) { - List overrides = new List(); + List overrides = new List(); for (int i = 0; i < property.arraySize; ++i) { SerializedProperty overrideProperty = property.GetArrayElementAtIndex(i); - overrides.Add(new VirtualTexturingGPUCacheSizeOverride() - { format = (GraphicsFormat)overrideProperty.FindPropertyRelative("format").intValue, usage = (VirtualTexturingCacheUsage)overrideProperty.FindPropertyRelative("usage").intValue, sizeInMegaBytes = (uint)overrideProperty.FindPropertyRelative("sizeInMegaBytes").intValue }); + overrides.Add(new VirtualTexturingGPUCacheSizeOverrideSRP() + { format = (GraphicsFormat)overrideProperty.FindPropertyRelative("format").intValue, usage = (VirtualTexturingCacheUsageSRP)overrideProperty.FindPropertyRelative("usage").intValue, sizeInMegaBytes = (uint)overrideProperty.FindPropertyRelative("sizeInMegaBytes").intValue }); } return overrides.ToArray(); @@ -79,7 +80,7 @@ ReorderableList CreateGPUCacheSizeOverrideList(SerializedProperty property, Reor List availableFormats = new List(EditorHelpers.QuerySupportedFormats()); // We can't just pass in existing overrides as a parameter to CreateGPUCacheSizeOverrideList() because lambdas can't capture ref params. - VirtualTexturingGPUCacheSizeOverride[] existingOverrides = GetGPUCacheSizeOverrideArrayFromProperty(serializedRPAsset.virtualTexturingSettings.gpuCacheSizeOverridesStreaming); + VirtualTexturingGPUCacheSizeOverrideSRP[] existingOverrides = GetGPUCacheSizeOverrideArrayFromProperty(serializedRPAsset.virtualTexturingSettings.gpuCacheSizeOverridesStreaming); RemoveOverriddenFormats(availableFormats, existingOverrides); int index = property.arraySize; @@ -111,7 +112,7 @@ GraphicsFormat FormatAndChannelTransformStringToGraphicsFormat(string format, st return (GraphicsFormat)Enum.Parse(typeof(GraphicsFormat), $"{format}_{channelTransform}"); } - void RemoveOverriddenFormats(List formats, VirtualTexturingGPUCacheSizeOverride[] overrides) + void RemoveOverriddenFormats(List formats, VirtualTexturingGPUCacheSizeOverrideSRP[] overrides) { foreach (var existingCacheSizeOverride in overrides) { @@ -119,7 +120,7 @@ void RemoveOverriddenFormats(List formats, VirtualTexturingGPUCa } } - void GPUCacheSizeOverridesGUI(Rect rect, int overrideIdx, SerializedProperty overrideListProperty, VirtualTexturingGPUCacheSizeOverride[] overrideList) + void GPUCacheSizeOverridesGUI(Rect rect, int overrideIdx, SerializedProperty overrideListProperty, VirtualTexturingGPUCacheSizeOverrideSRP[] overrideList) { var cacheSizeOverrideProperty = overrideListProperty.GetArrayElementAtIndex(overrideIdx); var cacheSizeOverride = overrideList[overrideIdx]; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index e5d24ec0935..e25ff8b864f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -252,10 +252,8 @@ public override Shader defaultShader internal List beforePostProcessCustomPostProcesses = new List(); [SerializeField] internal List afterPostProcessCustomPostProcesses = new List(); -#if ENABLE_VIRTUALTEXTURES [SerializeField] public VirtualTexturingSettingsSRP virtualTexturingSettings; -#endif #if UNITY_EDITOR /// HDRP default material. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs index 4edc475f96e..ac4d5d3a250 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using UnityEditor; using UnityEditor.Rendering; +using UnityEngine.Experimental.Rendering; using UnityEngine.Rendering.VirtualTexturing; namespace UnityEngine.Rendering.HighDefinition { -#if ENABLE_VIRTUALTEXTURES [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "VirtualTexturing - Settings" + Documentation.endURL)] [Serializable] public sealed class VirtualTexturingSettingsSRP @@ -15,8 +15,9 @@ public sealed class VirtualTexturingSettingsSRP public int gpuCacheSizeInMegaBytes = 64; // On the UI side we only expose the overrides used for streaming. - public List gpuCacheSizeOverridesStreaming = new List(); + public List gpuCacheSizeOverridesStreaming = new List(); +#if ENABLE_VIRTUALTEXTURES // Returns settings as passed to the Virtual Texturing API. public VirtualTexturing.VirtualTexturingSettings GetSettings() { @@ -25,7 +26,12 @@ public VirtualTexturing.VirtualTexturingSettings GetSettings() settings.cpuCache.sizeInMegaBytes = (uint) cpuCacheSizeInMegaBytes; List overrides = new List(); - overrides.AddRange(gpuCacheSizeOverridesStreaming); + + foreach (VirtualTexturingGPUCacheSizeOverrideSRP setting in gpuCacheSizeOverridesStreaming) + { + overrides.Add(setting.GetNative()); + } + settings.gpuCache.sizeOverrides = overrides.ToArray(); settings.gpuCache.sizeInMegaBytes = (uint) gpuCacheSizeInMegaBytes; @@ -43,6 +49,30 @@ public static UnityEngine.Rendering.VirtualTexturing.VirtualTexturingSettings De return settings; } } +#endif } + + + // HDRP side version of VirtualTexturingGPUCacheSizeOverride that is always available to be serialized even if VT is disabled. + [Serializable] + public struct VirtualTexturingGPUCacheSizeOverrideSRP + { + public VirtualTexturingCacheUsageSRP usage; + public GraphicsFormat format; + public uint sizeInMegaBytes; + +#if ENABLE_VIRTUALTEXTURES + public VirtualTexturingGPUCacheSizeOverride GetNative() + { + return new VirtualTexturingGPUCacheSizeOverride(){format = format, sizeInMegaBytes = sizeInMegaBytes, usage = (VirtualTexturingCacheUsage)(int)usage}; + } #endif + } + + public enum VirtualTexturingCacheUsageSRP + { + Any, + Streaming, + Procedural, + } } From a2a13fc7d097298f9c89ff3511795577e6db8aad Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 8 Apr 2020 10:24:28 +0200 Subject: [PATCH 135/143] Enable virtualTextureFeedback for passes that need it (got removed in latest merge). --- .../Editor/Material/Lit/ShaderGraph/HDLitSubTarget.cs | 6 +++++- .../Editor/Material/PBR/ShaderGraph/PBRSubTarget.cs | 6 +++++- .../Editor/Material/Unlit/ShaderGraph/HDUnlitSubTarget.cs | 4 +++- .../Editor/Material/Unlit/ShaderGraph/UnlitSubTarget.cs | 4 +++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubTarget.cs index be81709a5a5..1d5849869ce 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubTarget.cs @@ -1,4 +1,4 @@ -using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.HighDefinition; using UnityEditor.ShaderGraph; namespace UnityEditor.Rendering.HighDefinition.ShaderGraph @@ -90,6 +90,8 @@ public static class LitPasses defines = CoreDefines.ShaderGraphRaytracingHigh, keywords = LitKeywords.GBuffer, includes = LitIncludes.GBuffer, + + virtualTextureFeedback = true, }; public static PassDescriptor META = new PassDescriptor() @@ -328,6 +330,8 @@ public static class LitPasses defines = CoreDefines.Forward, keywords = CoreKeywords.Forward, includes = LitIncludes.Forward, + + virtualTextureFeedback = true, }; public static PassDescriptor TransparentDepthPostpass = new PassDescriptor() diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/PBRSubTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/PBRSubTarget.cs index 0f3abdee35a..df449e93e96 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/PBRSubTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/PBRSubTarget.cs @@ -1,4 +1,4 @@ -using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.HighDefinition; using UnityEditor.ShaderGraph; namespace UnityEditor.Rendering.HighDefinition.ShaderGraph @@ -69,6 +69,8 @@ static class PBRPasses pragmas = CorePragmas.InstancedRenderingLayer, keywords = PBRKeywords.GBuffer, includes = PBRIncludes.GBuffer, + + virtualTextureFeedback = true, }; public static PassDescriptor META = new PassDescriptor() @@ -228,6 +230,8 @@ static class PBRPasses defines = CoreDefines.Forward, keywords = PBRKeywords.Forward, includes = PBRIncludes.Forward, + + virtualTextureFeedback = true, }; } #endregion diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubTarget.cs index 64fdfb7b6f0..807cba566b6 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSubTarget.cs @@ -1,4 +1,4 @@ -using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.HighDefinition; using UnityEditor.ShaderGraph; namespace UnityEditor.Rendering.HighDefinition.ShaderGraph @@ -243,6 +243,8 @@ static class UnlitPasses pragmas = CorePragmas.DotsInstancedInV2Only, keywords = UnlitKeywords.Forward, includes = UnlitIncludes.ForwardOnly, + + virtualTextureFeedback = true, }; public static PassDescriptor RaytracingIndirect = new PassDescriptor() diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitSubTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitSubTarget.cs index cda904e70d2..a8901a76f41 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitSubTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitSubTarget.cs @@ -1,4 +1,4 @@ -using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.HighDefinition; using UnityEditor.ShaderGraph; namespace UnityEditor.Rendering.HighDefinition.ShaderGraph @@ -191,6 +191,8 @@ static class UnlitPasses pragmas = CorePragmas.DotsInstancedInV2Only, keywords = CoreKeywords.DebugDisplay, includes = UnlitIncludes.ForwardOnly, + + virtualTextureFeedback = true, }; } #endregion From 1fe9723e03a5ec626e21a66879d109c94c1ebd9d Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 8 Apr 2020 10:27:07 +0200 Subject: [PATCH 136/143] Remove shadergraph test changes. --- .../Direct3D11/None/ProceduralNodes.png | 4 +- .../Assets/Scenes/InputNodes.unity | 341 +----------------- .../Input/Texture/SampleVirtualTexture.mat | 29 -- .../Texture/SampleVirtualTexture.mat.meta | 8 - .../Texture/SampleVirtualTexture.shadergraph | 37 -- .../SampleVirtualTexture.shadergraph.meta | 10 - 6 files changed, 4 insertions(+), 425 deletions(-) delete mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat delete mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat.meta delete mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph delete mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph.meta diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/ProceduralNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/ProceduralNodes.png index fe7edd714fd..ddd09462824 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/ProceduralNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/ProceduralNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4ddfc4b1c5e60d2adcaf9094b24ce715c663c295c8b90589fde59a43ccc3dab -size 35844 +oid sha256:5420fb8d2003273501262d8950a2226966a103eca2c47398884f4195cf591960 +size 39191 diff --git a/TestProjects/ShaderGraph/Assets/Scenes/InputNodes.unity b/TestProjects/ShaderGraph/Assets/Scenes/InputNodes.unity index f1fd40ec35c..6c59d4c1004 100644 --- a/TestProjects/ShaderGraph/Assets/Scenes/InputNodes.unity +++ b/TestProjects/ShaderGraph/Assets/Scenes/InputNodes.unity @@ -43,7 +43,7 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 + serializedVersion: 11 m_GIWorkflowMode: 1 m_GISettings: serializedVersion: 2 @@ -99,8 +99,7 @@ LightmapSettings: m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 112000000, guid: ccd04a1b46622d842a16aa4d9df371fa, type: 2} - m_LightingSettings: {fileID: 4890085278179872738, guid: 71d345a19eeef944088678035dd9cf90, - type: 2} + m_UseShadowmask: 0 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -120,8 +119,6 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -172,7 +169,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -197,7 +193,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &577818 MeshFilter: m_ObjectHideFlags: 0 @@ -268,7 +263,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -293,7 +287,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1221712 SphereCollider: m_ObjectHideFlags: 0 @@ -363,7 +356,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -388,7 +380,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &17182308 SphereCollider: m_ObjectHideFlags: 0 @@ -457,7 +448,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -482,7 +472,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &29891251 MeshFilter: m_ObjectHideFlags: 0 @@ -553,7 +542,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -578,7 +566,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &42793508 SphereCollider: m_ObjectHideFlags: 0 @@ -648,7 +635,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -673,7 +659,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &53016697 SphereCollider: m_ObjectHideFlags: 0 @@ -743,7 +728,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -768,7 +752,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &83771984 SphereCollider: m_ObjectHideFlags: 0 @@ -838,7 +821,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -863,7 +845,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &97661565 SphereCollider: m_ObjectHideFlags: 0 @@ -933,7 +914,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -958,7 +938,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &100390684 SphereCollider: m_ObjectHideFlags: 0 @@ -1065,7 +1044,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1090,7 +1068,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &147557062 MeshFilter: m_ObjectHideFlags: 0 @@ -1161,7 +1138,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1186,7 +1162,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &172255954 SphereCollider: m_ObjectHideFlags: 0 @@ -1256,7 +1231,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1281,7 +1255,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &207413613 SphereCollider: m_ObjectHideFlags: 0 @@ -1351,7 +1324,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1376,7 +1348,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &212523233 SphereCollider: m_ObjectHideFlags: 0 @@ -1446,7 +1417,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1471,7 +1441,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &227977878 SphereCollider: m_ObjectHideFlags: 0 @@ -1540,7 +1509,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1565,7 +1533,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &238486951 MeshFilter: m_ObjectHideFlags: 0 @@ -1696,7 +1663,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1721,7 +1687,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &250086848 SphereCollider: m_ObjectHideFlags: 0 @@ -1791,7 +1756,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1816,7 +1780,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &283589528 SphereCollider: m_ObjectHideFlags: 0 @@ -1886,7 +1849,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1911,7 +1873,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &285294294 SphereCollider: m_ObjectHideFlags: 0 @@ -2031,7 +1992,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2056,7 +2016,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &315644276 SphereCollider: m_ObjectHideFlags: 0 @@ -2275,7 +2234,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2300,7 +2258,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &371422991 SphereCollider: m_ObjectHideFlags: 0 @@ -2370,7 +2327,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2395,7 +2351,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &414293742 SphereCollider: m_ObjectHideFlags: 0 @@ -2465,7 +2420,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2490,7 +2444,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &414435822 SphereCollider: m_ObjectHideFlags: 0 @@ -2560,7 +2513,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2585,7 +2537,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &460208045 SphereCollider: m_ObjectHideFlags: 0 @@ -2655,7 +2606,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2680,7 +2630,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &462242930 SphereCollider: m_ObjectHideFlags: 0 @@ -2750,7 +2699,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2775,7 +2723,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &480521287 SphereCollider: m_ObjectHideFlags: 0 @@ -2845,7 +2792,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2870,7 +2816,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &485539996 SphereCollider: m_ObjectHideFlags: 0 @@ -2984,7 +2929,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3009,7 +2953,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &507897637 SphereCollider: m_ObjectHideFlags: 0 @@ -3079,7 +3022,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3104,7 +3046,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &510972452 SphereCollider: m_ObjectHideFlags: 0 @@ -3174,7 +3115,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3199,7 +3139,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &513781238 SphereCollider: m_ObjectHideFlags: 0 @@ -3269,7 +3208,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3294,7 +3232,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &524449750 SphereCollider: m_ObjectHideFlags: 0 @@ -3364,7 +3301,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3389,7 +3325,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &529652658 SphereCollider: m_ObjectHideFlags: 0 @@ -3459,7 +3394,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3484,7 +3418,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &574756866 SphereCollider: m_ObjectHideFlags: 0 @@ -3554,7 +3487,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3579,7 +3511,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &582133713 SphereCollider: m_ObjectHideFlags: 0 @@ -3649,7 +3580,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3674,7 +3604,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &585441713 SphereCollider: m_ObjectHideFlags: 0 @@ -3740,7 +3669,6 @@ Transform: - {fileID: 1704958864} - {fileID: 1976893045} - {fileID: 697337478} - - {fileID: 775953114} m_Father: {fileID: 134715868} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -3792,7 +3720,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3817,7 +3744,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &628137915 SphereCollider: m_ObjectHideFlags: 0 @@ -3886,7 +3812,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3911,7 +3836,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &644476904 MeshFilter: m_ObjectHideFlags: 0 @@ -3982,7 +3906,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4007,7 +3930,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &661742760 SphereCollider: m_ObjectHideFlags: 0 @@ -4077,7 +3999,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4102,7 +4023,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &697337480 SphereCollider: m_ObjectHideFlags: 0 @@ -4172,7 +4092,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4197,7 +4116,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &715693414 SphereCollider: m_ObjectHideFlags: 0 @@ -4266,7 +4184,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4291,7 +4208,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &735557293 MeshFilter: m_ObjectHideFlags: 0 @@ -4362,7 +4278,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4387,7 +4302,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &738840891 SphereCollider: m_ObjectHideFlags: 0 @@ -4456,7 +4370,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4481,7 +4394,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &770505458 MeshFilter: m_ObjectHideFlags: 0 @@ -4504,101 +4416,6 @@ Transform: m_Father: {fileID: 303484558} m_RootOrder: 10 m_LocalEulerAnglesHint: {x: -90, y: 180, z: -90} ---- !u!1 &775953113 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 775953114} - - component: {fileID: 775953117} - - component: {fileID: 775953116} - - component: {fileID: 775953115} - m_Layer: 0 - m_Name: SamplerStateLinearMirrorOnceTexture2D (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &775953114 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 775953113} - m_LocalRotation: {x: -0, y: -0, z: 1, w: -0.00000035762784} - m_LocalPosition: {x: 3, y: -0, z: -2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 596523079} - m_RootOrder: 17 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 179.99998} ---- !u!23 &775953115 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 775953113} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 8619824a6872a6d46beb954a2f44f534, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - 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 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!135 &775953116 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 775953113} - 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!33 &775953117 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 775953113} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &801207484 GameObject: m_ObjectHideFlags: 0 @@ -4647,7 +4464,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4672,7 +4488,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &801207487 SphereCollider: m_ObjectHideFlags: 0 @@ -4742,7 +4557,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4767,7 +4581,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &804860715 SphereCollider: m_ObjectHideFlags: 0 @@ -4837,7 +4650,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4862,7 +4674,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &820177706 SphereCollider: m_ObjectHideFlags: 0 @@ -4932,7 +4743,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4957,7 +4767,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &840653960 SphereCollider: m_ObjectHideFlags: 0 @@ -5027,7 +4836,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5052,7 +4860,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &841185861 SphereCollider: m_ObjectHideFlags: 0 @@ -5122,7 +4929,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5147,7 +4953,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &853683123 SphereCollider: m_ObjectHideFlags: 0 @@ -5217,7 +5022,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5242,7 +5046,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &871278867 SphereCollider: m_ObjectHideFlags: 0 @@ -5312,7 +5115,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5337,7 +5139,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &919728591 SphereCollider: m_ObjectHideFlags: 0 @@ -5407,7 +5208,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5432,7 +5232,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &925157437 SphereCollider: m_ObjectHideFlags: 0 @@ -5502,7 +5301,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5527,7 +5325,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &991341885 SphereCollider: m_ObjectHideFlags: 0 @@ -5597,7 +5394,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5622,7 +5418,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1029832736 SphereCollider: m_ObjectHideFlags: 0 @@ -5692,7 +5487,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5717,7 +5511,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1029851379 SphereCollider: m_ObjectHideFlags: 0 @@ -5787,7 +5580,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5812,7 +5604,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1050940237 SphereCollider: m_ObjectHideFlags: 0 @@ -5881,7 +5672,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5906,7 +5696,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1051528461 MeshFilter: m_ObjectHideFlags: 0 @@ -5977,7 +5766,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6002,7 +5790,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1059825223 SphereCollider: m_ObjectHideFlags: 0 @@ -6072,7 +5859,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6097,7 +5883,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1077364020 SphereCollider: m_ObjectHideFlags: 0 @@ -6167,7 +5952,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6192,7 +5976,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1114000236 SphereCollider: m_ObjectHideFlags: 0 @@ -6262,7 +6045,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6287,7 +6069,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1126344843 SphereCollider: m_ObjectHideFlags: 0 @@ -6357,7 +6138,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6382,7 +6162,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1136984179 SphereCollider: m_ObjectHideFlags: 0 @@ -6452,7 +6231,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6477,7 +6255,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1182234435 SphereCollider: m_ObjectHideFlags: 0 @@ -6547,7 +6324,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6572,7 +6348,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1222953126 SphereCollider: m_ObjectHideFlags: 0 @@ -6642,7 +6417,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6667,7 +6441,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1235329771 SphereCollider: m_ObjectHideFlags: 0 @@ -6737,7 +6510,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6762,7 +6534,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1290363524 SphereCollider: m_ObjectHideFlags: 0 @@ -6832,7 +6603,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6857,7 +6627,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1290626768 SphereCollider: m_ObjectHideFlags: 0 @@ -6926,7 +6695,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6951,7 +6719,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1311165579 MeshFilter: m_ObjectHideFlags: 0 @@ -7022,7 +6789,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7047,7 +6813,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1315568619 SphereCollider: m_ObjectHideFlags: 0 @@ -7117,7 +6882,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7142,7 +6906,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1322529935 SphereCollider: m_ObjectHideFlags: 0 @@ -7212,7 +6975,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7237,7 +6999,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1324643245 SphereCollider: m_ObjectHideFlags: 0 @@ -7307,7 +7068,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7332,7 +7092,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1327032209 SphereCollider: m_ObjectHideFlags: 0 @@ -7402,7 +7161,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7427,7 +7185,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1343815778 SphereCollider: m_ObjectHideFlags: 0 @@ -7497,7 +7254,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7522,7 +7278,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1383437970 SphereCollider: m_ObjectHideFlags: 0 @@ -7592,7 +7347,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7617,7 +7371,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1425383531 SphereCollider: m_ObjectHideFlags: 0 @@ -7722,7 +7475,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7747,7 +7499,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1452926176 SphereCollider: m_ObjectHideFlags: 0 @@ -7817,7 +7568,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7842,7 +7592,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1462505747 SphereCollider: m_ObjectHideFlags: 0 @@ -7912,7 +7661,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7937,7 +7685,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1467200803 SphereCollider: m_ObjectHideFlags: 0 @@ -8007,7 +7754,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8032,7 +7778,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1469504154 SphereCollider: m_ObjectHideFlags: 0 @@ -8102,7 +7847,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8127,7 +7871,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1471236226 SphereCollider: m_ObjectHideFlags: 0 @@ -8196,7 +7939,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8221,7 +7963,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1475762080 MeshFilter: m_ObjectHideFlags: 0 @@ -8291,7 +8032,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8316,7 +8056,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1506539578 MeshFilter: m_ObjectHideFlags: 0 @@ -8387,7 +8126,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8412,7 +8150,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1536751011 SphereCollider: m_ObjectHideFlags: 0 @@ -8482,7 +8219,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8507,7 +8243,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1545791080 SphereCollider: m_ObjectHideFlags: 0 @@ -8613,7 +8348,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8638,7 +8372,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1606512716 SphereCollider: m_ObjectHideFlags: 0 @@ -8708,7 +8441,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8733,7 +8465,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1610334440 SphereCollider: m_ObjectHideFlags: 0 @@ -8802,7 +8533,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8827,7 +8557,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1619359163 MeshFilter: m_ObjectHideFlags: 0 @@ -8898,7 +8627,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8923,7 +8651,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1701306557 SphereCollider: m_ObjectHideFlags: 0 @@ -8993,7 +8720,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9018,7 +8744,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1704958866 SphereCollider: m_ObjectHideFlags: 0 @@ -9152,7 +8877,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9177,7 +8901,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1718807272 SphereCollider: m_ObjectHideFlags: 0 @@ -9246,7 +8969,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9271,7 +8993,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1739134292 MeshFilter: m_ObjectHideFlags: 0 @@ -9342,7 +9063,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9367,7 +9087,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1765169125 SphereCollider: m_ObjectHideFlags: 0 @@ -9437,7 +9156,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9462,7 +9180,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1770065823 SphereCollider: m_ObjectHideFlags: 0 @@ -9531,7 +9248,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9556,7 +9272,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1770552485 MeshFilter: m_ObjectHideFlags: 0 @@ -9627,7 +9342,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9652,7 +9366,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1785428293 SphereCollider: m_ObjectHideFlags: 0 @@ -9722,7 +9435,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9747,7 +9459,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1787014627 SphereCollider: m_ObjectHideFlags: 0 @@ -9817,7 +9528,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9842,7 +9552,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1806418204 SphereCollider: m_ObjectHideFlags: 0 @@ -9911,7 +9620,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9936,7 +9644,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1808814367 MeshFilter: m_ObjectHideFlags: 0 @@ -10006,7 +9713,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10031,7 +9737,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1813021371 MeshFilter: m_ObjectHideFlags: 0 @@ -10101,7 +9806,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10126,7 +9830,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1824269726 MeshFilter: m_ObjectHideFlags: 0 @@ -10197,7 +9900,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10222,7 +9924,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1840713833 SphereCollider: m_ObjectHideFlags: 0 @@ -10292,7 +9993,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10317,7 +10017,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1856304762 SphereCollider: m_ObjectHideFlags: 0 @@ -10387,7 +10086,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10412,7 +10110,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1887502894 SphereCollider: m_ObjectHideFlags: 0 @@ -10481,7 +10178,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10506,7 +10202,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1888281877 MeshFilter: m_ObjectHideFlags: 0 @@ -10577,7 +10272,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10602,7 +10296,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1889255734 SphereCollider: m_ObjectHideFlags: 0 @@ -10672,7 +10365,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10697,7 +10389,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1894348793 SphereCollider: m_ObjectHideFlags: 0 @@ -10767,7 +10458,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10792,7 +10482,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1908664928 SphereCollider: m_ObjectHideFlags: 0 @@ -10861,7 +10550,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10886,7 +10574,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1909678460 MeshFilter: m_ObjectHideFlags: 0 @@ -10957,7 +10644,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10982,7 +10668,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1926593707 SphereCollider: m_ObjectHideFlags: 0 @@ -11052,7 +10737,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11077,7 +10761,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1947256755 SphereCollider: m_ObjectHideFlags: 0 @@ -11188,7 +10871,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11213,7 +10895,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1976893047 SphereCollider: m_ObjectHideFlags: 0 @@ -11283,7 +10964,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11308,7 +10988,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1981582517 SphereCollider: m_ObjectHideFlags: 0 @@ -11378,7 +11057,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11403,7 +11081,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &1990772824 SphereCollider: m_ObjectHideFlags: 0 @@ -11473,7 +11150,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11498,7 +11174,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2006496221 SphereCollider: m_ObjectHideFlags: 0 @@ -11568,7 +11243,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11593,7 +11267,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2011343687 SphereCollider: m_ObjectHideFlags: 0 @@ -11663,7 +11336,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11688,7 +11360,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2048688198 SphereCollider: m_ObjectHideFlags: 0 @@ -11757,7 +11428,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11782,7 +11452,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &2064675060 MeshFilter: m_ObjectHideFlags: 0 @@ -11853,7 +11522,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11878,7 +11546,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2076468049 SphereCollider: m_ObjectHideFlags: 0 @@ -11948,7 +11615,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11973,7 +11639,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2087670892 SphereCollider: m_ObjectHideFlags: 0 @@ -12043,7 +11708,6 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -12068,7 +11732,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} --- !u!135 &2140997635 SphereCollider: m_ObjectHideFlags: 0 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat deleted file mode 100644 index 8eb500f0263..00000000000 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat +++ /dev/null @@ -1,29 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: SampleVirtualTexture - m_Shader: {fileID: -6465566751694194690, guid: 2c905ae6cf05d1045be9bd0cb88dcfc8, - type: 3} - m_ShaderKeywords: - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _SampleVTStack_3B9C242F_Texture_5: - m_Texture: {fileID: 2800000, guid: e18a7160005114c41b390e35a3f4acdc, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: [] - m_Colors: [] - m_BuildTextureStacks: [] diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat.meta deleted file mode 100644 index 4a49b24445c..00000000000 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8619824a6872a6d46beb954a2f44f534 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph deleted file mode 100644 index 2184b3dc6a7..00000000000 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph +++ /dev/null @@ -1,37 +0,0 @@ -{ - "m_SerializedProperties": [], - "m_SerializedKeywords": [], - "m_SerializableNodes": [ - { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.SampleTextureStackNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"2a18df7a-e934-4be8-ad48-cbcfe54857b9\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample VT Stack\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -345.0,\n \"y\": 70.0,\n \"width\": 167.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e18a7160005114c41b390e35a3f4acdc\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Feedback\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": true,\\n \\\"m_ShaderOutputName\\\": \\\"Feedback\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_LodCalculation\": 0,\n \"m_SampleQuality\": 1,\n \"m_NumSlots\": 1,\n \"m_NoFeedback\": false,\n \"m_StackName\": \"\",\n \"m_TextureTypes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"m_NormalMapSpace\": 0\n}" - }, - { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"d496da89-7d87-4d24-a396-1d3737e64412\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddPrecomputedVelocity\": false,\n \"m_DOTSInstancing\": false,\n \"m_ShaderGUIOverride\": \"\",\n \"m_OverrideEnabled\": false\n}" - } - ], - "m_Groups": [], - "m_StickyNotes": [], - "m_SerializableEdges": [ - { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" - }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"2a18df7a-e934-4be8-ad48-cbcfe54857b9\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"d496da89-7d87-4d24-a396-1d3737e64412\"\n }\n}" - } - ], - "m_PreviewData": { - "serializedMesh": { - "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", - "m_Guid": "" - } - }, - "m_Path": "Shader Graphs", - "m_ConcretePrecision": 0, - "m_ActiveOutputNodeGuidSerialized": "d496da89-7d87-4d24-a396-1d3737e64412" -} \ No newline at end of file diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph.meta deleted file mode 100644 index 6c24fd3d21b..00000000000 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Input/Texture/SampleVirtualTexture.shadergraph.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2c905ae6cf05d1045be9bd0cb88dcfc8 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} From 51ae695e59644859a583e14f58a1b790ce5c2588 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 8 Apr 2020 10:29:00 +0200 Subject: [PATCH 137/143] Remove visual effect graph changes. --- .../VFXSpawnerTest_AAAA.expected.txt.meta | 2 +- .../VFXSpawnerTest_BCAA.expected.txt.meta | 2 +- .../VFXSpawnerTest_CAAA.expected.txt.meta | 2 +- .../VFXSpawnerTest_CACA.expected.txt.meta | 2 +- .../Shadergraph/SampleScene/SampleScene.vfx | 41 ------------------- .../Shadergraph/Unlit/AllUVs.vfx | 41 ------------------- .../Shadergraph/Unlit/RandomColor.vfx | 41 ------------------- .../Shadergraph/Unlit/RandomColorClipped.vfx | 41 ------------------- .../Shadergraph/Unlit/ShaderGraphShadow.vfx | 41 ------------------- .../Shadergraph/Unlit/VertexColor.vfx | 41 ------------------- .../ProjectSettings/EditorSettings.asset | 36 ++++++++++++++++ .../ProjectSettings/GraphicsSettings.asset | 2 +- .../ProjectSettings/VFXManager.asset | 8 ++-- .../UserSettings/EditorUserSettings.asset | 19 --------- 14 files changed, 45 insertions(+), 274 deletions(-) create mode 100644 TestProjects/VisualEffectGraph/ProjectSettings/EditorSettings.asset delete mode 100644 TestProjects/VisualEffectGraph/UserSettings/EditorUserSettings.asset diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta index 4182552a52b..aecdd15cc17 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_AAAA.expected.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f4f2d97b51cbb8d46a1e3d51a71a0b67 +guid: 76a87ac49925e944187033db920e8762 TextScriptImporter: externalObjects: {} userData: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta index dbe6038ad3b..b12c2cdc6a8 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_BCAA.expected.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 363d992636e59ba49bec13eced2deab0 +guid: 5f1c852798932e5409de1e9f551b8bac TextScriptImporter: externalObjects: {} userData: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta index 29643c473f8..299e11689ab 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CAAA.expected.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: caa8690cde0555843bd51995ad0bc468 +guid: af45a7db96d32d3468d5d8513cd50632 TextScriptImporter: externalObjects: {} userData: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta index 10062e0d800..4355812d755 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/Editor/Tests/VFXSpawnerTest_CACA.expected.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b15aea2d59df5404eb631845a01a6e03 +guid: d68555eff73051c4fb0cae6597cceee9 TextScriptImporter: externalObjects: {} userData: diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/SampleScene/SampleScene.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/SampleScene/SampleScene.vfx index ad444d0cb95..caaf9ed271e 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/SampleScene/SampleScene.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/SampleScene/SampleScene.vfx @@ -2329,7 +2329,6 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: - - {fileID: 8926484042661614687} - {fileID: 8926484042661614653} - {fileID: 8926484042661614654} - {fileID: 8926484042661614685} @@ -3460,43 +3459,3 @@ MonoBehaviour: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] ---- !u!114 &8926484042661614687 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 0} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614687} - m_MasterData: - m_Owner: {fileID: 8926484042661614651} - m_Value: - m_Type: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' - m_Space: 2147483647 - m_Property: - name: mainTexture - m_serializedType: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: - - m_Type: 3 - m_Min: -Infinity - m_Max: Infinity - m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. - m_Regex: - m_RegexMaxLength: 0 - m_Direction: 0 - m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/AllUVs.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/AllUVs.vfx index 0cfa432edda..edb54b49729 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/AllUVs.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/AllUVs.vfx @@ -1106,7 +1106,6 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: - - {fileID: 8926484042661614568} - {fileID: 8926484042661614555} - {fileID: 8926484042661614556} - {fileID: 8926484042661614567} @@ -1418,43 +1417,3 @@ MonoBehaviour: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] ---- !u!114 &8926484042661614568 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 0} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614568} - m_MasterData: - m_Owner: {fileID: 8926484042661614553} - m_Value: - m_Type: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' - m_Space: 2147483647 - m_Property: - name: mainTexture - m_serializedType: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: - - m_Type: 3 - m_Min: -Infinity - m_Max: Infinity - m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. - m_Regex: - m_RegexMaxLength: 0 - m_Direction: 0 - m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColor.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColor.vfx index 5f947342f3d..018b66e86a1 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColor.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColor.vfx @@ -2610,7 +2610,6 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: - - {fileID: 8926484042661614817} - {fileID: 8926484042661614766} - {fileID: 8926484042661614767} - {fileID: 8926484042661614816} @@ -3711,43 +3710,3 @@ MonoBehaviour: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] ---- !u!114 &8926484042661614817 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 0} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614817} - m_MasterData: - m_Owner: {fileID: 8926484042661614764} - m_Value: - m_Type: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' - m_Space: 2147483647 - m_Property: - name: mainTexture - m_serializedType: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: - - m_Type: 3 - m_Min: -Infinity - m_Max: Infinity - m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. - m_Regex: - m_RegexMaxLength: 0 - m_Direction: 0 - m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColorClipped.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColorClipped.vfx index 5f3d5c3e773..5aaa5e0580a 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColorClipped.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/RandomColorClipped.vfx @@ -2609,7 +2609,6 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: - - {fileID: 8926484042661614813} - {fileID: 8926484042661614766} - {fileID: 8926484042661614767} - {fileID: 8926484042661614790} @@ -3617,43 +3616,3 @@ MonoBehaviour: attributes: [] m_Direction: 1 m_LinkedSlots: [] ---- !u!114 &8926484042661614813 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 0} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614813} - m_MasterData: - m_Owner: {fileID: 8926484042661614764} - m_Value: - m_Type: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' - m_Space: 2147483647 - m_Property: - name: mainTexture - m_serializedType: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: - - m_Type: 3 - m_Min: -Infinity - m_Max: Infinity - m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. - m_Regex: - m_RegexMaxLength: 0 - m_Direction: 0 - m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/ShaderGraphShadow.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/ShaderGraphShadow.vfx index e1d2ef6893d..482408c0f2b 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/ShaderGraphShadow.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/ShaderGraphShadow.vfx @@ -1239,7 +1239,6 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: - - {fileID: 8926484042661614569} - {fileID: 8926484042661614557} - {fileID: 8926484042661614558} m_OutputSlots: [] @@ -1644,43 +1643,3 @@ MonoBehaviour: attributes: [] m_Direction: 0 m_LinkedSlots: [] ---- !u!114 &8926484042661614569 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 0} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614569} - m_MasterData: - m_Owner: {fileID: 8926484042661614555} - m_Value: - m_Type: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' - m_Space: 2147483647 - m_Property: - name: mainTexture - m_serializedType: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: - - m_Type: 3 - m_Min: -Infinity - m_Max: Infinity - m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. - m_Regex: - m_RegexMaxLength: 0 - m_Direction: 0 - m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/VertexColor.vfx b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/VertexColor.vfx index 6b077f4dfc1..d6f2884ed54 100644 --- a/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/VertexColor.vfx +++ b/TestProjects/VisualEffectGraph/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/Unlit/VertexColor.vfx @@ -1106,7 +1106,6 @@ MonoBehaviour: m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: - - {fileID: 8926484042661614568} - {fileID: 8926484042661614555} - {fileID: 8926484042661614556} - {fileID: 8926484042661614567} @@ -1418,43 +1417,3 @@ MonoBehaviour: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] ---- !u!114 &8926484042661614568 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 0} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614568} - m_MasterData: - m_Owner: {fileID: 8926484042661614553} - m_Value: - m_Type: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' - m_Space: 2147483647 - m_Property: - name: mainTexture - m_serializedType: - m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: - - m_Type: 3 - m_Min: -Infinity - m_Max: Infinity - m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. - m_Regex: - m_RegexMaxLength: 0 - m_Direction: 0 - m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph/ProjectSettings/EditorSettings.asset b/TestProjects/VisualEffectGraph/ProjectSettings/EditorSettings.asset new file mode 100644 index 00000000000..e41f0bca1b0 --- /dev/null +++ b/TestProjects/VisualEffectGraph/ProjectSettings/EditorSettings.asset @@ -0,0 +1,36 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!159 &1 +EditorSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_SerializationMode: 2 + m_LineEndingsForNewScripts: 1 + m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} + m_SpritePackerMode: 0 + m_SpritePackerPaddingPower: 1 + m_EtcTextureCompressorBehavior: 0 + m_EtcTextureFastCompressor: 2 + m_EtcTextureNormalCompressor: 2 + m_EtcTextureBestCompressor: 5 + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmref + m_ProjectGenerationRootNamespace: + m_EnableTextureStreamingInEditMode: 1 + m_EnableTextureStreamingInPlayMode: 1 + m_AsyncShaderCompilation: 0 + m_CachingShaderPreprocessor: 0 + m_EnterPlayModeOptionsEnabled: 0 + m_EnterPlayModeOptions: 3 + m_UseLegacyProbeSampleCount: 1 + m_SerializeInlineMappingsOnOneLine: 0 + m_DisableCookiesInLightmapper: 1 + m_AssetPipelineMode: 1 + m_CacheServerMode: 0 + m_CacheServerEndpoint: + m_CacheServerNamespacePrefix: default + m_CacheServerEnableDownload: 1 + m_CacheServerEnableUpload: 1 + m_CacheServerEnableAuth: 0 + m_CacheServerEnableTls: 0 diff --git a/TestProjects/VisualEffectGraph/ProjectSettings/GraphicsSettings.asset b/TestProjects/VisualEffectGraph/ProjectSettings/GraphicsSettings.asset index ec10a9247ca..0ab3adb1f69 100644 --- a/TestProjects/VisualEffectGraph/ProjectSettings/GraphicsSettings.asset +++ b/TestProjects/VisualEffectGraph/ProjectSettings/GraphicsSettings.asset @@ -28,7 +28,6 @@ GraphicsSettings: m_LensFlare: m_Mode: 1 m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} - m_VideoShadersIncludeMode: 2 m_AlwaysIncludedShaders: - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} @@ -167,3 +166,4 @@ GraphicsSettings: m_LightsUseLinearIntensity: 1 m_LightsUseColorTemperature: 1 m_LogWhenShaderIsCompiled: 0 + m_AllowEnlightenSupportForUpgradedProject: 1 diff --git a/TestProjects/VisualEffectGraph/ProjectSettings/VFXManager.asset b/TestProjects/VisualEffectGraph/ProjectSettings/VFXManager.asset index e8fa2256bb0..727d3d75d94 100644 --- a/TestProjects/VisualEffectGraph/ProjectSettings/VFXManager.asset +++ b/TestProjects/VisualEffectGraph/ProjectSettings/VFXManager.asset @@ -3,10 +3,10 @@ --- !u!937362698 &1 VFXManager: m_ObjectHideFlags: 0 - m_IndirectShader: {fileID: 0} - m_CopyBufferShader: {fileID: 0} - m_SortShader: {fileID: 0} - m_StripUpdateShader: {fileID: 0} + m_IndirectShader: {fileID: 7200000, guid: 84a17cfa13e40ae4082ef42714f0a81c, type: 3} + m_CopyBufferShader: {fileID: 7200000, guid: 23c51f21a3503f6428b527b01f8a2f4e, type: 3} + m_SortShader: {fileID: 7200000, guid: ea257ca3cfb12a642a5025e612af6b2a, type: 3} + m_StripUpdateShader: {fileID: 7200000, guid: 8fa6c4009fe2a4d4486c62736fc30ad8, type: 3} m_RenderPipeSettingsPath: Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP m_FixedTimeStep: 0.016666668 m_MaxDeltaTime: 0.05 diff --git a/TestProjects/VisualEffectGraph/UserSettings/EditorUserSettings.asset b/TestProjects/VisualEffectGraph/UserSettings/EditorUserSettings.asset deleted file mode 100644 index 4681d1d2cf5..00000000000 --- a/TestProjects/VisualEffectGraph/UserSettings/EditorUserSettings.asset +++ /dev/null @@ -1,19 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!162 &1 -EditorUserSettings: - m_ObjectHideFlags: 0 - serializedVersion: 4 - m_ConfigSettings: - vcSharedLogLevel: - value: 0d5e400f0650 - flags: 0 - m_VCAutomaticAdd: 1 - m_VCDebugCom: 0 - m_VCDebugCmd: 0 - m_VCDebugOut: 0 - m_SemanticMergeMode: 2 - m_VCShowFailedCheckout: 1 - m_VCOverwriteFailedCheckoutAssets: 1 - m_VCOverlayIcons: 1 - m_VCAllowAsyncUpdate: 0 From 01e1e2e6e6e2ca419fd5c8ffb47cf49b46ed379c Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 8 Apr 2020 10:39:54 +0200 Subject: [PATCH 138/143] Remove various changes Not needed, clean up the diff. --- .../DefaultSettingsVolumeProfile.asset | 27 ------------------- .../package.json | 12 ++++----- com.unity.shadergraph/package.json | 6 ++--- ...ity.Testing.VisualEffectGraph.Tests.asmdef | 14 +++------- .../Tests/Runtime/VFXGraphicsTests.cs | 8 ------ 5 files changed, 12 insertions(+), 55 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset index 54cdc85056f..a5fe482a2e2 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset @@ -48,32 +48,6 @@ MonoBehaviour: m_OverrideState: 0 m_Value: 8 min: 2 ---- !u!114 &-2292924983350074914 -MonoBehaviour: - m_ObjectHideFlags: 3 - 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: 06bf2c1824f37b0408dc260f4cdd7d98, type: 3} - m_Name: VirtualTexturingSettings - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - cpuCacheSizeInMegaBytes: - m_OverrideState: 0 - m_Value: 256 - min: 2 - gpuCacheSizeInMegaBytes: - m_OverrideState: 1 - m_Value: 128 - min: 2 - gpuCacheSizeOverridesOverridden: 0 - gpuCacheSizeOverridesShared: [] - gpuCacheSizeOverridesStreaming: [] - gpuCacheSizeOverridesProcedural: [] --- !u!114 &-1016694868962581565 MonoBehaviour: m_ObjectHideFlags: 3 @@ -144,7 +118,6 @@ MonoBehaviour: - {fileID: 1932259527246508038} - {fileID: 448115243408767295} - {fileID: -7089757308646879465} - - {fileID: -2292924983350074914} --- !u!114 &448115243408767295 MonoBehaviour: m_ObjectHideFlags: 3 diff --git a/com.unity.render-pipelines.high-definition/package.json b/com.unity.render-pipelines.high-definition/package.json index db4c908081f..bac7ea6c3e2 100644 --- a/com.unity.render-pipelines.high-definition/package.json +++ b/com.unity.render-pipelines.high-definition/package.json @@ -1,15 +1,15 @@ { "name": "com.unity.render-pipelines.high-definition", "description": "The High Definition Render Pipeline (HDRP) is a high-fidelity Scriptable Render Pipeline built by Unity to target modern (Compute Shader compatible) platforms. HDRP utilizes Physically-Based Lighting techniques, linear lighting, HDR lighting, and a configurable hybrid Tile/Cluster deferred/Forward lighting architecture and gives you the tools you need to create games, technical demos, animations, and more to a high graphical standard.", - "version": "9.0.0-preview.13", + "version": "9.0.0-preview.14", "unity": "2020.1", - "unityRelease": "0b1", + "unityRelease": "0a23", "displayName": "High Definition RP", "dependencies": { - "com.unity.render-pipelines.core": "9.0.0-preview.13", - "com.unity.shadergraph": "9.0.0-preview.14", - "com.unity.visualeffectgraph": "9.0.0-preview.13", - "com.unity.render-pipelines.high-definition-config": "9.0.0-preview.15" + "com.unity.render-pipelines.core": "9.0.0-preview.14", + "com.unity.shadergraph": "9.0.0-preview.15", + "com.unity.visualeffectgraph": "9.0.0-preview.14", + "com.unity.render-pipelines.high-definition-config": "9.0.0-preview.16" }, "keywords": [ "graphics", diff --git a/com.unity.shadergraph/package.json b/com.unity.shadergraph/package.json index fc948b6938e..f0a598b61d7 100644 --- a/com.unity.shadergraph/package.json +++ b/com.unity.shadergraph/package.json @@ -1,12 +1,12 @@ { "name": "com.unity.shadergraph", "description": "The Shader Graph package adds a visual Shader editing tool to Unity. You can use this tool to create Shaders in a visual way instead of writing code. Specific render pipelines can implement specific graph features. Currently, both the High Definition Rendering Pipeline and the Universal Rendering Pipeline support Shader Graph.", - "version": "9.0.0-preview.14", + "version": "9.0.0-preview.15", "unity": "2020.1", - "unityRelease": "0b1", + "unityRelease": "0a23", "displayName": "Shader Graph", "dependencies": { - "com.unity.render-pipelines.core": "9.0.0-preview.13", + "com.unity.render-pipelines.core": "9.0.0-preview.14", "com.unity.searcher": "4.0.9" }, "samples": [ diff --git a/com.unity.testing.visualeffectgraph/Tests/Runtime/Unity.Testing.VisualEffectGraph.Tests.asmdef b/com.unity.testing.visualeffectgraph/Tests/Runtime/Unity.Testing.VisualEffectGraph.Tests.asmdef index 550e0c7b8b6..70157fb3a3e 100644 --- a/com.unity.testing.visualeffectgraph/Tests/Runtime/Unity.Testing.VisualEffectGraph.Tests.asmdef +++ b/com.unity.testing.visualeffectgraph/Tests/Runtime/Unity.Testing.VisualEffectGraph.Tests.asmdef @@ -3,20 +3,12 @@ "references": [ "Unity.Testing.VisualEffectGraph", "Unity.VisualEffectGraph.Editor", - "Unity.VisualEffectGraph.Runtime", - "UnityEngine.TestTools.Graphics", - "Unity.RenderPipelines.Universal.Runtime" + "Unity.VisualEffectGraph.Runtime", + "UnityEngine.TestTools.Graphics" ], "optionalUnityReferences": [ "TestAssemblies" ], "includePlatforms": [], - "excludePlatforms": [], - "versionDefines": [ - { - "name": "com.unity.render-pipelines.universal", - "expression": "1.0.0", - "define": "VFX_HAS_UNIVERSAL_RP" - } - ] + "excludePlatforms": [] } diff --git a/com.unity.testing.visualeffectgraph/Tests/Runtime/VFXGraphicsTests.cs b/com.unity.testing.visualeffectgraph/Tests/Runtime/VFXGraphicsTests.cs index 443ced0b2f0..933f7250071 100644 --- a/com.unity.testing.visualeffectgraph/Tests/Runtime/VFXGraphicsTests.cs +++ b/com.unity.testing.visualeffectgraph/Tests/Runtime/VFXGraphicsTests.cs @@ -85,14 +85,6 @@ public IEnumerator Run(GraphicsTestCase testCase) var camera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent(); if (camera) { - -#if VFX_HAS_UNIVERSAL_RP - if (!camera.gameObject.GetComponent()) - { - var cameraData = camera.gameObject.AddComponent(); - cameraData.renderPostProcessing = true; //HotFix forcing post process to be activated to cover missing clear - } -#endif var vfxComponents = Resources.FindObjectsOfTypeAll(); var rt = RenderTexture.GetTemporary(captureSizeWidth, captureSizeHeight, 24); From b00022268e369cdf7fad1807f014d37204e2e270 Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 8 Apr 2020 10:43:34 +0200 Subject: [PATCH 139/143] Clean up the diff --- .../package.json | 10 +++++----- com.unity.shadergraph/package.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/package.json b/com.unity.render-pipelines.high-definition/package.json index bac7ea6c3e2..1c46c75e7b6 100644 --- a/com.unity.render-pipelines.high-definition/package.json +++ b/com.unity.render-pipelines.high-definition/package.json @@ -1,15 +1,15 @@ { "name": "com.unity.render-pipelines.high-definition", "description": "The High Definition Render Pipeline (HDRP) is a high-fidelity Scriptable Render Pipeline built by Unity to target modern (Compute Shader compatible) platforms. HDRP utilizes Physically-Based Lighting techniques, linear lighting, HDR lighting, and a configurable hybrid Tile/Cluster deferred/Forward lighting architecture and gives you the tools you need to create games, technical demos, animations, and more to a high graphical standard.", - "version": "9.0.0-preview.14", + "version": "9.0.0-preview.13", "unity": "2020.1", "unityRelease": "0a23", "displayName": "High Definition RP", "dependencies": { - "com.unity.render-pipelines.core": "9.0.0-preview.14", - "com.unity.shadergraph": "9.0.0-preview.15", - "com.unity.visualeffectgraph": "9.0.0-preview.14", - "com.unity.render-pipelines.high-definition-config": "9.0.0-preview.16" + "com.unity.render-pipelines.core": "9.0.0-preview.13", + "com.unity.shadergraph": "9.0.0-preview.14", + "com.unity.visualeffectgraph": "9.0.0-preview.13", + "com.unity.render-pipelines.high-definition-config": "9.0.0-preview.15" }, "keywords": [ "graphics", diff --git a/com.unity.shadergraph/package.json b/com.unity.shadergraph/package.json index f0a598b61d7..d07c39bf018 100644 --- a/com.unity.shadergraph/package.json +++ b/com.unity.shadergraph/package.json @@ -1,12 +1,12 @@ { "name": "com.unity.shadergraph", "description": "The Shader Graph package adds a visual Shader editing tool to Unity. You can use this tool to create Shaders in a visual way instead of writing code. Specific render pipelines can implement specific graph features. Currently, both the High Definition Rendering Pipeline and the Universal Rendering Pipeline support Shader Graph.", - "version": "9.0.0-preview.15", + "version": "9.0.0-preview.14", "unity": "2020.1", "unityRelease": "0a23", "displayName": "Shader Graph", "dependencies": { - "com.unity.render-pipelines.core": "9.0.0-preview.14", + "com.unity.render-pipelines.core": "9.0.0-preview.13", "com.unity.searcher": "4.0.9" }, "samples": [ From cb6c5b6298d0252aa2d3f7582c49a0d146af255b Mon Sep 17 00:00:00 2001 From: Graphine Charles Date: Wed, 8 Apr 2020 15:54:30 +0200 Subject: [PATCH 140/143] Fix raytracing support by avoiding DDX/DDY in RT shaders. - Always samples higest available lod (similar behaviour to regular 2d textures) - Does not stream in new data (i.e. no feedback for VT samples from raytracing shaders) --- .../Editor/Data/Nodes/Input/Texture/TextureStackNode.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs index d0fa6664977..3e22f19b592 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/TextureStackNode.cs @@ -680,6 +680,13 @@ string MakeVtParameters(string variableName, string uvExpr, string lodExpr, stri {0}.levelMode = {7}; {0}.uvMode = {8}; {0}.sampleQuality = {9}; +#if defined(SHADER_STAGE_RAY_TRACING) + if ({0}.levelMode == VtLevel_Automatic || {0}.levelMode == VtLevel_Bias) + {{ + {0}.levelMode = VtLevel_Lod; + {0}.lodOrOffset = 0.0f; + }} +#endif "; return string.Format(VTParametersInputTemplate, From 75f1e0c3bd555c6e523e512c29021abe852dc424 Mon Sep 17 00:00:00 2001 From: Nico Leyman Date: Fri, 10 Apr 2020 12:12:01 +0200 Subject: [PATCH 141/143] Some fixes for VT settings serialization. --- .../Settings/SerializedHDRenderPipelineAsset.cs | 4 ---- .../Editor/RenderPipeline/VirtualTexturingSettingsUI.cs | 2 -- .../Runtime/RenderPipeline/HDRenderPipelineAsset.cs | 2 +- .../Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs | 1 + 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs index d5b08d67af1..e8b64eed36f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs @@ -20,9 +20,7 @@ class SerializedHDRenderPipelineAsset public SerializedFrameSettings defaultFrameSettings; public SerializedFrameSettings defaultBakedOrCustomReflectionFrameSettings; public SerializedFrameSettings defaultRealtimeReflectionFrameSettings; -#if ENABLE_VIRTUALTEXTURES public SerializedVirtualTexturingSettings virtualTexturingSettings; -#endif //RenderPipelineResources not always exist and thus cannot be serialized normally. public bool editorResourceHasMultipleDifferentValues @@ -67,9 +65,7 @@ public SerializedHDRenderPipelineAsset(SerializedObject serializedObject) defaultBakedOrCustomReflectionFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultBakedOrCustomReflectionFrameSettings"), null); //no overrides in HDRPAsset defaultRealtimeReflectionFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultRealtimeReflectionFrameSettings"), null); //no overrides in HDRPAsset -#if ENABLE_VIRTUALTEXTURES virtualTexturingSettings = new SerializedVirtualTexturingSettings(serializedObject.FindProperty("virtualTexturingSettings")); -#endif } public void Update() diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs index 61f535d67f7..12d01aa1163 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/VirtualTexturingSettingsUI.cs @@ -28,8 +28,6 @@ public void OnGUI(SerializedHDRenderPipelineAsset serialized, Editor owner) serializedObject = serialized.serializedObject; serializedRPAsset = serialized; - serializedObject.Update(); - EditorGUILayout.Space(); using (var scope = new EditorGUI.ChangeCheckScope()) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index e25ff8b864f..947879a4cb7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -253,7 +253,7 @@ public override Shader defaultShader [SerializeField] internal List afterPostProcessCustomPostProcesses = new List(); [SerializeField] - public VirtualTexturingSettingsSRP virtualTexturingSettings; + public VirtualTexturingSettingsSRP virtualTexturingSettings = new VirtualTexturingSettingsSRP(); #if UNITY_EDITOR /// HDRP default material. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs index ac4d5d3a250..d643ac85aa0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/VirtualTexturingSettingsSRP.cs @@ -69,6 +69,7 @@ public VirtualTexturingGPUCacheSizeOverride GetNative() #endif } + [Serializable] public enum VirtualTexturingCacheUsageSRP { Any, From 80840ab1c5f7fa7c1b26057be7ea0478e26f1d7c Mon Sep 17 00:00:00 2001 From: Nico Leyman Date: Fri, 10 Apr 2020 17:48:15 +0200 Subject: [PATCH 142/143] Removed define from SerializedVTSettings, was omitted from last commit --- .../Settings/SerializedVirtualTexturingSettings.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs index 034eecb0004..62b6b51a4b9 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedVirtualTexturingSettings.cs @@ -3,7 +3,6 @@ namespace UnityEditor.Rendering.HighDefinition { -#if ENABLE_VIRTUALTEXTURES public sealed class SerializedVirtualTexturingSettings { public SerializedProperty root; @@ -21,5 +20,4 @@ public SerializedVirtualTexturingSettings(SerializedProperty root) gpuCacheSizeOverridesStreaming = root.Find((VirtualTexturingSettingsSRP s) => s.gpuCacheSizeOverridesStreaming); } } -#endif } From ee59f5018c5ff290b334a32cc2e7f7712e7103e8 Mon Sep 17 00:00:00 2001 From: Chris Tchou Date: Wed, 22 Apr 2020 16:00:10 -0700 Subject: [PATCH 143/143] Added VirtualTexture property type (no list yet), got everything compiling again. --- .../Lit/ShaderGraph/HDLitMasterNode.cs | 2 +- .../Editor/ShaderGraph/HDTarget.cs | 4 +- .../Data/Graphs/AbstractShaderProperty.cs | 20 +++ .../Data/Graphs/SerializableVirtualTexture.cs | 28 ++++ .../SerializableVirtualTexture.cs.meta} | 2 +- .../Graphs/VirtualTextureShaderProperty.cs | 123 +++++++++++++++ .../VirtualTextureShaderProperty.cs.meta | 11 ++ .../Editor/Data/Nodes/Input/PropertyNode.cs | 7 + .../Editor/Data/Nodes/SlotValue.cs | 3 +- .../Editor/Data/Util/IncludeRegistry.cs | 48 ------ .../Editor/Data/Util/PropertyUtil.cs | 2 + .../Blackboard/BlackboardFieldPropertyView.cs | 16 ++ .../Drawing/Blackboard/BlackboardProvider.cs | 1 + .../Generation/Enumerations/PropertyType.cs | 5 +- .../Editor/Generation/Processors/Generator.cs | 6 +- .../Processors/PropertyCollector.cs | 148 +++++++++--------- .../Generation/Targets/PreviewTarget.cs | 3 +- 17 files changed, 301 insertions(+), 128 deletions(-) create mode 100644 com.unity.shadergraph/Editor/Data/Graphs/SerializableVirtualTexture.cs rename com.unity.shadergraph/Editor/Data/{Util/IncludeRegistry.cs.meta => Graphs/SerializableVirtualTexture.cs.meta} (83%) create mode 100644 com.unity.shadergraph/Editor/Data/Graphs/VirtualTextureShaderProperty.cs create mode 100644 com.unity.shadergraph/Editor/Data/Graphs/VirtualTextureShaderProperty.cs.meta delete mode 100644 com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs index b60876b1d89..0ed926ac740 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs @@ -1109,7 +1109,7 @@ public ConditionalField[] GetConditionalFields(PassDescriptor pass) // Ideally we do this another way but HDLit needs this for conditional pragmas var shaderProperties = new PropertyCollector(); owner.CollectShaderProperties(shaderProperties, GenerationMode.ForReals); - bool hasDotsProperties = shaderProperties.GetDotsInstancingPropertiesCount(GenerationMode.ForReals) > 0; + bool hasDotsProperties = shaderProperties.DotsInstancingProperties(GenerationMode.ForReals).Any(); return new ConditionalField[] { diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDTarget.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDTarget.cs index 1ad6541e5f7..aee3b11375e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDTarget.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using UnityEngine.Rendering; @@ -630,6 +630,7 @@ static class CoreIncludes { // CorePregraph const string kCommon = "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"; + const string kTextureStack = "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"; const string kShaderVariables = "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"; const string kFragInputs = "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"; const string kShaderPass = "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"; @@ -697,6 +698,7 @@ static class CoreIncludes public static IncludeCollection CorePregraph = new IncludeCollection { { kCommon, IncludeLocation.Pregraph }, + { kTextureStack, IncludeLocation.Pregraph }, // TODO: put this on a conditional { kShaderVariables, IncludeLocation.Pregraph }, { kFragInputs, IncludeLocation.Pregraph }, { kShaderPass, IncludeLocation.Pregraph }, diff --git a/com.unity.shadergraph/Editor/Data/Graphs/AbstractShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/AbstractShaderProperty.cs index d8e4f026bf9..e2ed4488b5a 100644 --- a/com.unity.shadergraph/Editor/Data/Graphs/AbstractShaderProperty.cs +++ b/com.unity.shadergraph/Editor/Data/Graphs/AbstractShaderProperty.cs @@ -37,8 +37,13 @@ internal void ValidateConcretePrecision(ConcretePrecision graphPrecision) m_ConcretePrecision = (precision == Precision.Inherit) ? graphPrecision : precision.ToConcrete(); } + // the simple interface for simple properties internal abstract bool isBatchable { get; } + // the more complex interface for complex properties (defaulted for simple properties) + internal virtual bool hasBatchableProperties { get { return isBatchable; } } + internal virtual bool hasNonBatchableProperties { get { return !isBatchable; } } + [SerializeField] bool m_Hidden = false; @@ -55,12 +60,27 @@ internal virtual string GetPropertyBlockString() return string.Empty; } + // the simple interface for simple properties internal virtual string GetPropertyDeclarationString(string delimiter = ";") { SlotValueType type = ConcreteSlotValueType.Vector4.ToSlotValueType(); return $"{concreteShaderValueType.ToShaderString(concretePrecision.ToShaderString())} {referenceName}{delimiter}"; } + // the more complex interface for complex properties (defaulted for simple properties) + internal virtual void AppendBatchablePropertyDeclarations(ShaderStringBuilder builder, string delimiter = ";") + { + if (isBatchable) + builder.AppendLine(GetPropertyDeclarationString(delimiter)); + } + + // the more complex interface for complex properties (defaulted for simple properties) + internal virtual void AppendNonBatchablePropertyDeclarations(ShaderStringBuilder builder, string delimiter = ";") + { + if (!isBatchable) + builder.AppendLine(GetPropertyDeclarationString(delimiter)); + } + internal virtual string GetPropertyAsArgumentString() { return GetPropertyDeclarationString(string.Empty); diff --git a/com.unity.shadergraph/Editor/Data/Graphs/SerializableVirtualTexture.cs b/com.unity.shadergraph/Editor/Data/Graphs/SerializableVirtualTexture.cs new file mode 100644 index 00000000000..fcd08fc143c --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Graphs/SerializableVirtualTexture.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEditor.ShaderGraph.Internal +{ + [Serializable] + public sealed class SerializableVirtualTexture : ISerializationCallbackReceiver + { + [SerializeField] + public List layerNames = new List(); + + [SerializeField] + public List layerTextures = new List(); + + [SerializeField] + public bool procedural; + + public void OnBeforeSerialize() + { + } + + public void OnAfterDeserialize() + { + } + } +} + diff --git a/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs.meta b/com.unity.shadergraph/Editor/Data/Graphs/SerializableVirtualTexture.cs.meta similarity index 83% rename from com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs.meta rename to com.unity.shadergraph/Editor/Data/Graphs/SerializableVirtualTexture.cs.meta index 2757c8decdf..67d39cff202 100644 --- a/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs.meta +++ b/com.unity.shadergraph/Editor/Data/Graphs/SerializableVirtualTexture.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 741c61621e6db90488d8aae5127973c4 +guid: 46a51e4c13978a8458c259f50331fc7c MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/com.unity.shadergraph/Editor/Data/Graphs/VirtualTextureShaderProperty.cs b/com.unity.shadergraph/Editor/Data/Graphs/VirtualTextureShaderProperty.cs new file mode 100644 index 00000000000..88df4e907b3 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Graphs/VirtualTextureShaderProperty.cs @@ -0,0 +1,123 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.ShaderGraph.Drawing.Controls; +using UnityEngine; +using UnityEditor.Graphing; +using UnityEditor.ShaderGraph.Internal; + +namespace UnityEditor.ShaderGraph +{ + [Serializable] + class VirtualTextureShaderProperty : AbstractShaderProperty + { + public VirtualTextureShaderProperty() + { + displayName = "VirtualTexture"; + value = new SerializableVirtualTexture(); + + // add at least one layer + value.layerNames.Add("Layer0"); + value.layerTextures.Add(new SerializableTexture()); + } + + public override PropertyType propertyType => PropertyType.VirtualTexture; + + // isBatchable should never be called of we override hasBatchable / hasNonBatchableProperties + internal override bool isBatchable + { + get { throw new NotImplementedException(); } + } + + internal override bool hasBatchableProperties => true; + internal override bool hasNonBatchableProperties => true; + + internal override bool isExposable => true; // the textures are exposable at least.. + internal override bool isRenamable => true; + + // this is used for properties exposed to the Material in the shaderlab Properties{} block + internal override string GetPropertyBlockString() + { + // something along the lines of: + // [TextureStack.MyStack(0)] [NoScaleOffset] Layer0("Layer0", 2D) = "white" {} + string result = ""; + for (int layer= 0; layer < value.layerNames.Count; layer++) + { + string layerName = value.layerNames[layer]; + result += $"[TextureStack.{referenceName}({layer})] [NoScaleOffset] {layerName}(\"{layerName}\", 2D) = \"white\" {{}}{Environment.NewLine}"; + } + return result; + } + + internal override void AppendBatchablePropertyDeclarations(ShaderStringBuilder builder, string delimiter = ";") + { + int numLayers = value.layerNames.Count; + if (numLayers > 0) + { + builder.Append("DECLARE_STACK_CB("); + builder.Append(referenceName); + builder.Append(")"); + builder.AppendLine(delimiter); + } + } + + internal override void AppendNonBatchablePropertyDeclarations(ShaderStringBuilder builder, string delimiter = ";") + { + int numLayers = value.layerNames.Count; + if (numLayers > 0) + { + builder.Append("DECLARE_STACK"); + builder.Append((numLayers <= 1) ? "" : numLayers.ToString()); + builder.Append("("); + builder.Append(referenceName); + builder.Append(","); + for (int i = 0; i < value.layerNames.Count; i++) + { + if (i != 0) builder.Append(","); + builder.Append(value.layerNames[i]); + } + builder.Append(")"); + builder.AppendLine(delimiter); // TODO: don't like delimiter, pretty sure it's not necessary if we invert the defaults on GEtPropertyDeclaration / GetPropertyArgument string + } + } + + internal override string GetPropertyDeclarationString(string delimiter = ";") + { + throw new NotImplementedException(); + } + + // argument string used to pass this property to a subgraph + internal override string GetPropertyAsArgumentString() + { + // throw new NotImplementedException(); + return "VirtualTexturePropertyArgumentStringGoesHere " + referenceName; + } + + // if a blackboard property is deleted, all node instances of it are replaced with this: + internal override AbstractMaterialNode ToConcreteNode() + { + // TODO: + return null; // new GradientNode { }; + } + + internal override PreviewProperty GetPreviewMaterialProperty() + { + return new PreviewProperty(propertyType) + { + name = referenceName + }; + } + + internal override ShaderInput Copy() + { + return new VirtualTextureShaderProperty + { + displayName = displayName, + hidden = hidden, + value = value, + precision = precision + }; + } + } +} diff --git a/com.unity.shadergraph/Editor/Data/Graphs/VirtualTextureShaderProperty.cs.meta b/com.unity.shadergraph/Editor/Data/Graphs/VirtualTextureShaderProperty.cs.meta new file mode 100644 index 00000000000..8887967a2a9 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Graphs/VirtualTextureShaderProperty.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ca7d3a56d2cd0c840b76155c0a92eaca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Input/PropertyNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Input/PropertyNode.cs index 8712d974b12..c0f062ebfa9 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Input/PropertyNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Input/PropertyNode.cs @@ -111,6 +111,13 @@ void AddOutputSlot(AbstractShaderProperty property) AddSlot(new GradientMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output)); RemoveSlotsNameNotMatching(new[] { OutputSlotId }); break; + case ConcreteSlotValueType.VirtualTexture: + // TODO: implement VT slot type + AddSlot(new Texture2DMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output)); + RemoveSlotsNameNotMatching(new[] { OutputSlotId }); + // AddSlot(new VirtualTextureSlot(OutputSlotId, property.displayName, "Out", SlotType.Output)); + // RemoveSlotsNameNotMatching(new[] { OutputSlotId }); + break; default: throw new ArgumentOutOfRangeException(); } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/SlotValue.cs b/com.unity.shadergraph/Editor/Data/Nodes/SlotValue.cs index ef5642db70e..11581f57140 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/SlotValue.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/SlotValue.cs @@ -41,7 +41,8 @@ enum ConcreteSlotValueType Vector3, Vector2, Vector1, - Boolean + Boolean, + VirtualTexture } static class SlotValueHelper diff --git a/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs b/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs deleted file mode 100644 index f6b743c9dab..00000000000 --- a/com.unity.shadergraph/Editor/Data/Util/IncludeRegistry.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEditor.ShaderGraph -{ - struct IncludeInfo - { - public string code; - public HashSet nodes; - } - - class IncludeRegistry - { - Dictionary m_Includes = new Dictionary(); - ShaderStringBuilder m_Builder; - - public IncludeRegistry(ShaderStringBuilder builder) - { - m_Builder = builder; - } - - internal ShaderStringBuilder builder => m_Builder; - - public Dictionary includes => m_Includes; - - public IEnumerable names { get { return m_Includes.Keys; } } - - public void ProvideInclude(string fileName) - { - ProvideIncludeBlock(fileName, "#include \"" + fileName + "\""); - } - - public void ProvideIncludeBlock(string uniqueIdentifier, string blockCode) - { - IncludeInfo existingInfo; - if (m_Includes.TryGetValue(uniqueIdentifier, out existingInfo)) - { - existingInfo.nodes.Add(m_Builder.currentNode); - } - else - { - m_Builder.AppendLine(blockCode); - m_Includes.Add(uniqueIdentifier, new IncludeInfo { code = blockCode, nodes = new HashSet { builder.currentNode } }); - } - } - } -} diff --git a/com.unity.shadergraph/Editor/Data/Util/PropertyUtil.cs b/com.unity.shadergraph/Editor/Data/Util/PropertyUtil.cs index 4ae1c9a2b81..381a4b8ad55 100644 --- a/com.unity.shadergraph/Editor/Data/Util/PropertyUtil.cs +++ b/com.unity.shadergraph/Editor/Data/Util/PropertyUtil.cs @@ -40,6 +40,8 @@ public static ConcreteSlotValueType ToConcreteShaderValueType(this PropertyType return ConcreteSlotValueType.Boolean; case PropertyType.Color: return ConcreteSlotValueType.Vector4; + case PropertyType.VirtualTexture: + return ConcreteSlotValueType.VirtualTexture; default: throw new ArgumentOutOfRangeException(); } diff --git a/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardFieldPropertyView.cs b/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardFieldPropertyView.cs index 3ec1dab5322..5ebddeb2229 100644 --- a/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardFieldPropertyView.cs +++ b/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardFieldPropertyView.cs @@ -72,6 +72,9 @@ public override void BuildCustomFields(ShaderInput input) case GradientShaderProperty gradientProperty: BuildGradientPropertyField(gradientProperty); break; + case VirtualTextureShaderProperty virtualTextureProperty: + BuildVirtualTexturePropertyField(virtualTextureProperty); + break; default: throw new ArgumentOutOfRangeException(); } @@ -331,6 +334,19 @@ void BuildTexture2DPropertyField(Texture2DShaderProperty property) AddRow("Mode", defaultModeField, !graph.isSubGraph && property.generatePropertyBlock); } + void BuildVirtualTexturePropertyField(VirtualTextureShaderProperty property) + { + Toggle proceduralToggle = new Toggle { value = property.value.procedural }; + proceduralToggle.OnToggleChanged(evt => + { + graph.owner.RegisterCompleteObjectUndo("Change VT Procedural Toggle"); + property.value.procedural = evt.newValue; + DirtyNodes(ModificationScope.Graph); + }); + AddRow("Procedural", proceduralToggle); + // TODO: add layer names and texture assignments view here (could we re-use the TextureShaderProperty custom builder?) + } + void BuildTexture2DArrayPropertyField(Texture2DArrayShaderProperty property) { var field = new ObjectField { value = property.value.textureArray, objectType = typeof(Texture2DArray) }; diff --git a/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardProvider.cs b/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardProvider.cs index 33774d6b2b6..0434f455bdc 100644 --- a/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardProvider.cs +++ b/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardProvider.cs @@ -213,6 +213,7 @@ void AddPropertyItems(GenericMenu gm) gm.AddItem(new GUIContent($"Texture2D Array"), false, () => AddInputRow(new Texture2DArrayShaderProperty(), true)); gm.AddItem(new GUIContent($"Texture3D"), false, () => AddInputRow(new Texture3DShaderProperty(), true)); gm.AddItem(new GUIContent($"Cubemap"), false, () => AddInputRow(new CubemapShaderProperty(), true)); + gm.AddItem(new GUIContent($"Virtual Texture"), false, () => AddInputRow(new VirtualTextureShaderProperty(), true)); gm.AddItem(new GUIContent($"Boolean"), false, () => AddInputRow(new BooleanShaderProperty(), true)); gm.AddItem(new GUIContent($"Matrix2x2"), false, () => AddInputRow(new Matrix2ShaderProperty(), true)); gm.AddItem(new GUIContent($"Matrix3x3"), false, () => AddInputRow(new Matrix3ShaderProperty(), true)); diff --git a/com.unity.shadergraph/Editor/Generation/Enumerations/PropertyType.cs b/com.unity.shadergraph/Editor/Generation/Enumerations/PropertyType.cs index 27a61878e13..8536749b539 100644 --- a/com.unity.shadergraph/Editor/Generation/Enumerations/PropertyType.cs +++ b/com.unity.shadergraph/Editor/Generation/Enumerations/PropertyType.cs @@ -1,4 +1,4 @@ -namespace UnityEditor.ShaderGraph.Internal +namespace UnityEditor.ShaderGraph.Internal { [GenerationAPI] public enum PropertyType @@ -17,6 +17,7 @@ public enum PropertyType Matrix2, Matrix3, Matrix4, - SamplerState + SamplerState, + VirtualTexture } } diff --git a/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs b/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs index c8bcae7ba6c..3f543429043 100644 --- a/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs +++ b/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs @@ -593,10 +593,10 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ // -------------------------------------------------- // Dots Instanced Graph Properties - int instancedPropCount = propertyCollector.GetDotsInstancingPropertiesCount(m_Mode); + bool hasDotsInstancedProps = propertyCollector.DotsInstancingProperties(m_Mode).Any(); using (var dotsInstancedPropertyBuilder = new ShaderStringBuilder()) { - if (instancedPropCount > 0) + if (hasDotsInstancedProps) dotsInstancedPropertyBuilder.AppendLines(propertyCollector.GetDotsInstancingPropertiesDeclaration(m_Mode)); else dotsInstancedPropertyBuilder.AppendLine("// HybridV1InjectedBuiltinProperties: "); @@ -612,7 +612,7 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ // if the shader graph has a nonzero amount of DOTS instanced properties. // This can be removed once Hybrid V1 is removed. #if !ENABLE_HYBRID_RENDERER_V2 - if (instancedPropCount > 0) + if (hasDotsInstancedProps) { dotsInstancingOptionsBuilder.AppendLine("#if SHADER_TARGET >= 35 && (defined(SHADER_API_D3D11) || defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE) || defined(SHADER_API_XBOXONE) || defined(SHADER_API_PSSL) || defined(SHADER_API_VULKAN) || defined(SHADER_API_METAL))"); dotsInstancingOptionsBuilder.AppendLine(" #define UNITY_SUPPORT_INSTANCING"); diff --git a/com.unity.shadergraph/Editor/Generation/Processors/PropertyCollector.cs b/com.unity.shadergraph/Editor/Generation/Processors/PropertyCollector.cs index 7ee47c40d24..39a7a4ce78d 100644 --- a/com.unity.shadergraph/Editor/Generation/Processors/PropertyCollector.cs +++ b/com.unity.shadergraph/Editor/Generation/Processors/PropertyCollector.cs @@ -25,68 +25,81 @@ public void AddShaderProperty(AbstractShaderProperty chunk) public void GetPropertiesDeclaration(ShaderStringBuilder builder, GenerationMode mode, ConcretePrecision inheritedPrecision) { - // Hybrid V1 generates a special version of UnityPerMaterial, which has dummy constants for - // instanced properties, and regular constants for other properties. - // Hybrid V2 generates a perfectly normal UnityPerMaterial, but needs to append - // a UNITY_DOTS_INSTANCING_START/END block after it that contains the instanced properties. - #if !ENABLE_HYBRID_RENDERER_V2 foreach (var prop in properties) { prop.ValidateConcretePrecision(inheritedPrecision); } - var batchAll = mode == GenerationMode.Preview; + if (mode == GenerationMode.Preview) + { + builder.AppendLine("CBUFFER_START(UnityPerMaterial)"); + foreach (var prop in properties.Where(p => !p.gpuInstanced)) // all non-gpu instanced properties (even non-batchable ones) - preview is weird + { + prop.AppendBatchablePropertyDeclarations(builder); + prop.AppendNonBatchablePropertyDeclarations(builder); + } + var GPUInstancedProperties = properties.Where(p => p.gpuInstanced); + if (GPUInstancedProperties.Any()) + { + builder.AppendLine("#ifdef UNITY_HYBRID_V1_INSTANCING_ENABLED"); + foreach (var prop in GPUInstancedProperties) + { + prop.AppendBatchablePropertyDeclarations(builder, "_dummy;"); + } + builder.AppendLine("#else"); + foreach (var prop in GPUInstancedProperties) + { + prop.AppendBatchablePropertyDeclarations(builder); + } + builder.AppendLine("#endif"); + } + builder.AppendLine("CBUFFER_END"); + return; + } + + // Hybrid V1 generates a special version of UnityPerMaterial, which has dummy constants for + // instanced properties, and regular constants for other properties. + // Hybrid V2 generates a perfectly normal UnityPerMaterial, but needs to append + // a UNITY_DOTS_INSTANCING_START/END block after it that contains the instanced properties. + +#if !ENABLE_HYBRID_RENDERER_V2 builder.AppendLine("CBUFFER_START(UnityPerMaterial)"); - int instancedCount = 0; - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + + // non-GPU instanced properties go first in the UnityPerMaterial cbuffer + var batchableProperties = properties.Where(n => n.generatePropertyBlock && n.hasBatchableProperties); + foreach (var prop in batchableProperties) { if (!prop.gpuInstanced) - builder.AppendLine(prop.GetPropertyDeclarationString()); - else - instancedCount++; + prop.AppendBatchablePropertyDeclarations(builder); } - if (instancedCount > 0) + var batchableGPUInstancedProperties = batchableProperties.Where(p => p.gpuInstanced); + if (batchableGPUInstancedProperties.Any()) { builder.AppendLine("#ifdef UNITY_HYBRID_V1_INSTANCING_ENABLED"); - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + foreach (var prop in batchableGPUInstancedProperties) { - if (prop.gpuInstanced) - builder.AppendLine(prop.GetPropertyDeclarationString("_dummy;")); + // TODO: why is this inserting a dummy value? this won't work on complex properties... + prop.AppendBatchablePropertyDeclarations(builder, "_dummy;"); } builder.AppendLine("#else"); - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + foreach (var prop in batchableGPUInstancedProperties) { - if (prop.gpuInstanced) - builder.AppendLine(prop.GetPropertyDeclarationString()); + prop.AppendBatchablePropertyDeclarations(builder); } builder.AppendLine("#endif"); } builder.AppendLine("CBUFFER_END"); +#else + // TODO: need to test this path with HYBRID_RENDERER_V2 ... - if (batchAll) - return; - - foreach (var prop in properties.Where(n => !n.isBatchable || !n.generatePropertyBlock)) - { - builder.AppendLine(prop.GetPropertyDeclarationString()); - } - - #else - - foreach (var prop in properties) - { - prop.ValidateConcretePrecision(inheritedPrecision); - } - - var batchAll = mode == GenerationMode.Preview; builder.AppendLine("CBUFFER_START(UnityPerMaterial)"); int instancedCount = 0; - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + foreach (var prop in properties.Where(n => n.generatePropertyBlock && n.hasBatchableProperties)) { if (!prop.gpuInstanced) - builder.AppendLine(prop.GetPropertyDeclarationString()); + prop.AppendBatchablePropertyDeclarations(builder); else instancedCount++; } @@ -94,10 +107,10 @@ public void GetPropertiesDeclaration(ShaderStringBuilder builder, GenerationMode if (instancedCount > 0) { builder.AppendLine("// Hybrid instanced properties"); - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + foreach (var prop in properties.Where(n => n.generatePropertyBlock && n.hasBatchableProperties)) { if (prop.gpuInstanced) - builder.AppendLine(prop.GetPropertyDeclarationString()); + prop.AppendBatchablePropertyDeclarations(builder); } } builder.AppendLine("CBUFFER_END"); @@ -108,7 +121,7 @@ public void GetPropertiesDeclaration(ShaderStringBuilder builder, GenerationMode builder.AppendLine("// DOTS instancing definitions"); builder.AppendLine("UNITY_DOTS_INSTANCING_START(MaterialPropertyMetadata)"); - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + foreach (var prop in properties.Where(n => n.generatePropertyBlock && n.hasBatchableProperties)) { if (prop.gpuInstanced) { @@ -120,7 +133,7 @@ public void GetPropertiesDeclaration(ShaderStringBuilder builder, GenerationMode builder.AppendLine("UNITY_DOTS_INSTANCING_END(MaterialPropertyMetadata)"); builder.AppendLine("// DOTS instancing usage macros"); - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + foreach (var prop in properties.Where(n => n.generatePropertyBlock && n.hasBatchableProperties)) { if (prop.gpuInstanced) { @@ -129,25 +142,26 @@ public void GetPropertiesDeclaration(ShaderStringBuilder builder, GenerationMode builder.AppendLine($"#define {n} UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO({type}, Metadata_{n})"); } } - builder.AppendLine("#endif"); } +#endif - if (batchAll) - return; - - foreach (var prop in properties.Where(n => !n.isBatchable || !n.generatePropertyBlock)) + // declare non-batchable properties + builder.AppendLine("// START Non-batchable properties:"); + foreach (var prop in properties.Where(n => n.hasNonBatchableProperties || !n.generatePropertyBlock)) { - builder.AppendLine(prop.GetPropertyDeclarationString()); - } + prop.AppendNonBatchablePropertyDeclarations(builder); - #endif + if (prop.hasBatchableProperties && !prop.generatePropertyBlock) // batchable properties that don't generate property block can't be instanced, get put here + prop.AppendBatchablePropertyDeclarations(builder); + } + builder.AppendLine("// END Non-batchable properties:"); } - public int GetDotsInstancingPropertiesCount(GenerationMode mode) + public IEnumerable DotsInstancingProperties(GenerationMode mode) { - var batchAll = mode == GenerationMode.Preview; - return properties.Where(n => (batchAll || (n.generatePropertyBlock && n.isBatchable)) && n.gpuInstanced).Count(); + var previewMode = (mode == GenerationMode.Preview); + return properties.Where(n => (previewMode || (n.generatePropertyBlock && n.hasBatchableProperties)) && n.gpuInstanced); } public string GetDotsInstancingPropertiesDeclaration(GenerationMode mode) @@ -159,34 +173,28 @@ public string GetDotsInstancingPropertiesDeclaration(GenerationMode mode) var builder = new ShaderStringBuilder(); var batchAll = mode == GenerationMode.Preview; - int instancedCount = GetDotsInstancingPropertiesCount(mode); + var dotsInstancingProperties = DotsInstancingProperties(mode); - if (instancedCount > 0) + if (dotsInstancingProperties.Any()) { builder.AppendLine("#if defined(UNITY_HYBRID_V1_INSTANCING_ENABLED)"); builder.Append("#define HYBRID_V1_CUSTOM_ADDITIONAL_MATERIAL_VARS\t"); int count = 0; - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + foreach (var prop in dotsInstancingProperties) { - if (prop.gpuInstanced) - { - string varName = $"{prop.referenceName}_Array"; - string sType = prop.concreteShaderValueType.ToShaderString(prop.concretePrecision); - builder.Append("UNITY_DEFINE_INSTANCED_PROP({0}, {1})", sType, varName); - if (count < instancedCount - 1) - builder.Append("\\"); - builder.AppendLine(""); - count++; - } + string varName = $"{prop.referenceName}_Array"; + string sType = prop.concreteShaderValueType.ToShaderString(prop.concretePrecision); + builder.Append("UNITY_DEFINE_INSTANCED_PROP({0}, {1})", sType, varName); +// if (count < instancedCount - 1) +// builder.Append("\\"); + builder.AppendLine(""); + count++; } - foreach (var prop in properties.Where(n => batchAll || (n.generatePropertyBlock && n.isBatchable))) + foreach (var prop in dotsInstancingProperties) { - if (prop.gpuInstanced) - { - string varName = $"{prop.referenceName}_Array"; - builder.AppendLine("#define {0} UNITY_ACCESS_INSTANCED_PROP(unity_Builtins0, {1})", prop.referenceName, varName); - } + string varName = $"{prop.referenceName}_Array"; + builder.AppendLine("#define {0} UNITY_ACCESS_INSTANCED_PROP(unity_Builtins0, {1})", prop.referenceName, varName); } } builder.AppendLine("#endif"); diff --git a/com.unity.shadergraph/Editor/Generation/Targets/PreviewTarget.cs b/com.unity.shadergraph/Editor/Generation/Targets/PreviewTarget.cs index 762d9e19ea7..b28487257cb 100644 --- a/com.unity.shadergraph/Editor/Generation/Targets/PreviewTarget.cs +++ b/com.unity.shadergraph/Editor/Generation/Targets/PreviewTarget.cs @@ -1,4 +1,4 @@ -using UnityEngine.Rendering; +using UnityEngine.Rendering; namespace UnityEditor.ShaderGraph { @@ -71,6 +71,7 @@ static class Passes { // Pre-graph { "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl", IncludeLocation.Pregraph }, + { "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl", IncludeLocation.Pregraph }, // TODO: put this on a conditional { "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl", IncludeLocation.Pregraph }, { "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl", IncludeLocation.Pregraph }, { "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl", IncludeLocation.Pregraph },