Tested with: KSA Version 2026.10.19.5638
KSA compiles every shader from GLSL source at startup. There is no precompiled SPIR-V shipped with the game, no shader cache on disk, and no Vulkan pipeline cache. Edit the source, restart the game, and your change is live.
If you edited a shader and nothing changed, it is nearly always one of two things: you edited a file the game does not read, or you edited one it reads but never runs. The folder trap below covers the first, Is that shader actually being used? covers the second.
There are two folders called Shaders in the game directory. Only one of them does anything.
| Folder | Files | Loaded? |
|---|---|---|
Content\Shaders\ |
Color.frag, Color.vert, ColorInstance.vert |
No. Not referenced by any XML in the game. Leftovers. |
Content\Core\Shaders\ |
~350 files across a dozen subfolders | Yes. This is the real one. |
Editing
Content\Shaders\does nothing, and the folder name makes it look like the obvious place. This is the single most common reason a shader edit appears to be ignored.
A shader has to be declared in an assets file before the game knows it exists. Core declares 200 of them in Content\Core\DefaultAssets.xml:
<Shader Id="DistantSphereVert" Path="Shaders/DistantSphere.vert" />
<Shader Id="DistantSphereFrag" Path="Shaders/DistantSphere.frag" />
<Shader Id="UnlitMeshVert" Path="Shaders/Mesh/UnlitMesh.vert" />
Path is relative to the mod folder, not to Content. Core's mod folder is Content\Core, so Shaders/DistantSphere.vert means Content\Core\Shaders\DistantSphere.vert.Id is what the renderer asks for by name..vert, .frag, .comp, .tesc, .tese.A .glsl file is not declared as a shader. Those are include files, pulled in by #include from the files that are declared. Content\Core\Shaders\Common\, the *Data.glsl files and the various *Functions.glsl are all includes.
To see what the game actually has loaded, open the in-game console and run:
shaders
That lists every shader by id, the path it was loaded from, its stage and its size. If your file is not in that list it was not declared in XML, which usually means nothing will ever load it. There is one exception, covered under Shaders the console will not show you.
The blunt approach, fine for experimenting:
Content\Core\Shaders\.That is genuinely all. No cache to clear, no compile step, no tooling.
Two caveats:
Content\Core. Keep a copy of anything you change.Shader ids are registered into one global table, and registration is first come, first served. A duplicate id is dropped, not replaced. Mods load in the order they appear in manifest.toml, so whoever gets there first wins.
That gives you the override: declare a <Shader> with the same Id as the stock one, from a mod listed above Core.
Documents\My Games\Kitten Space Agency\manifest.toml:
[[mods]]
id = "MyShaderMod"
enabled = true
[[mods]]
id = "Core"
enabled = true
mods\MyShaderMod\mod.toml:
name = "MyShaderMod"
assets = [ "MyShaderModAssets.xml" ]
mods\MyShaderMod\MyShaderModAssets.xml:
<?xml version="1.0" encoding="utf-8"?>
<Assets>
<Shader Id="DistantSphereFrag" Path="Shaders/MyDistantSphere.frag" />
</Assets>
Your file goes in mods\MyShaderMod\Shaders\MyDistantSphere.frag. Core will still try to register its own DistantSphereFrag and be quietly ignored, because yours is already in the table.
Order in
manifest.tomlis load order, and the game rewrites this file whenever you toggle mods in-game.
Check your mod is still aboveCoreafter using the in-game mod menu.
Start from a copy of the stock file rather than from scratch. The renderer expects a specific set of descriptor bindings, push constants and vertex inputs, and a shader that compiles but declares the wrong interface will fail at pipeline creation instead of at compile time, which is much harder to debug.
A shader can be declared, compile cleanly, register fine, and still never run. If your edit is definitely in the right file and definitely reloading, this is the next thing to check.
Some effects ship more than one implementation, with the unused one still wired up. Bloom is the example that catches people. There are two:
| Implementation | Shaders | Runs by default? |
|---|---|---|
| Kawase | kawase_downsample.comp, kawase_upsample.comp, kawase_downsample_with_thresholds.comp |
Yes |
| Gaussian | bloom_vertical_blur.comp, bloom_horizontal_blur_compose.comp |
No |
The Gaussian path is gated on a flag that defaults to off and can only be switched on from the bloom debug window. The Kawase path falls back to the Global Bloom and Threshold Bloom graphics settings, which are on.
Edit the Gaussian pair and nothing happens, because nothing dispatches them.
The glow around the sun is a third, separate system again: sunbloom.frag, sunbloom_blur.comp, sunbloom_merge.comp.
shaders in the console. If your file is not listed, it was never declared and nothing will ever use it.Id. Open KSA.dll in ILSpy and search for that id as a string. You are looking for a ModLibrary.Get<ShaderReference>("YourId") call, which tells you which renderer owns it.false, and plenty of debug-only paths are wired up exactly that way.See Reverse Engineering for getting set up with ILSpy.
A handful of shaders skip the <Shader> declaration entirely. A few renderers build their own pipelines and load straight off a hardcoded path with SetShaderFromFile, so these never register, never appear in the shaders listing, and cannot be overridden from a mod by id. Editing the file still works, because it is still compiled from source on every launch.
As of 2026.8.5.5168 there are eleven, in two groups:
Ambient occlusion (AMD FidelityFX CACAO), loaded by AmbientOcclusionRenderer:
Shaders/PostProcess/Blur/ffx_blur_pass.comp
Shaders/PostProcess/Cacao/ffx_cacao_apply_pass.comp
Shaders/PostProcess/Cacao/ffx_cacao_edge_sensitive_blur_pass.comp
Shaders/PostProcess/Cacao/ffx_cacao_generate_pass.comp
Shaders/PostProcess/Cacao/ffx_cacao_prepare_native_depths_and_mips_pass.comp
Shaders/PostProcess/Cacao/ffx_cacao_prepare_native_normals_pass.comp
Raytracing, loaded by RaytracePipeline and RaytracingRenderer:
Shaders/Raytracing/raygen.rgen
Shaders/Raytracing/closesthit.rchit
Shaders/Raytracing/alphaHit.rahit
Shaders/Raytracing/miss.rmiss
Shaders/Raytracing/shadow.rmiss
Note the raytracing stages use extensions that never appear in an XML declaration: .rgen, .rchit, .rahit, .rmiss. If you see one of those, it is loaded this way by definition.
These renderers also build their own CompileOptions through ShaderModuleUtils.CloneDefaultCompileOptions() and add preprocessor defines with AddMacroDefinition, so the same source file can be compiled several times into different variants. AmbientOcclusionRenderer, AtmosphereRenderer and CharacterRenderResources all do this. If a change to one file shows up in some places and not others, macro variants are the reason.
The compiler resolves #include through a callback, and the game tracks which includes each shader pulled in.
Paths are relative to the including file:
#include "Common/Lighting.glsl"
#include "../Atmosphere/AtmosphereFunctions.glsl"
An include is shared, so editing one .glsl affects every shader that pulls it in. That is often what you want for a global tweak, and occasionally a nasty surprise.
The compiler throws, and the message goes to
Documents\My Games\Kitten Space Agency\logs\KittenSpaceAgency.log. Search for the shader's path or for ShaderCompilationException.
The failure is not silent, but it is easy to miss because the game may keep going and only break when something tries to draw with that shader. If a shader edit produces a black screen, a missing object or a crash on a specific view, read the log before assuming the GLSL was fine.
.spv files and stores no compiled shaders on disk.If old behaviour survives a restart, either the game is reading a different file from the one you edited, or nothing is dispatching the shader you changed. Run shaders in the console, compare the path it reports against the file you edited, and if that checks out, work through
Is that shader actually being used?.
Two compile steps get conflated:
AppData\Local\NVIDIA\DXCache, AppData\Local\AMD\VkCache) entirely independently of the game.The first launch also reads a lot of texture data cold, and later launches get it from the OS file cache.
How much depends on the system you load and your texture size cap, which is what the `
Confirmed: KSA caches nothing itself. It never calls CreatePipelineCache, writes no .spv, and creates no cache folder anywhere. Not measured: how the remaining time splits between the driver cache and the file cache.
None of this can hand you a stale shader. Edit the GLSL and the SPIR-V changes, so the driver's cache key misses and it recompiles that one.
ShaderReloader exists in the code and watches for file changes, but the frame hook that would apply the reload does nothing in the shipped build. Treat shader editing as restart-only.
Worth knowing even if it worked: recompiling a shader module does not rebuild the graphics pipelines already built from it. Several renderers cache their pipeline in a static field for the process lifetime, so a live reload would swap the module and change nothing on screen.