[0.2.2]
Added
Cauldron3D.Paint.Spans: textured, shaded, lit-surface and tinted runs filled in C, with the same bytes made in Elixir where the C did not build.Cauldron3D.Frame.Pixels:lay/2andthrough/2over whole RGBA runs, in C likewise.Cauldron3D.Texture.colour/2: one colour of a colour table.
Changed
- Each band of
Cauldron3D.Render.draw_setups/3is given only the setups crossing its rows. Cauldron3D.Bsp.Draw.polygons/3looks each face's surface up once a frame and dedups faces by face and mip.
Breaking changes
Cauldron3D.Texture.colours/1and a texture'scoloursare a 1024-byte RGBA binary, not a tuple of 256 binaries; read a colour withCauldron3D.Texture.colour/2.Cauldron3D.Bsp.Surfaces.cached/5answers{:ok, {index, mip}, surface}.- The package builds C with
elixir_make.
[0.2.0]
Added
Cauldron3D.CameraandCauldron3D.View: perspective and orthographic cameras, with first-person, follow, side-on and top-down set-ups, fitted to a picture and its pixel shape.Cauldron3D.Render,Setup,RasterandPaint: polygons drawn into an indexed-colourCauldron3D.Frame, each row resolved into runs of the nearest polygon, bands of rows drawn in parallel; flat, textured, light-table, per-vertex shaded, surface, liquid, sky and game-defined paints; see-through and always-on-top polygons.- Full colour:
Render.draw/3with:palettedraws RGBA frames (Cauldron3D.Paint.Rgba); textures may carry their own palette or be RGBA; surfaces are built from grey or red-green-blue lightmaps (Bsp.light_channels) through a:curve; polygons blend by alpha or add (Polygon.blend);Frame.blit/4andscale/3take RGBA frames. :maskedtexture kind,{:skybox, faces}paint andBsp.Draw's:skyboxoption; brush models drawn turned ({model, origin, angles}).Cauldron3D.Mesh(keyframed, blended, lit by normals) andCauldron3D.Billboard.Cauldron3D.Bsp,Bsp.Face,Bsp.DrawandBsp.Surfaces: BSP worlds, what a leaf can see, faces drawn with lightmapped surfaces made in parallel and cached per mip level.Bsp.visible_leaves/2gives world leaves only (Bsp.world_leaves), never a brush model's.Bsp.gamenames the game a map was made for,:quakeor:half_life.Cauldron3D.Bsp.Light, the light under a point, andBsp.Light.on_face/4, a face's lightmap light at a point on it.Cauldron3D.QuatandCauldron3D.Skeleton(bone transforms from parent-relative poses).Cauldron3D.Hull(point and box hulls, traces) andCauldron3D.Move(sliding, stepping).Cauldron3D.Texture,Cauldron3D.Frame(rgba/2,rgb/2,blit/4,scale/3) andCauldron3D.Vec.