Merge branch '4.1' into 4.2-beta

This commit is contained in:
Mario Zechner 2023-02-17 07:13:59 +01:00
commit 9cef3b443a
8 changed files with 147 additions and 146 deletions

View File

@ -135,7 +135,6 @@ void USpineSkeletonRendererComponent::UpdateMaterial(UTexture2D *Texture, UMater
material->SetTextureParameterValue(TextureParameterName, Texture);
CurrentInstance = material;
}
}
void USpineSkeletonRendererComponent::Flush(int &Idx, TArray<FVector> &Vertices, TArray<int32> &Indices, TArray<FVector> &Normals, TArray<FVector2D> &Uvs, TArray<FColor> &Colors, UMaterialInstanceDynamic *Material) {

View File

@ -101,7 +101,7 @@ half4 CombinedShapeLightFragment(VertexOutputSpriteURP2D input) : SV_Target
surfaceData.albedo = main.rgb;
surfaceData.alpha = 1;
surfaceData.mask = mask;
inputData.uv = input.texcoord;
inputData.uv = input.texcoord.xy;
inputData.lightingUV = input.lightingUV;
half4 pixel = half4(CombinedShapeLightShared(surfaceData, inputData).rgb * main.a, main.a);
#endif

View File

@ -65,7 +65,7 @@ half3 LightweightLightVertexSimplified(float3 positionWS, half3 normalWS, out ha
additionalLightColor += ProcessLight(positionWS, normalWS, meshRenderingLayers, lightIndex);
}
#else // !USE_FORWARD_PLUS
int pixelLightCount = GetAdditionalLightsCount();
uint pixelLightCount = GetAdditionalLightsCount();
LIGHT_LOOP_BEGIN_SPINE(pixelLightCount)
additionalLightColor += ProcessLight(positionWS, normalWS, meshRenderingLayers, lightIndex);
LIGHT_LOOP_END_SPINE
@ -86,7 +86,7 @@ half3 LightweightLightFragmentSimplified(float3 positionWS, float2 positionCS, h
inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(positionCS);
uint meshRenderingLayers = GetMeshRenderingLayerBackwardsCompatible();
int pixelLightCount = GetAdditionalLightsCount();
uint pixelLightCount = GetAdditionalLightsCount();
LIGHT_LOOP_BEGIN_SPINE(pixelLightCount)
additionalLightColor += ProcessLight(positionWS, normalWS, meshRenderingLayers, lightIndex);
LIGHT_LOOP_END_SPINE
@ -124,7 +124,7 @@ VertexOutput vert(appdata v) {
if (color.a == 0) {
o.color = color;
#if defined(SKELETONLIT_RECEIVE_SHADOWS)
o.shadowedColor = color;
o.shadowedColor = color.rgb;
o.shadowCoord = float4(0, 0, 0, 0);
#endif
return o;
@ -169,9 +169,11 @@ half4 frag(VertexOutput i
// USE_FORWARD_PLUS lights need to be processed in fragment shader,
// otherwise light culling by vertex will create a very bad lighting result.
half3 shadowedColor;
i.color.rgb += LightweightLightFragmentSimplified(i.positionWS, i.pos, i.normalWS, shadowedColor);
i.color.rgb += LightweightLightFragmentSimplified(i.positionWS, i.pos.xy, i.normalWS, shadowedColor);
#if defined(SKELETONLIT_RECEIVE_SHADOWS)
i.shadowedColor += shadowedColor;
#endif
#endif
#if defined(SKELETONLIT_RECEIVE_SHADOWS)
half shadowAttenuation = MainLightRealtimeShadow(i.shadowCoord);

View File

@ -145,7 +145,7 @@ half4 LightweightFragmentPBRSimplified(InputData inputData, half4 texAlbedoAlpha
finalColor += ProcessLightPBRSimplified(inputData, brdfData, shadowMask, meshRenderingLayers, lightIndex);
}
#endif
int pixelLightCount = GetAdditionalLightsCount();
uint pixelLightCount = GetAdditionalLightsCount();
LIGHT_LOOP_BEGIN_SPINE(pixelLightCount)
finalColor += ProcessLightPBRSimplified(inputData, brdfData, shadowMask, meshRenderingLayers, lightIndex);
LIGHT_LOOP_END_SPINE
@ -221,7 +221,7 @@ half4 LightweightFragmentBlinnPhongSimplified(InputData inputData, half4 texDiff
diffuseLighting += ProcessLightLambert(inputData, shadowMask, meshRenderingLayers, lightIndex);
}
#endif
int pixelLightCount = GetAdditionalLightsCount();
uint pixelLightCount = GetAdditionalLightsCount();
LIGHT_LOOP_BEGIN(pixelLightCount)
diffuseLighting += ProcessLightLambert(inputData, shadowMask, meshRenderingLayers, lightIndex);
LIGHT_LOOP_END

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.urp-shaders",
"displayName": "Spine Universal RP Shaders",
"description": "This plugin provides universal render pipeline (URP) shaders for the spine-unity runtime.\n\nPrerequisites:\nIt requires a working installation of the spine-unity runtime, version 4.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
"version": "4.1.8",
"version": "4.1.9",
"unity": "2019.3",
"author": {
"name": "Esoteric Software",