Ejemplo n.º 1
0
        private static void AppendVertexShader(List <VertexAttributeRenderInfo> attributes, StringBuilder shaderSource)
        {
            GlslUtils.AppendShadingLanguageVersion(shaderSource);

            GlslUtils.AppendVertexInputs(attributes, shaderSource);
            GlslUtils.AppendVertexOutputs(attributes, shaderSource);
            GlslUtils.AppendMatrixUniform(shaderSource);

            AppendVertexMainFunction(attributes, shaderSource);
        }
Ejemplo n.º 2
0
        private static void AppendFragmentShader(List <VertexAttributeRenderInfo> attributes, StringBuilder shaderSource)
        {
            GlslUtils.AppendShadingLanguageVersion(shaderSource);

            GlslUtils.AppendFragmentInputs(attributes, shaderSource);
            GlslUtils.AppendFragmentOutput(shaderSource);

            shaderSource.AppendLine($"uniform int {attribIndexName};");

            AppendFragmentMainFunction(attributes, shaderSource);
        }
Ejemplo n.º 3
0
        private static void AppendFragmentShader(List <TextureRenderInfo> textures,
                                                 List <VertexAttributeRenderInfo> attributes, StringBuilder shaderSource,
                                                 string uv0, string normal)
        {
            GlslUtils.AppendShadingLanguageVersion(shaderSource);

            GlslUtils.AppendFragmentInputs(attributes, shaderSource);
            AppendViewNormalInput(shaderSource);

            GlslUtils.AppendFragmentOutput(shaderSource);

            AppendTextureUniforms(textures, shaderSource);
            GlslUtils.AppendMatrixUniform(shaderSource);

            shaderSource.AppendLine($"uniform int {attribIndexName};");

            AppendFragmentMainFunction(textures, shaderSource, uv0, normal);
        }