|
|
|
@ -73,6 +73,8 @@ function draw(state, context) {
@@ -73,6 +73,8 @@ function draw(state, context) {
|
|
|
|
|
if (static_points > 0) { |
|
|
|
|
// DEPTH PREPASS
|
|
|
|
|
|
|
|
|
|
index_buffer.reverse(); |
|
|
|
|
|
|
|
|
|
if (context.do_prepass) { |
|
|
|
|
gl.drawBuffers([gl.NONE]); |
|
|
|
|
|
|
|
|
@ -94,11 +96,9 @@ function draw(state, context) {
@@ -94,11 +96,9 @@ function draw(state, context) {
|
|
|
|
|
gl.vertexAttribIPointer(locations['a_stroke_id'], 1, gl.INT, config.bytes_per_point, 4 * 3 + 4 * 4 + 4); |
|
|
|
|
|
|
|
|
|
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, index_buffer, gl.DYNAMIC_DRAW); |
|
|
|
|
|
|
|
|
|
gl.drawElements(gl.TRIANGLES, index_count, gl.UNSIGNED_INT, 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
index_buffer.reverse(); |
|
|
|
|
|
|
|
|
|
// MAIN PASS
|
|
|
|
|
gl.drawBuffers([gl.BACK]); |
|
|
|
|