sync
This commit is contained in:
parent
f4bbef9e99
commit
3ccfaf4dc7
@ -1,9 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5500c7bc667b55f49b29485c043a2b42
|
||||
guid: Cn8ftXmqASi6epsI4nfo7953qufqb5nBuoGXa/Fnz8E2iB3Zkxr25P8=
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
@ -22,6 +22,9 @@ TextureImporter:
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
webStreaming: 0
|
||||
priorityLevel: 0
|
||||
uploadedMode: 2
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
@ -70,6 +73,7 @@ TextureImporter:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 512
|
||||
maxPlaceholderSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
@ -83,6 +87,7 @@ TextureImporter:
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
maxPlaceholderSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
@ -96,6 +101,7 @@ TextureImporter:
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
maxPlaceholderSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
@ -109,6 +115,7 @@ TextureImporter:
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 512
|
||||
maxPlaceholderSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
@ -122,6 +129,7 @@ TextureImporter:
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 512
|
||||
maxPlaceholderSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
@ -132,6 +140,34 @@ TextureImporter:
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: HMIAndroid
|
||||
maxTextureSize: 512
|
||||
maxPlaceholderSize: 32
|
||||
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: OpenHarmony
|
||||
maxTextureSize: 512
|
||||
maxPlaceholderSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
|
||||
@ -28,7 +28,7 @@ MonoBehaviour:
|
||||
m_SupportsHDR: 1
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 0.5882813
|
||||
m_RenderScale: 0.6666667
|
||||
m_UpscalingFilter: 0
|
||||
m_FsrOverrideSharpness: 1
|
||||
m_FsrSharpness: 1
|
||||
@ -114,5 +114,5 @@ MonoBehaviour:
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
superResolution: 14
|
||||
superResolution: 4
|
||||
vrsRate: 0
|
||||
|
||||
@ -145,25 +145,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c3c4391133b9f3142b57264047029ec5, type: 3}
|
||||
m_Name: XESS
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
m_Active: 0
|
||||
xess1ConfigParam:
|
||||
OutputWidth: 2560
|
||||
OutputHeight: 1440
|
||||
Quality: 103
|
||||
UseHiResMotionVectors: 0
|
||||
UseHiResMotionVectors: 1
|
||||
UseJitteredMotionVectors: 0
|
||||
UseMotionVectorsInNDC: 1
|
||||
UseExposureTexture: 0
|
||||
UseResponsiveMask: 0
|
||||
UseAutoExposure: 0
|
||||
UseAutoExposure: 1
|
||||
EnableProfiling: 0
|
||||
InvertedDepth: 0
|
||||
VelocityScaleX: -2
|
||||
VelocityScaleY: 2
|
||||
JitterScaleX: 0
|
||||
JitterScaleY: 0
|
||||
JitterScaleX: 1
|
||||
JitterScaleY: 1
|
||||
ExposureScale: 1
|
||||
MipMapBias: -1.45
|
||||
MipMapBias: -1.64
|
||||
--- !u!114 &1524480044783497712
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -176,8 +176,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: a6b8ba513f1b1fe499924f362fdde22d, type: 3}
|
||||
m_Name: GSR
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 0
|
||||
quality: 4
|
||||
m_Active: 1
|
||||
quality: 3
|
||||
v1settings:
|
||||
EnableEdgeDirection: 1
|
||||
Mode: 1
|
||||
@ -187,8 +187,8 @@ MonoBehaviour:
|
||||
UseCompute2Pass: 0
|
||||
GSRV2Material: {fileID: 2100000, guid: faa906817c0647f42a0cec70faeb91c1, type: 2}
|
||||
GSRV2ComputeShader: {fileID: 7200000, guid: 9a4e6ff1f9a33fa4ea1e9744e313e2fd, type: 3}
|
||||
FiveSample: 0
|
||||
Exposure_co_rcp: 1
|
||||
FiveSample: 1
|
||||
Exposure_co_rcp: 0.1
|
||||
--- !u!114 &2459758869679212578
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -501,7 +501,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
ref var colorDescriptor = ref cameraData.cameraTargetDescriptor;
|
||||
colorDescriptor.width = cameraData.camera.pixelWidth;
|
||||
colorDescriptor.height = cameraData.camera.pixelHeight;
|
||||
if (asset.SuperResolution == ESuperResolution.XESS13)
|
||||
if (asset.SuperResolution == ESuperResolution.XESS13 || asset.SuperResolution == ESuperResolution.GSR2)
|
||||
{
|
||||
colorDescriptor.graphicsFormat = GraphicsFormat.R16G16B16A16_SFloat;
|
||||
colorDescriptor.enableRandomWrite = true; // compute
|
||||
|
||||
@ -278,7 +278,6 @@ namespace UnityEngine.Rendering.Universal
|
||||
SuperResolutionParamSets.Instance.Get<float>("MipmapBias", ref ssMipBias);
|
||||
float taaMipBias = Math.Min(cameraData.taaSettings.mipBias, ssMipBias);
|
||||
mipBias = Math.Min(mipBias, taaMipBias);
|
||||
// TODO: xyang Mip bias
|
||||
cmd.SetGlobalVector(ShaderPropertyId.globalMipBias, new Vector2(mipBias, Mathf.Pow(2.0f, mipBias)));
|
||||
|
||||
//Set per camera matrices.
|
||||
|
||||
@ -135,6 +135,8 @@ namespace X.Rendering.Feature
|
||||
public int Mode = 1;
|
||||
[SerializeField, Range(0.5f, 2.5f)]
|
||||
public float Sharp = 2;
|
||||
[SerializeField, Range(-5f, 2.5f)]
|
||||
public float MipMapBias = 0;
|
||||
[SerializeField]
|
||||
public Material GSRV1Material;
|
||||
}
|
||||
@ -176,6 +178,7 @@ namespace X.Rendering.Feature
|
||||
cameraData.imageScalingMode = ImageScalingMode.None;
|
||||
cameraData.upscalingFilter = ImageUpscalingFilter.None;
|
||||
|
||||
SuperResolutionParamSets.Instance.Set<float>("MipmapBias", v1settings.MipMapBias);
|
||||
|
||||
cmd.SetGlobalVector(ViewportInfoId, new Vector4(1.0f / pixW, 1.0f / pixH, pixW, pixH));
|
||||
cmd.SetGlobalVector(GSR1ParamsId, new Vector4(v1settings.Mode, v1settings.Sharp, 0, 0));
|
||||
@ -256,13 +259,16 @@ namespace X.Rendering.Feature
|
||||
|
||||
private void UpscalePass(CommandBuffer cmdBuffer, RTHandle source, RTHandle destination)
|
||||
{
|
||||
SuperResolutionParamSets.Instance.Set<bool>("NeedJitter", true);
|
||||
var jitter = TemporalAA.CurrentJitter;
|
||||
|
||||
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("_JitterOffset", jitter);
|
||||
cmdBuffer.SetGlobalVector("_ScaleRatio", scaleRatio.xyxx);
|
||||
|
||||
cmdBuffer.SetGlobalFloat("_cameraFovAngleHor", cameraFovAngleHor);
|
||||
|
||||
@ -46,6 +46,7 @@ namespace X.Rendering.Feature
|
||||
}
|
||||
|
||||
|
||||
Dictionary<string, bool> boolMap = new ();
|
||||
Dictionary<string, int> intMap = new ();
|
||||
Dictionary<string, float> floatMap = new ();
|
||||
Dictionary<string, string> stringMap = new ();
|
||||
@ -72,6 +73,12 @@ namespace X.Rendering.Feature
|
||||
map.TryGetValue(name, out value);
|
||||
break;
|
||||
}
|
||||
case bool v:
|
||||
{
|
||||
var map = boolMap as Dictionary<string, T>;
|
||||
map.TryGetValue(name, out value);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new ArgumentException($"type err:{typeof(T)}");
|
||||
}
|
||||
@ -97,6 +104,11 @@ namespace X.Rendering.Feature
|
||||
stringMap[name] = v;
|
||||
break;
|
||||
}
|
||||
case bool v:
|
||||
{
|
||||
boolMap[name] = v;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new ArgumentException($"type err:{typeof(T)}");
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ namespace X.Rendering.Feature
|
||||
lastQuality = xess1ConfigParam.Quality;
|
||||
}
|
||||
|
||||
cameraData.NeedJitter = true;
|
||||
SuperResolutionParamSets.Instance.Set<bool>("NeedJitter", true);
|
||||
SuperResolutionParamSets.Instance.Set<float>("MipmapBias", xess1ConfigParam.MipMapBias);
|
||||
SuperResolutionParamSets.Instance.Set<float>("JitterScale", xess1ConfigParam.JitterScaleX);
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ namespace UnityEngine.Rendering.Universal
|
||||
if (!hasActive)
|
||||
{
|
||||
superResolution = ESuperResolution.None;
|
||||
SuperResolutionParamSets.Instance.Set<bool>("NeedJitter", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -301,8 +301,10 @@ namespace UnityEngine.Rendering.Universal
|
||||
static internal Matrix4x4 CalculateJitterMatrix(ref CameraData cameraData, out Vector2 jitter)
|
||||
{
|
||||
Matrix4x4 jitterMat = Matrix4x4.identity;
|
||||
bool needJitter = false;
|
||||
SuperResolutionParamSets.Instance.Get<bool>("NeedJitter", ref needJitter);
|
||||
|
||||
bool isJitter = cameraData.IsTemporalAAEnabled() || cameraData.NeedJitter;
|
||||
bool isJitter = cameraData.IsTemporalAAEnabled() || needJitter;
|
||||
jitter = Vector2.zero;
|
||||
if (isJitter)
|
||||
{
|
||||
|
||||
@ -627,8 +627,6 @@ namespace UnityEngine.Rendering.Universal
|
||||
&& postProcessEnabled; // No Postprocessing
|
||||
}
|
||||
|
||||
internal bool NeedJitter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The sorting criteria used when drawing opaque objects by the internal URP render passes.
|
||||
/// When a GPU supports hidden surface removal, URP will rely on that information to avoid sorting opaque objects front to back and
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user