Hello dear Community and PlayCanvas Team,
I am not really familiar with writing Shaders, so I´ve been searching through the web for some Kind of Shader that is ready for WebGL and allows to add a Normal Map and a Diffuse Texture to a Material (I know, StandardMaterial of PlayCanvas already has this functionality but I want to extend the basic Shader as described in the following Post: Use Multiple Textures and Normals on UV Spaces, since it does not seem possible to achieve the desired Effect with the Standard PBR Material.
I found a shader but couldn´t manage to get it working. See: Editor Shader Project for Code and Details. If i run the game, the Objects that have the ShaderScript attached to simply do not show. Custom Shader Example is working just fine, so i tried to modify the ShaderDefinition Script for the Shader that i found online.
I don´t really know what the “Color” Variable in the Vertex Shader is responible for, so i just tried to pass multiple Color Values to it, none of them changed the output. It´s totally possible that i missed something crucial or simply did not set up all the values correctly, thats why I ask you for Help. Maybe theres somebody more familiar in writing Shaders who can enlighten me a little bit.
PS: Original Shader is from Matt DesLauriers gitRepository