[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,8 +0,0 @@
fileFormatVersion: 2
guid: 1b7e9ac06aaa69049ac657d341499ae0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

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