add gsr
This commit is contained in:
parent
c130954d89
commit
f2942dae83
1
.gitignore
vendored
1
.gitignore
vendored
@ -53,3 +53,4 @@ sysinfo.txt
|
||||
crashlytics-build.properties
|
||||
|
||||
TJURP_BurstDebugInformation_DoNotShip/
|
||||
UserSettings/
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
|
||||
m_Name: Bloom
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
active: 0
|
||||
skipIterations:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
@ -80,16 +80,16 @@ MonoBehaviour:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.25
|
||||
contrast:
|
||||
m_OverrideState: 0
|
||||
m_OverrideState: 1
|
||||
m_Value: 15
|
||||
colorFilter:
|
||||
m_OverrideState: 0
|
||||
m_OverrideState: 1
|
||||
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
||||
hueShift:
|
||||
m_OverrideState: 0
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
saturation:
|
||||
m_OverrideState: 0
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
--- !u!114 &9109530758031880643
|
||||
MonoBehaviour:
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
|
||||
m_Name: Bloom
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
active: 0
|
||||
skipIterations:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
|
||||
45
Assets/Scenes/Test.cs
Normal file
45
Assets/Scenes/Test.cs
Normal file
@ -0,0 +1,45 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
[ExecuteAlways]
|
||||
public class Test : MonoBehaviour
|
||||
{
|
||||
private Material material;
|
||||
private Texture2D oriTexture;
|
||||
private Texture2D cvtTexture;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
material = GetComponent<MeshRenderer>().sharedMaterial;
|
||||
oriTexture = material.GetTexture("_MainTex") as Texture2D;
|
||||
ConvertAlpha();
|
||||
}
|
||||
|
||||
void ConvertAlpha()
|
||||
{
|
||||
cvtTexture = new Texture2D(oriTexture.width, oriTexture.height, TextureFormat.ARGB32, false);
|
||||
for (int i = 0; i < cvtTexture.width; i++)
|
||||
{
|
||||
for (int j = 0; j < cvtTexture.height; j++)
|
||||
{
|
||||
var col = oriTexture.GetPixel(i, j);
|
||||
//col.r = Mathf.Pow(col.r, 1/2.2f);
|
||||
//col.g = Mathf.Pow(col.g, 1/2.2f);
|
||||
//col.b = Mathf.Pow(col.b, 1/2.2f);
|
||||
cvtTexture.SetPixel(i,j, col);
|
||||
}
|
||||
}
|
||||
cvtTexture.Apply();
|
||||
}
|
||||
|
||||
[ContextMenu("Use Converted")]
|
||||
private void UseAlpha()
|
||||
{
|
||||
}
|
||||
|
||||
[ContextMenu("Use Original")]
|
||||
private void UseOriginal()
|
||||
{
|
||||
material.SetTexture("_MainTex", oriTexture);
|
||||
}
|
||||
}
|
||||
11
Assets/Scenes/Test.cs.meta
Normal file
11
Assets/Scenes/Test.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: Xnwd4ymoVn5T21JNkRdz/wbaTps3w3Z40N+XT4ognLZgPi/O+54tq4M=
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -21,19 +21,19 @@ MonoBehaviour:
|
||||
- {fileID: 11400000, guid: 23cccccf13c3d4170a9b21e52a9bc86b, type: 2}
|
||||
- {fileID: 11400000, guid: a04c28107d77d5e42b7155783b8475b6, type: 2}
|
||||
m_DefaultRendererIndex: 0
|
||||
m_RequireDepthTexture: 0
|
||||
m_RequireDepthTexture: 1
|
||||
m_RequireOpaqueTexture: 1
|
||||
m_OpaqueDownsampling: 0
|
||||
m_SupportsTerrainHoles: 1
|
||||
m_SupportsHDR: 1
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 1
|
||||
m_RenderScale: 0.75
|
||||
m_UpscalingFilter: 0
|
||||
m_FsrOverrideSharpness: 1
|
||||
m_FsrSharpness: 1
|
||||
m_EnableLODCrossFade: 1
|
||||
m_LODCrossFadeDitheringType: 1
|
||||
m_LODCrossFadeDitheringType: 0
|
||||
m_ShEvalMode: 0
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 1
|
||||
@ -74,7 +74,7 @@ MonoBehaviour:
|
||||
m_ColorGradingMode: 0
|
||||
m_ColorGradingLutSize: 32
|
||||
m_UseFastSRGBLinearConversion: 1
|
||||
m_SupportDataDrivenLensFlare: 1
|
||||
m_SupportDataDrivenLensFlare: 0
|
||||
m_ShadowType: 1
|
||||
m_LocalShadowsSupported: 0
|
||||
m_LocalShadowsAtlasResolution: 256
|
||||
@ -114,3 +114,5 @@ MonoBehaviour:
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
superResolution: 5
|
||||
sSRenderScale: 3
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3}
|
||||
m_Name: ScreenSpaceAmbientOcclusion
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 0
|
||||
m_Active: 1
|
||||
m_Settings:
|
||||
AOMethod: 1
|
||||
Downsample: 1
|
||||
@ -147,8 +147,15 @@ MonoBehaviour:
|
||||
m_Active: 1
|
||||
v1settings:
|
||||
EnableEdgeDirection: 1
|
||||
Mode: 1
|
||||
Sharp: 2
|
||||
GSRV1Material: {fileID: 2100000, guid: d57e64d5723127243b429034bed82c7d, type: 2}
|
||||
v2settings:
|
||||
EnableEdgeDirection: 1
|
||||
UseCompute2Pass: 1
|
||||
GSRV2Material: {fileID: 2100000, guid: faa906817c0647f42a0cec70faeb91c1, type: 2}
|
||||
GSRV2ComputeShader: {fileID: 7200000, guid: 9a4e6ff1f9a33fa4ea1e9744e313e2fd, type: 3}
|
||||
FiveSample: 0
|
||||
Exposure_co_rcp: 1
|
||||
--- !u!114 &2459758869679212578
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -203,4 +210,4 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ee9a04e75c9a5ad478f0d0b896c75181, type: 3}
|
||||
m_Name: FSR
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
m_Active: 0
|
||||
|
||||
@ -1,112 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:yousandi.cn,2023:
|
||||
--- !u!114 &11400000
|
||||
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: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
||||
m_Name: PC_Low
|
||||
m_EditorClassIdentifier:
|
||||
k_AssetVersion: 11
|
||||
k_AssetPreviousVersion: 11
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
- {fileID: 11400000, guid: 13ba41cd2fa191f43890b271bd110ed9, type: 2}
|
||||
- {fileID: 11400000, guid: a73f6fa069dd14a42b40cbb01bae63b4, type: 2}
|
||||
- {fileID: 11400000, guid: a04c28107d77d5e42b7155783b8475b6, type: 2}
|
||||
m_DefaultRendererIndex: 0
|
||||
m_RequireDepthTexture: 0
|
||||
m_RequireOpaqueTexture: 1
|
||||
m_OpaqueDownsampling: 1
|
||||
m_SupportsTerrainHoles: 0
|
||||
m_SupportsHDR: 1
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 0.8
|
||||
m_UpscalingFilter: 3
|
||||
m_FsrOverrideSharpness: 0
|
||||
m_FsrSharpness: 0.92
|
||||
m_EnableLODCrossFade: 1
|
||||
m_LODCrossFadeDitheringType: 0
|
||||
m_ShEvalMode: 0
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 1
|
||||
m_MainLightShadowmapResolution: 2048
|
||||
m_AdditionalLightsRenderingMode: 1
|
||||
m_AdditionalLightsPerObjectLimit: 4
|
||||
m_AdditionalLightShadowsSupported: 0
|
||||
m_AdditionalLightsShadowmapResolution: 2048
|
||||
m_AdditionalLightsShadowResolutionTierLow: 256
|
||||
m_AdditionalLightsShadowResolutionTierMedium: 512
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 1024
|
||||
m_ReflectionProbeBlending: 1
|
||||
m_ReflectionProbeBoxProjection: 1
|
||||
m_ShadowDistance: 50
|
||||
m_ShadowCascadeCount: 1
|
||||
m_Cascade2Split: 0.25
|
||||
m_Cascade3Split: {x: 0.1, y: 0.3}
|
||||
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
|
||||
m_CascadeBorder: 0.2
|
||||
m_ShadowDepthBias: 1
|
||||
m_ShadowNormalBias: 1
|
||||
m_AnyShadowsSupported: 1
|
||||
m_SoftShadowsSupported: 0
|
||||
m_ConservativeEnclosingSphere: 1
|
||||
m_NumIterationsEnclosingSphere: 64
|
||||
m_SoftShadowQuality: 2
|
||||
m_AdditionalLightsCookieResolution: 2048
|
||||
m_AdditionalLightsCookieFormat: 3
|
||||
m_UseSRPBatcher: 1
|
||||
m_SupportsDynamicBatching: 0
|
||||
m_MixedLightingSupported: 1
|
||||
m_SupportsLightCookies: 1
|
||||
m_SupportsLightLayers: 0
|
||||
m_DebugLevel: 0
|
||||
m_StoreActionsOptimization: 0
|
||||
m_EnableRenderGraph: 0
|
||||
m_UseAdaptivePerformance: 1
|
||||
m_ColorGradingMode: 0
|
||||
m_ColorGradingLutSize: 32
|
||||
m_UseFastSRGBLinearConversion: 0
|
||||
m_SupportDataDrivenLensFlare: 1
|
||||
m_ShadowType: 1
|
||||
m_LocalShadowsSupported: 0
|
||||
m_LocalShadowsAtlasResolution: 256
|
||||
m_MaxPixelLights: 0
|
||||
m_ShadowAtlasResolution: 256
|
||||
m_VolumeFrameworkUpdateMode: 0
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_PrefilteringModeMainLightShadows: 3
|
||||
m_PrefilteringModeAdditionalLight: 3
|
||||
m_PrefilteringModeAdditionalLightShadows: 0
|
||||
m_PrefilterXRKeywords: 1
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 1
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 0
|
||||
m_PrefilterDebugKeywords: 1
|
||||
m_PrefilterWriteRenderingLayers: 1
|
||||
m_PrefilterHDROutput: 1
|
||||
m_PrefilterSSAODepthNormals: 1
|
||||
m_PrefilterSSAOSourceDepthLow: 1
|
||||
m_PrefilterSSAOSourceDepthMedium: 1
|
||||
m_PrefilterSSAOSourceDepthHigh: 1
|
||||
m_PrefilterSSAOInterleaved: 1
|
||||
m_PrefilterSSAOBlueNoise: 1
|
||||
m_PrefilterSSAOSampleCountLow: 1
|
||||
m_PrefilterSSAOSampleCountMedium: 1
|
||||
m_PrefilterSSAOSampleCountHigh: 1
|
||||
m_PrefilterDBufferMRT1: 1
|
||||
m_PrefilterDBufferMRT2: 1
|
||||
m_PrefilterDBufferMRT3: 1
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
@ -1,139 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:yousandi.cn,2023:
|
||||
--- !u!114 &11400000
|
||||
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: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
|
||||
m_Name: PC_Low_Renderer
|
||||
m_EditorClassIdentifier:
|
||||
debugShaders:
|
||||
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3}
|
||||
hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
|
||||
m_RendererFeatures:
|
||||
- {fileID: 8597830380581107856}
|
||||
- {fileID: 375584857543697397}
|
||||
- {fileID: 6921628297578724829}
|
||||
m_RendererFeatureMap: 903899892da15177f563e82070583605ddbd78a843900e60
|
||||
m_UseNativeRenderPass: 0
|
||||
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
|
||||
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
|
||||
shaders:
|
||||
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
|
||||
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
screenSpaceShadowPS: {fileID: 0}
|
||||
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
|
||||
stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
|
||||
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
|
||||
fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3}
|
||||
materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
|
||||
coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3}
|
||||
coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3}
|
||||
blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3}
|
||||
cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3}
|
||||
objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3}
|
||||
dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92, type: 3}
|
||||
m_AssetVersion: 2
|
||||
m_OpaqueLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_TransparentLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_DefaultStencilState:
|
||||
overrideStencilState: 0
|
||||
stencilReference: 0
|
||||
stencilCompareFunction: 8
|
||||
passOperation: 2
|
||||
failOperation: 0
|
||||
zFailOperation: 0
|
||||
m_ShadowTransparentReceive: 0
|
||||
m_RenderingMode: 1
|
||||
m_DepthPrimingMode: 0
|
||||
m_CopyDepthMode: 1
|
||||
m_AccurateGbufferNormals: 0
|
||||
m_IntermediateTextureMode: 0
|
||||
--- !u!114 &375584857543697397
|
||||
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: a1614fc811f8f184697d9bee70ab9fe5, type: 3}
|
||||
m_Name: DecalRendererFeature
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
m_Settings:
|
||||
technique: 2
|
||||
maxDrawDistance: 1000
|
||||
decalLayers: 0
|
||||
dBufferSettings:
|
||||
surfaceData: 2
|
||||
screenSpaceSettings:
|
||||
normalBlend: 0
|
||||
m_CopyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
m_DBufferClear: {fileID: 4800000, guid: f056d8bd2a1c7e44e9729144b4c70395, type: 3}
|
||||
--- !u!114 &6921628297578724829
|
||||
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: 6b3d386ba5cd94485973aee1479b272e, type: 3}
|
||||
m_Name: RenderObjects
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
settings:
|
||||
passTag: RenderObjects
|
||||
Event: 300
|
||||
filterSettings:
|
||||
RenderQueueType: 0
|
||||
LayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1536
|
||||
PassNames: []
|
||||
overrideMaterial: {fileID: 2100000, guid: 725a070d0d3a84543b62d9387002f061, type: 2}
|
||||
overrideMaterialPassIndex: 0
|
||||
overrideShader: {fileID: 0}
|
||||
overrideShaderPassIndex: 0
|
||||
overrideMode: 1
|
||||
overrideDepthState: 0
|
||||
depthCompareFunction: 4
|
||||
enableWrite: 1
|
||||
stencilSettings:
|
||||
overrideStencilState: 1
|
||||
stencilReference: 2
|
||||
stencilCompareFunction: 8
|
||||
passOperation: 2
|
||||
failOperation: 0
|
||||
zFailOperation: 0
|
||||
cameraSettings:
|
||||
overrideCamera: 0
|
||||
restoreCamera: 1
|
||||
offset: {x: 0, y: 0, z: 0, w: 0}
|
||||
cameraFieldOfView: 60
|
||||
--- !u!114 &8597830380581107856
|
||||
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: a0ec52cecc795714f93f274c2e71e87b, type: 3}
|
||||
m_Name: GlobalVolumeFeature
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
_baseProfile: {fileID: 11400000, guid: f2d4d916a6612574cad220d125febbf2, type: 2}
|
||||
@ -1,139 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:yousandi.cn,2023:
|
||||
--- !u!114 &-2828792358486935836
|
||||
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: 6b3d386ba5cd94485973aee1479b272e, type: 3}
|
||||
m_Name: ScreenStencil
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
settings:
|
||||
passTag: ScreenStencil
|
||||
Event: 300
|
||||
filterSettings:
|
||||
RenderQueueType: 0
|
||||
LayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1536
|
||||
PassNames: []
|
||||
overrideMaterial: {fileID: 2100000, guid: 725a070d0d3a84543b62d9387002f061, type: 2}
|
||||
overrideMaterialPassIndex: 0
|
||||
overrideShader: {fileID: 0}
|
||||
overrideShaderPassIndex: 0
|
||||
overrideMode: 1
|
||||
overrideDepthState: 0
|
||||
depthCompareFunction: 4
|
||||
enableWrite: 1
|
||||
stencilSettings:
|
||||
overrideStencilState: 1
|
||||
stencilReference: 1
|
||||
stencilCompareFunction: 8
|
||||
passOperation: 2
|
||||
failOperation: 0
|
||||
zFailOperation: 0
|
||||
cameraSettings:
|
||||
overrideCamera: 0
|
||||
restoreCamera: 1
|
||||
offset: {x: 0, y: 0, z: 0, w: 0}
|
||||
cameraFieldOfView: 60
|
||||
--- !u!114 &-1138028507582284805
|
||||
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: a1614fc811f8f184697d9bee70ab9fe5, type: 3}
|
||||
m_Name: DecalRendererFeature
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
m_Settings:
|
||||
technique: 2
|
||||
maxDrawDistance: 1000
|
||||
decalLayers: 0
|
||||
dBufferSettings:
|
||||
surfaceData: 2
|
||||
screenSpaceSettings:
|
||||
normalBlend: 0
|
||||
m_CopyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
m_DBufferClear: {fileID: 4800000, guid: f056d8bd2a1c7e44e9729144b4c70395, type: 3}
|
||||
--- !u!114 &11400000
|
||||
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: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
|
||||
m_Name: PC_Low_ScreenRenderer
|
||||
m_EditorClassIdentifier:
|
||||
debugShaders:
|
||||
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3}
|
||||
hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
|
||||
m_RendererFeatures:
|
||||
- {fileID: 8597830380581107856}
|
||||
- {fileID: -1138028507582284805}
|
||||
- {fileID: -2828792358486935836}
|
||||
m_RendererFeatureMap: 903899892da15177fb3b4a151ae934f0e4f60b69561cbed8
|
||||
m_UseNativeRenderPass: 0
|
||||
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
|
||||
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
|
||||
shaders:
|
||||
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
|
||||
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
screenSpaceShadowPS: {fileID: 0}
|
||||
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
|
||||
stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
|
||||
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
|
||||
fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3}
|
||||
materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
|
||||
coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3}
|
||||
coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3}
|
||||
blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3}
|
||||
cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3}
|
||||
objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3}
|
||||
dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92, type: 3}
|
||||
m_AssetVersion: 2
|
||||
m_OpaqueLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_TransparentLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_DefaultStencilState:
|
||||
overrideStencilState: 1
|
||||
stencilReference: 1
|
||||
stencilCompareFunction: 3
|
||||
passOperation: 2
|
||||
failOperation: 0
|
||||
zFailOperation: 0
|
||||
m_ShadowTransparentReceive: 0
|
||||
m_RenderingMode: 1
|
||||
m_DepthPrimingMode: 0
|
||||
m_CopyDepthMode: 1
|
||||
m_AccurateGbufferNormals: 0
|
||||
m_IntermediateTextureMode: 0
|
||||
--- !u!114 &8597830380581107856
|
||||
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: a0ec52cecc795714f93f274c2e71e87b, type: 3}
|
||||
m_Name: GlobalVolumeFeature
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
_baseProfile: {fileID: 11400000, guid: f2d4d916a6612574cad220d125febbf2, type: 2}
|
||||
@ -1,5 +1,21 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:yousandi.cn,2023:
|
||||
--- !u!114 &-8189118008837629952
|
||||
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: 81180773991d8724ab7f2d216912b564, type: 3}
|
||||
m_Name: ChromaticAberration
|
||||
m_EditorClassIdentifier:
|
||||
active: 0
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.459
|
||||
--- !u!114 &-7893295128165547882
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
@ -12,7 +28,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
|
||||
m_Name: Bloom
|
||||
m_EditorClassIdentifier:
|
||||
active: 0
|
||||
active: 1
|
||||
skipIterations:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
@ -61,8 +77,8 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
postExposure:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
contrast:
|
||||
m_OverrideState: 1
|
||||
m_Value: 50
|
||||
@ -70,11 +86,58 @@ MonoBehaviour:
|
||||
m_OverrideState: 1
|
||||
m_Value: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1}
|
||||
hueShift:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
m_OverrideState: 1
|
||||
m_Value: -33
|
||||
saturation:
|
||||
m_OverrideState: 1
|
||||
m_Value: -10
|
||||
--- !u!114 &-2299945138040312024
|
||||
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: 29fa0085f50d5e54f8144f766051a691, type: 3}
|
||||
m_Name: FilmGrain
|
||||
m_EditorClassIdentifier:
|
||||
active: 0
|
||||
type:
|
||||
m_OverrideState: 1
|
||||
m_Value: 9
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
response:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.747
|
||||
texture:
|
||||
m_OverrideState: 1
|
||||
m_Value: {fileID: 0}
|
||||
--- !u!114 &-1918349096863288190
|
||||
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: 5485954d14dfb9a4c8ead8edb0ded5b1, type: 3}
|
||||
m_Name: LiftGammaGain
|
||||
m_EditorClassIdentifier:
|
||||
active: 0
|
||||
lift:
|
||||
m_OverrideState: 0
|
||||
m_Value: {x: 1, y: 1, z: 1, w: -0.03665241}
|
||||
gamma:
|
||||
m_OverrideState: 1
|
||||
m_Value: {x: 0.9840989, y: 1, z: 0.9917936, w: 1}
|
||||
gain:
|
||||
m_OverrideState: 0
|
||||
m_Value: {x: 1, y: 1, z: 1, w: -0.36652416}
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -91,6 +154,10 @@ MonoBehaviour:
|
||||
- {fileID: 849379129802519247}
|
||||
- {fileID: -7893295128165547882}
|
||||
- {fileID: -4709434348940240520}
|
||||
- {fileID: -1918349096863288190}
|
||||
- {fileID: 3868631785033536162}
|
||||
- {fileID: -8189118008837629952}
|
||||
- {fileID: -2299945138040312024}
|
||||
--- !u!114 &849379129802519247
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
@ -131,3 +198,49 @@ MonoBehaviour:
|
||||
maxNits:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1000
|
||||
--- !u!114 &3868631785033536162
|
||||
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: c01700fd266d6914ababb731e09af2eb, type: 3}
|
||||
m_Name: DepthOfField
|
||||
m_EditorClassIdentifier:
|
||||
active: 0
|
||||
mode:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
gaussianStart:
|
||||
m_OverrideState: 0
|
||||
m_Value: 10
|
||||
gaussianEnd:
|
||||
m_OverrideState: 0
|
||||
m_Value: 30
|
||||
gaussianMaxRadius:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
highQualitySampling:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
focusDistance:
|
||||
m_OverrideState: 0
|
||||
m_Value: 10
|
||||
aperture:
|
||||
m_OverrideState: 0
|
||||
m_Value: 5.6
|
||||
focalLength:
|
||||
m_OverrideState: 0
|
||||
m_Value: 50
|
||||
bladeCount:
|
||||
m_OverrideState: 0
|
||||
m_Value: 5
|
||||
bladeCurvature:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
bladeRotation:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
|
||||
@ -72,6 +72,7 @@ namespace UnityEditor.Rendering.Universal
|
||||
public SerializedProperty useFastSRGBLinearConversion { get; }
|
||||
public SerializedProperty supportDataDrivenLensFlare { get; }
|
||||
|
||||
|
||||
#if ADAPTIVE_PERFORMANCE_2_0_0_OR_NEWER
|
||||
public SerializedProperty useAdaptivePerformance { get; }
|
||||
#endif
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using X.Rendering.Feature;
|
||||
using Styles = UnityEditor.Rendering.Universal.UniversalRenderPipelineAssetUI.Styles;
|
||||
|
||||
namespace UnityEditor.Rendering.Universal
|
||||
@ -19,17 +20,23 @@ namespace UnityEditor.Rendering.Universal
|
||||
|
||||
private SerializedUniversalRenderPipelineAsset m_SerializedURPAsset;
|
||||
|
||||
private SerializedProperty superResolution;
|
||||
private SerializedProperty ssRenderScale;
|
||||
/// <inheritdoc/>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
m_SerializedURPAsset.Update();
|
||||
UniversalRenderPipelineAssetUI.Inspector.Draw(m_SerializedURPAsset, this);
|
||||
EditorGUILayout.PropertyField(superResolution, new GUIContent("超分"));
|
||||
EditorGUILayout.PropertyField(ssRenderScale, new GUIContent("超分比例"));
|
||||
m_SerializedURPAsset.Apply();
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
m_SerializedURPAsset = new SerializedUniversalRenderPipelineAsset(serializedObject);
|
||||
superResolution = serializedObject.FindProperty("superResolution");
|
||||
ssRenderScale = serializedObject.FindProperty("sSRenderScale");
|
||||
CreateRendererReorderableList();
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Experimental.Rendering;
|
||||
using X.Rendering.Feature;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
@ -369,7 +370,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
void Render(CommandBuffer cmd, ref RenderingData renderingData)
|
||||
{
|
||||
ref CameraData cameraData = ref renderingData.cameraData;
|
||||
ref ScriptableRenderer renderer = ref cameraData.renderer;
|
||||
UniversalRenderer renderer = cameraData.renderer as UniversalRenderer;
|
||||
bool isSceneViewCamera = cameraData.isSceneViewCamera;
|
||||
|
||||
//Check amount of swaps we have to do
|
||||
@ -423,7 +424,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
return destination;
|
||||
}
|
||||
|
||||
void Swap(ref ScriptableRenderer r)
|
||||
void Swap(ScriptableRenderer r)
|
||||
{
|
||||
--amountOfPassesRemaining;
|
||||
if (m_UseSwapBuffer)
|
||||
@ -451,7 +452,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
using (new ProfilingScope(cmd, ProfilingSampler.Get(URPProfileId.StopNaNs)))
|
||||
{
|
||||
Blitter.BlitCameraTexture(cmd, GetSource(), GetDestination(), RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, m_Materials.stopNaN, 0);
|
||||
Swap(ref renderer);
|
||||
Swap(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -461,7 +462,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
using (new ProfilingScope(cmd, ProfilingSampler.Get(URPProfileId.SMAA)))
|
||||
{
|
||||
DoSubpixelMorphologicalAntialiasing(ref cameraData, cmd, GetSource(), GetDestination());
|
||||
Swap(ref renderer);
|
||||
Swap(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -477,7 +478,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
using (new ProfilingScope(cmd, ProfilingSampler.Get(markerName)))
|
||||
{
|
||||
DoDepthOfField(cameraData.camera, cmd, GetSource(), GetDestination(), cameraData.pixelRect);
|
||||
Swap(ref renderer);
|
||||
Swap(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -488,10 +489,41 @@ namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
|
||||
TemporalAA.ExecutePass(cmd, m_Materials.temporalAntialiasing, ref cameraData, source, destination, m_MotionVectors.rt);
|
||||
Swap(ref renderer);
|
||||
Swap(renderer);
|
||||
}
|
||||
}
|
||||
var asset = UniversalRenderPipeline.asset;
|
||||
// SuperResolution
|
||||
if (asset.SuperResolution == ESuperResolution.GSR1 || asset.SuperResolution == ESuperResolution.GSR2)
|
||||
{
|
||||
ref var colorDescriptor = ref cameraData.cameraTargetDescriptor;
|
||||
colorDescriptor.width = cameraData.camera.pixelWidth;
|
||||
colorDescriptor.height = cameraData.camera.pixelHeight;
|
||||
|
||||
colorDescriptor.enableRandomWrite = true;
|
||||
|
||||
renderer.m_ColorBufferSystem.SetCameraSettings(colorDescriptor, FilterMode.Bilinear);
|
||||
|
||||
cmd.SetGlobalVector(ShaderPropertyId.scaledScreenParams, new Vector4(colorDescriptor.width, colorDescriptor.height, 1.0f + 1.0f / colorDescriptor.width, 1.0f + 1.0f / colorDescriptor.height));
|
||||
cmd.SetGlobalVector(ShaderPropertyId.screenSize, new Vector4(colorDescriptor.width, colorDescriptor.height, 1.0f / colorDescriptor.width, 1.0f / colorDescriptor.height));
|
||||
|
||||
|
||||
var dst = renderer.GetCameraColorBackBuffer(cmd);
|
||||
|
||||
foreach (var c in renderer.rendererFeatures)
|
||||
{
|
||||
if(c.isActive)
|
||||
{
|
||||
if (c is ISuperResolutionFeature isr)
|
||||
{
|
||||
isr.DoSR(cmd, source, dst, m_MotionVectors, ref renderingData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
destination = renderer.GetCameraColorFrontBuffer(cmd);
|
||||
source = renderer.GetCameraColorBackBuffer(cmd);
|
||||
}
|
||||
|
||||
// Motion blur
|
||||
if (useMotionBlur)
|
||||
@ -499,7 +531,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
using (new ProfilingScope(cmd, ProfilingSampler.Get(URPProfileId.MotionBlur)))
|
||||
{
|
||||
DoMotionBlur(cmd, GetSource(), GetDestination(), ref cameraData);
|
||||
Swap(ref renderer);
|
||||
Swap(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -510,7 +542,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
using (new ProfilingScope(cmd, ProfilingSampler.Get(URPProfileId.PaniniProjection)))
|
||||
{
|
||||
DoPaniniProjection(cameraData.camera, cmd, GetSource(), GetDestination());
|
||||
Swap(ref renderer);
|
||||
Swap(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -615,7 +647,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
}
|
||||
Blitter.BlitCameraTexture(cmd, GetSource(), destination, colorLoadAction, RenderBufferStoreAction.Store, m_Materials.uber, 0);
|
||||
renderer.ConfigureCameraColorTarget(destination);
|
||||
Swap(ref renderer);
|
||||
Swap(renderer);
|
||||
}
|
||||
// TODO: Implement swapbuffer in 2DRenderer so we can remove this
|
||||
// For now, when render post-processing in the middle of the camera stack (not resolving to screen)
|
||||
@ -647,6 +679,8 @@ namespace UnityEngine.Rendering.Universal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#region Sub-pixel Morphological Anti-aliasing
|
||||
|
||||
|
||||
@ -17,10 +17,7 @@ namespace X.Rendering.Feature
|
||||
}
|
||||
}
|
||||
|
||||
sealed class FSRV1 : ScriptableRenderPass
|
||||
{
|
||||
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
|
||||
sealed class FSRV1
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using System.Data.Common;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Experimental.Rendering;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
|
||||
@ -9,12 +12,12 @@ namespace X.Rendering.Feature
|
||||
/// 高通 Snapdragon Game Super Resolution.
|
||||
/// api 无关,可能在
|
||||
/// </summary>
|
||||
public sealed class GSR : ScriptableRendererFeature, ISuperResolution
|
||||
public sealed class GSR : ScriptableRendererFeature, ISuperResolutionFeature
|
||||
{
|
||||
[SerializeField]
|
||||
private V1Setting v1settings;
|
||||
[SerializeField]
|
||||
private V1Setting v2settings;
|
||||
private V2Setting v2settings;
|
||||
|
||||
|
||||
GSRV1 gsr1;
|
||||
@ -23,22 +26,35 @@ namespace X.Rendering.Feature
|
||||
|
||||
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
|
||||
{
|
||||
if (useGSR1)
|
||||
{
|
||||
renderer.EnqueuePass(gsr1);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer.EnqueuePass(gsr2);
|
||||
}
|
||||
//if (useGSR1)
|
||||
//{
|
||||
// renderer.EnqueuePass(gsr1);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// renderer.EnqueuePass(gsr2);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
public override void Create()
|
||||
{
|
||||
gsr1 = new GSRV1(v1settings);
|
||||
gsr2 = new GSRV2(v2settings);
|
||||
}
|
||||
|
||||
public void DoSR(CommandBuffer cmd, RTHandle source, RTHandle destination, RTHandle motionVector, ref RenderingData renderingData)
|
||||
{
|
||||
if (useGSR1)
|
||||
{
|
||||
gsr1.DoSR(cmd, source, destination, ref renderingData);
|
||||
}
|
||||
else
|
||||
{
|
||||
gsr2.DoSR(cmd, source, destination, motionVector, ref renderingData);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetSR(ESuperResolution resolution)
|
||||
{
|
||||
switch (resolution)
|
||||
@ -62,6 +78,13 @@ namespace X.Rendering.Feature
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
gsr1?.Dispose();
|
||||
gsr2?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
#region GSR1
|
||||
@ -70,18 +93,61 @@ namespace X.Rendering.Feature
|
||||
{
|
||||
[SerializeField]
|
||||
public bool EnableEdgeDirection = true;
|
||||
[SerializeField, Range(1, 4)]
|
||||
public int Mode = 1;
|
||||
[SerializeField, Range(0.5f, 2.5f)]
|
||||
public float Sharp = 2;
|
||||
[SerializeField]
|
||||
public Material GSRV1Material;
|
||||
}
|
||||
|
||||
sealed class GSRV1 : ScriptableRenderPass
|
||||
sealed class GSRV1 : IDisposable
|
||||
{
|
||||
private V1Setting v1settings;
|
||||
private ProfilingSampler profiler;
|
||||
|
||||
private static readonly int InputTextureId = Shader.PropertyToID("_InputTexture");
|
||||
private static readonly int ViewportInfoId = Shader.PropertyToID("_ViewportInfo");
|
||||
private static readonly int GSR1ParamsId = Shader.PropertyToID("_GSR1Params");
|
||||
|
||||
public GSRV1(V1Setting v1settings)
|
||||
{
|
||||
this.v1settings = v1settings;
|
||||
profiler = new ProfilingSampler(nameof(GSRV1));
|
||||
}
|
||||
|
||||
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
|
||||
public void DoSR(CommandBuffer cmd, RTHandle source, RTHandle destination, ref RenderingData renderingData)
|
||||
{
|
||||
ref CameraData cameraData = ref renderingData.cameraData;
|
||||
|
||||
using (new ProfilingScope(cmd, profiler))
|
||||
{
|
||||
if (v1settings.EnableEdgeDirection)
|
||||
{
|
||||
v1settings.GSRV1Material.EnableKeyword("UseEdgeDirection");
|
||||
}
|
||||
else
|
||||
{
|
||||
v1settings.GSRV1Material.DisableKeyword("UseEdgeDirection");
|
||||
}
|
||||
|
||||
cmd.SetRenderTarget(destination);
|
||||
|
||||
var pixW = source.referenceSize.x;
|
||||
var pixH = source.referenceSize.y;
|
||||
cameraData.imageScalingMode = ImageScalingMode.None;
|
||||
cameraData.upscalingFilter = ImageUpscalingFilter.None;
|
||||
|
||||
|
||||
cmd.SetGlobalVector(ViewportInfoId, new Vector4(1.0f / pixW, 1.0f / pixH, pixW, pixH));
|
||||
cmd.SetGlobalVector(GSR1ParamsId, new Vector4(v1settings.Mode, v1settings.Sharp, 0, 0));
|
||||
cmd.SetGlobalTexture(InputTextureId, source);
|
||||
|
||||
cmd.DrawProcedural(Matrix4x4.identity, v1settings.GSRV1Material, 0, MeshTopology.Triangles, 3);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -93,19 +159,268 @@ namespace X.Rendering.Feature
|
||||
{
|
||||
[SerializeField]
|
||||
public bool UseCompute2Pass = false;
|
||||
[SerializeField]
|
||||
public Material GSRV2Material;
|
||||
[SerializeField]
|
||||
public ComputeShader GSRV2ComputeShader;
|
||||
[SerializeField]
|
||||
public bool FiveSample = false;
|
||||
[SerializeField]
|
||||
public float Exposure_co_rcp = 1;
|
||||
}
|
||||
|
||||
sealed class GSRV2 : ScriptableRenderPass
|
||||
sealed class GSRV2 : IDisposable
|
||||
{
|
||||
private V1Setting v2settings;
|
||||
private V2Setting v2settings;
|
||||
private static Matrix4x4 prevViewProjMatrix;
|
||||
private static int cameraStillFrameCnt;
|
||||
private ProfilingSampler profiler;
|
||||
|
||||
public GSRV2(V1Setting v2settings)
|
||||
public static readonly Vector2[] JitterPositions = new Vector2[32];
|
||||
private static int jitterIndex;
|
||||
|
||||
private RTHandle motionDepthClipAlphaBuffer;
|
||||
private RTHandle prevSceneColorTexture1;
|
||||
private RTHandle prevSceneColorTexture2;
|
||||
private RTHandle YCoCgColor;
|
||||
|
||||
public float4x4 clipToPrevClip;
|
||||
public float4 renderSizeParam;
|
||||
public float4 outputSizeParam;
|
||||
public float2 jitterOffset;
|
||||
public float2 scaleRatio;
|
||||
public float cameraFovAngleHor;
|
||||
public float minLerpContribution;
|
||||
public int sameCameraFrmNum;
|
||||
|
||||
|
||||
public GSRV2(V2Setting v2settings)
|
||||
{
|
||||
for (int i = 0; i < 32; ++i)
|
||||
{
|
||||
JitterPositions[i] = new Vector2 { x = Halton(i + 1, 2) - 0.5f, y = Halton(i + 1, 3) - 0.5f };
|
||||
}
|
||||
this.v2settings = v2settings;
|
||||
profiler = new ProfilingSampler(nameof(GSRV2));
|
||||
}
|
||||
|
||||
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
|
||||
private void ConvertPass(CommandBuffer cmdBuffer, RTHandle motionVector, ref RenderingData renderingData)
|
||||
{
|
||||
cmdBuffer.SetGlobalTexture("_DepthTexture", renderingData.cameraData.renderer.cameraDepthTargetHandle);
|
||||
//cmdBuffer.SetGlobalTexture("_MotionTexture", motionVector);
|
||||
cmdBuffer.SetGlobalMatrix("_clipToPrevClip", clipToPrevClip);
|
||||
cmdBuffer.SetGlobalVector("_renderSizeParam", renderSizeParam);
|
||||
cmdBuffer.SetGlobalVector("_outputSizeParam", outputSizeParam);
|
||||
cmdBuffer.SetGlobalFloat("_cameraFovAngleHor", cameraFovAngleHor);
|
||||
cmdBuffer.SetRenderTarget(motionDepthClipAlphaBuffer, loadAction: RenderBufferLoadAction.DontCare, storeAction: RenderBufferStoreAction.Store);
|
||||
cmdBuffer.DrawProcedural(Matrix4x4.identity, v2settings.GSRV2Material, 0, MeshTopology.Triangles, 3);
|
||||
}
|
||||
|
||||
private void UpscalePass(CommandBuffer cmdBuffer, RTHandle source, RTHandle destination)
|
||||
{
|
||||
cmdBuffer.SetGlobalTexture("_PrevSceneColorTexture", prevSceneColorTexture1);
|
||||
cmdBuffer.SetGlobalTexture("_InputTexture", source);
|
||||
cmdBuffer.SetGlobalTexture("_MotionDepthClipAlphaBuffer", motionDepthClipAlphaBuffer);
|
||||
cmdBuffer.SetGlobalMatrix("_clipToPrevClip", clipToPrevClip);
|
||||
cmdBuffer.SetGlobalVector("_renderSizeParam", renderSizeParam);
|
||||
cmdBuffer.SetGlobalVector("_outputSizeParam", outputSizeParam);
|
||||
cmdBuffer.SetGlobalVector("_JitterOffset", GetJitter());
|
||||
cmdBuffer.SetGlobalVector("_ScaleRatio", scaleRatio.xyxx);
|
||||
|
||||
cmdBuffer.SetGlobalFloat("_cameraFovAngleHor", cameraFovAngleHor);
|
||||
cmdBuffer.SetGlobalFloat("minLerpContribution", minLerpContribution);
|
||||
cmdBuffer.SetGlobalInt("sameCameraFrmNum", sameCameraFrmNum);
|
||||
|
||||
cmdBuffer.SetRenderTarget(destination, loadAction: RenderBufferLoadAction.DontCare, storeAction: RenderBufferStoreAction.Store);
|
||||
cmdBuffer.DrawProcedural(Matrix4x4.identity, v2settings.GSRV2Material, 1, MeshTopology.Triangles, 3);
|
||||
|
||||
cmdBuffer.CopyTexture(destination, prevSceneColorTexture1);
|
||||
}
|
||||
|
||||
private void DispatchConvert(CommandBuffer cmdBuffer, RTHandle source, RTHandle motionVector, ref RenderingData renderingData)
|
||||
{
|
||||
var gsrv2 =v2settings.GSRV2ComputeShader;
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 0, "InputDepth", renderingData.cameraData.renderer.cameraDepthTargetHandle);
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 0, "InputVelocity", motionVector);
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 0, "InputColor", source);
|
||||
cmdBuffer.SetComputeMatrixParam(gsrv2, "_clipToPrevClip", clipToPrevClip);
|
||||
cmdBuffer.SetComputeVectorParam(gsrv2, "_renderSizeParam", renderSizeParam);
|
||||
cmdBuffer.SetComputeVectorParam(gsrv2, "_outputSizeParam", outputSizeParam);
|
||||
cmdBuffer.SetComputeFloatParams(gsrv2, "_cameraFovAngleHor", cameraFovAngleHor);
|
||||
cmdBuffer.SetComputeFloatParams(gsrv2, "Exposure_co_rcp", v2settings.Exposure_co_rcp);
|
||||
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 0, "MotionDepthClipAlphaBuffer", motionDepthClipAlphaBuffer);
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 0, "YCoCgColor", YCoCgColor);
|
||||
cmdBuffer.DispatchCompute(gsrv2, 0, Mathf.CeilToInt(renderSizeParam.x / 8), Mathf.CeilToInt(renderSizeParam.y / 8), 1);
|
||||
}
|
||||
|
||||
private void DispatchUpscale(CommandBuffer cmdBuffer, RTHandle historyIn, RTHandle historyOut, RTHandle destination)
|
||||
{
|
||||
var gsrv2 =v2settings.GSRV2ComputeShader;
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 1, "_inputPrevHistoryOutput", historyIn);
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 1, "_inputYCoCgColor", YCoCgColor);
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 1, "_inputMotionDepthClipAlphaBuffer", motionDepthClipAlphaBuffer);
|
||||
|
||||
cmdBuffer.SetComputeMatrixParam(gsrv2, "_clipToPrevClip", clipToPrevClip);
|
||||
cmdBuffer.SetComputeVectorParam(gsrv2, "_renderSizeParam", renderSizeParam);
|
||||
cmdBuffer.SetComputeVectorParam(gsrv2, "_outputSizeParam", outputSizeParam);
|
||||
cmdBuffer.SetComputeFloatParams(gsrv2, "_cameraFovAngleHor", cameraFovAngleHor);
|
||||
cmdBuffer.SetComputeFloatParams(gsrv2, "minLerpContribution", minLerpContribution);
|
||||
cmdBuffer.SetComputeFloatParams(gsrv2, "Exposure_co_rcp", v2settings.Exposure_co_rcp);
|
||||
cmdBuffer.SetGlobalVector("_JitterOffset", GetJitter());
|
||||
|
||||
if (v2settings.FiveSample)
|
||||
{
|
||||
gsrv2.EnableKeyword("SAMPLE_NUMBER");
|
||||
}
|
||||
else
|
||||
{
|
||||
gsrv2.DisableKeyword("SAMPLE_NUMBER");
|
||||
}
|
||||
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 1, "HistoryOutput", historyOut);
|
||||
cmdBuffer.SetComputeTextureParam(gsrv2, 1, "SceneColorOutput", destination);
|
||||
|
||||
cmdBuffer.DispatchCompute(gsrv2, 1, Mathf.CeilToInt(outputSizeParam.x / 8), Mathf.CeilToInt(outputSizeParam.y / 8), 1);
|
||||
}
|
||||
|
||||
|
||||
public void DoSR(CommandBuffer cmd, RTHandle source, RTHandle destination, RTHandle motionVector, ref RenderingData renderingData)
|
||||
{
|
||||
using (new ProfilingScope(cmd, profiler))
|
||||
{
|
||||
bool useCompute = v2settings.UseCompute2Pass;
|
||||
var camera = renderingData.cameraData.camera;
|
||||
var clip2View = camera.projectionMatrix.inverse;
|
||||
var vcenter = clip2View.MultiplyPoint(Vector3.zero).normalized;
|
||||
var vright = clip2View.MultiplyPoint(new Vector3(0, 1, 0)).normalized;
|
||||
var fv = math.acos(vcenter.x * vright.x + vcenter.y * vright.y + vcenter.z * vright.z);
|
||||
cameraFovAngleHor = math.tan(fv) * (float)(source.referenceSize.x) / (float)(source.referenceSize.y);
|
||||
var viewMatrix = camera.worldToCameraMatrix;
|
||||
var projMatrix = camera.projectionMatrix;
|
||||
var curViewProjMatrix = projMatrix * viewMatrix;
|
||||
var invCurViewProjMatrix = viewMatrix.inverse * projMatrix.inverse;
|
||||
|
||||
clipToPrevClip = prevViewProjMatrix * invCurViewProjMatrix;
|
||||
var isCameraStill = IsCameraStill(curViewProjMatrix, prevViewProjMatrix, 1e-5f);
|
||||
cameraStillFrameCnt = isCameraStill ? cameraStillFrameCnt + 1 : 0;
|
||||
prevViewProjMatrix = curViewProjMatrix;
|
||||
minLerpContribution = cameraStillFrameCnt > 5 ? 0.3f : 0;
|
||||
sameCameraFrmNum = isCameraStill ? 1 : 0;
|
||||
renderSizeParam = new(source.referenceSize.x, source.referenceSize.y, 1.0f / source.referenceSize.x, 1.0f / source.referenceSize.y);
|
||||
outputSizeParam = new(camera.pixelWidth, camera.pixelHeight, 1.0f / camera.pixelWidth, 1.0f / camera.pixelHeight);
|
||||
scaleRatio = new float2((float)(camera.pixelWidth) / (float)(source.referenceSize.x),
|
||||
math.min(20.0f, math.pow(((float)camera.pixelWidth * camera.pixelHeight) / ((float)source.referenceSize.x * source.referenceSize.y), 3.0f)));
|
||||
RenderingUtils.ReAllocateIfNeeded(ref motionDepthClipAlphaBuffer, name: "motionDepthClipAlphaBuffer", descriptor: new RenderTextureDescriptor()
|
||||
{
|
||||
width = source.referenceSize.x,
|
||||
height = source.referenceSize.y,
|
||||
colorFormat = RenderTextureFormat.ARGBHalf,
|
||||
depthBufferBits = 0,
|
||||
enableRandomWrite = useCompute ? true : false,
|
||||
dimension = TextureDimension.Tex2D,
|
||||
msaaSamples = 1
|
||||
});
|
||||
RenderingUtils.ReAllocateIfNeeded(ref prevSceneColorTexture1, name: "prevSceneColorTexture1", descriptor: new RenderTextureDescriptor()
|
||||
{
|
||||
width = camera.pixelWidth,
|
||||
height = camera.pixelHeight,
|
||||
graphicsFormat = useCompute ? GraphicsFormat.R16G16B16A16_SFloat : GraphicsFormat.B10G11R11_UFloatPack32,
|
||||
depthBufferBits = 0,
|
||||
enableRandomWrite = useCompute ? true : false,
|
||||
dimension = TextureDimension.Tex2D,
|
||||
msaaSamples = 1,
|
||||
});
|
||||
RenderingUtils.ReAllocateIfNeeded(ref prevSceneColorTexture2, name: "prevSceneColorTexture2", descriptor: new RenderTextureDescriptor()
|
||||
{
|
||||
width = camera.pixelWidth,
|
||||
height = camera.pixelHeight,
|
||||
graphicsFormat = GraphicsFormat.R16G16B16A16_SFloat,
|
||||
depthBufferBits = 0,
|
||||
enableRandomWrite = useCompute ? true : false,
|
||||
dimension = TextureDimension.Tex2D,
|
||||
msaaSamples = 1,
|
||||
});
|
||||
if (v2settings.UseCompute2Pass)
|
||||
{
|
||||
|
||||
RenderingUtils.ReAllocateIfNeeded(ref YCoCgColor, name: "YCoCgColor", descriptor: new RenderTextureDescriptor()
|
||||
{
|
||||
width = source.referenceSize.x,
|
||||
height = source.referenceSize.y,
|
||||
graphicsFormat = GraphicsFormat.R32_UInt,
|
||||
depthBufferBits = 0,
|
||||
enableRandomWrite = true,
|
||||
dimension = TextureDimension.Tex2D,
|
||||
msaaSamples = 1
|
||||
});
|
||||
|
||||
DispatchConvert(cmd, source, motionVector, ref renderingData);
|
||||
if (jitterIndex % 2 == 0)
|
||||
{
|
||||
DispatchUpscale(cmd, prevSceneColorTexture1, prevSceneColorTexture2, destination);
|
||||
}
|
||||
else
|
||||
{
|
||||
DispatchUpscale(cmd, prevSceneColorTexture2, prevSceneColorTexture1, destination);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ConvertPass(cmd, motionVector, ref renderingData);
|
||||
UpscalePass(cmd, source, destination);
|
||||
}
|
||||
|
||||
|
||||
++jitterIndex;
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector2 GetJitter()
|
||||
{
|
||||
//float jitterX = HaltonSequence.Get((jitterIndex & 1023) + 1, 2) - 0.5f;
|
||||
//float jitterY = HaltonSequence.Get((jitterIndex & 1023) + 1, 3) - 0.5f;
|
||||
//return new float2(jitterX, jitterY);
|
||||
return JitterPositions[jitterIndex % JitterPositions.Length];
|
||||
}
|
||||
|
||||
static float Halton(Int32 Index, Int32 Base)
|
||||
{
|
||||
float Result = 0.0f;
|
||||
float InvBase = 1.0f / Base;
|
||||
float Fraction = InvBase;
|
||||
while (Index > 0)
|
||||
{
|
||||
Result += (Index % Base) * Fraction;
|
||||
Index /= Base;
|
||||
Fraction *= InvBase;
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
private static bool IsCameraStill(float4x4 curVP, float4x4 prevVP, float threshold = 1e-5f)
|
||||
{
|
||||
float vpDiff = 0;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
vpDiff += math.abs(curVP[i][j] - prevVP[i][j]);
|
||||
}
|
||||
}
|
||||
if (vpDiff < threshold)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
motionDepthClipAlphaBuffer?.Release();
|
||||
prevSceneColorTexture1?.Release();
|
||||
prevSceneColorTexture2?.Release();
|
||||
YCoCgColor?.Release();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using UnityEngine.Rendering;
|
||||
namespace X.Rendering.Feature
|
||||
{
|
||||
public enum ESuperResolution
|
||||
@ -34,8 +36,10 @@ namespace X.Rendering.Feature
|
||||
Factor05,
|
||||
}
|
||||
|
||||
public interface ISuperResolution
|
||||
public interface ISuperResolutionFeature
|
||||
{
|
||||
public void SetSR(ESuperResolution resolution);
|
||||
|
||||
public void DoSR(CommandBuffer cmd, RTHandle source, RTHandle destination, RTHandle motionVector, ref RenderingData renderingData);
|
||||
}
|
||||
}
|
||||
|
||||
242
Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Shader/GSR1.shader
vendored
Normal file
242
Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Shader/GSR1.shader
vendored
Normal file
@ -0,0 +1,242 @@
|
||||
Shader "MRP/SR/GSR1"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
|
||||
Pass
|
||||
{
|
||||
HLSLPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#pragma target 5.0
|
||||
#pragma multi_compile_fragment _ UseEdgeDirection
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
struct Varyings
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
float2 GetFullScreenTriangleTexCoord(uint vertexID)
|
||||
{
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
return float2((vertexID << 1) & 2, 1.0 - (vertexID & 2));
|
||||
#else
|
||||
return float2((vertexID << 1) & 2, vertexID & 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
float4 GetFullScreenTriangleVertexPosition(uint vertexID, float z = UNITY_NEAR_CLIP_VALUE)
|
||||
{
|
||||
// note: the triangle vertex position coordinates are x2 so the returned UV coordinates are in range -1, 1 on the screen.
|
||||
float2 uv = float2((vertexID << 1) & 2, vertexID & 2);
|
||||
float4 pos = float4(uv * 2.0 - 1.0, z, 1.0);
|
||||
return pos;
|
||||
}
|
||||
|
||||
Varyings vert(uint vertexID: SV_VertexID)
|
||||
{
|
||||
Varyings o;
|
||||
o.vertex = GetFullScreenTriangleVertexPosition(vertexID);
|
||||
o.uv = GetFullScreenTriangleTexCoord(vertexID);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
/*
|
||||
* Operation modes:
|
||||
* RGBA -> 1
|
||||
* RGBY -> 3
|
||||
* LERP -> 4
|
||||
*/
|
||||
|
||||
|
||||
#define EdgeThreshold 8.0/255.0
|
||||
|
||||
#define SGSR_H 1
|
||||
|
||||
float4 _ViewportInfo;
|
||||
float4 _GSR1Params;
|
||||
|
||||
#define OperationMode _GSR1Params.x
|
||||
#define EdgeSharpness _GSR1Params.y
|
||||
|
||||
SamplerState samLinearClamp;
|
||||
Texture2D<float4> _InputTexture;
|
||||
|
||||
half4 SGSRRH(float2 p)
|
||||
{
|
||||
half4 res = _InputTexture.GatherRed(samLinearClamp, p);
|
||||
return res;
|
||||
}
|
||||
half4 SGSRGH(float2 p)
|
||||
{
|
||||
half4 res = _InputTexture.GatherGreen(samLinearClamp, p);
|
||||
return res;
|
||||
}
|
||||
half4 SGSRBH(float2 p)
|
||||
{
|
||||
half4 res = _InputTexture.GatherBlue(samLinearClamp, p);
|
||||
return res;
|
||||
}
|
||||
half4 SGSRAH(float2 p)
|
||||
{
|
||||
half4 res = _InputTexture.GatherAlpha(samLinearClamp, p);
|
||||
return res;
|
||||
}
|
||||
half4 SGSRRGBH(float2 p)
|
||||
{
|
||||
half4 res = _InputTexture.SampleLevel(samLinearClamp, p, 0);
|
||||
return res;
|
||||
}
|
||||
|
||||
half4 SGSRH(float2 p, uint channel)
|
||||
{
|
||||
if (channel == 0)
|
||||
return SGSRRH(p);
|
||||
if (channel == 1)
|
||||
return SGSRGH(p);
|
||||
if (channel == 2)
|
||||
return SGSRBH(p);
|
||||
return SGSRAH(p);
|
||||
}
|
||||
half fastLanczos2(half x)
|
||||
{
|
||||
half wA = x- half(4.0);
|
||||
half wB = x*wA-wA;
|
||||
wA *= wA;
|
||||
return wB*wA;
|
||||
}
|
||||
|
||||
#if defined(UseEdgeDirection)
|
||||
half2 weightY(half dx, half dy, half c, half3 data)
|
||||
#else
|
||||
half2 weightY(half dx, half dy, half c, half data)
|
||||
#endif
|
||||
{
|
||||
#if defined(UseEdgeDirection)
|
||||
half std = data.x;
|
||||
half2 dir = data.yz;
|
||||
|
||||
half edgeDis = ((dx*dir.y)+(dy*dir.x));
|
||||
half x = (((dx*dx)+(dy*dy))+((edgeDis*edgeDis)*((clamp(((c*c)*std),0.0,1.0)*0.7)+-1.0)));
|
||||
#else
|
||||
half std = data;
|
||||
half x = ((dx*dx)+(dy* dy))* half(0.5) + clamp(abs(c)*std, 0.0, 1.0);
|
||||
#endif
|
||||
|
||||
half w = fastLanczos2(x);
|
||||
return half2(w, w * c);
|
||||
}
|
||||
|
||||
half2 edgeDirection(half4 left, half4 right)
|
||||
{
|
||||
half2 dir;
|
||||
half RxLz = (right.x + (-left.z));
|
||||
half RwLy = (right.w + (-left.y));
|
||||
half2 delta;
|
||||
delta.x = (RxLz + RwLy);
|
||||
delta.y = (RxLz + (-RwLy));
|
||||
half lengthInv = rsqrt((delta.x * delta.x+ 3.075740e-05) + (delta.y * delta.y));
|
||||
dir.x = (delta.x * lengthInv);
|
||||
dir.y = (delta.y * lengthInv);
|
||||
return dir;
|
||||
}
|
||||
|
||||
void SgsrYuvH(
|
||||
out half4 pix,
|
||||
float2 uv,
|
||||
float4 con1)
|
||||
{
|
||||
int mode = OperationMode;
|
||||
half edgeThreshold = EdgeThreshold;
|
||||
half edgeSharpness = EdgeSharpness;
|
||||
if(mode == 1)
|
||||
pix.xyz = SGSRRGBH(uv).xyz;
|
||||
else
|
||||
pix.xyzw = SGSRRGBH(uv).xyzw;
|
||||
float xCenter;
|
||||
xCenter = abs(uv.x+-0.5);
|
||||
float yCenter;
|
||||
yCenter = abs(uv.y+-0.5);
|
||||
|
||||
//todo: config the SR region based on needs
|
||||
//if ( mode!=4 && xCenter*xCenter+yCenter*yCenter<=0.4 * 0.4)
|
||||
if ( mode!=4)
|
||||
{
|
||||
float2 imgCoord = ((uv.xy*con1.zw)+ float2(-0.5,0.5));
|
||||
float2 imgCoordPixel = floor(imgCoord);
|
||||
float2 coord = (imgCoordPixel*con1.xy);
|
||||
half2 pl = (imgCoord+(-imgCoordPixel));
|
||||
half4 left = SGSRH(coord, mode);
|
||||
|
||||
half edgeVote = abs(left.z - left.y) + abs(pix[mode] - left.y) + abs(pix[mode] - left.z) ;
|
||||
if(edgeVote > edgeThreshold)
|
||||
{
|
||||
coord.x += con1.x;
|
||||
|
||||
half4 right = SGSRH(coord + float2(con1.x, 0.0), mode);
|
||||
half4 upDown;
|
||||
upDown.xy = SGSRH(coord + float2(0.0, -con1.y), mode).wz;
|
||||
upDown.zw = SGSRH(coord + float2(0.0, con1.y), mode).yx;
|
||||
|
||||
half mean = (left.y+left.z+right.x+right.w)* half(0.25);
|
||||
left = left - half4(mean,mean,mean,mean);
|
||||
right = right - half4(mean, mean, mean, mean);
|
||||
upDown = upDown - half4(mean, mean, mean, mean);
|
||||
pix.w =pix[mode] - mean;
|
||||
|
||||
half sum = (((((abs(left.x)+abs(left.y))+abs(left.z))+abs(left.w))+(((abs(right.x)+abs(right.y))+abs(right.z))+abs(right.w)))+(((abs(upDown.x)+abs(upDown.y))+abs(upDown.z))+abs(upDown.w)));
|
||||
half sumMean = 1.014185e+01/sum;
|
||||
half std = (sumMean*sumMean);
|
||||
|
||||
#if defined(UseEdgeDirection)
|
||||
half3 data = half3(std, edgeDirection(left, right));
|
||||
#else
|
||||
half data = std;
|
||||
#endif
|
||||
|
||||
half2 aWY = weightY(pl.x, pl.y+1.0, upDown.x,data);
|
||||
aWY += weightY(pl.x-1.0, pl.y+1.0, upDown.y,data);
|
||||
aWY += weightY(pl.x-1.0, pl.y-2.0, upDown.z,data);
|
||||
aWY += weightY(pl.x, pl.y-2.0, upDown.w,data);
|
||||
aWY += weightY(pl.x+1.0, pl.y-1.0, left.x,data);
|
||||
aWY += weightY(pl.x, pl.y-1.0, left.y,data);
|
||||
aWY += weightY(pl.x, pl.y, left.z,data);
|
||||
aWY += weightY(pl.x+1.0, pl.y, left.w,data);
|
||||
aWY += weightY(pl.x-1.0, pl.y-1.0, right.x,data);
|
||||
aWY += weightY(pl.x-2.0, pl.y-1.0, right.y,data);
|
||||
aWY += weightY(pl.x-2.0, pl.y, right.z,data);
|
||||
aWY += weightY(pl.x-1.0, pl.y, right.w,data);
|
||||
|
||||
half finalY = aWY.y/aWY.x;
|
||||
|
||||
half max4 = max(max(left.y,left.z),max(right.x,right.w));
|
||||
half min4 = min(min(left.y,left.z),min(right.x,right.w));
|
||||
finalY = clamp(edgeSharpness*finalY, min4, max4);
|
||||
|
||||
half deltaY = finalY -pix.w;
|
||||
|
||||
pix.x = saturate((pix.x+deltaY));
|
||||
pix.y = saturate((pix.y+deltaY));
|
||||
pix.z = saturate((pix.z+deltaY));
|
||||
}
|
||||
}
|
||||
pix.w = 1.0; //assume alpha channel is not used
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
fixed4 frag (Varyings i) : SV_Target
|
||||
{
|
||||
half4 OutColor = half4(0, 0, 0, 1);
|
||||
SgsrYuvH(OutColor, i.uv, _ViewportInfo);
|
||||
return OutColor;
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfe84e33ceb6d1147a989c43cec74049
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
418
Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Shader/GSR2.compute
vendored
Normal file
418
Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Shader/GSR2.compute
vendored
Normal file
@ -0,0 +1,418 @@
|
||||
#pragma enable_d3d11_debug_symbols
|
||||
|
||||
#pragma kernel ConvertKernel
|
||||
#pragma kernel UpscaleKernel
|
||||
|
||||
Texture2D InputVelocity;
|
||||
|
||||
#pragma multi_compile_local __ SAMPLE_NUMBER
|
||||
|
||||
Texture2D InputDepth;
|
||||
Texture2D InputColor;
|
||||
float Exposure_co_rcp;
|
||||
float _cameraFovAngleHor;
|
||||
float4x4 _clipToPrevClip;
|
||||
SamplerState PointClamp;
|
||||
SamplerState PointClamp_Velocity;
|
||||
|
||||
float4 _renderSizeParam;
|
||||
float4 _outputSizeParam;
|
||||
|
||||
float2 _JitterOffset;
|
||||
|
||||
RWTexture2D<uint> YCoCgColor;
|
||||
RWTexture2D<half4> MotionDepthClipAlphaBuffer;
|
||||
|
||||
void Convert(uint2 DisThreadID)
|
||||
{
|
||||
int2 PixelOffset;
|
||||
PixelOffset.x = 0; //store int2(1, 1) - int2(1, 1)
|
||||
float2 gatherCoord = float2(DisThreadID) * _renderSizeParam.zw;
|
||||
float2 ViewportUV = gatherCoord + float2(0.5f, 0.5f) * _renderSizeParam.zw;
|
||||
gatherCoord = float2(DisThreadID) * _renderSizeParam.zw;
|
||||
|
||||
float4 topleft = InputDepth.GatherRed(PointClamp, gatherCoord);
|
||||
float4 topRight = InputDepth.GatherRed(PointClamp, gatherCoord + float2(_renderSizeParam.zw.x * 2.0, 0.0)).xyzw;
|
||||
float4 bottomLeft = InputDepth.GatherRed(PointClamp, gatherCoord + float2(0.0, _renderSizeParam.zw.y * 2.0)).xyzw;
|
||||
float4 bottomRight = InputDepth.GatherRed(PointClamp, gatherCoord + float2(_renderSizeParam.zw.x * 2.0, _renderSizeParam.zw.y * 2.0)).xyzw;
|
||||
|
||||
float maxC = max(max(max(topleft.y, topRight.x), bottomLeft.z), bottomRight.w);
|
||||
float topleft4 = max(max(max(topleft.y, topleft.x), topleft.z), topleft.w);
|
||||
float topLeftMax9 = max(bottomLeft.w, max(max(maxC, topleft4), topRight.w));
|
||||
|
||||
float depthclip = 0.0;
|
||||
if (maxC > 1.0e-05f)
|
||||
{
|
||||
float topRight4 = max(max(max(topRight.y, topRight.x), topRight.z), topRight.w);
|
||||
float bottomLeft4 = max(max(max(bottomLeft.y, bottomLeft.x), bottomLeft.z), bottomLeft.w);
|
||||
float bottomRight4 = max(max(max(bottomRight.y, bottomRight.x), bottomRight.z), bottomRight.w);
|
||||
|
||||
float Wdepth = 0.f;
|
||||
float Ksep = 1.37e-05f;
|
||||
float Kfov = _cameraFovAngleHor; /** (_renderSizeParam.xy.x / _renderSizeParam.xy.y)*/
|
||||
float diagonal_length = length(float2(_renderSizeParam.xy));
|
||||
float Ksep_Kfov_diagonal = Ksep * Kfov * diagonal_length;
|
||||
|
||||
float Depthsep = Ksep_Kfov_diagonal * maxC;
|
||||
#define EPSILON 1.19e-07f /*1.192092896e-07f*/
|
||||
Wdepth += saturate(Depthsep / (abs(maxC - topleft4) + EPSILON));
|
||||
Wdepth += saturate(Depthsep / (abs(maxC - topRight4) + EPSILON));
|
||||
Wdepth += saturate(Depthsep / (abs(maxC - bottomLeft4) + EPSILON));
|
||||
Wdepth += saturate(Depthsep / (abs(maxC - bottomRight4) + EPSILON));
|
||||
|
||||
depthclip = saturate(1.0f - Wdepth * 0.25);
|
||||
}
|
||||
|
||||
float4 EncodedVelocity = InputVelocity[DisThreadID];
|
||||
|
||||
float2 motion;
|
||||
if (float(EncodedVelocity.x) > 0.0f)
|
||||
{
|
||||
motion = EncodedVelocity.xy;// DecodeVelocityFromTexture(EncodedVelocity).xy;
|
||||
}
|
||||
else
|
||||
{
|
||||
float2 ScreenPos = float2(2.0f * ViewportUV.x - 1.0f, 1.0f - 2.0f * ViewportUV.y);
|
||||
float3 Position = float3(ScreenPos, topLeftMax9);
|
||||
float4 CurClip = float4(Position, 1.0f);
|
||||
float4 PreClip = mul(CurClip, _clipToPrevClip);
|
||||
float2 PreScreen = PreClip.xy / PreClip.w;
|
||||
motion = Position.xy - PreScreen;
|
||||
}
|
||||
|
||||
float3 Colorrgb = InputColor[DisThreadID].xyz;
|
||||
///simple tonemap
|
||||
float ColorMax = (max(max(Colorrgb.x, Colorrgb.y), Colorrgb.z) + Exposure_co_rcp).x;
|
||||
Colorrgb /= ColorMax.xxx;
|
||||
|
||||
float3 Colorycocg;
|
||||
Colorycocg.x = 0.25f * (Colorrgb.x + 2.0f * Colorrgb.y + Colorrgb.z),
|
||||
Colorycocg.y = saturate(0.5f * Colorrgb.x + 0.5 - 0.5f * Colorrgb.z),
|
||||
Colorycocg.z = saturate(Colorycocg.x + Colorycocg.y - Colorrgb.x);
|
||||
|
||||
//now color YCoCG all in the range of [0,1]
|
||||
uint x11 = Colorycocg.x * 2047.5f;
|
||||
uint y11 = Colorycocg.y * 2047.5f;
|
||||
uint z10 = Colorycocg.z * 1023.5f;
|
||||
|
||||
YCoCgColor[DisThreadID] = (x11 << 21) | (y11 << 10) | z10;
|
||||
MotionDepthClipAlphaBuffer[DisThreadID] = half4(motion, depthclip, ColorMax);
|
||||
}
|
||||
|
||||
#define TILE_SIZE_X 8
|
||||
#define TILE_SIZE_Y 8
|
||||
|
||||
[numthreads(TILE_SIZE_X, TILE_SIZE_Y, 1)]
|
||||
void ConvertKernel(uint2 uGroupId : SV_GroupID,
|
||||
uint2 uGroupThreadId : SV_GroupThreadID,
|
||||
uint2 uDispatchThreadId : SV_DispatchThreadID)
|
||||
{
|
||||
Convert(uDispatchThreadId);
|
||||
}
|
||||
|
||||
|
||||
#define five_sample_use SAMPLE_NUMBER
|
||||
|
||||
Texture2D<uint> _inputYCoCgColor;
|
||||
Texture2D<half4> _inputMotionDepthClipAlphaBuffer;
|
||||
Texture2D<float4> _inputPrevHistoryOutput;
|
||||
|
||||
SamplerState LinearClamp1;
|
||||
SamplerState LinearClamp2;
|
||||
float ValidReset;
|
||||
float minLerpContribution;// 0.0 or 0.3, when camera move 0.0, camera freeze 0.3
|
||||
|
||||
RWTexture2D<float4> HistoryOutput;
|
||||
RWTexture2D<float4> SceneColorOutput;
|
||||
|
||||
float FastLanczos(float base)
|
||||
{
|
||||
float y = base - 1.0f;
|
||||
float y2 = y * y;
|
||||
float y_temp = 0.75f * y + y2;
|
||||
return y_temp * y2;
|
||||
}
|
||||
|
||||
float3 DecodeColor(uint sample32)
|
||||
{
|
||||
uint x11 = sample32 >> 21;
|
||||
uint y11 = sample32 & (2047 << 10);
|
||||
uint z10 = sample32 & 1023;
|
||||
float3 samplecolor;
|
||||
samplecolor.x = ((float)x11 * (1.0f / 2047.5f));
|
||||
samplecolor.y = ((float)y11 * (4.76953602e-7f)) - 0.5f;
|
||||
samplecolor.z = ((float)z10 * (1.0f / 1023.5f)) - 0.5f;
|
||||
return samplecolor;
|
||||
}
|
||||
|
||||
void Update(uint2 DisThreadID)
|
||||
{
|
||||
float2 HistoryInfo_ViewportSizeInverse = _outputSizeParam.zw;
|
||||
float2 Hruv = (DisThreadID + 0.5f) * HistoryInfo_ViewportSizeInverse;
|
||||
float2 srcOutputPos = Hruv * _renderSizeParam.xy;
|
||||
int2 InputPos = srcOutputPos;
|
||||
|
||||
float2 Jitteruv;
|
||||
Jitteruv.x = saturate(Hruv.x + _JitterOffset.x * HistoryInfo_ViewportSizeInverse.x);
|
||||
Jitteruv.y = saturate(Hruv.y + _JitterOffset.y * HistoryInfo_ViewportSizeInverse.y);
|
||||
|
||||
float4 mda = _inputMotionDepthClipAlphaBuffer.SampleLevel(LinearClamp1, Jitteruv, 0).xyzw;
|
||||
|
||||
float2 PrevUV;
|
||||
PrevUV.x = -0.5f * mda.x + Hruv.x;
|
||||
PrevUV.y = 0.5f * mda.y + Hruv.y;
|
||||
|
||||
PrevUV.x = clamp(PrevUV.x, 0.0f, 1.0f);
|
||||
PrevUV.y = clamp(PrevUV.y, 0.0f, 1.0f);
|
||||
|
||||
float depthclip = mda.z;
|
||||
float ColorMax = mda.w;
|
||||
|
||||
float3 HistoryColor = _inputPrevHistoryOutput.SampleLevel(LinearClamp2, PrevUV, 0).xyz;
|
||||
float Biasmax_viewportXScale = min(float(_outputSizeParam.x) / float(_renderSizeParam.x), 1.99);
|
||||
float2 _ScaleRatio = min(20.0, pow((float(_outputSizeParam.x) / float(_renderSizeParam.x)) * (float(_outputSizeParam.y) / float(_renderSizeParam.y)), 3.0));
|
||||
/////upsample and compute box
|
||||
float4 Upsampledcw = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float kernelfactor = ValidReset;
|
||||
float biasmax = Biasmax_viewportXScale - Biasmax_viewportXScale * kernelfactor;
|
||||
float biasmin = max(1.0f, 0.3f + 0.3f * biasmax);
|
||||
float biasfactor = max(0.25f * depthclip, kernelfactor);
|
||||
float kernelbias = lerp(biasmax, biasmin, biasfactor);
|
||||
float motion_viewport_len = length(mda.xy * _outputSizeParam.xy);
|
||||
float curvebias = lerp(-2.0f, -3.0f, saturate(motion_viewport_len * 0.02f));
|
||||
|
||||
float3 rectboxcenter = float3(0.0f, 0.0f, 0.0f);
|
||||
float3 rectboxvar = float3(0.0f, 0.0f, 0.0f);
|
||||
float rectboxweight = 0.0f;
|
||||
|
||||
float2 InputPosf = float2(InputPos);
|
||||
float2 srcpos = InputPosf + float2(0.5f, 0.5f) - _JitterOffset; //fSrcUnjitteredPos
|
||||
|
||||
float kernelbias2 = kernelbias * kernelbias * 0.25f;
|
||||
float2 srcpos_srcOutputPos = srcpos - srcOutputPos;
|
||||
|
||||
int2 InputPosBtmRight = int2(1, 1) + InputPos;
|
||||
float2 gatherCoord = InputPosf * _renderSizeParam.zw;
|
||||
uint4 topleft = _inputYCoCgColor.GatherRed(PointClamp, gatherCoord);
|
||||
uint2 topRight;
|
||||
uint2 bottomLeft;
|
||||
|
||||
#if five_sample_use
|
||||
uint2 btmRight = _inputYCoCgColor.GatherRed(PointClamp, gatherCoord + float2(_renderSizeParam.zw.x, _renderSizeParam.zw.y)).xz;
|
||||
bottomLeft.y = btmRight.x;
|
||||
topRight.x = btmRight.y;
|
||||
#else
|
||||
topRight = _inputYCoCgColor.GatherRed(PointClamp, gatherCoord + float2(_renderSizeParam.zw.x, 0.0f)).yz;
|
||||
bottomLeft = _inputYCoCgColor.GatherRed(PointClamp, gatherCoord + float2(0.0f, _renderSizeParam.zw.y)).xy;
|
||||
#endif
|
||||
|
||||
float3 rectboxmin;
|
||||
float3 rectboxmax;
|
||||
{
|
||||
float3 samplecolor = DecodeColor(bottomLeft.y);
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(0.0f, 1.0f);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw = float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = samplecolor;
|
||||
rectboxmax = samplecolor;
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter = wsample;
|
||||
rectboxvar = (samplecolor * wsample);
|
||||
rectboxweight = boxweight;
|
||||
}
|
||||
{
|
||||
float3 samplecolor = DecodeColor(topRight.x);
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(1.0f, 0.0f);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
{
|
||||
float3 samplecolor = DecodeColor(topleft.x);
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(-1.0f, 0.0f);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
{
|
||||
float3 samplecolor = DecodeColor(topleft.y);
|
||||
float2 baseoffset = srcpos_srcOutputPos;
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
{
|
||||
float3 samplecolor = DecodeColor(topleft.z);
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(0.0f, -1.0f);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
|
||||
#if !five_sample_use
|
||||
{
|
||||
uint btmRight = _inputYCoCgColor[InputPosBtmRight].x;
|
||||
float3 samplecolor = DecodeColor(btmRight);
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(1.0f, 1.0f);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
{
|
||||
float3 samplecolor = DecodeColor(bottomLeft.x);
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(-1.0f, 1.0f);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
{
|
||||
float3 samplecolor = DecodeColor(topRight.y);
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(1.0f, -1.0f);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
{
|
||||
float3 samplecolor = DecodeColor(topleft.w);
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(-1.0f, -1.0f);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
#endif
|
||||
|
||||
rectboxweight = 1.0f / rectboxweight;
|
||||
rectboxcenter *= rectboxweight;
|
||||
rectboxvar *= rectboxweight;
|
||||
rectboxvar = sqrt(abs(rectboxvar - rectboxcenter * rectboxcenter));
|
||||
////Upsampledcw.xyz = (Upsampledcw.w > 0.00025f) ? clamp(Upsampledcw.xyz / Upsampledcw.w, rectboxmin, rectboxmax) : Upsampledcw.xyz;
|
||||
////Upsampledcw.w = (Upsampledcw.w > 0.00025f) ? Upsampledcw.w * (1.0f / 3.0f) : 0.0f;
|
||||
|
||||
float3 bias = float3(0.05f, 0.05f, 0.05f);
|
||||
Upsampledcw.xyz = clamp(Upsampledcw.xyz / Upsampledcw.w, rectboxmin - bias, rectboxmax + bias);
|
||||
Upsampledcw.w = Upsampledcw.w * (1.0f / 3.0f);
|
||||
|
||||
float baseupdate = 1.0f - depthclip;
|
||||
baseupdate = min(baseupdate, lerp(baseupdate, Upsampledcw.w * 10.0f, saturate(10.0f * motion_viewport_len)));
|
||||
baseupdate = min(baseupdate, lerp(baseupdate, Upsampledcw.w, saturate(motion_viewport_len * 0.05f)));
|
||||
float basealpha = baseupdate;
|
||||
|
||||
float boxscale = max(depthclip, saturate(motion_viewport_len * 0.05f));
|
||||
float boxsize = lerp(_ScaleRatio.y, 1.0f, boxscale);
|
||||
|
||||
float3 sboxvar = rectboxvar * boxsize;
|
||||
float3 boxmin = rectboxcenter - sboxvar;
|
||||
float3 boxmax = rectboxcenter + sboxvar;
|
||||
rectboxmax = min(rectboxmax, boxmax);
|
||||
rectboxmin = max(rectboxmin, boxmin);
|
||||
|
||||
float3 clampedcolor = clamp(HistoryColor, rectboxmin, rectboxmax);
|
||||
float startLerpValue = minLerpContribution;
|
||||
if ((abs(mda.x) + abs(mda.y)) > 0.000001f)
|
||||
startLerpValue = 0.0f;
|
||||
float lerpcontribution = (any(rectboxmin > HistoryColor) || any(HistoryColor > rectboxmax)) ? startLerpValue : 1.0f;
|
||||
|
||||
HistoryColor = lerp(clampedcolor, HistoryColor, saturate(lerpcontribution));
|
||||
float basemin = min(basealpha, 0.1f);
|
||||
basealpha = lerp(basemin, basealpha, saturate(lerpcontribution));
|
||||
|
||||
// const float EPSILON = 1.192e-07f /*1.192092896e-07f*/;
|
||||
////blend color
|
||||
float alphasum = max( 1.192e-07f, basealpha + Upsampledcw.w);
|
||||
float alpha = saturate(Upsampledcw.w / alphasum + ValidReset);
|
||||
|
||||
Upsampledcw.xyz = lerp(HistoryColor, Upsampledcw.xyz, alpha.xxx);
|
||||
|
||||
Upsampledcw.x = clamp(Upsampledcw.x, rectboxmin.x, rectboxmax.x);
|
||||
HistoryOutput[DisThreadID] = float4(Upsampledcw.xyz, 0.0f);
|
||||
////ycocg to grb
|
||||
float x_z = Upsampledcw.x - Upsampledcw.z;
|
||||
Upsampledcw.rgb = float3(
|
||||
saturate(x_z + Upsampledcw.y),
|
||||
saturate(Upsampledcw.x + Upsampledcw.z),
|
||||
saturate(x_z - Upsampledcw.y));
|
||||
|
||||
float compMax = max(Upsampledcw.x, Upsampledcw.y);
|
||||
compMax = clamp(max(compMax, Upsampledcw.z), 0.0f, 1.0f);
|
||||
float scale = min(Exposure_co_rcp / ((1.0f + 1.0f / 65504.0f) - compMax), ColorMax);
|
||||
|
||||
if (ColorMax > 4000.0f) scale = ColorMax;
|
||||
Upsampledcw.xyz = Upsampledcw.xyz * scale.xxx;
|
||||
|
||||
SceneColorOutput[DisThreadID] = float4( Upsampledcw.xyz,0);
|
||||
}
|
||||
|
||||
[numthreads(TILE_SIZE_X, TILE_SIZE_Y, 1)]
|
||||
void UpscaleKernel(uint2 uGroupId : SV_GroupID,
|
||||
uint2 uGroupThreadId : SV_GroupThreadID,
|
||||
uint2 uDispatchThreadId : SV_DispatchThreadID)
|
||||
{
|
||||
Update(uDispatchThreadId);
|
||||
}
|
||||
@ -1,8 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13ba41cd2fa191f43890b271bd110ed9
|
||||
NativeFormatImporter:
|
||||
guid: 9a4e6ff1f9a33fa4ea1e9744e313e2fd
|
||||
ComputeShaderImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
437
Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Shader/GSR2.shader
vendored
Normal file
437
Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Shader/GSR2.shader
vendored
Normal file
@ -0,0 +1,437 @@
|
||||
Shader "MRP/SR/GSR2"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
HLSLINCLUDE
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
precise float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
float2 GetFullScreenTriangleTexCoord(uint vertexID)
|
||||
{
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
return float2((vertexID << 1) & 2, 1.0 - (vertexID & 2));
|
||||
#else
|
||||
return float2((vertexID << 1) & 2, vertexID & 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
float4 GetFullScreenTriangleVertexPosition(uint vertexID, float z = UNITY_NEAR_CLIP_VALUE)
|
||||
{
|
||||
// note: the triangle vertex position coordinates are x2 so the returned UV coordinates are in range -1, 1 on the screen.
|
||||
float2 uv = float2((vertexID << 1) & 2, vertexID & 2);
|
||||
float4 pos = float4(uv * 2.0 - 1.0, z, 1.0);
|
||||
return pos;
|
||||
}
|
||||
|
||||
Varyings vert(uint vertexID: SV_VertexID)
|
||||
{
|
||||
Varyings o;
|
||||
o.vertex = GetFullScreenTriangleVertexPosition(vertexID);
|
||||
o.uv = GetFullScreenTriangleTexCoord(vertexID);
|
||||
|
||||
return o;
|
||||
}
|
||||
ENDHLSL
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Convert"
|
||||
HLSLPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma enable_d3d11_debug_symbols
|
||||
#pragma target 5.0
|
||||
|
||||
float4x4 _clipToPrevClip;
|
||||
float4 _renderSizeParam;
|
||||
float _cameraFovAngleHor;
|
||||
|
||||
SamplerState samLinearClamp;
|
||||
Texture2D _DepthTexture;
|
||||
Texture2D _MotionVectorTexture;
|
||||
|
||||
float2 decodeVelocityFromTexture(float2 ev)
|
||||
{
|
||||
const float inv_div = 1.0f / (0.499f * 0.5f);
|
||||
float2 dv;
|
||||
dv.xy = ev.xy * inv_div - 32767.0f / 65535.0f * inv_div;
|
||||
//dv.z = uintBitsToFloat((uint(round(ev.z * 65535.0f)) << 16) | uint(round(ev.w * 65535.0f)));
|
||||
return dv;
|
||||
}
|
||||
|
||||
|
||||
float4 frag(Varyings i) : SV_Target
|
||||
{
|
||||
uint2 inputPos = uint2(i.uv * _renderSizeParam.xy);
|
||||
float2 gatherCoord = i.uv - 0.5 * _renderSizeParam.zw;
|
||||
// texture gather to find nearest depth
|
||||
// a b c d
|
||||
// e f g h
|
||||
// i j k l
|
||||
// m n o p
|
||||
//btmLeft mnji
|
||||
//btmRight oplk
|
||||
//topLeft efba
|
||||
//topRight ghdc
|
||||
float4 btmLeft = _DepthTexture.GatherRed(samLinearClamp, gatherCoord, 0);
|
||||
float2 v10 = float2(_renderSizeParam.z * 2.0f, 0.0);
|
||||
float4 btmRight = _DepthTexture.GatherRed(samLinearClamp, (gatherCoord + v10), 0);
|
||||
float2 v12 = float2(0.0, _renderSizeParam.w * 2.0f);
|
||||
float4 topLeft = _DepthTexture.GatherRed(samLinearClamp, (gatherCoord + v12), 0);
|
||||
float2 v14 = float2(_renderSizeParam.z * 2.0f, _renderSizeParam.w * 2.0f);
|
||||
float4 topRight = _DepthTexture.GatherRed(samLinearClamp, (gatherCoord + v14), 0);
|
||||
|
||||
float maxC = max(max(max(btmLeft.z, btmRight.w), topLeft.y), topRight.x);
|
||||
float btmLeft4 = max(max(max(btmLeft.y, btmLeft.x), btmLeft.z), btmLeft.w);
|
||||
float btmLeftMax9 = max(topLeft.x, max(max(maxC, btmLeft4), btmRight.x));
|
||||
|
||||
float depthclip = 0.0;
|
||||
if (maxC > 1.0e-05f)
|
||||
{
|
||||
float btmRight4 = max(max(max(btmRight.y, btmRight.x), btmRight.z), btmRight.w);
|
||||
float topLeft4 = max(max(max(topLeft.y, topLeft.x), topLeft.z), topLeft.w);
|
||||
float topRight4 = max(max(max(topRight.y, topRight.x), topRight.z), topRight.w);
|
||||
|
||||
float Wdepth = 0.0;
|
||||
float Ksep = 1.37e-05f;
|
||||
float Kfov = _cameraFovAngleHor;
|
||||
float diagonal_length = length(_renderSizeParam.xy);
|
||||
float Ksep_Kfov_diagonal = Ksep * Kfov * diagonal_length;
|
||||
|
||||
float Depthsep = Ksep_Kfov_diagonal * (1.0 - maxC);
|
||||
float EPSILON = 1.19e-07f;
|
||||
Wdepth += clamp((Depthsep / (abs(maxC - btmLeft4) + EPSILON)), 0.0, 1.0);
|
||||
Wdepth += clamp((Depthsep / (abs(maxC - btmRight4) + EPSILON)), 0.0, 1.0);
|
||||
Wdepth += clamp((Depthsep / (abs(maxC - topLeft4) + EPSILON)), 0.0, 1.0);
|
||||
Wdepth += clamp((Depthsep / (abs(maxC - topRight4) + EPSILON)), 0.0, 1.0);
|
||||
depthclip = clamp(1.0f - Wdepth * 0.25, 0.0, 1.0);
|
||||
}
|
||||
|
||||
//refer to ue/fsr2 PostProcessFFX_FSR2ConvertVelocity.usf, and using nearest depth for dilated motion
|
||||
|
||||
float4 EncodedVelocity = _MotionVectorTexture.Load(int3(inputPos, 0));
|
||||
|
||||
float2 motion;
|
||||
if (EncodedVelocity.x > 0.0)
|
||||
{
|
||||
motion = EncodedVelocity.xy;//decodeVelocityFromTexture(EncodedVelocity.xy);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef UNITY_UV_STARTS_AT_TOP
|
||||
float2 ScreenPos = float2(2.0f * i.uv.x - 1.0f, 1.0f - 2.0f * i.uv.y);
|
||||
// NDC Y+ down from viewport Y+ up
|
||||
#else
|
||||
float2 ScreenPos = float2(2.0f * i.uv - 1.0f); // NDC Y+ down from viewport Y+ down
|
||||
#endif
|
||||
float3 Position = float3(ScreenPos, btmLeftMax9); //this_clip
|
||||
float4 CurClip = float4(Position, 1.0f);
|
||||
float4 PreClip = _clipToPrevClip[3] + ((_clipToPrevClip[2] * Position.z)
|
||||
+
|
||||
((_clipToPrevClip[1] * ScreenPos.y) + (_clipToPrevClip[0] *
|
||||
ScreenPos.x)));
|
||||
// float4 PreClip = mul(CurClip, _clipToPrevClip);
|
||||
float2 PreScreen = PreClip.xy / PreClip.w;
|
||||
motion = Position.xy - PreScreen;
|
||||
}
|
||||
|
||||
return float4(motion, depthclip, 0.0);
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Upscale"
|
||||
HLSLPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma enable_d3d11_debug_symbols
|
||||
#pragma target 5.0
|
||||
|
||||
float FastLanczos(float base)
|
||||
{
|
||||
float y = base - 1.0f;
|
||||
float y2 = y * y;
|
||||
float y_temp = 0.75f * y + y2;
|
||||
return y_temp * y2;
|
||||
}
|
||||
|
||||
/*
|
||||
UBO description
|
||||
renderSize = {InputResolution.x, InputResolution.y}
|
||||
outputSize = {OutputResolution.x, OutputResolution.y}
|
||||
renderSizeRcp = {1.0 / InputResolution.x, 1.0 / InputResolution.y}
|
||||
outputSizeRcp = {1.0 / OutputResolution.x, 1.0 / OutputResolution.y}
|
||||
_JitterOffset = {jitter.x, jitter.y},
|
||||
_ScaleRatio = {OutputResolution.x / InputResolution.x, min(20.0, pow((OutputResolution.x*OutputResolution.y) / (InputResolution.x*InputResolution.y), 3.0)},
|
||||
angleHor = tan(radians(m_Camera.verticalFOV / 2)) * InputResolution.x / InputResolution.y
|
||||
MinLerpContribution = sameCameraFrmNum? 0.3: 0.0;
|
||||
sameCameraFrmNum //the frame number where camera pose is exactly same with previous frame
|
||||
*/
|
||||
float4x4 _clipToPrevClip;
|
||||
float4 _renderSizeParam;
|
||||
float4 _outputSizeParam;
|
||||
|
||||
|
||||
float2 _JitterOffset;
|
||||
float2 _ScaleRatio;
|
||||
float minLerpContribution;
|
||||
uint sameCameraFrmNum;
|
||||
|
||||
Texture2D _PrevSceneColorTexture;
|
||||
Texture2D _MotionDepthClipAlphaBuffer;
|
||||
Texture2D _InputTexture;
|
||||
SamplerState samLinearClamp;
|
||||
|
||||
fixed4 frag(Varyings i) : SV_Target
|
||||
{
|
||||
float Biasmax_viewportXScale = _ScaleRatio.x;
|
||||
float scalefactor = _ScaleRatio.y;
|
||||
|
||||
float2 Hruv = i.uv;
|
||||
|
||||
precise float2 Jitteruv;
|
||||
Jitteruv.x = clamp(Hruv.x + (_JitterOffset.x * _outputSizeParam.z), 0.0, 1.0);
|
||||
Jitteruv.y = clamp(Hruv.y + (_JitterOffset.y * _outputSizeParam.w), 0.0, 1.0);
|
||||
|
||||
int2 InputPos = int2(Jitteruv * _renderSizeParam.xy);
|
||||
|
||||
float3 mda = _MotionDepthClipAlphaBuffer.SampleLevel(samLinearClamp, Jitteruv, 0.0).xyz;
|
||||
float2 Motion = mda.xy;
|
||||
|
||||
float2 PrevUV;
|
||||
PrevUV.x = clamp(-0.5 * Motion.x + Hruv.x, 0.0, 1.0);
|
||||
#ifdef UNITY_UV_STARTS_AT_TOP
|
||||
PrevUV.y = clamp(0.5 * Motion.y + Hruv.y, 0.0, 1.0); // NDC Y+ down from viewport Y+ up
|
||||
#else
|
||||
PrevUV.y = clamp(-0.5 * Motion.y + Hruv.y, 0.0, 1.0); // NDC Y+ down from viewport Y+ down
|
||||
#endif
|
||||
|
||||
float depthfactor = mda.z;
|
||||
|
||||
float3 HistoryColor = _PrevSceneColorTexture.SampleLevel(samLinearClamp, PrevUV, 0.0).xyz;
|
||||
|
||||
/////upsample and compute box
|
||||
float4 Upsampledcw = 0.0;
|
||||
float biasmax = Biasmax_viewportXScale;
|
||||
float biasmin = max(1.0f, 0.3 + 0.3 * biasmax);
|
||||
float biasfactor = 0.25f * depthfactor;
|
||||
float kernelbias = lerp(biasmax, biasmin, biasfactor);
|
||||
float motion_viewport_len = length(Motion * _outputSizeParam.xy);
|
||||
float curvebias = lerp(-2.0, -3.0, clamp(motion_viewport_len * 0.02, 0.0, 1.0));
|
||||
|
||||
float3 rectboxcenter = 0.0;
|
||||
float3 rectboxvar = 0.0;
|
||||
float rectboxweight = 0.0;
|
||||
float2 srcpos = float2(InputPos) + 0.5 - _JitterOffset;
|
||||
|
||||
kernelbias *= 0.5f;
|
||||
float kernelbias2 = kernelbias * kernelbias;
|
||||
float2 srcpos_srcOutputPos = srcpos - Hruv * _renderSizeParam.xy;
|
||||
//srcOutputPos = Hruv * renderSize;
|
||||
float3 rectboxmin;
|
||||
float3 rectboxmax;
|
||||
float3 topMid = _InputTexture.Load(int3(InputPos + int2(0, 1), 0)).xyz;
|
||||
{
|
||||
float3 samplecolor = topMid;
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(0.0, 1.0);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = samplecolor;
|
||||
rectboxmax = samplecolor;
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
float3 rightMid = _InputTexture.Load(int3(InputPos + int2(1, 0), 0)).xyz;
|
||||
{
|
||||
float3 samplecolor = rightMid;
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(1.0, 0.0);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
float3 leftMid = _InputTexture.Load(int3(InputPos + int2(-1, 0), 0)).xyz;
|
||||
{
|
||||
float3 samplecolor = leftMid;
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(-1.0, 0.0);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
float3 centerMid = _InputTexture.Load(int3(InputPos + int2(0, 0), 0)).xyz;
|
||||
{
|
||||
float3 samplecolor = centerMid;
|
||||
float2 baseoffset = srcpos_srcOutputPos;
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
float3 btmMid = _InputTexture.Load(int3(InputPos + int2(0, -1), 0)).xyz;
|
||||
{
|
||||
float3 samplecolor = btmMid;
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(0.0, -1.0);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
|
||||
if (sameCameraFrmNum != 0u) //maybe disable this for ultra performance
|
||||
if (false) //maybe disable this for ultra performance, true could generate more realistic output
|
||||
{
|
||||
{
|
||||
float3 topRight = _InputTexture.Load(int3(InputPos + int2(1, 1), 0)).xyz;
|
||||
float3 samplecolor = topRight;
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(1.0, 1.0);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0, 1.0);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
{
|
||||
float3 topLeft = _InputTexture.Load(int3(InputPos + int2(-1, 1), 0)).xyz;
|
||||
float3 samplecolor = topLeft;
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(-1.0, 1.0);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
{
|
||||
float3 btmRight = _InputTexture.Load(int3(InputPos + int2(1, -1), 0)).xyz;
|
||||
float3 samplecolor = btmRight;
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(1.0, -1.0);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
|
||||
{
|
||||
float3 btmLeft = _InputTexture.Load(int3(InputPos + int2(-1, -1), 0)).xyz;
|
||||
float3 samplecolor = btmLeft;
|
||||
float2 baseoffset = srcpos_srcOutputPos + float2(-1.0, -1.0);
|
||||
float baseoffset_dot = dot(baseoffset, baseoffset);
|
||||
float base = clamp(baseoffset_dot * kernelbias2, 0.0f, 1.0f);
|
||||
float weight = FastLanczos(base);
|
||||
Upsampledcw += float4(samplecolor * weight, weight);
|
||||
float boxweight = exp(baseoffset_dot * curvebias);
|
||||
rectboxmin = min(rectboxmin, samplecolor);
|
||||
rectboxmax = max(rectboxmax, samplecolor);
|
||||
float3 wsample = samplecolor * boxweight;
|
||||
rectboxcenter += wsample;
|
||||
rectboxvar += (samplecolor * wsample);
|
||||
rectboxweight += boxweight;
|
||||
}
|
||||
}
|
||||
|
||||
rectboxweight = 1.0 / rectboxweight;
|
||||
rectboxcenter *= rectboxweight;
|
||||
rectboxvar *= rectboxweight;
|
||||
rectboxvar = sqrt(abs(rectboxvar - rectboxcenter * rectboxcenter));
|
||||
|
||||
Upsampledcw.xyz = clamp(Upsampledcw.xyz / Upsampledcw.w, rectboxmin - 0.075,
|
||||
rectboxmax + 0.075);
|
||||
Upsampledcw.w = Upsampledcw.w * (1.0f / 3.0f);
|
||||
|
||||
float baseupdate = 1.0f - depthfactor;
|
||||
baseupdate = min(baseupdate, lerp(baseupdate, Upsampledcw.w * 10.0f, clamp(10.0f * motion_viewport_len, 0.0, 1.0)));
|
||||
baseupdate = min(baseupdate, lerp(baseupdate, Upsampledcw.w, clamp(motion_viewport_len * 0.05f, 0.0, 1.0)));
|
||||
float basealpha = baseupdate;
|
||||
|
||||
const float EPSILON = 1.192e-07f;
|
||||
float boxscale = max(depthfactor, clamp(motion_viewport_len * 0.05f, 0.0, 1.0));
|
||||
float boxsize = lerp(scalefactor, 1.0f, boxscale);
|
||||
float3 sboxvar = rectboxvar * boxsize;
|
||||
float3 boxmin = rectboxcenter - sboxvar;
|
||||
float3 boxmax = rectboxcenter + sboxvar;
|
||||
rectboxmax = min(rectboxmax, boxmax);
|
||||
rectboxmin = max(rectboxmin, boxmin);
|
||||
|
||||
float3 clampedcolor = clamp(HistoryColor, rectboxmin, rectboxmax);
|
||||
float startLerpValue = minLerpContribution;
|
||||
if ((abs(mda.x) + abs(mda.y)) > 0.000001) startLerpValue = 0.0;
|
||||
float lerpcontribution = (any((rectboxmin > HistoryColor)) || any((HistoryColor > rectboxmax)))
|
||||
? startLerpValue
|
||||
: 1.0f;
|
||||
|
||||
HistoryColor = lerp(clampedcolor, HistoryColor, clamp(lerpcontribution, 0.0, 1.0));
|
||||
float basemin = min(basealpha, 0.1f);
|
||||
basealpha = lerp(basemin, basealpha, clamp(lerpcontribution, 0.0, 1.0));
|
||||
|
||||
////blend color
|
||||
float alphasum = max(EPSILON, basealpha + Upsampledcw.w);
|
||||
float alpha = clamp(Upsampledcw.w / alphasum, 0.0, 1.0);
|
||||
|
||||
Upsampledcw.xyz = lerp(HistoryColor, Upsampledcw.xyz, alpha);
|
||||
|
||||
return float4(Upsampledcw.xyz, 0.0);
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4a59e967fe65fd48bb28b2a4b05eb3e
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,30 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:yousandi.cn,2023:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: MRP_SR_GSR1
|
||||
m_Shader: {fileID: 4800000, guid: bfe84e33ceb6d1147a989c43cec74049, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- UseEdgeDirection
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats: []
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
||||
@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a73f6fa069dd14a42b40cbb01bae63b4
|
||||
guid: d57e64d5723127243b429034bed82c7d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,30 @@
|
||||
%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: MRP_SR_GSR2
|
||||
m_Shader: {fileID: 4800000, guid: c4a59e967fe65fd48bb28b2a4b05eb3e, 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: []
|
||||
m_Ints: []
|
||||
m_Floats: []
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4eb9ff6b5314098428cfa0be7e36ccda
|
||||
guid: faa906817c0647f42a0cec70faeb91c1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,6 +1,3 @@
|
||||
|
||||
using System.Reflection;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using X.Rendering.Feature;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
@ -12,12 +9,22 @@ namespace UnityEngine.Rendering.Universal
|
||||
[SerializeField]
|
||||
private ERenderScale sSRenderScale;
|
||||
|
||||
public ERenderScale SSRenderScale
|
||||
public ERenderScale SSRenderScale => sSRenderScale;
|
||||
|
||||
public ESuperResolution SuperResolution => superResolution;
|
||||
|
||||
private void UpdateSSSettings()
|
||||
{
|
||||
get => sSRenderScale; set
|
||||
var renderer = GetRenderer(this.m_DefaultRendererIndex);
|
||||
foreach (var item in renderer.rendererFeatures)
|
||||
{
|
||||
sSRenderScale = value;
|
||||
switch (value)
|
||||
if (item is ISuperResolutionFeature isr)
|
||||
{
|
||||
isr.SetSR(superResolution);
|
||||
}
|
||||
}
|
||||
|
||||
switch (sSRenderScale)
|
||||
{
|
||||
case ERenderScale.Factor1:
|
||||
this.renderScale = 1.0f;
|
||||
@ -40,69 +47,13 @@ namespace UnityEngine.Rendering.Universal
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ESuperResolution SuperResolution
|
||||
{
|
||||
get => superResolution; set
|
||||
{
|
||||
superResolution = value;
|
||||
var renderer = GetRenderer(this.m_DefaultRendererIndex);
|
||||
foreach (var item in renderer.rendererFeatures)
|
||||
{
|
||||
if (item is ISuperResolution isr)
|
||||
{
|
||||
isr.SetSR(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace UnityEditor.Rendering.Universal
|
||||
{
|
||||
internal class SerializedUniversalRenderPipelineAsset
|
||||
{
|
||||
public UniversalRenderPipelineAsset asset { get; }
|
||||
public SerializedObject serializedObject { get; }
|
||||
public SerializedUniversalRenderPipelineAsset(SerializedObject serializedObject)
|
||||
{
|
||||
asset = serializedObject.targetObject as UniversalRenderPipelineAsset;
|
||||
this.serializedObject = serializedObject;
|
||||
|
||||
}
|
||||
public void Update()
|
||||
{
|
||||
serializedObject.Update();
|
||||
}
|
||||
|
||||
|
||||
public void Apply()
|
||||
protected override void OnValidate()
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CustomEditor(typeof(UniversalRenderPipelineAsset)), CanEditMultipleObjects]
|
||||
public class SuperRenderingAssetEditor : Editor
|
||||
{
|
||||
private SerializedUniversalRenderPipelineAsset m_SerializedURPAsset;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
m_SerializedURPAsset.Update();
|
||||
//UniversalRenderPipelineAssetUI.Inspector.Draw(m_SerializedURPAsset, this);
|
||||
m_SerializedURPAsset.Apply();
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
var t = Assembly.GetAssembly(typeof(UnityEditor.Rendering.Universal.SceneViewDrawMode)).GetType("UniversalRenderPipelineAssetUI");
|
||||
m_SerializedURPAsset = new SerializedUniversalRenderPipelineAsset(serializedObject);
|
||||
base.OnValidate();
|
||||
UpdateSSSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -66,6 +66,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
/// </summary>
|
||||
internal enum ImageUpscalingFilter
|
||||
{
|
||||
None,
|
||||
/// Bilinear filtering
|
||||
Linear,
|
||||
|
||||
|
||||
@ -1453,7 +1453,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
|
||||
// NOTE: TAA and motion vector dependencies added here to share between Execute and Render (Graph) paths.
|
||||
// TAA in postprocess requires motion to function.
|
||||
if (renderingData.cameraData.IsTemporalAAEnabled())
|
||||
//if (renderingData.cameraData.IsTemporalAAEnabled())
|
||||
inputSummary.requiresMotionVectors = true;
|
||||
|
||||
// Motion vectors imply depth
|
||||
|
||||
@ -26,6 +26,7 @@ GraphicsSettings:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_VideoShadersIncludeMode: 2
|
||||
m_LengthOfAlwaysIncludedShadersInInspector: 1
|
||||
m_AlwaysIncludedShaders:
|
||||
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
@ -51,12 +52,16 @@ GraphicsSettings:
|
||||
m_FogKeepExp: 0
|
||||
m_FogKeepExp2: 0
|
||||
m_AlbedoSwatchInfos: []
|
||||
m_ModelImportDefaultMaterial: {fileID: 0}
|
||||
m_LightsUseLinearIntensity: 1
|
||||
m_LightsUseColorTemperature: 1
|
||||
m_DefaultRenderingLayerMask: 1
|
||||
m_LogWhenShaderIsCompiled: 0
|
||||
m_NoExactGfxBuffer: 0
|
||||
m_SRPDefaultSettings:
|
||||
UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: bdede76083021864d8ff8bf23b2f37f1, type: 2}
|
||||
m_LightProbeOutsideHullStrategy: 0
|
||||
m_CameraRelativeLightCulling: 0
|
||||
m_CameraRelativeShadowCulling: 0
|
||||
m_GenerateGeometryBuffer: 0
|
||||
m_EnableGDRP: 0
|
||||
|
||||
@ -286,7 +286,8 @@ PlayerSettings:
|
||||
androidSupportedAspectRatio: 1
|
||||
androidMaxAspectRatio: 2.1
|
||||
applicationIdentifier:
|
||||
Android: com.unity.template.urpsample
|
||||
Android: com.DefaultCompany.TJURP
|
||||
OpenHarmony: com.DefaultCompany.TJURP
|
||||
Standalone: com.unity.template.urp-sample
|
||||
iPhone: com.unity.template.urp-sample
|
||||
buildNumber:
|
||||
@ -294,7 +295,7 @@ PlayerSettings:
|
||||
VisionOS: 0
|
||||
iPhone: 0
|
||||
tvOS: 0
|
||||
overrideDefaultApplicationIdentifier: 1
|
||||
overrideDefaultApplicationIdentifier: 0
|
||||
AndroidBundleVersionCode: 1
|
||||
AndroidMinSdkVersion: 23
|
||||
AndroidTargetSdkVersion: 0
|
||||
@ -1064,9 +1065,10 @@ PlayerSettings:
|
||||
webGLMemoryGeometricGrowthCap: 96
|
||||
webGLPowerPreference: 2
|
||||
scriptingDefineSymbols:
|
||||
Android: STARTER_ASSETS_PACKAGES_CHECKED
|
||||
Android: STARTER_ASSETS_PACKAGES_CHECKED;RENDER_GRAPH_ENABLED
|
||||
Nintendo Switch: STARTER_ASSETS_PACKAGES_CHECKED
|
||||
Standalone: STARTER_ASSETS_PACKAGES_CHECKED;URP_EXPERIMENTAL_TAA_ENABLE
|
||||
OpenHarmony: RENDER_GRAPH_ENABLED
|
||||
Standalone: STARTER_ASSETS_PACKAGES_CHECKED;URP_EXPERIMENTAL_TAA_ENABLE;RENDER_GRAPH_ENABLED
|
||||
iPhone: STARTER_ASSETS_PACKAGES_CHECKED
|
||||
additionalCompilerArguments: {}
|
||||
platformArchitecture: {}
|
||||
|
||||
@ -59,116 +59,6 @@ QualitySettings:
|
||||
excludedTargetPlatforms:
|
||||
- Nintendo Switch
|
||||
- Standalone
|
||||
- serializedVersion: 3
|
||||
name: PC Low
|
||||
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: 0
|
||||
skinWeights: 2
|
||||
globalTextureMipmapLimit: 0
|
||||
textureMipmapLimitSettings: []
|
||||
anisotropicTextures: 0
|
||||
antiAliasing: 0
|
||||
softParticles: 0
|
||||
softVegetation: 1
|
||||
realtimeReflectionProbes: 0
|
||||
billboardsFaceCameraPosition: 0
|
||||
useLegacyDetailDistribution: 1
|
||||
vSyncCount: 0
|
||||
realtimeGICPUUsage: 25
|
||||
lodBias: 0.25
|
||||
maximumLODLevel: 1
|
||||
enableLODCrossFade: 1
|
||||
streamingMipmapsActive: 0
|
||||
streamingMipmapsAddAllCameras: 1
|
||||
streamingMipmapsMemoryBudget: 512
|
||||
streamingMipmapsRenderersPerFrame: 512
|
||||
streamingMipmapsMaxLevelReduction: 2
|
||||
streamingMipmapsMaxFileIORequests: 1024
|
||||
particleRaycastBudget: 256
|
||||
asyncUploadTimeSlice: 2
|
||||
asyncUploadBufferSize: 16
|
||||
asyncUploadPersistentBuffer: 1
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
customRenderPipeline: {fileID: 11400000, guid: 4eb9ff6b5314098428cfa0be7e36ccda, type: 2}
|
||||
terrainQualityOverrides: 0
|
||||
terrainPixelError: 1
|
||||
terrainDetailDensityScale: 1
|
||||
terrainBasemapDistance: 1000
|
||||
terrainDetailDistance: 80
|
||||
terrainTreeDistance: 5000
|
||||
terrainBillboardStart: 50
|
||||
terrainFadeLength: 5
|
||||
terrainMaxTrees: 50
|
||||
vgPersistentBufferSize: 256
|
||||
vgStreamingBufferSize: 512
|
||||
excludedTargetPlatforms:
|
||||
- Android
|
||||
- iPhone
|
||||
- Standalone
|
||||
- GameCoreXboxOne
|
||||
- Nintendo Switch
|
||||
- serializedVersion: 3
|
||||
name: PC 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
|
||||
skinWeights: 4
|
||||
globalTextureMipmapLimit: 0
|
||||
textureMipmapLimitSettings: []
|
||||
anisotropicTextures: 2
|
||||
antiAliasing: 0
|
||||
softParticles: 0
|
||||
softVegetation: 1
|
||||
realtimeReflectionProbes: 0
|
||||
billboardsFaceCameraPosition: 1
|
||||
useLegacyDetailDistribution: 1
|
||||
vSyncCount: 0
|
||||
realtimeGICPUUsage: 100
|
||||
lodBias: 2
|
||||
maximumLODLevel: 0
|
||||
enableLODCrossFade: 1
|
||||
streamingMipmapsActive: 0
|
||||
streamingMipmapsAddAllCameras: 1
|
||||
streamingMipmapsMemoryBudget: 512
|
||||
streamingMipmapsRenderersPerFrame: 512
|
||||
streamingMipmapsMaxLevelReduction: 2
|
||||
streamingMipmapsMaxFileIORequests: 1024
|
||||
particleRaycastBudget: 256
|
||||
asyncUploadTimeSlice: 2
|
||||
asyncUploadBufferSize: 16
|
||||
asyncUploadPersistentBuffer: 1
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
customRenderPipeline: {fileID: 11400000, guid: 4b83569d67af61e458304325a23e5dfd, type: 2}
|
||||
terrainQualityOverrides: 0
|
||||
terrainPixelError: 1
|
||||
terrainDetailDensityScale: 1
|
||||
terrainBasemapDistance: 1000
|
||||
terrainDetailDistance: 80
|
||||
terrainTreeDistance: 5000
|
||||
terrainBillboardStart: 50
|
||||
terrainFadeLength: 5
|
||||
terrainMaxTrees: 50
|
||||
vgPersistentBufferSize: 256
|
||||
vgStreamingBufferSize: 512
|
||||
excludedTargetPlatforms:
|
||||
- Android
|
||||
- Nintendo Switch
|
||||
- iPhone
|
||||
m_TextureMipmapLimitGroupNames: []
|
||||
m_PerPlatformDefaultQuality:
|
||||
Android: 0
|
||||
@ -179,10 +69,10 @@ QualitySettings:
|
||||
PS4: 0
|
||||
Server: 0
|
||||
Stadia: 0
|
||||
Standalone: 2
|
||||
Standalone: 0
|
||||
WebGL: 0
|
||||
WeixinMiniGame: 1
|
||||
WeixinMiniGame: 0
|
||||
Windows Store Apps: 0
|
||||
XboxOne: 0
|
||||
iPhone: 1
|
||||
iPhone: 0
|
||||
tvOS: 0
|
||||
|
||||
@ -6,8 +6,20 @@ EditorUserSettings:
|
||||
serializedVersion: 4
|
||||
m_ConfigSettings:
|
||||
RecentlyUsedSceneGuid-0:
|
||||
value: 0257020252075b0b5a0b5b2345715a444f4e402b7a2d22667f7c4b35e7b16769
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 5a57555407545f0b5e0f5f764277594914161e2b787977692b714e64e4b2363b
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-2:
|
||||
value: 57050d5004060d590f56087046700f4445164c7e7a7824312e7c4e6bb0e1376d
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-3:
|
||||
value: 01060c075556080e0956597315775b14104e4179282b25662b2c1c31b7b63068
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-4:
|
||||
value: 5b00515154055e035459547042705a44154f1e2c2e2e7f677e7d4567e1b9376d
|
||||
flags: 0
|
||||
vcSharedLogLevel:
|
||||
value: 0d5e400f0650
|
||||
flags: 0
|
||||
|
||||
@ -14,14 +14,14 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_PixelRect:
|
||||
serializedVersion: 2
|
||||
x: 122
|
||||
y: 279
|
||||
width: 891
|
||||
height: 603
|
||||
x: 2815
|
||||
y: 219
|
||||
width: 1934
|
||||
height: 971
|
||||
m_ShowMode: 0
|
||||
m_Title: Build Settings
|
||||
m_Title: Frame Debugger
|
||||
m_RootView: {fileID: 4}
|
||||
m_MinSize: {x: 640, y: 601}
|
||||
m_MinSize: {x: 1000, y: 521}
|
||||
m_MaxSize: {x: 4000, y: 4021}
|
||||
m_Maximized: 0
|
||||
--- !u!114 &2
|
||||
@ -43,8 +43,8 @@ MonoBehaviour:
|
||||
width: 2560
|
||||
height: 1349
|
||||
m_ShowMode: 4
|
||||
m_Title: Console
|
||||
m_RootView: {fileID: 9}
|
||||
m_Title: Game
|
||||
m_RootView: {fileID: 11}
|
||||
m_MinSize: {x: 875, y: 300}
|
||||
m_MaxSize: {x: 10000, y: 10000}
|
||||
m_Maximized: 1
|
||||
@ -58,20 +58,20 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: BuildPlayerWindow
|
||||
m_Name: FrameDebuggerWindow
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 891
|
||||
height: 603
|
||||
m_MinSize: {x: 640, y: 601}
|
||||
width: 1934
|
||||
height: 971
|
||||
m_MinSize: {x: 1000, y: 521}
|
||||
m_MaxSize: {x: 4000, y: 4021}
|
||||
m_ActualView: {fileID: 15}
|
||||
m_ActualView: {fileID: 17}
|
||||
m_Panes:
|
||||
- {fileID: 15}
|
||||
- {fileID: 17}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &4
|
||||
@ -92,14 +92,66 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 891
|
||||
height: 603
|
||||
m_MinSize: {x: 640, y: 601}
|
||||
width: 1934
|
||||
height: 971
|
||||
m_MinSize: {x: 1000, y: 521}
|
||||
m_MaxSize: {x: 4000, y: 4021}
|
||||
vertical: 0
|
||||
controlID: 2540
|
||||
controlID: 14
|
||||
draggingID: 0
|
||||
--- !u!114 &5
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
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: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: ConsoleWindow
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 1300
|
||||
y: 0
|
||||
width: 650
|
||||
height: 529
|
||||
m_MinSize: {x: 102, y: 121}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 23}
|
||||
m_Panes:
|
||||
- {fileID: 23}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &6
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
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: 12010, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 10}
|
||||
- {fileID: 5}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 770
|
||||
width: 1950
|
||||
height: 529
|
||||
m_MinSize: {x: 200, y: 50}
|
||||
m_MaxSize: {x: 16192, y: 8096}
|
||||
vertical: 0
|
||||
controlID: 126
|
||||
draggingID: 0
|
||||
--- !u!114 &7
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -112,8 +164,8 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 12}
|
||||
- {fileID: 6}
|
||||
- {fileID: 14}
|
||||
- {fileID: 8}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
@ -123,9 +175,9 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 300, y: 100}
|
||||
m_MaxSize: {x: 24288, y: 16192}
|
||||
vertical: 0
|
||||
controlID: 261
|
||||
controlID: 162
|
||||
draggingID: 0
|
||||
--- !u!114 &6
|
||||
--- !u!114 &8
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -140,18 +192,18 @@ MonoBehaviour:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 1863
|
||||
x: 1950
|
||||
y: 0
|
||||
width: 697
|
||||
width: 610
|
||||
height: 1299
|
||||
m_MinSize: {x: 277, y: 71}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 17}
|
||||
m_MinSize: {x: 276, y: 71}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 19}
|
||||
m_Panes:
|
||||
- {fileID: 17}
|
||||
- {fileID: 19}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &7
|
||||
--- !u!114 &9
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -168,16 +220,16 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 462
|
||||
width: 483
|
||||
height: 770
|
||||
m_MinSize: {x: 201, y: 221}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 18}
|
||||
m_ActualView: {fileID: 20}
|
||||
m_Panes:
|
||||
- {fileID: 18}
|
||||
- {fileID: 20}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &8
|
||||
--- !u!114 &10
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -187,24 +239,23 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: ConsoleWindow
|
||||
m_Name: ProjectBrowser
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 770
|
||||
width: 1863
|
||||
y: 0
|
||||
width: 1300
|
||||
height: 529
|
||||
m_MinSize: {x: 101, y: 121}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 21}
|
||||
m_MinSize: {x: 231, y: 271}
|
||||
m_MaxSize: {x: 10001, y: 10021}
|
||||
m_ActualView: {fileID: 18}
|
||||
m_Panes:
|
||||
- {fileID: 16}
|
||||
- {fileID: 21}
|
||||
m_Selected: 1
|
||||
- {fileID: 18}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &9
|
||||
--- !u!114 &11
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -217,9 +268,9 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 10}
|
||||
- {fileID: 5}
|
||||
- {fileID: 11}
|
||||
- {fileID: 12}
|
||||
- {fileID: 7}
|
||||
- {fileID: 13}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
@ -232,7 +283,7 @@ MonoBehaviour:
|
||||
m_TopViewHeight: 30
|
||||
m_UseBottomView: 1
|
||||
m_BottomViewHeight: 20
|
||||
--- !u!114 &10
|
||||
--- !u!114 &12
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -253,8 +304,8 @@ MonoBehaviour:
|
||||
height: 30
|
||||
m_MinSize: {x: 0, y: 0}
|
||||
m_MaxSize: {x: 0, y: 0}
|
||||
m_LastLoadedLayoutName: TutorialLayout
|
||||
--- !u!114 &11
|
||||
m_LastLoadedLayoutName:
|
||||
--- !u!114 &13
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -275,7 +326,7 @@ MonoBehaviour:
|
||||
height: 20
|
||||
m_MinSize: {x: 0, y: 0}
|
||||
m_MaxSize: {x: 0, y: 0}
|
||||
--- !u!114 &12
|
||||
--- !u!114 &14
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -288,20 +339,20 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 13}
|
||||
- {fileID: 8}
|
||||
- {fileID: 15}
|
||||
- {fileID: 6}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1863
|
||||
width: 1950
|
||||
height: 1299
|
||||
m_MinSize: {x: 200, y: 100}
|
||||
m_MaxSize: {x: 16192, y: 16192}
|
||||
vertical: 1
|
||||
controlID: 236
|
||||
controlID: 39
|
||||
draggingID: 0
|
||||
--- !u!114 &13
|
||||
--- !u!114 &15
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -314,20 +365,20 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 7}
|
||||
- {fileID: 14}
|
||||
- {fileID: 9}
|
||||
- {fileID: 16}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1863
|
||||
width: 1950
|
||||
height: 770
|
||||
m_MinSize: {x: 200, y: 50}
|
||||
m_MaxSize: {x: 16192, y: 8096}
|
||||
vertical: 0
|
||||
controlID: 237
|
||||
controlID: 40
|
||||
draggingID: 0
|
||||
--- !u!114 &14
|
||||
--- !u!114 &16
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -342,19 +393,19 @@ MonoBehaviour:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 462
|
||||
x: 483
|
||||
y: 0
|
||||
width: 1401
|
||||
width: 1467
|
||||
height: 770
|
||||
m_MinSize: {x: 202, y: 221}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 20}
|
||||
m_ActualView: {fileID: 22}
|
||||
m_Panes:
|
||||
- {fileID: 19}
|
||||
- {fileID: 20}
|
||||
- {fileID: 21}
|
||||
- {fileID: 22}
|
||||
m_Selected: 1
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &15
|
||||
--- !u!114 &17
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -363,21 +414,21 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12043, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Script: {fileID: 13202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_MinSize: {x: 640, y: 580}
|
||||
m_MinSize: {x: 1000, y: 500}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_TitleContent:
|
||||
m_Text: Build Settings
|
||||
m_Text: Frame Debugger
|
||||
m_Image: {fileID: 0}
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 122
|
||||
y: 279
|
||||
width: 891
|
||||
height: 582
|
||||
x: 2815
|
||||
y: 219
|
||||
width: 1934
|
||||
height: 950
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -388,11 +439,12 @@ MonoBehaviour:
|
||||
m_LastAppliedPresetName: Default
|
||||
m_SaveData: []
|
||||
m_OverlaysVisible: 1
|
||||
m_TreeWidth: 337.92
|
||||
m_TreeViewState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs:
|
||||
m_SelectedIDs: 1f000000
|
||||
m_LastClickedID: 31
|
||||
m_ExpandedIDs: e4ffffffe5ffffffe9ffffffebffffffecfffffff5fffffff8fffffffdfffffffeffffff00000000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -410,7 +462,7 @@ MonoBehaviour:
|
||||
m_IsRenamingFilename: 0
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_SearchString:
|
||||
--- !u!114 &16
|
||||
--- !u!114 &18
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -432,7 +484,7 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 843
|
||||
width: 1862
|
||||
width: 1299
|
||||
height: 508
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
@ -455,24 +507,24 @@ MonoBehaviour:
|
||||
m_SkipHidden: 0
|
||||
m_SearchArea: 1
|
||||
m_Folders:
|
||||
- Assets/Settings
|
||||
- Packages/com.unity.render-pipelines.universal/Runtime/SuperRendering/SR/Shader
|
||||
m_Globs: []
|
||||
m_OriginalText:
|
||||
m_ImportLogFlags: 0
|
||||
m_FilterByTypeIntersection: 0
|
||||
m_ViewMode: 1
|
||||
m_StartGridSize: 64
|
||||
m_StartGridSize: 16
|
||||
m_LastFolders:
|
||||
- Assets/Settings
|
||||
m_LastFoldersGridSize: -1
|
||||
- Packages/com.unity.render-pipelines.universal/Runtime/SuperRendering/SR/Shader
|
||||
m_LastFoldersGridSize: 16
|
||||
m_LastProjectPath: G:\TJURP
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: 00270100
|
||||
m_LastClickedID: 75520
|
||||
m_ExpandedIDs: 00000000fc26010000ca9a3b
|
||||
scrollPos: {x: 0, y: 456}
|
||||
m_SelectedIDs: 30530000
|
||||
m_LastClickedID: 21296
|
||||
m_ExpandedIDs: 00000000284500005c45000068450000344600008c4600004447000060480000e84a0000104c0000144e0000e84f0000649a010000ca9a3bffffff7f
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -488,7 +540,7 @@ MonoBehaviour:
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 1
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_ClientGUIView: {fileID: 10}
|
||||
m_SearchString:
|
||||
m_CreateAssetUtility:
|
||||
m_EndAction: {fileID: 0}
|
||||
@ -500,7 +552,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 00000000fc26010000ca9a3bffffff7f
|
||||
m_ExpandedIDs: 00000000cc4400002845000068450000344600008c4600004447000060480000e84a0000104c0000144e0000e84f0000649a0100
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -525,10 +577,10 @@ MonoBehaviour:
|
||||
m_Icon: {fileID: 0}
|
||||
m_ResourceFile:
|
||||
m_ListAreaState:
|
||||
m_SelectedInstanceIDs: 00270100
|
||||
m_LastClickedInstanceID: 75520
|
||||
m_SelectedInstanceIDs:
|
||||
m_LastClickedInstanceID: 0
|
||||
m_HadKeyboardFocusLastEvent: 1
|
||||
m_ExpandedInstanceIDs: c6230000
|
||||
m_ExpandedInstanceIDs: c623000000000000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -544,7 +596,7 @@ MonoBehaviour:
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 1
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_ClientGUIView: {fileID: 10}
|
||||
m_CreateAssetUtility:
|
||||
m_EndAction: {fileID: 0}
|
||||
m_InstanceID: 0
|
||||
@ -553,10 +605,10 @@ MonoBehaviour:
|
||||
m_ResourceFile:
|
||||
m_NewAssetIndexInList: -1
|
||||
m_ScrollPosition: {x: 0, y: 0}
|
||||
m_GridSize: 64
|
||||
m_GridSize: 16
|
||||
m_SkipHiddenPackages: 0
|
||||
m_DirectoriesAreaWidth: 207
|
||||
--- !u!114 &17
|
||||
--- !u!114 &19
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -576,9 +628,9 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 1863
|
||||
x: 1950
|
||||
y: 73
|
||||
width: 696
|
||||
width: 609
|
||||
height: 1278
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
@ -593,7 +645,7 @@ MonoBehaviour:
|
||||
m_ObjectsLockedBeforeSerialization: []
|
||||
m_InstanceIDsLockedBeforeSerialization:
|
||||
m_PreviewResizer:
|
||||
m_CachedPref: 160
|
||||
m_CachedPref: 482
|
||||
m_ControlHash: -371814159
|
||||
m_PrefName: Preview_InspectorPreview
|
||||
m_LastInspectedObjectInstanceID: -1
|
||||
@ -603,7 +655,7 @@ MonoBehaviour:
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_PreviewWindow: {fileID: 0}
|
||||
--- !u!114 &18
|
||||
--- !u!114 &20
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -625,7 +677,7 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 73
|
||||
width: 461
|
||||
width: 482
|
||||
height: 749
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
@ -640,9 +692,9 @@ MonoBehaviour:
|
||||
m_SceneHierarchy:
|
||||
m_TreeViewState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: 00270100
|
||||
m_SelectedIDs: 48030000
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 9640feff42fbffff
|
||||
m_ExpandedIDs: 8e95fdff
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -658,7 +710,7 @@ MonoBehaviour:
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 0
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_ClientGUIView: {fileID: 9}
|
||||
m_SearchString:
|
||||
m_ExpandedScenes: []
|
||||
m_CurrenRootInstanceID: 0
|
||||
@ -666,7 +718,7 @@ MonoBehaviour:
|
||||
m_IsLocked: 0
|
||||
m_CurrentSortingName: TransformSorting
|
||||
m_WindowGUID: 4c969a2b90040154d917609493e03593
|
||||
--- !u!114 &19
|
||||
--- !u!114 &21
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -686,10 +738,10 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 365.33334
|
||||
y: 72.66667
|
||||
width: 1102
|
||||
height: 777
|
||||
x: 483
|
||||
y: 73
|
||||
width: 1465
|
||||
height: 749
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -704,8 +756,8 @@ MonoBehaviour:
|
||||
floating: 0
|
||||
collapsed: 0
|
||||
displayed: 1
|
||||
snapOffset: {x: 0, y: 0}
|
||||
snapOffsetDelta: {x: -160, y: -26.666687}
|
||||
snapOffset: {x: -166, y: -26}
|
||||
snapOffsetDelta: {x: -5, y: 0}
|
||||
snapCorner: 3
|
||||
id: Tool Settings
|
||||
index: 0
|
||||
@ -1063,6 +1115,19 @@ MonoBehaviour:
|
||||
layout: 4
|
||||
size: {x: 0, y: 0}
|
||||
sizeOverriden: 0
|
||||
- dockPosition: 1
|
||||
containerId: overlay-container--right
|
||||
floating: 0
|
||||
collapsed: 0
|
||||
displayed: 1
|
||||
snapOffset: {x: 48, y: 48}
|
||||
snapOffsetDelta: {x: 0, y: 0}
|
||||
snapCorner: 0
|
||||
id: UnityEditor.SceneViewCameraOverlay
|
||||
index: 10
|
||||
layout: 4
|
||||
size: {x: 0, y: 0}
|
||||
sizeOverriden: 0
|
||||
m_OverlaysVisible: 1
|
||||
m_WindowGUID: cc27987af1a868c49b0894db9c0f5429
|
||||
m_Gizmos: 1
|
||||
@ -1074,9 +1139,9 @@ MonoBehaviour:
|
||||
m_PlayAudio: 0
|
||||
m_AudioPlay: 0
|
||||
m_Position:
|
||||
m_Target: {x: -2.6114657, y: 2.6320024, z: -14.458087}
|
||||
m_Target: {x: 0.3252655, y: 6.390328, z: -98.436806}
|
||||
speed: 2
|
||||
m_Value: {x: -2.6114657, y: 2.6320024, z: -14.458087}
|
||||
m_Value: {x: 0.3252655, y: 6.390328, z: -98.436806}
|
||||
m_RenderMode: 0
|
||||
m_CameraMode:
|
||||
drawMode: 0
|
||||
@ -1085,7 +1150,7 @@ MonoBehaviour:
|
||||
m_ValidateTrueMetals: 0
|
||||
m_DoValidateTrueMetals: 0
|
||||
m_SceneViewState:
|
||||
m_AlwaysRefresh: 0
|
||||
m_AlwaysRefresh: 1
|
||||
showFog: 1
|
||||
showSkybox: 1
|
||||
showFlares: 1
|
||||
@ -1117,18 +1182,18 @@ MonoBehaviour:
|
||||
m_Value: 0
|
||||
m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4}
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Size: {x: 0, y: 0}
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_ShowGrid: 1
|
||||
m_GridAxis: 1
|
||||
m_gridOpacity: 0.5
|
||||
m_Rotation:
|
||||
m_Target: {x: -0.00039701394, y: -0.99538195, z: -0.004038258, w: 0.096016675}
|
||||
m_Target: {x: 0.10873414, y: -0.42024752, z: 0.050804242, w: 0.89943933}
|
||||
speed: 2
|
||||
m_Value: {x: -0.00039700978, y: -0.9953715, z: -0.0040382156, w: 0.09601567}
|
||||
m_Value: {x: 0.10873396, y: -0.4202468, z: 0.050804157, w: 0.89943784}
|
||||
m_Size:
|
||||
m_Target: 10
|
||||
m_Target: 1.4466168
|
||||
speed: 2
|
||||
m_Value: 10
|
||||
m_Value: 1.4466168
|
||||
m_Ortho:
|
||||
m_Target: 0
|
||||
speed: 2
|
||||
@ -1148,14 +1213,14 @@ MonoBehaviour:
|
||||
m_OcclusionCulling: 0
|
||||
m_EnableGDRP: 1
|
||||
m_BackfaceCulling: 0
|
||||
m_LastSceneViewRotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_LastSceneViewRotation: {x: -0.015300392, y: 0.033586923, z: -0.0005142884, w: -0.9993189}
|
||||
m_LastSceneViewOrtho: 0
|
||||
m_ReplacementShader: {fileID: 0}
|
||||
m_ReplacementString:
|
||||
m_SceneVisActive: 1
|
||||
m_LastLockedObject: {fileID: 0}
|
||||
m_ViewIsLockedToObject: 0
|
||||
--- !u!114 &20
|
||||
--- !u!114 &22
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -1175,9 +1240,9 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 462
|
||||
x: 483
|
||||
y: 73
|
||||
width: 1399
|
||||
width: 1465
|
||||
height: 749
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
@ -1195,7 +1260,7 @@ MonoBehaviour:
|
||||
m_ShowGizmos: 0
|
||||
m_TargetDisplay: 0
|
||||
m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_TargetSize: {x: 1399, y: 728}
|
||||
m_TargetSize: {x: 2560, y: 1440}
|
||||
m_TextureFilterMode: 0
|
||||
m_TextureHideFlags: 61
|
||||
m_RenderIMGUI: 1
|
||||
@ -1204,16 +1269,16 @@ MonoBehaviour:
|
||||
m_VSyncEnabled: 0
|
||||
m_Gizmos: 0
|
||||
m_Stats: 0
|
||||
m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
m_SelectedSizes: 0000000000000000000000000a000000000000000000000000000000000000000000000000000000
|
||||
m_ZoomArea:
|
||||
m_HRangeLocked: 0
|
||||
m_VRangeLocked: 0
|
||||
hZoomLockedByDefault: 0
|
||||
vZoomLockedByDefault: 0
|
||||
m_HBaseRangeMin: -699.5
|
||||
m_HBaseRangeMax: 699.5
|
||||
m_VBaseRangeMin: -364
|
||||
m_VBaseRangeMax: 364
|
||||
m_HBaseRangeMin: -1280
|
||||
m_HBaseRangeMax: 1280
|
||||
m_VBaseRangeMin: -720
|
||||
m_VBaseRangeMax: 720
|
||||
m_HAllowExceedBaseRangeMin: 1
|
||||
m_HAllowExceedBaseRangeMax: 1
|
||||
m_VAllowExceedBaseRangeMin: 1
|
||||
@ -1231,29 +1296,29 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 21
|
||||
width: 1399
|
||||
width: 1465
|
||||
height: 728
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Translation: {x: 699.5, y: 364}
|
||||
m_Scale: {x: 0.50555557, y: 0.50555557}
|
||||
m_Translation: {x: 732.5, y: 364}
|
||||
m_MarginLeft: 0
|
||||
m_MarginRight: 0
|
||||
m_MarginTop: 0
|
||||
m_MarginBottom: 0
|
||||
m_LastShownAreaInsideMargins:
|
||||
serializedVersion: 2
|
||||
x: -699.5
|
||||
y: -364
|
||||
width: 1399
|
||||
height: 728
|
||||
x: -1448.901
|
||||
y: -720
|
||||
width: 2897.802
|
||||
height: 1440
|
||||
m_MinimalGUI: 1
|
||||
m_defaultScale: 1
|
||||
m_LastWindowPixelSize: {x: 1399, y: 749}
|
||||
m_defaultScale: 0.50555557
|
||||
m_LastWindowPixelSize: {x: 1465, y: 749}
|
||||
m_ClearInEditMode: 1
|
||||
m_NoCameraWarning: 1
|
||||
m_LowResolutionForAspectRatios: 00000000000000000000
|
||||
m_LowResolutionForAspectRatios: 00000001000000000000
|
||||
m_XRRenderMode: 0
|
||||
m_RenderTexture: {fileID: 0}
|
||||
--- !u!114 &21
|
||||
--- !u!114 &23
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -1273,9 +1338,9 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
x: 1300
|
||||
y: 843
|
||||
width: 1862
|
||||
width: 648
|
||||
height: 508
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user