// Конструктор protected SkyboxShader() : base() { if (vertexAttrib == null) { vertexAttrib = new VertexAttribute("inPosition"); attribs.Add(vertexAttrib); } if (texCoordAttrib == null) { texCoordAttrib = new VertexAttribute("inTexCoord"); attribs.Add(texCoordAttrib); } if (textureUniform == null) { textureUniform = new TextureUniform("texture"); uniforms.Add(textureUniform); } if (diffuseColor == null) { diffuseColor = new ColorUniform("diffuseColor"); uniforms.Add(diffuseColor); } if (textureMatrix == null) { textureMatrix = new MatrixUniform("textureMatrix"); uniforms.Add(textureMatrix); } }
/// <summary> /// Конструктор /// </summary> WireCubeShader() : base() { if (vertexAttrib == null) { vertexAttrib = new VertexAttribute("inPosition"); attribs.Add(vertexAttrib); } if (diffuseColor == null) { diffuseColor = new ColorUniform("diffuseColor"); uniforms.Add(diffuseColor); } }
// Конструктор protected MeshShader() : base() { if (vertexAttrib == null) { vertexAttrib = new VertexAttribute("inPosition"); attribs.Add(vertexAttrib); } if (normalAttrib == null) { normalAttrib = new VertexAttribute("inNormal"); attribs.Add(normalAttrib); } if (texCoordAttrib == null) { texCoordAttrib = new VertexAttribute("inTexCoord"); attribs.Add(texCoordAttrib); } if (textureUniform == null) { textureUniform = new TextureUniform("texture"); uniforms.Add(textureUniform); } if (diffuseColor == null) { diffuseColor = new ColorUniform("diffuseColor"); uniforms.Add(diffuseColor); } if (alphaPass == null) { alphaPass = new BoolUniform("discardPass"); uniforms.Add(alphaPass); } if (lightMultiplier == null) { lightMultiplier = new FloatUniform("lightMult"); uniforms.Add(lightMultiplier); } if (textureMatrix == null) { textureMatrix = new MatrixUniform("textureMatrix"); uniforms.Add(textureMatrix); } }