gsr2 闪烁
This commit is contained in:
parent
538b12622f
commit
a8a769e617
@ -0,0 +1,134 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: JM_WuJian_TianChuang003
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _SPECULAR_SETUP
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 1ad708c84eaf4084c9870f1a6bbd2779, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 1ad708c84eaf4084c9870f1a6bbd2779, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.6509434, g: 0.6509434, b: 0.6509434, a: 1}
|
||||
- _Color: {r: 0.6509434, g: 0.6509434, b: 0.6509434, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &6868159958657864359
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76a063ea2cf7334499992b59e33a81de
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 MiB |
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ad708c84eaf4084c9870f1a6bbd2779
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -0,0 +1,109 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0de700f626a08c44091a03511a8d7388
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 0
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 0
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 1
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -89820,6 +89820,71 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 3222786974498240390, guid: e4f829552ff027340afbaed5e87ba9d9, type: 3}
|
||||
m_PrefabInstance: {fileID: 1636801640}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1642142997
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -17.24971
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.95578253
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 73.25475
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -6126673751231732936, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 76a063ea2cf7334499992b59e33a81de, type: 2}
|
||||
- target: {fileID: 919132149155446097, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: JM_WuJian_TianChuang003
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5504113258885105547, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 0de700f626a08c44091a03511a8d7388, type: 3}
|
||||
--- !u!1001 &1642665822
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -120618,3 +120683,4 @@ SceneRoots:
|
||||
- {fileID: 966895463892816108}
|
||||
- {fileID: 226723377}
|
||||
- {fileID: 1996431148}
|
||||
- {fileID: 1642142997}
|
||||
|
||||
@ -28,7 +28,7 @@ MonoBehaviour:
|
||||
m_SupportsHDR: 1
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 0.6666667
|
||||
m_RenderScale: 1
|
||||
m_UpscalingFilter: 1
|
||||
m_FsrOverrideSharpness: 1
|
||||
m_FsrSharpness: 1
|
||||
@ -114,5 +114,5 @@ MonoBehaviour:
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
superResolution: 3
|
||||
superResolution: 5
|
||||
vrsRate: 0
|
||||
|
||||
@ -43,7 +43,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 386e439eeef2849448d91896c74ff1d5, type: 3}
|
||||
m_Name: FSR
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
m_Active: 0
|
||||
Quality: 1
|
||||
v1setting:
|
||||
EasuCompute: {fileID: 7200000, guid: 787b0c165dad9074e9489817de945916, type: 3}
|
||||
@ -137,7 +137,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: a00dddc5b3ea7fe45953ccbd49b58b94, type: 3}
|
||||
m_Name: GSR
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 0
|
||||
m_Active: 1
|
||||
quality: 1
|
||||
v1settings:
|
||||
EnableEdgeDirection: 1
|
||||
@ -145,7 +145,7 @@ MonoBehaviour:
|
||||
Sharp: 1.68
|
||||
GSRV1Material: {fileID: 2100000, guid: d57e64d5723127243b429034bed82c7d, type: 2}
|
||||
v2settings:
|
||||
UseCompute2Pass: 1
|
||||
UseCompute2Pass: 0
|
||||
UseCompute3Pass: 0
|
||||
GSRV2Material: {fileID: 2100000, guid: faa906817c0647f42a0cec70faeb91c1, type: 2}
|
||||
GSR2psComputeShader: {fileID: 7200000, guid: 9a4e6ff1f9a33fa4ea1e9744e313e2fd, type: 3}
|
||||
|
||||
@ -135,6 +135,9 @@ namespace X.Rendering.Feature
|
||||
fsr1 = new(v1setting);
|
||||
fsr2 = new(v2setting);
|
||||
fsr3 = new(v3setting);
|
||||
fsr1?.Dispose();
|
||||
fsr2?.Dispose();
|
||||
fsr3?.Dispose();
|
||||
}
|
||||
|
||||
public void DoSR(CommandBuffer cmd, RTHandle source, RTHandle destination, RTHandle motionVector, ref RenderingData renderingData)
|
||||
|
||||
@ -62,7 +62,6 @@ namespace X.Rendering.Feature
|
||||
public float Exposure_co_rcp = 1;
|
||||
|
||||
internal bool useCompute = false;
|
||||
|
||||
}
|
||||
[SerializeField]
|
||||
private V2Setting v2settings;
|
||||
@ -344,6 +343,9 @@ namespace X.Rendering.Feature
|
||||
compute.DisableKeyword("SAMPLE_NUMBER");
|
||||
}
|
||||
|
||||
cmdBuffer.SetComputeFloatParam(compute, "Scalefactor", scaleRatio.y);
|
||||
cmdBuffer.SetComputeFloatParam(compute, "Biasmax_viewportXScale", viewportXScale);
|
||||
|
||||
cmdBuffer.SetComputeTextureParam(compute, 1, "HistoryOutput", historyOut);
|
||||
cmdBuffer.SetComputeTextureParam(compute, 1, "SceneColorOutput", destination);
|
||||
|
||||
@ -442,8 +444,11 @@ namespace X.Rendering.Feature
|
||||
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)));
|
||||
math.max(math.min(20.0f, math.pow(((float)camera.pixelWidth * camera.pixelHeight) / ((float)source.referenceSize.x * source.referenceSize.y), 3.0f)), 2)
|
||||
);
|
||||
viewportXScale = math.min((camera.pixelWidth / (float)source.referenceSize.x), 1.99f);
|
||||
cmd.SetGlobalVector("_ScaleRatio", scaleRatio.xyxx);
|
||||
|
||||
if (v2settings.UseCompute3Pass)
|
||||
{
|
||||
RenderingUtils.ReAllocateIfNeeded(ref motionDepthAlphaBuffer, name: "motionDepthAlphaBuffer", descriptor: new RenderTextureDescriptor()
|
||||
|
||||
@ -149,7 +149,7 @@ Shader "MRP/SR/GSR2"
|
||||
motion = Position.xy - PreScreen;
|
||||
}
|
||||
|
||||
return float4(motion, depthclip, 0.0);
|
||||
return float4(max(motion, 0), depthclip, 0.0);
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
@ -161,6 +161,7 @@ Shader "MRP/SR/GSR2"
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma enable_d3d11_debug_symbols
|
||||
|
||||
#pragma target 5.0
|
||||
|
||||
float FastLanczos(float base)
|
||||
@ -197,22 +198,29 @@ Shader "MRP/SR/GSR2"
|
||||
Texture2D _MotionDepthClipAlphaBuffer;
|
||||
Texture2D _InputTexture;
|
||||
SamplerState samLinearClamp;
|
||||
|
||||
float3x3 rgb2ycbcr = float3x3(0.2126, -0.114572, 0.5,
|
||||
0.7152, -0.385428, -0.454153,
|
||||
0.0722, 0.5, -0.0458471);
|
||||
float3x3 ycbcr2rgb = float3x3(1, 1, 1,
|
||||
0, -0.187324, 1.8556,
|
||||
1.5748, -0.468124, 0);
|
||||
|
||||
fixed4 frag(Varyings i) : SV_Target
|
||||
{
|
||||
float Biasmax_viewportXScale = _ScaleRatio.x;
|
||||
float scalefactor = _ScaleRatio.y;
|
||||
|
||||
float2 Hruv = i.uv;
|
||||
precise float2 Hruv = i.uv;
|
||||
|
||||
precise float2 Jitteruv;
|
||||
Jitteruv.x = clamp(Hruv.x + (_JitterOffset.x * _renderSizeParam.z), 0.0, 1.0);
|
||||
Jitteruv.y = clamp(Hruv.y + (_JitterOffset.y * _renderSizeParam.w), 0.0, 1.0);
|
||||
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;
|
||||
precise float3 mda = _MotionDepthClipAlphaBuffer.SampleLevel(samLinearClamp, Jitteruv, 0.0).xyz;
|
||||
precise float2 Motion = mda.xy;
|
||||
|
||||
float2 PrevUV;
|
||||
PrevUV.x = clamp(-0.5 * Motion.x + Hruv.x, 0.0, 1.0);
|
||||
@ -224,7 +232,7 @@ Shader "MRP/SR/GSR2"
|
||||
|
||||
float depthfactor = mda.z;
|
||||
|
||||
float3 HistoryColor = _PrevSceneColorTexture.SampleLevel(samLinearClamp, PrevUV, 0.0).xyz;
|
||||
float3 HistoryColor = _PrevSceneColorTexture.SampleLevel(samLinearClamp, PrevUV, 0.0);
|
||||
|
||||
/////upsample and compute box
|
||||
float4 Upsampledcw = 0.0;
|
||||
@ -242,7 +250,7 @@ Shader "MRP/SR/GSR2"
|
||||
|
||||
kernelbias *= 0.5f;
|
||||
float kernelbias2 = kernelbias * kernelbias;
|
||||
float2 srcpos_srcOutputPos = srcpos - Hruv * _renderSizeParam.xy;
|
||||
precise float2 srcpos_srcOutputPos = srcpos - Hruv * _renderSizeParam.xy;
|
||||
//srcOutputPos = Hruv * renderSize;
|
||||
float3 rectboxmin;
|
||||
float3 rectboxmax;
|
||||
@ -412,6 +420,7 @@ Shader "MRP/SR/GSR2"
|
||||
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;
|
||||
@ -419,15 +428,18 @@ Shader "MRP/SR/GSR2"
|
||||
float3 boxmax = rectboxcenter + sboxvar;
|
||||
rectboxmax = min(rectboxmax, boxmax);
|
||||
rectboxmin = max(rectboxmin, boxmin);
|
||||
|
||||
|
||||
float3 clampedcolor = clamp(HistoryColor, rectboxmin, rectboxmax);
|
||||
// return float4(clampedcolor.xyz, 0.0);
|
||||
|
||||
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));
|
||||
// return float4(lerpcontribution.x,0,0, 0.0);
|
||||
|
||||
float basemin = min(basealpha, 0.1f);
|
||||
basealpha = lerp(basemin, basealpha, clamp(lerpcontribution, 0.0, 1.0));
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ void Convert(uint2 DisThreadID)
|
||||
uint z10 = Colorycocg.z * 1023.5f;
|
||||
|
||||
YCoCgColor[DisThreadID] = (x11 << 21) | (y11 << 10) | z10;
|
||||
MotionDepthClipAlphaBuffer[DisThreadID] = half4(motion, depthclip, ColorMax);
|
||||
MotionDepthClipAlphaBuffer[DisThreadID] = half4(max(motion,0), depthclip, ColorMax);
|
||||
}
|
||||
|
||||
#define TILE_SIZE_X 8
|
||||
@ -121,6 +121,8 @@ SamplerState LinearClamp1;
|
||||
SamplerState LinearClamp2;
|
||||
float ValidReset;
|
||||
float minLerpContribution;// 0.0 or 0.3, when camera move 0.0, camera freeze 0.3
|
||||
float Scalefactor;
|
||||
float Biasmax_viewportXScale;
|
||||
|
||||
RWTexture2D<float4> HistoryOutput;
|
||||
RWTexture2D<float3> SceneColorOutput;
|
||||
@ -169,8 +171,10 @@ void Update(uint2 DisThreadID)
|
||||
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));
|
||||
|
||||
//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;
|
||||
@ -353,8 +357,8 @@ void Update(uint2 DisThreadID)
|
||||
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;
|
||||
//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);
|
||||
@ -366,13 +370,13 @@ void Update(uint2 DisThreadID)
|
||||
float basealpha = baseupdate;
|
||||
|
||||
float boxscale = max(depthclip, saturate(motion_viewport_len * 0.05f));
|
||||
float boxsize = lerp(_ScaleRatio.y, 1.0f, boxscale);
|
||||
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);
|
||||
rectboxmax = min(rectboxmax, boxmax);
|
||||
rectboxmin = max(rectboxmin, boxmin);
|
||||
|
||||
float3 clampedcolor = clamp(HistoryColor, rectboxmin, rectboxmax);
|
||||
float startLerpValue = minLerpContribution;
|
||||
@ -380,7 +384,7 @@ void Update(uint2 DisThreadID)
|
||||
startLerpValue = 0.0f;
|
||||
float lerpcontribution = (any(rectboxmin > HistoryColor) || any(HistoryColor > rectboxmax)) ? startLerpValue : 1.0f;
|
||||
|
||||
HistoryColor = lerp(clampedcolor, HistoryColor, saturate(lerpcontribution));
|
||||
HistoryColor = lerp(clampedcolor, HistoryColor, saturate(lerpcontribution));
|
||||
float basemin = min(basealpha, 0.1f);
|
||||
basealpha = lerp(basemin, basealpha, saturate(lerpcontribution));
|
||||
|
||||
@ -391,7 +395,7 @@ void Update(uint2 DisThreadID)
|
||||
|
||||
Upsampledcw.xyz = lerp(HistoryColor, Upsampledcw.xyz, alpha.xxx);
|
||||
|
||||
Upsampledcw.x = clamp(Upsampledcw.x, rectboxmin.x, rectboxmax.x);
|
||||
//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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user