Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transform does not work! #22

Open
cailven opened this issue Aug 15, 2019 · 2 comments
Open

transform does not work! #22

cailven opened this issue Aug 15, 2019 · 2 comments

Comments

@cailven
Copy link

cailven commented Aug 15, 2019

webpack.js

{
                test: /\.(glsl|frag|vert)$/,
                use: ['raw-loader',
                     {
                        loader: 'glslify-loader', options: {
                            transform: [
                                ['glslify-hex', { post: true }],
                            ]
                        },
                    }],
                exclude: /node_modules/
            },

glsl

void main() {

 gl_FragColor = #ff0000ff;

}

js

console.log(require("../glsl/post/test2.glsl"));

in console is also like that

void main() {

 gl_FragColor = #ff0000ff;

}

The tansform does not work!
ps. I already installed npm depend package.

@pqml
Copy link
Collaborator

pqml commented Aug 19, 2019

Hi, I used the same setup as yours and it successfully logs

#define GLSLIFY 1
void main() {

 gl_FragColor = vec4(1.,0.,0.,1.);

}

It doesn't seem to be a post-transform issue but rather an issue with glslify / glslify-loader since you dont have the #define GLSLIFY 1 line

@cailven
Copy link
Author

cailven commented Aug 21, 2019

I added "#define GLSLIFY 1" and it doesnt work also.but thank you very much.I give it up the tansform funciton instead by glsl origin code.thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants