Skip to content

Syntax highlighting in shader strings #5

@davidhesselbom

Description

@davidhesselbom

It would be useful to be able to define shader strings in a way that Atom can syntax highlight the shader as GLSL code instead of a string. For instance, instead of

OpenGLES3MapBgr: class extends OpenGLES3MapDefault {
    init: func (context: GpuContext, transform := false) { super(This fragmentSource, context, transform, func { this program setUniform("texture0", 0) }) }
    fragmentSource: static String = "
        #version 300 es\n
        precision highp float;\n
        uniform sampler2D texture0;\n
        in vec2 fragmentTextureCoordinate;
        out vec3 outColor;\n
        void main() {\n
            outColor = texture(texture0, fragmentTextureCoordinate).rgb;\n
        }\n"
}

imagine something like

OpenGLES3MapBgr: class extends OpenGLES3MapDefault {
    init: func (context: GpuContext, transform := false) { super(This fragmentSource, context, transform, func { this program setUniform("texture0", 0) }) }
    fragmentSource: static String = GLSL"
        #version 300 es
        precision highp float;
        uniform sampler2D texture0;
        in vec2 fragmentTextureCoordinate;
        out vec3 outColor;
        void main() {
            outColor = texture(texture0, fragmentTextureCoordinate).rgb;
        }"
}

but in Atom.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions