Skip to main content

vcti-shader-deform

The deformation shader feature: the vertex-stage math that moves geometry.

Overview

A CAE solver reports how far each node of a mesh moved under a load. Drawing the deformed shape means adding that displacement to each node's coordinates in the vertex stage — usually magnified, because real displacements are too small to see. vcti-shader-deform is the shader feature that does it.

It ships one Slang module (deform.slang) with two entry functions:

  • deform3 — displace by a per-axis scaled vector,
  • deform6 — for results that also carry a rotation: a full rotation about a center (Rodrigues' formula) plus the scaled translation.

Around that math, the package declares two things: the specs saying what each variant needs supplied — which attributes, which uniforms — and the ShaderDefinition saying what the feature is. Both are plain data. Nothing here compiles or runs a shader; a build step does that, using what this package declares.

Geometry has no numerical oracle to diff against, so the test suite runs the math headlessly on a GPU — through the compiler's render_readback — and diffs the positions against a CPU replication of the same formulas. That is test machinery, and it ships with the source, not with the package.

Installation

pip install vcti-shader-deform

Requires Python 3.12, 3.13, or 3.14, matching vcti-shader-base. Nothing native is built on that path, and nothing native is built by [test] either — only the [gl] extra pulls a GL binding, and only on 3.14 does that compile from source for want of a cp314 wheel.

In requirements.txt

vcti-shader-deform>=1.0.0

In pyproject.toml dependencies

dependencies = [
    "vcti-shader-deform>=1.0.0",
]

Quick Start

What the feature is

from vcti.shader.deform import DEFINITION

DEFINITION.id, DEFINITION.role.value      # ('deform', 'vertex')
DEFINITION.capabilities                   # ('deform3', 'deform6')
DEFINITION.slang_modules                  # ('deform.slang',)

DEFINITION is built at import, so importing the package is all it takes to have one. Its capabilities are what a caller asks for — a feature is one thing you install, a capability is one thing it can do, and deform offers two.

What its math needs supplied

Pick a variant, and the specs follow from it:

from vcti.shader.deform import VertexStage, vertex_attributes, vertex_uniforms

[a.name for a in vertex_attributes(VertexStage.DEFORM6)]
# ['a_position', 'a_deformation', 'a_rotation']

[u.name for u in vertex_uniforms(VertexStage.DEFORM6)]
# ['u_deformScale', 'u_deformRotationCenter']

VertexStage is the choice of variant: NONE (pass-through), DEFORM3, DEFORM6. Note that NONE is a variant rather than the absence of one — it still contributes a_position, because the fragment stage has to have geometry to color. The specs come from functions rather than module-level tuples for exactly this reason: they differ per variant, and only the caller knows which variant it is building.

Each AttributeSpec carries a semantic — coordinates, deformation, rotation — which is how a caller decides which of its own buffers belongs in which attribute. The attribute name is a shader-source detail and may be renamed; the semantic names the data.

Building a shader from it

This package does not compile anything, so the last step belongs to a build step, and amounts to two things:

# 1. Give the compiler somewhere to resolve `import deform;` from.
include_dirs = [DEFINITION.slang_dir]

# 2. Merge this feature's specs with those of a fragment-stage feature,
#    dropping the a_position both of them declare.
inputs = tuple(dict.fromkeys(vertex_attributes(stage) + color_attributes()))

slang_dir is the field with teeth: the .slang files install inside this package, so only this package can resolve where they are.


Dependencies

  • vcti-shader-base — the zero-dependency vocabulary this feature declares itself with (ShaderDefinition, StageRole, AttributeSpec, UniformSpec). The only runtime dependency.

The rest are test-only — needed to run the shader, not to declare the feature, and split across two extras:

  • [test] — vcti-shader-compiler>=4.0, whose render_readback the suite drives to run the emitted math headlessly, and numpy for the CPU replication it is diffed against. The test module imports the compiler at module scope, so without it the tests fail to collect rather than skip — which is why it sits here and not under [gl].
  • [gl] — vcti-shader-compiler[gl], the GL binding that makes the probes actually run. Every shader package defines a gl extra meaning "what I need to execute shaders"; ci-shader.yml installs .[test,gl] on that contract.

Without [gl] the probe tests skip and everything else passes, which is the right default: compiling a GL binding is a cost only the machines that run shaders should pay.

Nothing that combines, selects, or discovers features: a feature declares itself and stops there.


Documentation

If you want to… Read
Get started using the package Quick Start above
Understand the transforms and the design decisions docs/design.md
Navigate or modify the source, including the Slang docs/source-guide.md

The full API reference is generated from the source docstrings and published in the unified VCollab docs.

Metadata

Release files for vcti-shader-deform 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vcti-shader-deform 1.0.1
File Size Uploaded Provenance Actions
vcti_shader_deform-1.0.1.tar.gz 20.9 kB With provenance Details for vcti_shader_deform-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vcti-shader-deform 1.0.1
File Interpreter ABI Platform Actions
vcti_shader_deform-1.0.1-py3-none-any.whl Python 3 none any Details for vcti_shader_deform-1.0.1-py3-none-any.whl

Total release size: 29.8 kB

Release files / vcti_shader_deform-1.0.1.tar.gz

Download URL vcti_shader_deform-1.0.1.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
323b6533c798f0d35bfadc5df91a08cc0b1630d17aec71c9892a444050ddfeac
BLAKE2b-256 checksum
How to use checksums
458b1058a80239824262e79edf701bd75564c61f69707c8512e4b7e75a809b4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / vcti_shader_deform-1.0.1-py3-none-any.whl

Download URL vcti_shader_deform-1.0.1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95941d9920a4a9a6113333d46a44c7e4cfaa534251c411abf2c83994a3f1933f
BLAKE2b-256 checksum
How to use checksums
62be45c82eeea190b225e5c5c8cb3810a7afddb8247a65b938b6ede9681c137f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Security for vcti-shader-deform 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vcti_shader_deform-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page