foriero

Shader error in 'Spine/Sprite/Pixel Lit': syntax error: unexpected token ';' at Assets/Git/Spine/spine-unity/Modules/Shaders/Sprite/CGIncludes/SpritePixelLighting.cginc(60) (on metal)

Compiling Vertex program with POINT
Platform defines: UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
foriero
Posts: 185

Pharan

That shader hasn't been changed in months.
What version of Unity are you using?
User avatar
Pharan

Pharan
Posts: 4942

foriero

Today I downloaded the latest spine runtime from github. 2018.1b10.

---

We are dowloading directly the directories from github. Not using unitypackage version.
foriero
Posts: 185

Pharan

We haven't tested the sprite shaders yet in 2018.1 beta

We'll check it soon.
User avatar
Pharan

Pharan
Posts: 4942

ENAY

Are you using Windows or Mac? What version of Unity are you using?

This shader works for me in Unity 2017.1.2p3(64 bit) pro licence.

Might want to try upgrading Unity, see if that magically fixes your issue.

[edit]
Whoops sorry. I read that sentence as his version of Github and not Unity. My bad (:
ENAY
Posts: 14

Pharan

He said 2018.1
It's newer.
User avatar
Pharan

Pharan
Posts: 4942

foriero

On Metal which implies OSX Unity Editor.
foriero
Posts: 185

RareSloth

Any update on this? On Unity 2018.1.4f1 with a similar error when building:
Shader error in 'Spine/Sprite/Pixel Lit': syntax error: unexpected token ';' at Assets/Plugins/Spine/spine-unity/Modules/Shaders/Sprite/CGIncludes/SpritePixelLighting.cginc(60) (on metal)

Compiling Vertex program with UNITY_PASS_FORWARDADD POINT
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
I also get a duplicate error with (on glcore) at the end instead of (on metal)

EDIT:
Looks like replacing line 60 with this does the trick, although I don't know what it's doing:
UNITY_LIGHT_ATTENUATION(attenuation, input, _LightColor0.rgb);
User avatar
RareSloth
Posts: 44

Pharan

Thanks for sharing!

According to Mike Geig (the same Mike Geig from the Unity tutorials/demos), that was the correct fix.
He mentioned it here: https://github.com/traggett/UnitySpriteShaders/issues/15
User avatar
Pharan

Pharan
Posts: 4942


Return to Unity