rayMarchingApp = {
const { width: w, height: h } = rayMarchingCanvas;
const bigTriangle = new Float32Array([-5, -5, 5, -5, 0, 5]);
const app = picogl
.createApp(rayMarchingCanvas, {
premultipliedAlpha: false,
preserveDrawingBuffer: true
})
.clearColor(0.5, 0.5, 0.5, 1);
const positions = app.createVertexBuffer(picogl.FLOAT, 2, bigTriangle);
const triangleArray = app
.createVertexArray()
.vertexAttributeBuffer(0, positions);
const program = app.createProgram(vertShader, fragShader);
const drawCall = app.createDrawCall(program, triangleArray);
return { app, drawCall };
}