Undeclared identifier when using Fetch on Slider

Node-based Shader Editor
Post Reply
summer
Posts: 10
Joined: Tue Nov 13, 2018 4:47 pm

Undeclared identifier when using Fetch on Slider

Post 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
summer
Posts: 10
Joined: Tue Nov 13, 2018 4:47 pm

Re: Undeclared identifier when using Fetch on Slider

Post by summer »

Sorry, wrong image url.

Image
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Undeclared identifier when using Fetch on Slider

Post 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.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
summer
Posts: 10
Joined: Tue Nov 13, 2018 4:47 pm

Re: Undeclared identifier when using Fetch on Slider

Post by summer »

Thanks, I got it to work!
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Undeclared identifier when using Fetch on Slider

Post by Amplify_Borba »

Happy to help, don't hesitate to get back in touch if you have any further questions, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Post Reply