|
|
|
@ -323,6 +323,14 @@ async function draw(state, context, animate, ts) {
@@ -323,6 +323,14 @@ async function draw(state, context, animate, ts) {
|
|
|
|
|
gl.bindTexture(gl.TEXTURE_2D, context.textures['dynamic_stroke_data']); |
|
|
|
|
upload_square_rgba16ui_texture(gl, context.dynamic_stroke_data, config.dynamic_stroke_texture_size); |
|
|
|
|
|
|
|
|
|
gl.uniform2f(locations['u_res'], context.canvas.width, context.canvas.height); |
|
|
|
|
gl.uniform2f(locations['u_scale'], state.canvas.zoom, state.canvas.zoom); |
|
|
|
|
gl.uniform2f(locations['u_translation'], state.canvas.offset.x, state.canvas.offset.y); |
|
|
|
|
gl.uniform1i(locations['u_stroke_count'], context.dynamic_stroke_count); |
|
|
|
|
gl.uniform1i(locations['u_debug_mode'], state.debug.red); |
|
|
|
|
gl.uniform1i(locations['u_stroke_data'], 0); |
|
|
|
|
gl.uniform1i(locations['u_stroke_texture_size'], config.dynamic_stroke_texture_size); |
|
|
|
|
|
|
|
|
|
gl.enableVertexAttribArray(locations['a_a']); |
|
|
|
|
gl.enableVertexAttribArray(locations['a_b']); |
|
|
|
|
gl.enableVertexAttribArray(locations['a_stroke_id']); |
|
|
|
|