Skip to content

Commit

Permalink
Add program info log error message fallback for glsl compilation fail…
Browse files Browse the repository at this point in the history
…ures

adeira-source-id: 02609ad655acbb332af2c98e2ce29060c09d9805
  • Loading branch information
itsdouges authored and triplex-bot committed Nov 25, 2024
1 parent 415aa89 commit 8d2077e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/test-fixture/src/throws-error-glsl-fallback.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Copyright (c) Michael Dougall. All rights reserved.
*
* This source code is licensed under the GPL-3.0 license found in the LICENSE
* file in the root directory of this source tree.
*/
export function GLSLErrorFallback() {
return (
<mesh>
<boxGeometry />
<shaderMaterial
fragmentShader={`
varying vec2 v_uv;
void main() {
gl_FragColor = vec4(v_uv, 0.0, 0.0);
}
`}
/>
</mesh>
);
}

0 comments on commit 8d2077e

Please sign in to comment.