I am attempting to make a copy of the Standard shader compatible with the Animation Instancing shader (Unity Blog)
The issue is that the Standard Shader (at least my copy of it) looks like this
#pragma shader_feature _NORMALMAP
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#pragma shader_feature _EMISSION
#pragma shader_feature _METALLICGLOSSMAP
#pragma shader_feature ___ _DETAIL_MULX2
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
#pragma shader_feature _PARALLAXMAP
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#pragma multi_compile_instancing
#pragma vertex vertBase
#pragma fragment fragBase
#include "UnityStandardCoreForward.cginc"
and adding
#include "AnimationInstancingBase.cginc"
#pragma vertex vert
to the end did nothing, probably since it already have a #pragma vertex vertBase
declaration.
How do I combine the vert function from AnimationInstancingBase.cginc and the vertBase from UnityStandardCoreForward.cginc?
I am hoping for some simple way of doing that, since there are 8 more passes in the StandardShader all using different vertex
‘pragmas’ in different .cginc
files
Worst case scenario I am thinking of copying each of the vertex functions to their respective passes and manually figure out a way to insert the skinning functions from AnimationInstancingBase.cginc
, but here I am hoping for a easy solution somehow existing