redefinition of '_SpecColor'
Posted: Fri Dec 08, 2017 8:29 pm
In using Amplify Shader Editor, I'd like to essentially recreate the standard shader, but with some additional options.
The issue comes when adding Colors and Textures which match the names from the standard shader
(ie... _ColorMap, _Color, _SpecColor, _SpecMap, etc)
The goal here is so that when you change a material between the standard shader and my custom shader that the values held in these variables stay linked.
This works fine for the _Color, and _ColorMap.
(ie... Make standard material, set a image or color into the albedo, then change material's shader to my shader, and the same color and texture is mapped into the correct input)
This however does not work with _SpecColor (float3 variable). Instead I get a few errors.
Why are specular variables giving me this issue when albedo don't?
I can't find other posts of people expressing this issue, which is odd.
Any help would be appreciated.
Thanks
The issue comes when adding Colors and Textures which match the names from the standard shader
(ie... _ColorMap, _Color, _SpecColor, _SpecMap, etc)
The goal here is so that when you change a material between the standard shader and my custom shader that the values held in these variables stay linked.
This works fine for the _Color, and _ColorMap.
(ie... Make standard material, set a image or color into the albedo, then change material's shader to my shader, and the same color and texture is mapped into the correct input)
This however does not work with _SpecColor (float3 variable). Instead I get a few errors.
- Code: Select all
Shader error in 'MyShader': declaration of "_SpecColor" conflicts with previous declaration at /UnityLightingCommon.cginc(5) at line 46 (on d3d9)
- Code: Select all
Shader error in 'MyShader': redefinition of _'SpecColor' at line 46 (on d3d11)
Why are specular variables giving me this issue when albedo don't?
I can't find other posts of people expressing this issue, which is odd.
Any help would be appreciated.
Thanks