[M] add fswave FSBlur Test scripts

This commit is contained in:
2025-03-11 15:23:01 +08:00
parent d764abfd7d
commit 7aef099b44
16 changed files with 900 additions and 105 deletions

View File

@@ -1,17 +0,0 @@
using UnityEditor;
using zzwater;
public class SRPTest
{
[MenuItem("SRPTest/Active wave")]
static void AciveWave()
{
URPHelper.RendererFeatureSetActive (true, "FullScreenPassRendererFeature");
}
[MenuItem("SRPTest/Deactivate wave")]
static void DeactivateWave()
{
URPHelper.RendererFeatureSetActive (false, "FullScreenPassRendererFeature");
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 79ed5f89bd7986e4484c1319e5aafadc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,25 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-8667348071685768688
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: 6d613f08f173d4dd895bb07b3230baa9, type: 3}
m_Name: FSBlur
m_EditorClassIdentifier:
m_Active: 0
injectionPoint: 600
fetchColorBuffer: 1
requirements: 0
passMaterial: {fileID: 2100000, guid: d910087229da1db42a2a4d8f24e7c20c, type: 2}
passIndex: 0
bindDepthStencilAttachment: 0
m_Version: 1
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -16,8 +36,10 @@ MonoBehaviour:
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
type: 3}
hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
m_RendererFeatures: []
m_RendererFeatureMap:
m_RendererFeatures:
- {fileID: 6810086802740779712}
- {fileID: -8667348071685768688}
m_RendererFeatureMap: c09af09edd49825e10ba80b2d964b787
m_UseNativeRenderPass: 0
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
@@ -60,3 +82,24 @@ MonoBehaviour:
m_CopyDepthMode: 0
m_AccurateGbufferNormals: 0
m_IntermediateTextureMode: 1
--- !u!114 &6810086802740779712
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: 6d613f08f173d4dd895bb07b3230baa9, type: 3}
m_Name: FSWave
m_EditorClassIdentifier:
m_Active: 0
injectionPoint: 600
fetchColorBuffer: 1
requirements: 0
passMaterial: {fileID: -876546973899608171, guid: 0eed213bde3da224ab7e57ef6ec91ed5,
type: 3}
passIndex: 0
bindDepthStencilAttachment: 0
m_Version: 1

View File

@@ -0,0 +1,30 @@
using UnityEngine;
using zzwater;
public class RendererFeatureToggle : MonoBehaviour
{
void OnGUI()
{
GUILayout.Label("W Toggle FSWave");
GUILayout.Label("B Toggle FSBlur");
}
void Update()
{
if (Input.GetKeyUp(KeyCode.W))
{
ToggleRendererFeature("FSWave");
}
if(Input.GetKeyUp(KeyCode.B))
{
ToggleRendererFeature("FSBlur");
}
}
private void ToggleRendererFeature(string featureName)
{
var feature = URPHelper.FindAndCacheRendererFeature(featureName);
feature?.SetActive(!feature.isActive);
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d44a821c64507624e88e7f1240c5cefe
guid: ebe6847dadb94f545ba84ecdc50f5b2e
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TestOnRenderImage : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -147,7 +147,7 @@ Transform:
m_GameObject: {fileID: 796612278}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: -0.725, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@@ -171,6 +171,7 @@ GameObject:
- component: {fileID: 850493788}
- component: {fileID: 850493787}
- component: {fileID: 850493790}
- component: {fileID: 850493791}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
@@ -218,7 +219,7 @@ Camera:
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
far clip plane: 100
field of view: 60
orthographic: 0
orthographic size: 5
@@ -245,13 +246,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 850493786}
serializedVersion: 2
m_LocalRotation: {x: 0.00034918755, y: 0.9996229, z: -0.022804288, w: 0.015295088}
m_LocalPosition: {x: -0.124184564, y: 0.5519303, z: 0.9334965}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &850493790
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -296,6 +297,18 @@ MonoBehaviour:
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
--- !u!114 &850493791
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 850493786}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ebe6847dadb94f545ba84ecdc50f5b2e, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &999887970
GameObject:
m_ObjectHideFlags: 0
@@ -372,13 +385,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 999887970}
serializedVersion: 2
m_LocalRotation: {x: 1, y: 0, z: 0, w: 0}
m_LocalPosition: {x: -0.041160904, y: 0.48424995, z: -1.147}
m_LocalScale: {x: 3, y: 3, z: 2.0165}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 7}
m_LocalScale: {x: 10, y: 10, z: 2.0165}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1031976958
GameObject:
m_ObjectHideFlags: 0
@@ -417,7 +430,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b65ac35274b604b168f0b6ec6085ba2e, type: 2}
- {fileID: 2100000, guid: 2194e0d71139943b4bd966de690495f4, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@@ -455,13 +468,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1031976958}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.345, y: 0.117, z: -0.109}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: -0.57, y: -0.7, z: 6.29}
m_LocalScale: {x: 2.5733, y: 2.5733, z: 2.5733}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 796612279}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!1 &1264153883
GameObject:
m_ObjectHideFlags: 0
@@ -500,7 +513,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b65ac35274b604b168f0b6ec6085ba2e, type: 2}
- {fileID: 2100000, guid: 2194e0d71139943b4bd966de690495f4, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@@ -538,13 +551,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1264153883}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.138, y: 0.332, z: -0.169}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: -0.01, y: 0.332, z: 6.63}
m_LocalScale: {x: 2.5733, y: 2.5733, z: 2.5733}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 796612279}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!1 &1508057664
GameObject:
m_ObjectHideFlags: 0
@@ -583,7 +596,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b65ac35274b604b168f0b6ec6085ba2e, type: 2}
- {fileID: 2100000, guid: 2194e0d71139943b4bd966de690495f4, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@@ -621,13 +634,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1508057664}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.124, y: 0.117, z: 0.171}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0.72, y: 0.117, z: 6.24}
m_LocalScale: {x: 2.5733, y: 2.5733, z: 2.5733}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 796612279}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!1 &1621975248
GameObject:
m_ObjectHideFlags: 0
@@ -666,7 +679,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b65ac35274b604b168f0b6ec6085ba2e, type: 2}
- {fileID: 2100000, guid: 2194e0d71139943b4bd966de690495f4, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@@ -704,13 +717,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1621975248}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.16, y: 0.158, z: -0.159}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: -0.767, y: 0.158, z: 2}
m_LocalScale: {x: 2.5733, y: 2.5733, z: 2.5733}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 796612279}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!1 &1625038973
GameObject:
m_ObjectHideFlags: 0
@@ -749,7 +762,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b65ac35274b604b168f0b6ec6085ba2e, type: 2}
- {fileID: 2100000, guid: 2194e0d71139943b4bd966de690495f4, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@@ -787,13 +800,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1625038973}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.124, y: 0, z: -0.062}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: -0.94, y: 0, z: 5.12}
m_LocalScale: {x: 2.5733, y: 2.5733, z: 2.5733}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 796612279}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!33 &1190685432395387274
MeshFilter:
m_ObjectHideFlags: 0
@@ -810,13 +823,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3198155167939134613}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.47, y: 0.019, z: -0.038}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0.484, y: -0.025, z: 2}
m_LocalScale: {x: 2.5733, y: 2.5733, z: 2.5733}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 796612279}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!1 &3198155167939134613
GameObject:
m_ObjectHideFlags: 0
@@ -855,7 +868,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b65ac35274b604b168f0b6ec6085ba2e, type: 2}
- {fileID: 2100000, guid: 2194e0d71139943b4bd966de690495f4, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0

View File

@@ -0,0 +1,134 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: FSBlur
m_Shader: {fileID: 4800000, guid: 4cb3a33af23f76541a3829b6fe8b4bed, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _Deep: 0
- _DepthThreshold: 6
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
--- !u!114 &4828077842088583083
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View File

@@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: 1b7e9ac06aaa69049ac657d341499ae0
folderAsset: yes
DefaultImporter:
guid: d910087229da1db42a2a4d8f24e7c20c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -8,8 +8,7 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: WaterPlantG
m_Shader: {fileID: -6465566751694194690, guid: 746c94d4092dee3428d2f89537482562,
type: 3}
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
@@ -18,7 +17,8 @@ Material:
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
@@ -68,10 +68,6 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Tex:
m_Texture: {fileID: 2800000, guid: 5b6ebc13703cb474f9e95eaf1d90d1d6, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
@@ -100,15 +96,12 @@ Material:
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _Freq: 1.25
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Intensity: 0.118
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueControl: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
@@ -124,8 +117,6 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
- _Tine: {r: 1, g: 1, b: 1, a: 0}
- _WaterDIr: {r: 1, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
--- !u!114 &7309648709844754497
MonoBehaviour:

View File

@@ -48,7 +48,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 016ab36f33e35487bb91a3712c78b36e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ee00fd152ab58af4bb7fedc9f1ceb006
guid: dead106d66ad3e74a9e75f6d5afc02b2
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -0,0 +1,74 @@
Shader "zzwater/FSBlur"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_DepthThreshold ("Depth Threshold", Range(0, 200)) = 50
//_BlurRadius ("Blur Radius", Range(1, 10)) = 3
}
SubShader
{
Tags { "RenderType"="Opaque" "RenderPipeline" = "UniversalPipeline"}
LOD 100
ZWrite Off Cull Off
Pass
{
Name "FSBlur"
HLSLPROGRAM
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
// The Blit.hlsl file provides the vertex shader (Vert),
// the input structure (Attributes) and the output structure (Varyings)
#include "Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blit.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl"
#pragma vertex Vert
#pragma fragment frag
float _DepthThreshold;
SAMPLER(sampler_BlitTexture);
float4 _BlitTexture_TexelSize;
half4 frag (Varyings input) : SV_Target
{
// Sample depth
float deviceDepth = SampleSceneDepth(input.texcoord);
float linearDepth = LinearEyeDepth(deviceDepth, _ZBufferParams);
float _BlurRadius = 3;
// Original color
half4 originalColor = SAMPLE_TEXTURE2D(_BlitTexture, sampler_BlitTexture, input.texcoord);
// If depth is less than threshold, return original color
if (linearDepth < _DepthThreshold)
return originalColor;
// Simple box blur (much faster than Gaussian)
half4 blurredColor = half4(0, 0, 0, 0);
int samples = 0;
// Use fixed radius for simplicity
for (int x = -_BlurRadius; x <= _BlurRadius; x++)
{
for (int y = -_BlurRadius; y <= _BlurRadius; y++)
{
float2 offset = float2(x, y) * _BlitTexture_TexelSize;
blurredColor += SAMPLE_TEXTURE2D(_BlitTexture, sampler_BlitTexture, input.texcoord + offset);
samples++;
}
}
// Average the samples
return blurredColor / samples;
}
ENDHLSL
}
}
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 4cb3a33af23f76541a3829b6fe8b4bed
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,537 @@
{
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "97bdc616974748949d3e85eeb6169cf6",
"m_Properties": [],
"m_Keywords": [],
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "251c23702d974aa796acbd724c029af7"
}
],
"m_Nodes": [
{
"m_Id": "c8cf96b42c3741b387dfa4b89feb535e"
},
{
"m_Id": "5a910df6760f4b52bb844107735592de"
},
{
"m_Id": "b89dacbc48004a04b9c7e7ff73a91785"
},
{
"m_Id": "b6a10604d3b64469942aefb11ca3202e"
},
{
"m_Id": "735bf3b859f5434b9171d848935b49bf"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "735bf3b859f5434b9171d848935b49bf"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "b6a10604d3b64469942aefb11ca3202e"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "b6a10604d3b64469942aefb11ca3202e"
},
"m_SlotId": 1
},
"m_InputSlot": {
"m_Node": {
"m_Id": "b89dacbc48004a04b9c7e7ff73a91785"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "b89dacbc48004a04b9c7e7ff73a91785"
},
"m_SlotId": 2
},
"m_InputSlot": {
"m_Node": {
"m_Id": "c8cf96b42c3741b387dfa4b89feb535e"
},
"m_SlotId": 0
}
}
],
"m_VertexContext": {
"m_Position": {
"x": -0.00001239776611328125,
"y": -0.0000286102294921875
},
"m_Blocks": []
},
"m_FragmentContext": {
"m_Position": {
"x": 0.0,
"y": 200.0
},
"m_Blocks": [
{
"m_Id": "c8cf96b42c3741b387dfa4b89feb535e"
},
{
"m_Id": "5a910df6760f4b52bb844107735592de"
}
]
},
"m_PreviewData": {
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
},
"preventRotation": false
},
"m_Path": "zzwater",
"m_GraphPrecision": 1,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": ""
},
"m_SubDatas": [],
"m_ActiveTargets": [
{
"m_Id": "59f0b9eed4544b4f8a44a9bf01cab21e"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "251c23702d974aa796acbd724c029af7",
"m_Name": "",
"m_ChildObjectList": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.Rendering.Fullscreen.ShaderGraph.FullscreenData",
"m_ObjectId": "3cec1ba0bc4c4781ad9b8bf02a2920b1",
"m_Version": 0,
"m_fullscreenMode": 0,
"m_BlendMode": 0,
"m_SrcColorBlendMode": 0,
"m_DstColorBlendMode": 1,
"m_ColorBlendOperation": 0,
"m_SrcAlphaBlendMode": 0,
"m_DstAlphaBlendMode": 1,
"m_AlphaBlendOperation": 0,
"m_EnableStencil": false,
"m_StencilReference": 0,
"m_StencilReadMask": 255,
"m_StencilWriteMask": 255,
"m_StencilCompareFunction": 8,
"m_StencilPassOperation": 0,
"m_StencilFailOperation": 0,
"m_StencilDepthFailOperation": 0,
"m_DepthWrite": false,
"m_depthWriteMode": 0,
"m_AllowMaterialOverride": false,
"m_DepthTestMode": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
"m_ObjectId": "46b8622de7be4068b625bd4bc04be38f",
"m_Id": 0,
"m_DisplayName": "Out",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "4e74e98b104e41aaa8adc8c67f972ed9",
"m_Id": 0,
"m_DisplayName": "Alpha",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Alpha",
"m_StageCapability": 2,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "4fbd2a02b6e44e95a5f1531a7e35678e",
"m_Id": 1,
"m_DisplayName": "Out",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget",
"m_ObjectId": "59f0b9eed4544b4f8a44a9bf01cab21e",
"m_Datas": [
{
"m_Id": "3cec1ba0bc4c4781ad9b8bf02a2920b1"
}
],
"m_ActiveSubTarget": {
"m_Id": "bd0ea81575d74b88aaf8b3e9f283476d"
},
"m_AllowMaterialOverride": false,
"m_SurfaceType": 0,
"m_ZTestMode": 4,
"m_ZWriteControl": 0,
"m_AlphaMode": 0,
"m_RenderFace": 2,
"m_AlphaClip": false,
"m_CastShadows": true,
"m_ReceiveShadows": true,
"m_SupportsLODCrossFade": false,
"m_CustomEditorGUI": "",
"m_SupportVFX": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "5a910df6760f4b52bb844107735592de",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.Alpha",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "4e74e98b104e41aaa8adc8c67f972ed9"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.Alpha"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "6fb8fe7b25b24856b766270254888f90",
"m_Id": 0,
"m_DisplayName": "uv",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "uv",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.UVNode",
"m_ObjectId": "735bf3b859f5434b9171d848935b49bf",
"m_Group": {
"m_Id": ""
},
"m_Name": "UV",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -868.0,
"y": -21.999984741210939,
"width": 145.0,
"height": 128.99993896484376
}
},
"m_Slots": [
{
"m_Id": "46b8622de7be4068b625bd4bc04be38f"
}
],
"synonyms": [
"texcoords",
"coords",
"coordinates"
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_OutputChannel": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ColorRGBAMaterialSlot",
"m_ObjectId": "874211ead7b44611aadbb9aa5338fea4",
"m_Id": 2,
"m_DisplayName": "Output",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Output",
"m_StageCapability": 2,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "b6a10604d3b64469942aefb11ca3202e",
"m_Group": {
"m_Id": ""
},
"m_Name": "SCWave (Custom Function)",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -663.0,
"y": -21.999984741210939,
"width": 208.0,
"height": 245.99998474121095
}
},
"m_Slots": [
{
"m_Id": "6fb8fe7b25b24856b766270254888f90"
},
{
"m_Id": "4fbd2a02b6e44e95a5f1531a7e35678e"
}
],
"synonyms": [
"code",
"HLSL"
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 1,
"m_FunctionName": "SCWave",
"m_FunctionSource": "",
"m_FunctionBody": "//waveSize = 5\r\n// _Amplitude = 0.005\r\r\nfloat X = uv.x * 5 + _Time.y;\r\nfloat Y = uv.y * 5 + _Time.y;\r\nfloat Xoffset = cos(X-Y)* 0.005 *cos(Y);\r\nfloat Yoffset = sin(X+Y)* 0.005 * sin(Y);\r\nOut = uv + float2(Xoffset, Yoffset);\r\n"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.Rendering.Universal.UniversalSampleBufferNode",
"m_ObjectId": "b89dacbc48004a04b9c7e7ff73a91785",
"m_Group": {
"m_Id": ""
},
"m_Name": "URP Sample Buffer",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -384.0,
"y": 0.0,
"width": 208.0,
"height": 313.0
}
},
"m_Slots": [
{
"m_Id": "e02e445989c2407d9c765ef29b91a743"
},
{
"m_Id": "874211ead7b44611aadbb9aa5338fea4"
}
],
"synonyms": [
"normal",
"motion vector",
"blit"
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_BufferType": 2
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalFullscreenSubTarget",
"m_ObjectId": "bd0ea81575d74b88aaf8b3e9f283476d"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "c8cf96b42c3741b387dfa4b89feb535e",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.BaseColor",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "e8b57279c0424bbea4332f3396bf8da8"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.BaseColor"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ScreenPositionMaterialSlot",
"m_ObjectId": "e02e445989c2407d9c765ef29b91a743",
"m_Id": 0,
"m_DisplayName": "UV",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "UV",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_Labels": [],
"m_ScreenSpaceType": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
"m_ObjectId": "e8b57279c0424bbea4332f3396bf8da8",
"m_Id": 0,
"m_DisplayName": "Base Color",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "BaseColor",
"m_StageCapability": 2,
"m_Value": {
"x": 0.5,
"y": 0.5,
"z": 0.5
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [],
"m_ColorMode": 0,
"m_DefaultColor": {
"r": 0.5,
"g": 0.5,
"b": 0.5,
"a": 1.0
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 0eed213bde3da224ab7e57ef6ec91ed5
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}