Package limn.render3d
package limn.render3d
Render-to-texture 3D:
Graphics3D is both the facade a caller uses
inside a frame and the SPI the backend installs, and around it sit the neutral resources
a scene is made of: MeshData and TextureData
built on any thread, their uploaded twins GpuMesh and
GpuTexture, Camera with its controllers,
Material, Light, and the
RenderPass draws are issued into. A pass renders into a
RenderTarget the 2D pipeline composites like any other texture,
which is why a 3D viewport is just a widget.-
ClassDescriptionA perspective camera positioned by
eye/target/up.Translates pointer input into camera motion.How the channel values of a color or texture are encoded.Immediate-mode debug geometry: world-space lines (AABBs, oriented boxes, axes, grids, rays) batched on the CPU and flushed into aRenderPassonce per frame.An image-based lighting environment as a procedural gradient sky:skystraight up,horizonat the equator,groundstraight down, in linear color, scaled byintensity.A first-person "fly" camera: dragging looks around (yaw/pitch about the eye, pitch clamped near the poles) and the wheel flies forward/back along the view direction.An opaque handle to mesh geometry uploaded to the GPU (viaGraphics3D.upload).An opaque handle to a texture uploaded to the GPU (seeGraphics3D.uploadTexture).Facade + install-at-startup SPI for the 3D backend, the same inversion pattern asImages/Sounds: a neutral entry point here, the GL implementation installed by the backend on startup.Backend-supplied factory + renderer (installed at startup).Order-2 (9-coefficient) spherical-harmonic irradiance baked from anEnvironment, the diffuse half of image-based lighting (Ramamoorthi & Hanrahan 2001).An analytic light for the PBR pass, added to aRenderPasswithRenderPass.addLight(limn.render3d.Light).An infinitely distant light (sun):directionpoints toward the source.An omnidirectional light atpositionwith inverse-square falloff.A cone light atpositionaimed alongdirection(pointing away from the light).How a surface is shaded.A tangent-space normal map and how far to lean on it.Metallic-roughness PBR (Cook-Torrance GGX), lit by everyLighton the pass plus a flat ambient term.Custom GLSL.Lambert diffuse from the pass's single directional light, over a base color.A surface the application builds itself, out of the same neutral shader IR the built-in materials are generated from, and lit by the same core.A named sampler.A namedvec4uniform.A flat/vertex color, unaffected by lights.CPU-side geometry: one float array perVertexAttributeplus a triangle index list.How often a mesh's contents change, declared at upload, because a GPU buffer's usage is fixed when it is allocated.Orbits aCameraaround its target: horizontal drag spins the azimuth, vertical drag tilts the elevation (clamped near the poles), the wheel dollies in/out.CPU ray picking.ProceduralMeshDatafor common shapes, each with POSITION, NORMAL and UV0.A snapshot of the 3D subsystem's GPU footprint and last-frame workload, for diagnostics (a performance monitor).The draw interface handed to a render callback (seeGraphics3D.render(target, camera, body)).An offscreen render target for 3D content: a color texture plus a depth buffer, optionally multisampled (MSAA).How a texture is filtered and wrapped when sampled.CPU-side pixels for a 2D texture: tightly packed 8-bit RGBA, row-major from the top-left, tagged with theColorSpacethe values are authored in.A vertex attribute semantic and its component count.