Skip to content

ParseError:Unexpected token "varying vec3 vWorldPosition;" #7

Open

Description

@cjroth

I'm unable to get this working with this glsl file: https://github.com/ngokevin/kframe/blob/master/components/sun-sky/shaders/vertex.glsl

browserify -t [ browserify-shader ] public/packages.js
browserify -t [ browserify-shader --parameterize=true ] public/packages.js
node_modules/aframe-sun-sky/shaders/vertex.glsl:1
varying vec3 vWorldPosition;
        ^
ParseError: Unexpected token

I'm using Browserify 13.1.1.

Activity

  1. mere commented on Jan 24, 2017

    @mere
    Owner

    Hi Chris, does your vertex shader work if you run it through a parser?
    Try: http://shdr.bkcore.com

  2. joy4sure commented on Feb 12, 2018

    @joy4sure

    I also have this problem. My shader can work with a parser.

  3. marquizzo commented on Oct 17, 2018

    @marquizzo

    It looks like it's trying to compile the .glsl file as JavaScript, instead of just turning it into a string. I'm also getting a similar compile error on the very first character of my shader:

    #extension GL_OES_standard_derivatives : enable
    ^
    ParseError: Unexpected character '#'
    
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions