Skip to content

shader #version directive compile error #290

Open

Description

@exolution

my shader content is

#version 300 es
attribute lowp vec4 a_vertexPosition;
attribute vec2 a_texturePosition;
varying vec2 v_texCoord;
void main() {
gl_Position = a_vertexPosition;
v_texCoord = a_texturePosition;
}

when i compile this shader it throws error

ERROR: 0:2: 'version' : #version directive must occur before anything else, except for comments and white space

I am sure that in the shader text passed to gl.shaderSource, there are no characters before this version directive.

Activity

  1. army8735 commented on Jun 14, 2024

    @army8735

    +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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