libgdx-shaders

libgdx-shaders is a skill for Claude Code from kyu-n/gdx-claude-skills. It costs 63 tokens per session (2,981 once invoked), scanned A, original, MIT.

A reference for writing libGDX Java or Kotlin code that uses GLSL, the language for graphics-card shaders. It covers shader setup, rendering integration, uniforms, compilation, and compatibility with desktop and mobile graphics systems.

In plain words
What is it for?
Use it when creating or debugging ShaderProgram code, custom SpriteBatch or Mesh rendering, shader uniforms and attributes, or OpenGL ES 2.0 and 3.0 compatibility.
Why use it?
It helps avoid common shader problems such as compilation errors, black or white screens, and code that works on desktop but fails on a phone. It also explains how to manage shader resources correctly.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the gdx-claude-skills plugin — 28 skills shipped together

Good fit Use it when creating or debugging ShaderProgram code, custom SpriteBatch or Mesh rendering, shader uniforms and attributes, or OpenGL ES 2.0 and 3.0 compatibility.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kyu-n/gdx-claude-skills/libgdx-shaders
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kyu-n/gdx-claude-skills --skill libgdx-shaders
Clone the repo
git clone --depth 1 https://github.com/kyu-n/gdx-claude-skills

Made for: Claude Code.

Or install gdx-claude-skills, the plugin that ships this one along with the rest of its 28 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for libgdx-shaders

README.md
[![agentmods](https://agentmods.dev/badge/skills/kyu-n/gdx-claude-skills/libgdx-shaders/github.svg)](https://agentmods.dev/skills/kyu-n/gdx-claude-skills/libgdx-shaders)
Your own site
<a href="https://agentmods.dev/skills/kyu-n/gdx-claude-skills/libgdx-shaders"><img src="https://agentmods.dev/badge/skills/kyu-n/gdx-claude-skills/libgdx-shaders/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for libgdx-shaders

Your own site · 80×15
<a href="https://agentmods.dev/skills/kyu-n/gdx-claude-skills/libgdx-shaders"><img src="https://agentmods.dev/badge/skills/kyu-n/gdx-claude-skills/libgdx-shaders.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,981 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.02981
Opus 5 $0.00032 $0.01491
Sonnet 5 $0.00013 $0.00596
Haiku 4.5 $0.00006 $0.00298

Measured 12d ago against content hash 3597bf6f4a25, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

libgdx-shaders scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/libgdx-shaders/SKILL.md · 238 lines

How it starts

The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.

libGDX ShaderProgram & GLSL

Quick reference for ShaderProgram, GLSL authoring, SpriteBatch/Mesh integration, and cross-platform shader compatibility. Covers GL ES 2.0 and GL ES 3.0 targeting.

ShaderProgram Basics

// Construction — from source strings or FileHandles
ShaderProgram shader = new ShaderProgram(vertexSrc, fragmentSrc);
ShaderProgram shader = new ShaderProgram(Gdx.files.internal("vert.glsl"),
                                         Gdx.files.internal("frag.glsl"));

// ALWAYS check compilation
if (!shader.isCompiled()) {
    Gdx.app.error("Shader", shader.getLog());
    // handle failure — do not proceed
}

// Bind before setting uniforms (standalone usage)
shader.bind();
shader.setUniformf("u_time", elapsed);

// Disposal
shader.dispose();

ShaderProgram is a managed resource — auto-recompiles on Android GL context loss. Source strings are retained internally.

DO NOT use begin()/end() — they are deprecated. begin() just calls bind(). end() is a no-op. Use bind() directly.

Configuration (Static Fields)

// Strict uniform checking (default: true)
// true  → IllegalArgumentException if uniform name not found in shader
// false → silently ignores missing uniforms (GL no-op on location -1)
ShaderProgram.pedantic = false;

// Prepended to ALL shader source before compilation (default: "")
// Affects every ShaderProgram created after being set, including internal ones
ShaderProgram.prependVertexCode = "#version 150\n";
ShaderProgram.prependFragmentCode = "#version 150\n";

prependVertexCode/prependFragmentCode are useful for injecting #version directives globally (e.g., fixing macOS GL 3.2 core profile). Caution: they affect libGDX's internal shaders (SpriteBatch, ShapeRenderer) too.

Standard Attribute Names

Constant Value Components
ShaderProgram.POSITION_ATTRIBUTE "a_position" 3 (xyz)
ShaderProgram.COLOR_ATTRIBUTE "a_color" 4 (rgba)
ShaderProgram.TEXCOORD_ATTRIBUTE "a_texCoord" 2 (uv) — unit appended: a_texCoord0
ShaderProgram.NORMAL_ATTRIBUTE "a_normal" 3 (xyz)
ShaderProgram.TANGENT_ATTRIBUTE "a_tangent" 3
ShaderProgram.BINORMAL_ATTRIBUTE "a_binormal" 3
ShaderProgram.BONEWEIGHT_ATTRIBUTE "a_boneWeight" 2 — unit appended: a_boneWeight0

Read the full file on GitHub · 238 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 238 lines · 63 tokens per session scan A 3597bf6f4a25

Subscribe to this mod's changes

libgdx-shaders is a skill published in the GitHub repository kyu-n/gdx-claude-skills (4 stars, last pushed 7mo ago), licensed MIT. It adds 63 tokens to every session and 2,981 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cesiumjs-models-particles

CesiumJS models, glTF, and particle effects - Model, KHRmeshoptcompression, CAD glTF extensions, EdgeDisplayMode, ModelAnimation, ModelNode, ParticleSystem, emitters, GPM extensions. Use when loading compressed or CAD-style glTF/GLB models, controlling edge rendering, playing model animations, positioning particles…

CesiumGS/cesiumjs-skills · 87 tokens

cesiumjs-materials-shaders

CesiumJS materials and post-processing — Material, Fabric JSON, MaterialAppearance, ImageBasedLighting, PostProcessStage, PostProcessStageLibrary, bloom, depth of field, ambient occlusion, FXAA, tonemapping, BlendingState. Use when defining Fabric materials for entities or primitives, configuring PBR image-based…

CesiumGS/cesiumjs-skills · 83 tokens

atmosphere-shader

Generate physically-based atmospheric scattering shaders — sky domes, planetary atmospheres, LUT-optimized pipelines, depth-aware post-processing. Four modes — sky-dome, atmosphere-post, planet, lut. Triggers on atmospheric scattering, sky shader, sunset rendering, planet atmosphere, Rayleigh scattering, Mie…

tdimino/claude-code-minoan · 96 tokens

particle-swarm-sim

Generate 20,000+ particle swarm simulators in two modes: sandbox (complete Three.js host runtime with gesture controls, security validation, code injection pipeline) and sim (behavior function bodies that position/color particles via a sandboxed API). The AI writes ONLY a function body — the host handles rendering…

tdimino/claude-code-minoan · 0 tokens

sprite-forge

Generate game sprites, SVG characters, ASCII art, animated mascots, and isometric turnarounds from images or descriptions. Five output modes: SVG characters, game sprite sheets with atlas metadata, 8-way isometric turnarounds, ASCII/Unicode terminal art, GSAP-animated mascots. Triggers on sprite, pixel art, SVG…

tdimino/claude-code-minoan · 95 tokens

meshy-3d-generation

Generate 3D models, textures, images, rig characters, and animate them using the Meshy AI API. Handles API key detection, setup, and all generation workflows via direct HTTP calls. Use when the user asks to create 3D models, convert text/images to 3D, texture models, rig or animate characters, or interact with the…

meshy-dev/meshy-3d-agent · 101 tokens