API
@react-shader/stdlib
Variables and Assignments

Variables And Assignments

Define Uniform

<Uniform type={"float"} id={"u_time"} />

Define Input

<Input type={"vec2"} id={"vCoords"} />

Define Output

<Output type={"vec4"} id={"fragColor"} />

Assign value

<Assign to={<Output type={"vec4"} id={"fragColor"} />}>
  <Vec4 x={0} y={0} z={1} w={1} />
</Assign>

Define variable

<Sym id={"variable"} type={"float"}>
    <Float value={0.5} />
</Sym>