mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-13 18:48:44 +08:00
[unity] URP Sprite shader now allows Receive Shadow option when Write to Depth is disabled. This option has been greyed out unnecessarily. Closes #1839.
This commit is contained in:
parent
48470a4b16
commit
8908cdd15c
@ -679,9 +679,6 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
|
||||
IsURP3DShader(_materialEditor, out areMixedShaders);
|
||||
|
||||
if (hasReceiveShadowsParameter) {
|
||||
bool forceDisableReceiveShadows = !_writeToDepth.hasMixedValue && _writeToDepth.floatValue == 0;
|
||||
EditorGUI.BeginDisabledGroup(forceDisableReceiveShadows);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool mixedValue;
|
||||
bool enableReceive = !IsKeywordEnabled(_materialEditor, "_RECEIVE_SHADOWS_OFF", out mixedValue);
|
||||
@ -690,11 +687,10 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
|
||||
|
||||
EditorGUI.showMixedValue = false;
|
||||
|
||||
if (EditorGUI.EndChangeCheck() || forceDisableReceiveShadows) {
|
||||
SetKeyword(_materialEditor, "_RECEIVE_SHADOWS_OFF", !enableReceive || forceDisableReceiveShadows);
|
||||
if (EditorGUI.EndChangeCheck()) {
|
||||
SetKeyword(_materialEditor, "_RECEIVE_SHADOWS_OFF", !enableReceive);
|
||||
dataChanged = true;
|
||||
}
|
||||
EditorGUI.EndDisabledGroup(); // forceDisableReceiveShadows
|
||||
}
|
||||
|
||||
return dataChanged;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user