wavebbs

I want to use light probe on my scene to optimize the preformance.
So I click the "Light Probes & Ambient" on "Spine/Sprite/Vertex Lit" shader for my spine objects.
But it doesn't work.

1.png



In the pic , the light probe have dectected the spine objects. But there is any changes for spine object.

Did I do something wrong?

Thanks so much for your help!
添付ファイルを見るにはパーミッションが必要です
wavebbs
  • 記事: 9

Harald

Did you enable Light Probes & Ambient at the Spine/Sprite/Vertex Lit Material?
アバター
Harald

Harri
  • 記事: 3353

wavebbs

Yes, I enable that but It doesn't work.
My unity version: 2020.3.17f1
Spine version: spine-unity-4.0-2021-08-16.unitypackage
Harald さんが書きました:Did you enable Light Probes & Ambient at the Spine/Sprite/Vertex Lit Material?
wavebbs
  • 記事: 9

Harald

Sorry, I just noticed that you said in the first line already that you enabled Light Probes & Ambient.

The current version of the Spine/Sprite/Vertex Lit shader does not support Light Probes since it uses the "LightMode" = "Vertex" and not
"LightMode" = "ForwardBase"
lighting mode. It only simulates the three-color gradient Ambient Light. The easiest solution would be to switch to the Spine/Sprite/Pixel Lit shader.

You could however also change the shader code accordingly if you would like to use the Spine/Sprite/Vertex Lit shader:

Change the following line in SpritesVertexLit.shader:
Tags { "LightMode" = "Vertex" }
to
Tags { "LightMode" = "ForwardBase" }
And this complete block in SpriteVertexLighting.cginc, function calculateAmbientLight to only a single line call to ShadeSH9:
#if defined(_SPHERICAL_HARMONICS)
return ShadeSH9(half4(normalWorld, 1.0));
#else // !_SPHERICAL_HARMONICS
If you don't see any updates, be sure to modify SpritesVertexLit.shader last so that the includes are also recompiled.
アバター
Harald

Harri
  • 記事: 3353


Return to Unity