frb-pixel-harness
Skill659 starsChanged 2 months agoMITView on GitHub
Pixel tests that render Gum through a real FlatRedBall (FRB1) game. Triggers: premultiplied alpha, Blend/BlendState changes, render-target bake or composite, Tests/FlatRedBall.GumRendering.Tests, BlendMathTests.
In this repository69 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- debuggingSkill
- frb-build-verificationSkill
- gum-architecture-layersSkill
- gum-bundleSkill
- gum-cliSkill
- gum-cross-platform-unificationSkill
- gum-docs-writingSkill
- gum-file-pathsSkill
- gum-forms-behaviorsSkill
- gum-forms-controlsSkill
- gum-forms-default-visualsSkill
- gum-forms-itemscontrolSkill
- gum-forms-theme-importSkill
- gum-iconsSkill
- gum-issue-creationSkill
- gum-kernsmith-integrationsSkill
- gum-layout-engineSkill
- gum-layoutSkill
- gum-localizationSkill
- gum-monogame-renderingSkill
- gum-monthly-releaseSkill
- gum-project-versioningSkill
- gum-property-assignmentSkill
- gum-raylib-renderingSkill
- gum-releaseSkill
- gum-runtime-animation-chainsSkill
- gum-runtime-bindingSkill
- gum-runtime-fontsSkill
- gum-runtime-hot-reloadSkill
- gum-runtime-syntax-versionSkill
- gum-runtime-systemmanagers-initSkill
- gum-runtime-topologySkill
- gum-runtime-variable-referencesSkill
- gum-samplesSkill
- gum-serviceSkill
- gum-source-linked-projectSkill
- gum-themingSkill
- gum-tool-animationsSkill
- gum-tool-codegenSkill
- gum-tool-copy-pasteSkill
- gum-tool-delete-logicSkill
- gum-tool-dialogsSkill
- gum-tool-errorsSkill
- gum-tool-file-watchSkill
- gum-tool-font-generationSkill
- gum-tool-import-from-gumxSkill
- gum-tool-loggingSkill
- gum-tool-outputSkill
- gum-tool-pluginsSkill
- gum-tool-save-classesSkill
- gum-tool-screenshotsSkill
- gum-tool-selectionSkill
- gum-tool-tree-viewSkill
- gum-tool-undoSkill
- gum-tool-variable-gridSkill
- gum-tool-variable-referencesSkill
- gum-tool-viewmodelsSkill
- gum-unit-testsSkill
- gum-variable-deep-diveSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Run it by path, dotnet test Tests/FlatRedBall.GumRendering.Tests, or one class with pwsh Tools/fast-test.ps1 …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
FRB Pixel Harness
Tests/FlatRedBall.GumRendering.Tests draws Gum through FRB's own GumIdb and checks single pixels against arithmetic. It exists because MonoGameGum.IntegrationTests cannot model FRB's premultiplied pipeline (NormalBlendState == AlphaBlend). Run it after changing blend states, Sprite.Render, or the render-target bake/composite in Renderer.cs. For compile-only checks see frb-build-verification.
Run it by path, dotnet test Tests/FlatRedBall.GumRendering.Tests, or one class with pwsh Tools/fast-test.ps1 FlatRedBall.GumRendering.Tests:BlendMathTests; it is in no solution, so fast-test needs the Project: prefix. The build skips itself with a warning when ../FlatRedBall is missing.
| File | Purpose |
Harness/FrbGumHost.cs | One real FRB Game per process; Render(...) draws elements and returns the backbuffer |
BlendMathTests.cs | Solid colors at a known alpha, expected value computed in the test |
SpriteTintTests.cs | Sprite Red/Green/Blue/Alpha set through SetProperty, as a loaded project sets them |
Gotchas
FrbGumHost.Initializecopies the hooks Glue generates intoGame1.Initialize(GumGame1CodeGenerator.csin the FRB repo). When Glue's generated setup changes, update the host to match.- FRB state is static, so there is exactly one host per process. Touch
FrbGumHost.Instancebefore anything that usesSystemManagers.Default. - Sprite textures must go through
TextureContentLoader.MakePremultiplied, as real FRB loads do. - Inside
namespace FlatRedBall.*,Gum.andSpriteresolve to FRB types. Useglobal::Gum...andRenderingLibrary.Graphics.Sprite. - The
FRBcompile constant makesToBlendStatereturn the premultiplied blend states; a plaindotnet testofMonoGameGum.Testsnever exercises that path. Blend.Replaceon a translucent texture looks darker in FRB than in the tool. FRB's texture is premultiplied andBlendState.Opaquewrites it unchanged, while the tool replaces with the straight color; matching it needs a shader that un-premultiplies, so the difference is accepted and not tested.- A
Skipped test documents a known FRB bug; remove theSkipin the same change that fixes it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

