simvx.graphics.shaders.variants¶
The finite set of shader permutations the engine can request.
Every GLSL stage file in this directory is compiled once with no defines. The table below adds the preprocessor permutations the renderer asks for on top of that, and the functions that build a permutation’s defines at run time read from the same table, so a permutation the renderer can request is one the release build compiles into the wheel.
Standard library only: the graphics wheel’s build hook loads this file by path,
without importing :mod:simvx.graphics.
Module Contents¶
Functions¶
The defines of one |
|
Every |
Data¶
API¶
- simvx.graphics.shaders.variants.__all__¶
[‘PROBE_BLEND_COUNT_DEFAULT’, ‘PROBE_BLEND_COUNTS’, ‘STAGE_SUFFIXES’, ‘TANGENT_VERTEX_DEFINES’, ‘TAA…
- simvx.graphics.shaders.variants.STAGE_SUFFIXES¶
(‘.vert’, ‘.frag’, ‘.comp’)
- simvx.graphics.shaders.variants.PROBE_BLEND_COUNT_DEFAULT¶
2
- simvx.graphics.shaders.variants.PROBE_BLEND_COUNTS¶
‘range(…)’
- simvx.graphics.shaders.variants.TANGENT_VERTEX_DEFINES¶
(‘HAS_TANGENTS’,)
- simvx.graphics.shaders.variants.TAA_UPSCALE_DEFINES¶
(‘TAAU’,)
- simvx.graphics.shaders.variants.lit_fragment_defines(*, gbuffer: bool = False, tangents: bool = False, probe_blend_count: int = PROBE_BLEND_COUNT_DEFAULT) tuple[str, ...]¶
The defines of one
cube_textured.fragpermutation.Raises: ValueError: if probe_blend_count is outside :data:
PROBE_BLEND_COUNTS, which no shipped permutation covers.
- simvx.graphics.shaders.variants.engine_shader_variants(shader_dir: pathlib.Path) list[tuple[str, tuple[str, ...]]]¶
Every
(file name, defines)pair the engine can compile from shader_dir.Sorted, so a build compiles and names them in a stable order.