Original Post
My old 3d engine had no shaderprogram support at all, so I decided to re-design it with shaders as the primary functionality. I've designed a simple shaderformat with focus on reuseability of shader elements
# Shader Default // name Default
# Declaration VNT // name VNT (VertexNormalTexture)
# Stream 0 Vertex
# Stream 1 Normal
# Stream 2 Texture
# End Declaration
# Material MyMaterial // name MyMaterial
# Ambient 255 255 255 255
# Diffuse 255 255 255 255
# specular 255 255 255 255
# Emissive 255 255 255 255
# Pass 0 Streamsource 2 // fetch texcoord from stream 2
# Texture "Texture.png" Texture // name Texture
# Operation ColorOperation
# Arguments Arg0 Arg1
# End Pass
# Pass 1 Streamsource 2 // fetch texcoord from stream 2
# Texture "Texture2.png" Texture2 // name Texture2
# operation ColorOperation
# Arguments Arg0 Arg1
# Operation ColorOperation
# Arguments Arg0 Arg1
# End Pass
# End Material
# Program
# "../program.fx" ShadowVolumeExtraction
# "../program2.fx" StencilShadow
# "../program3.fx" PerPixelLighting
# End Program
# End Shader
As you might notice, each subset except texture passes has an identifier assigned to it and here is where I can see some design flaws, can you? I'd appreciate if you could give me your opinions about my shader format and what I can improve