TimelineImprovements
This commit is contained in:
1 parent
e312131725
commit
f927552adc
2211 files changed
+115416
-540944
No files matched your search
@@ -11,6 +11,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 178415
|
||||
packageName: MK Toon - Stylized Shader
|
||||
packageVersion: 3.5.0C
|
||||
packageVersion: 3.5.0D
|
||||
assetPath: Assets/MK/MKToon/Shader/Lib/MotionVectors/Data.hlsl
|
||||
uploadId: 1012352
|
||||
uploadId: 1023756
|
||||
@@ -23,6 +23,20 @@
|
||||
UNITY_TRANSFER_INSTANCE_ID(vertexInput, vertexOutput);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(vertexOutput);
|
||||
|
||||
#if defined(MK_URP) && UNITY_VERSION >= 60070000
|
||||
float4 previousVertex = unity_MotionVectorsParams.x == 1 ? float4(vertexInput.positionOld, 1) : vertexInput.vertex;
|
||||
#if _ADD_PRECOMPUTED_VELOCITY
|
||||
previousVertex.xyz -= vertexInput.alembicMotionVector;
|
||||
#endif
|
||||
#ifdef MK_VERTEX_ANIMATION
|
||||
previousVertex.xyz = VertexAnimation(_VertexAnimationMap, PASS_VERTEX_ANIMATION_UV(vertexInput.texcoord0.xy), _VertexAnimationIntensity, _VertexAnimationFrequency.xyz, previousVertex.xyz, _LastTimeParameters.x
|
||||
#ifndef MK_VERTEX_ANIMATION_SINE
|
||||
, vertexInput.normal
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MK_VERTEX_ANIMATION
|
||||
vertexInput.vertex.xyz = VertexAnimation(PASS_VERTEX_ANIMATION_ARG(_VertexAnimationMap, PASS_VERTEX_ANIMATION_UV(vertexInput.texcoord0.xy), _VertexAnimationIntensity, _VertexAnimationFrequency.xyz, vertexInput.vertex.xyz, vertexInput.normal));
|
||||
#endif
|
||||
@@ -67,9 +81,13 @@
|
||||
vertexOutput.positionCSNoJitter = mul(_NonJitteredViewProjMatrix, mul(MATRIX_M, vertexInput.vertex));
|
||||
#endif
|
||||
|
||||
float4 prevPos = (unity_MotionVectorsParams.x == 1) ? float4(vertexInput.positionOld, 1) : vertexInput.vertex;
|
||||
#if _ADD_PRECOMPUTED_VELOCITY
|
||||
prevPos = prevPos - float4(vertexInput.alembicMotionVector, 0);
|
||||
#if defined(MK_URP) && UNITY_VERSION >= 60070000
|
||||
float4 prevPos = previousVertex;
|
||||
#else
|
||||
float4 prevPos = (unity_MotionVectorsParams.x == 1) ? float4(vertexInput.positionOld, 1) : vertexInput.vertex;
|
||||
#if _ADD_PRECOMPUTED_VELOCITY
|
||||
prevPos = prevPos - float4(vertexInput.alembicMotionVector, 0);
|
||||
#endif
|
||||
#endif
|
||||
vertexOutput.previousPositionCSNoJitter = mul(_PrevViewProjMatrix, mul(UNITY_PREV_MATRIX_M, prevPos));
|
||||
#ifndef MK_URP_6000_1_0_OR_NEWER
|
||||
@@ -113,6 +131,9 @@
|
||||
#endif
|
||||
|
||||
#if defined(APPLICATION_SPACE_WARP_MOTION)
|
||||
#if UNITY_VERSION >= 60070000 && defined(APPLICATION_SPACE_WARP_MOTION_TRANSPARENT)
|
||||
clip(surface.alpha - 0.001);
|
||||
#endif
|
||||
return float4(CalcAswNdcMotionVectorFromCsPositions(vertexOutput.positionCSNoJitter, vertexOutput.previousPositionCSNoJitter), 1);
|
||||
#else
|
||||
return float4(CalcNdcMotionVectorFromCsPositions(vertexOutput.positionCSNoJitter, vertexOutput.previousPositionCSNoJitter), 0, 0);
|
||||
|
||||
@@ -11,6 +11,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 178415
|
||||
packageName: MK Toon - Stylized Shader
|
||||
packageVersion: 3.5.0C
|
||||
packageVersion: 3.5.0D
|
||||
assetPath: Assets/MK/MKToon/Shader/Lib/MotionVectors/ProgramMotionVectors.hlsl
|
||||
uploadId: 1012352
|
||||
uploadId: 1023756
|
||||
@@ -11,6 +11,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 178415
|
||||
packageName: MK Toon - Stylized Shader
|
||||
packageVersion: 3.5.0C
|
||||
packageVersion: 3.5.0D
|
||||
assetPath: Assets/MK/MKToon/Shader/Lib/MotionVectors/Setup.hlsl
|
||||
uploadId: 1012352
|
||||
uploadId: 1023756
|
||||
Reference in new issue
Block a user