Forge Vertex Pulling logo

Forge Vertex Pulling

Community
Nebulavenus
forge-vertex-pulling

Add vertex pulling (programmable vertex fetch) to an SDL GPU project. Replace fixed-function vertex input with storage buffer reads in the vertex shader using SV_VertexID and StructuredBuffer.

Overview

PublisherNebulavenus
Repositoryforge-gpu
Skill nameforge-vertex-pulling
Stars
46
Forks
7
Bundled files
Instructions only
LicenseZlib
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Nebulavenus on GitHub. Read the source before you install it.

Installation

Install the Forge Vertex Pulling AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-vertex-pulling
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Nebulavenus/forge-gpu.git /tmp/forge-gpu
mkdir -p .claude/skills
cp -r /tmp/forge-gpu/.claude/skills/forge-vertex-pulling .claude/skills/forge-vertex-pulling
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Forge Vertex Pulling in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Forge Vertex Pulling on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Forge Vertex Pulling is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Vertex Pulling with SDL3 GPU

Replace the fixed-function vertex input assembler with manual storage buffer reads in the vertex shader. The pipeline declares zero vertex attributes and the shader fetches vertex data from a StructuredBuffer using SV_VertexID.

Based on GPU Lesson 33 — Vertex Pulling.

When to use

  • Meshes with different vertex layouts sharing one pipeline
  • Compute shaders writing vertex data for the vertex shader to read
  • Compressed or packed vertex formats decoded in the shader
  • GPU-driven rendering with indirect draw calls
  • Reducing pipeline state complexity and pipeline object count

HLSL pattern

Vertex shader (pulled)

hlsl
struct PulledVertex
{
    float3 position;
    float3 normal;
    float2 uv;
};

/* Vertex storage buffer: register(t0, space0) for DXIL vertex shaders.
 * Slot index follows sampled textures and storage textures (if any). */
StructuredBuffer<PulledVertex> vertex_buffer : register(t0, space0);

cbuffer SceneUniforms : register(b0, space1)
{
    column_major float4x4 mvp;
    column_major float4x4 model;
};

struct VSOutput
{
    float4 clip_pos  : SV_Position;
    float3 world_pos : TEXCOORD0;
    float3 world_nrm : TEXCOORD1;
    float2 uv        : TEXCOORD2;
};

VSOutput main(uint vertex_id : SV_VertexID)
{
    VSOutput output;
    PulledVertex v = vertex_buffer[vertex_id];

    float4 world = mul(model, float4(v.position, 1.0));
    output.clip_pos  = mul(mvp, float4(v.position, 1.0));
    output.world_pos = world.xyz;
    output.world_nrm = normalize(mul((float3x3)model, v.normal));
    output.uv        = v.uv;
    return output;
}

Fragment shader

No changes needed — fragment shaders work identically regardless of whether vertex data came from the input assembler or a storage buffer.

C-side pattern

1. Define the vertex struct (must match HLSL)

c
typedef struct PulledVertex {
    vec3 position;   /* 12 bytes */
    vec3 normal;     /* 12 bytes */
    vec2 uv;         /*  8 bytes */
} PulledVertex;      /* 32 bytes */

2. Upload as storage buffer (not vertex buffer)

c
/* The only CPU-side difference: buffer usage flag */
SDL_GPUBuffer *storage_buf = upload_gpu_buffer(
    device,
    SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ,  /* NOT VERTEX */
    vertex_data,
    vertex_count * sizeof(PulledVertex));

3. Create shader with storage buffer count

c
/* Vertex shader: declare 1 storage buffer */
SDL_GPUShaderCreateInfo info;
SDL_zero(info);
info.stage               = SDL_GPU_SHADERSTAGE_VERTEX;
info.num_samplers        = 0;
info.num_storage_buffers = 1;   /* <-- vertex data storage buffer */
info.num_uniform_buffers = 1;
/* ... format, code, entrypoint ... */

4. Create pipeline with empty vertex input

c
/* No vertex buffer descriptions, no vertex attributes */
SDL_GPUVertexInputState vis;
SDL_zero(vis);
/* vis.num_vertex_buffers    = 0;  already zero */
/* vis.num_vertex_attributes = 0;  already zero */

SDL_GPUGraphicsPipelineCreateInfo pi;
SDL_zero(pi);
pi.vertex_input_state = vis;
/* ... rest of pipeline setup ... */

5. Bind and draw

c
/* Bind storage buffer instead of vertex buffer */
SDL_GPUBuffer *bufs[1] = { storage_buf };
SDL_BindGPUVertexStorageBuffers(pass, 0, bufs, 1);

/* Index buffer binding is unchanged */
SDL_GPUBufferBinding ib = { index_buffer, 0 };
SDL_BindGPUIndexBuffer(pass, &ib, index_type);
SDL_DrawGPUIndexedPrimitives(pass, index_count, 1, 0, 0, 0);

SDL GPU register mapping

For DXIL vertex shaders, resources are bound in this order at space0:

  1. Sampled textures (t0..tN)
  2. Storage textures (tN+1..)
  3. Storage buffers (tN+M+1..)

With zero sampled/storage textures, the first storage buffer is t0, space0.

For SPIR-V vertex shaders, storage buffers go in descriptor set 0 after sampled and storage textures.

Combining with other techniques

  • Compute → Vertex: Use SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ | SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE so a compute shader can write the buffer and the vertex shader can read it.

  • Indirect drawing (Lesson 38): Vertex pulling pairs naturally with indirect draws for fully GPU-driven rendering.

  • Multiple vertex formats: One pipeline can render meshes with different vertex layouts by defining multiple StructuredBuffer structs or using a ByteAddressBuffer with manual offset calculations.

Common mistakes

MistakeFix
Using SDL_GPU_BUFFERUSAGE_VERTEXUse SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ
Forgetting num_storage_buffers = 1 on shaderSet it in SDL_GPUShaderCreateInfo
Calling SDL_BindGPUVertexBuffersUse SDL_BindGPUVertexStorageBuffers
Mismatched C/HLSL struct layoutEnsure identical field order and sizes
Leaving vertex attributes in pipelineSet num_vertex_buffers = 0, num_vertex_attributes = 0

Frequently asked questions

What does the Forge Vertex Pulling AI skill do?

Add vertex pulling (programmable vertex fetch) to an SDL GPU project. Replace fixed-function vertex input with storage buffer reads in the vertex shader using SV_VertexID and StructuredBuffer.

Why use Forge Vertex Pulling on TypingMind?

Because you install it once and use it with any model. Forge Vertex Pulling is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Forge Vertex Pulling in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-vertex-pulling. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Forge Vertex Pulling?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Forge Vertex Pulling?

As many as you like. As long as a model supports skills, you can use Forge Vertex Pulling with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Forge Vertex Pulling AI skill free?

Yes. It is published on GitHub by Nebulavenus under the Zlib license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇