Vml
C++17 GLSL-like vector and matrix math lib
Install / Use
/learn @valentingalea/VmlREADME
= VML
C++17 GLSL vector and matrix math library. Tweaked for best debug code gen.
== Quick Usage
.Introduce the GLSL types [source, cpp] using vec3 = vml::vector<float, 0, 1, 2>; using mat3 = vml::matrix<float, vml::vector, vml::indices_pack<0, 1, 2>, vml::indices_pack<0, 1, 2>>;
.Compile shader code as C++ [source, cpp]
void mainImage( out vec4 fragColor, in vec2 fragCoord ) { // Normalized pixel coordinates (from 0 to 1) vec2 uv = fragCoord/iResolution.xy;
// Time varying pixel color
vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
// Output to screen
fragColor = vec4(col,1.0);
}
Debug!
image::https://i.imgur.com/NH3qB2e.png[debug]
== About
Inspired by and borrowed major ideas from https://github.com/gwiazdorrr/CxxSwizzle[CxxSwizzle] but mine is engineered for best possible debug code gen.
It includes a SDL based sample app that runs GLSL shaders in a software rasterizer. It can get decent framerates for simple/medium complexity shaders.
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
