Pythonic Shader Metaprogramming with Metashade
summary
Metashade is a Python-based EDSL that generates HLSL source code from Python (Apache-2.0 on GitHub) and targets pragmatic needs: managing hundreds of shader permutations, enforcing C-like scoping via with-statements and operator overloading, and emitting plain source rather than an IR. A companion glTF demo uses AMD Cauldron and a Python glTF loader to reimplement AMD shaders as a working proof of concept, arguing it avoids C preprocessor limits and differs from Warp/Triton-style transpilers.
AI-written summary · about
chapters (7)
- 0:00Introduction to Metashade
- 2:35Why Metashade exists
- 5:45Design principles of Metashade
- 7:11Generators in Metashade
- 8:59Comparison to other solutions
- 11:02Metashade vs Python EDSLs
- 12:07Closing and Q&A
related talks
49mRapid Prototyping of Graphics Shaders in Modern C++
25mPython as a Hackable Language for Interactive Data Science
18mShaders are awesome
21mHiPy: Extracting High-Level Semantics From Python Code For Data Processing
24mThe AST and Me
59mGraphics Programming with LambdaCube 3D - Part 2 of 2
37mGamma: A simple model for WebGL
41mIntro to WebGL with Python examples
