var colors = []; for (var j = 0; j const index Buffer = gl.create Buffer(); Buffer(gl.

topface rudating-69

Topface rudating video

Consider: each face requires four vertices to define it, but each vertex is shared by three faces.

We can pass a lot less data around by building an array of all 24 vertices, then referring to each vertex by its index into that array instead of passing entire sets of coordinates around.

If you wonder why we need 24 vertices, and not just 8, it is because each corner belongs to three faces of different colors, and a single vertex needs to have a single specific color - therefore we will create 3 copies of each vertex in three different colors, one for each face.

First, let's build the cube's vertex position buffer by updating the code in const positions = [ // Front face -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, // Back face -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, // Top face -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, // Bottom face -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, // Right face 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, // Left face -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, ]; We also need to build an array of colors for each of the 24 vertices.

Also, the image here contradicts the text here (for Java Edition, anyway).

It might be different between 32- and 64-bit versions of Java and/or the OS? The maximum height a player can possibly reach is somewhere around Y = 260,740,604,970,814,219,042,361,048,116,400,404,614 587,954,389,239,840,081,425,977,517,360,806,369,707,098,391,474 864,127, or 2^307-1.

I may pop my head back into here in a couple of days when I get some of this stuff implemented.

I was thinking of potentially creating a scene per texture, and save the rendering until last with V-ray's 'Batch Render' option. But I'll look into this Animation option for giving the script pause.

Beyond this limit, the game may come unresponsive and maybe crash.

The highest achievable height in Console Edition is y=511 due to an invisible wall.

I'm taking screenshots right now with view.write_image just for proof of concept, but hopefully I'll upgrade that to one of two things; Create a scene per texture, then Batch Render with Vray after all the textures have been put into a respective scene. You have two options, to change the texture of the material gloabally, or change the material of specific faces.