Undeclared identifier when using Fetch on Slider

Node-based Shader Editor

Undeclared identifier when using Fetch on Slider

Postby summer » Tue Nov 13, 2018 4:53 pm

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

Postby summer » Tue Nov 13, 2018 4:55 pm

Sorry, wrong image url.

Image
summer
 
Posts: 10
Joined: Tue Nov 13, 2018 4:47 pm

Re: Undeclared identifier when using Fetch on Slider

Postby Amplify_Borba » Wed Nov 14, 2018 9:06 am

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!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Undeclared identifier when using Fetch on Slider

Postby summer » Wed Nov 14, 2018 10:26 am

Thanks, I got it to work!
summer
 
Posts: 10
Joined: Tue Nov 13, 2018 4:47 pm

Re: Undeclared identifier when using Fetch on Slider

Postby Amplify_Borba » Wed Nov 14, 2018 10:40 am

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!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests