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

Float Array Uniform cannot be used in version 2.1 #635

Open
Jo-Song opened this issue Dec 27, 2021 · 1 comment
Open

Float Array Uniform cannot be used in version 2.1 #635

Jo-Song opened this issue Dec 27, 2021 · 1 comment

Comments

@Jo-Song
Copy link

Jo-Song commented Dec 27, 2021

Float Array Uniform was not available in version 2.1.0, but it works fine in version 1.4.2. I do not know why?

const drawTexture = regl({
  ...computeBase,

  frag: `
        precision mediump float;
      
        uniform sampler2D buffer;
        uniform float plasma[2];
        uniform float maxi;
        
        varying vec2 uv;
        
        void main() {

          gl_FragColor = vec4(plasma[0],plasma[1],1.0, 1.0);

        }`,

  uniforms: {
    buffer: regl.prop<any, "buffer">("buffer"),
    maxi: regl.prop<any, "maxi">("maxi"),
    "plasma[0]": 0.98,
    "plasma[1]": 0.99,
  },
});
@rreusser
Copy link
Member

You might have to trace it back through a particular bug reproduction, but I believe this was reverted in #612 due to a bug reported in #611. I don't happen to know the particular cause, though I believe there was some ambiguity discussed in #258.

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