glslify / glslify/glslify

glslify did not interpret the string.

Open
#104 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.3k
Forks
83
PR merge metrics
No merged PRs in 30d

Description

I install glslify 6.0.1 in my project with npm.

import the glslify file in my js file with
`var glslify = require('glslify');`

And use it as
_copyShader = new THREE.RawShaderMaterial({
uniforms: {
resolution: { type: 'v2', value: new THREE.Vector2( TEXTURE_WIDTH, TEXTURE_HEIGHT ) },
texture: { type: 't', value: undef }
},
vertexShader: rawShaderPrefix + shaderParse(glslify('../glsl/quad.vert')),
fragmentShader: rawShaderPrefix + shaderParse(glslify('../glsl/through.frag'))
});

But got syntax error that said unexpected "." on my line 2.
I think it is because glslify did not interpret the string and get the file, just add the string to the shader. Is there a way that I can fix it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.