Describes the core flow for loading and running RetroArch shader presets (.slangp) in Goggles.
Goggles reads a preset path from config or from the runtime UI. If no preset is selected, the effect stage stays in passthrough mode.
The preset loader reads the .slangp file, resolves referenced shader files, and collects pass
metadata such as scaling, filtering, feedback, and history requirements.
RetroArch shader sources are preprocessed before compilation:
- resolve includes
- extract
#pragma parametermetadata - split combined
.slangfiles into vertex and fragment stages
Goggles compiles the generated GLSL through Slang, then reflects resource bindings and push constants for each pass.
The filter chain allocates the pass sequence, intermediate framebuffers, and any history or feedback resources required by the preset.
For every frame, the chain records passes in order and binds the semantics expected by RetroArch shaders, including:
SourceOriginalOriginalHistory#PassOutput#PassFeedback#
The output pass writes the final processed image to the viewer swapchain.
The ImGui overlay can:
- enable or disable the effect stage
- apply or reload presets
- adjust exposed shader parameters at runtime
- Filter Chain - Detailed render-pass flow
- Shader Compatibility Report - Batch compilation status
- RetroArch Slang spec