titidatiti

I'm using Unity 2017.3 and when I import the Spine-unity v3.8 asset package, it shows some shader errors:
QQ截图20190908210607.jpg

Shader error in 'Spine/Sprite/Unlit': Can't find include file Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl at line 9

It seems that spine-unity 3.8 is including the LWRP from unity 2019?
The official download website says v3.8 is Compatible with Spine 3.8.x and Unity 2017.1-2019.2.
I wonder if I did something wrong?

Thank you!

---

Is there anyone can help? :lol:
Thanks!
No tienes los permisos requeridos para ver los archivos adjuntos a este mensaje.
Avatar de Usuario
titidatiti
  • Mensajes: 33

Mario

Hm, the default spine-unity asset shouldn't reference any LWRP shaders or APIs at all. Could you tell what steps you took to upgrade spine-unity in your project?
Avatar de Usuario
Mario

Mario
  • Mensajes: 2974

titidatiti

badlogic escribió:Hm, the default spine-unity asset shouldn't reference any LWRP shaders or APIs at all. Could you tell what steps you took to upgrade spine-unity in your project?
I upgraded spine-unity from 3.6 to 3.8 by just downloading the spine-unity 3.8 asset package and covering the old version in my project, and I did not add the LWRP Shaders UPM package. Then I found some script errors occur, so I removed several deprecated c# scripts(which do not exist in 3.8 ) from 3.6 package. When all the script errors are gone, the last error is the shader error that I mentioned in this topic.

After that I tried removing the whole Spine folder in Unity project and re-import the 3.8 asset package, but the shader error still exist. :lol:

---
[Update]
I found out that if I comment the code in ShaderMaths.cginc and ShaderShared.cginc like this, the bug is gone:
QQ截图20190911141722.jpg

Seems like the if defined(USE_LWRP) returns true, but I have no idea why :rolleyes:
No tienes los permisos requeridos para ver los archivos adjuntos a este mensaje.
Avatar de Usuario
titidatiti
  • Mensajes: 33

Mario

You should always remove the entire old Spine folder and copy over the new Spine folder. Partial updates usually never work, and as you experienced, some stuff can get left over.

Regarding the USE_LWRP flag, there must be some left over files from the lwrp-shaders package. These are the only places where that define is defined, see Search · USE_LWRP. You could search your project for the string #define USE_LWRP to see which file might be the culprit. Let me know what you found!
Avatar de Usuario
Mario

Mario
  • Mensajes: 2974

titidatiti

badlogic escribió:You should always remove the entire old Spine folder and copy over the new Spine folder. Partial updates usually never work, and as you experienced, some stuff can get left over.

Regarding the USE_LWRP flag, there must be some left over files from the lwrp-shaders package. These are the only places where that define is defined, see Search · USE_LWRP. You could search your project for the string #define USE_LWRP to see which file might be the culprit. Let me know what you found!
I've searched the entire project for keywords USE_LWRP but I found no #define USE_LWRP in the project.
That's why I got confused and could only comment these code yesterday:lol:.
Avatar de Usuario
titidatiti
  • Mensajes: 33

Mario

Wow, that is extremely weird! I'll make sure to forward this to Harri (our Unity expert) once he's back. For now I'm glad you found a work around :)
Avatar de Usuario
Mario

Mario
  • Mensajes: 2974

Harald

The USE_LWRP definition is only defined in LWRP shaders that are included in the LWRP extension package, you will not find it in the main spine-unity unitypackage. They include the same shader include files, but branch into different #if sections.

Please also have a look at your Packages directory for any leftover files of previous installations.
It may also happen that your Library directory contains some old references and causes weird behaviour.
Avatar de Usuario
Harald

Harri
  • Mensajes: 3931

qppistc

[quote="Harald"][/quote]
Hello,I meet the same shader error when upgrade spine from 3.5 to 3.8. My unity version is Unity2017.4.39f
I delete old Spine folder and Import the spine 3.8's unity package.

And I create a empty new unity project and import this 3.8's unity package, it's also have same shader error, in SpritesPixelLit.shader, SpritesUnlit and some others.

Please have a look. Thanks!
qppistc
  • Mensajes: 13

Luke

Hello,

I just wanted to let you know Harald is currently on vacation. He will take a look when he returns!
Luke

Luke
  • Mensajes: 107

Harald

Sorry for the late reply.
qppistc escribió:And I create a empty new unity project and import this 3.8's unity package, it's also have same shader error, in SpritesPixelLit.shader, SpritesUnlit and some others.

Please have a look. Thanks!
Unity 2017 unfortunately compiles all shader preprocessor branches and reports errors of branches that are never used. Did you encounter any incorrect rendering of your skeletons? Otherwise you can safely ignore the reported shader errors, these are harmless. Newer Unity versions no longer report such errors.
Avatar de Usuario
Harald

Harri
  • Mensajes: 3931

qppistc

Harald escribió:Sorry for the late reply.
qppistc escribió:And I create a empty new unity project and import this 3.8's unity package, it's also have same shader error, in SpritesPixelLit.shader, SpritesUnlit and some others.

Please have a look. Thanks!
Unity 2017 unfortunately compiles all shader preprocessor branches and reports errors of branches that are never used. Did you encounter any incorrect rendering of your skeletons? Otherwise you can safely ignore the reported shader errors, these are harmless. Newer Unity versions no longer report such errors.
Thanks for replay,I have ignored it and it do harmless. I meet another problem when upgrade spine3.8,Please have a look,Thanks!
Upgrading to Unity 2019
qppistc
  • Mensajes: 13


Volver a Bugs