Page 1 of 1

Undeclared identifier when using Fetch on Slider

PostPosted: Tue Nov 13, 2018 4:53 pm
by summer
Shader error in 'MyShaders/ObjectLit': undeclared identifier '_Angryness' at line 32 (on d3d11)

This happens when I set the Slider Variable Mode to Fetch.

Image

Re: Undeclared identifier when using Fetch on Slider

PostPosted: Tue Nov 13, 2018 4:55 pm
by summer
Sorry, wrong image url.

Image

Re: Undeclared identifier when using Fetch on Slider

PostPosted: Wed Nov 14, 2018 9:06 am
by Amplify_Borba
Hello, thank you for getting in touch and for your support!

Setting the 'Variable Mode' to 'Fetch' won't declare it over the shader, meaning that it has to be declared over an included cginc, for example, so the error is being thrown since the shader can't find any reference to that property name.

If you want the property to be created on the shader, you need to set this parameter to 'Create'.

Please let me know if this helps and if you have any further questions.

Re: Undeclared identifier when using Fetch on Slider

PostPosted: Wed Nov 14, 2018 10:26 am
by summer
Thanks, I got it to work!

Re: Undeclared identifier when using Fetch on Slider

PostPosted: Wed Nov 14, 2018 10:40 am
by Amplify_Borba
Happy to help, don't hesitate to get back in touch if you have any further questions, thanks!