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

uniform1fv failed #260

Open
vvshuai opened this issue May 18, 2023 · 0 comments
Open

uniform1fv failed #260

vvshuai opened this issue May 18, 2023 · 0 comments

Comments

@vvshuai
Copy link

vvshuai commented May 18, 2023

gl.shaderSource(
    xxxShader,
    `
    ....
    uniform float h[6];
    ....
    `
);
....
gl.uniform1fv(
        gl.getUniformLocation(xxxProgram, 'h'),
        new Float32Array([
            1.0,2.0,3.0,4.0,5.0,6.0
        ])
    );

When I am using headless-gl,
I'm trying to pass an array with variable 'h' into the fragment shader, but the rendering result is not working.
But if I write the variable 'h' in the fragment shader, there is no problem.
The code is effective in the browser.

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

1 participant