Skip to content

Error in NEXT.js "Failed to execute 'shaderSource' on 'WebGLRenderingContext'..." #42

Open
@jonayWaka

Description

I tried to install and run the demo in a Next.js project, and it prompt this error:

TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'.

To Reproduce
Steps to reproduce the behavior:

  1. npm i shadertoy-react
  2. import ShadertoyReact from "shadertoy-react";
  3. Declare ```
    const fragmentShader = void main(void) { vec2 uv = gl_FragCoord.xy/iResolution.xy; vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4)); gl_FragColor = vec4(col ,1.0); };
4. Include component inside render function `<ShadertoyReact fs={fragmentShader} />`.

**Expected behavior**
Same as demo.


**Desktop (please complete the following information):**
 - MacOs Monterey
 - Chrome
 - Versión 107.0.5304.110 (Build oficial) (x86_64)

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