Help with shaders


Hi everyone,i am using 3ds max 2016 and i would like to make a material to blend textures using vertex illumination and vertex alpha. I also need some add/sub/mul operations, i didn’t find these available in to use with standard materials so i tried to make a dx shader using shaderfx. I noticed that using stingray it only allows to use vertex color 0 so i tried with shaderFX, i’ve made my graph and exposed the textures parameters but i noticed that nothing renders in viewport or using quicksilver hardware render.

this is the .fx i’ve saved
What did i do wrong? And can you suggest me where i can learn more about this?