0
À l'étude

ViewDir in vertex offset does not work...

BecomingAt. il y a 11 ans mis à jour il y a 11 ans 4
Copied from my question on the the forum: 

Hey, i am not sure if this is a bug or just my lack of experience, so thought i ask here before posting on the feedback page...
i try to offset a vertex perpendicular to the view direction(billboard shader) but when ever i use the viewdir node in the vertex offset, the shader turns pink. Any tips on this?

----------------------------------------------------------------------------------------------------------------------------------
Murgilod replied:

I think this might be a bug. I tossed it into my testbed shader and as soon as I connect the view direction node to the vertex offset node in any way, I get this:

Shader error in 'Shader Forge/Crystalline Entity': undefined variable "viewDirection" at line 37
À l'étude
It's an old bug that should go away when the new dependency system is done
oh thx for the quick reply! Do you know a workaround for this? Maybe using object pos and view pos? Tried it but without luck :(
You'll have to edit it manually afterwards, moving a single line of code, making sure it's defined before you use it. (I think)