simvx.core.colour_grading¶
Backend-agnostic 3D-LUT colour-grading data generators.
Pure-numpy producers of (size, size, size, 4) uint8 identity/graded LUTs.
They live in core (no rendering deps) so both the Vulkan desktop backend and the
WebGPU web runtime can build the same LUT from one call: a game generates a LUT
here and registers it via App.register_lut / WebApp.register_lut, and it
grades identically on either backend. The GPU upload + sampler live backend-side
(simvx.graphics.renderer.colour_grading / the web KIND_LUT resource).
Axis order is [b, g, r] (numpy row-major: the trailing R axis is the fastest
stride = texture width), which maps to an rgba8 3D texture as X=R, Y=G, Z=B.
Module Contents¶
Functions¶
Generate an identity 3D LUT (no colour change). |
|
Generate a warm-toned 3D LUT (shifted toward orange/amber). |
|
Generate a cool-toned 3D LUT (shifted toward blue/teal). |
|
Generate a vintage/desaturated warm 3D LUT. |
Data¶
API¶
- simvx.core.colour_grading.__all__¶
[‘generate_neutral_lut’, ‘generate_warm_lut’, ‘generate_cool_lut’, ‘generate_vintage_lut’]
- simvx.core.colour_grading.generate_neutral_lut(size: int = 32) numpy.ndarray[source]¶
Generate an identity 3D LUT (no colour change).
- simvx.core.colour_grading.generate_warm_lut(size: int = 32) numpy.ndarray[source]¶
Generate a warm-toned 3D LUT (shifted toward orange/amber).