+2

Shader error in 'Shader Forge/DecorProp': undeclared identifier 'partZ'

Mike 8 jaar geleden bijgewerkt door Timo Weiße 6 jaar geleden 1

Hi there.
I seem to be running into a shader compile error with ShaderForge anytime I try to do anything with the Vertex Offset node.

Here's the setup:




I'm also a bit new when it comes to use this sort of thing, so I'm not sure if there's something completely stupid I'm doing here, but googling hasn't brought any results. Even if what I'm doing is incorrect I would expect ShaderForge to not allow me to hook the node into Vertex Offset.


At the very least the code does seem to suggest it's trying to reference a partZ variable that doesn't seem to exist inside VertexOutput


Full error:

Shader error in 'Shader Forge/DecorProp': undeclared identifier 'partZ' at line 46 (on d3d11)


Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING


I also got errors in an other shader: Undeclared identifier: sceneZ ( and then partZ ).

I fixed the issue by copy & paste the declaration of sceneZ and partZ before it is used in the code.

Sadly this fix is destroyed whenever I compile the shader.