Custom local variable insert Position In Template Shader

Hi . I meet a problem when I am using Amplify Shader Editor Template Functions .When I was writing template Shader ,I usually use some calculated results as Input pass to a new Function Code .
When I declared a variable like
And It was assigned with pre-calculated color result .
Then it was used to calculate a additional Lighting effect like Snow
And I have to insert code after the line
And the declare local variable line will add at line /*ase_frag_code:i=VertexOutput*/
So, also ,there are many lines to add additional function , and lots of local variable need to be declared.It's necessary to have a keyword to control where to insert declare local variable line .
To deal with this , if i could use the declared local variable (In this case is : tempColor) instead of the variable (in this case ,the generated variable like float4 temp_cast_0 = (tempColor).xyzx ), I can declare all my local variable at begin and use them at anywhere I like .
When I declared a variable like
- Code: Select all
/*ase_local_var*/ float3 tempColor;
And It was assigned with pre-calculated color result .
- Code: Select all
tempColor = albedo.rgb;
Then it was used to calculate a additional Lighting effect like Snow
- Code: Select all
/*ase_frag_out: Replace Shader Function Here;Float3*/fioat3(0, 0, 0);
And I have to insert code after the line
- Code: Select all
tempColor =albedo.rgb
And the declare local variable line will add at line /*ase_frag_code:i=VertexOutput*/
So, also ,there are many lines to add additional function , and lots of local variable need to be declared.It's necessary to have a keyword to control where to insert declare local variable line .
To deal with this , if i could use the declared local variable (In this case is : tempColor) instead of the variable (in this case ,the generated variable like float4 temp_cast_0 = (tempColor).xyzx ), I can declare all my local variable at begin and use them at anywhere I like .