Skip to content

Latest commit

 

History

History
118 lines (95 loc) · 7.51 KB

File metadata and controls

118 lines (95 loc) · 7.51 KB

Project Structure

Language: English | 简体中文

Repository root

Path Role in Alpha Piscium
shaders/ Runtime shader-pack contents that can be installed directly
scripts/ Generators, packaging, release, and offline asset tools
docs/ Project-specific development and module documentation
changelogs/ Release notes; the options script also derives its default version from them
data/ Source data used by offline scripts
licenses/ Third-party licenses shipped in the package
.github/ GitHub workflows and repository configuration
README.md, LICENSE Public overview and primary license
shaders/
├─ Base.glsl      common include root
├─ base/          shared interfaces and generated bindings
├─ pass/          entry-point shaders grouped by pipeline stage
├─ techniques/    reusable modules plus existing direct compute entries
├─ util/          general GLSL helpers and data types
├─ textures/      runtime LUT, noise, sky, cloud, and sampling assets
├─ lang/          generated option localization
├─ *.csh          generated compute wrappers
├─ *.vsh/*.fsh…   Iris compatibility entry wrappers
├─ shaders.properties
└─ shadesmith.json

Base.glsl and base/

pass/

Only shaders with an entry point belong here; it is the standard location for new entry points:

  • setup/: initialization and cleanup when the shader pack loads or its dimensions change.
  • begin/: per-frame global-data, LUT, work-queue, and transient-resource preparation.
  • geometry/: solid, translucent, and shadow geometry entry implementations.
  • shadowcomp/: water-normal processing after shadow geometry.
  • composite/: screen-space lighting, GI, volumetrics, translucency, and post-processing entry points.
  • general/: shared full-screen and no-op wrapper implementations.

Shared code without main belongs under techniques/ or util/.

techniques/

This directory groups reusable implementations by algorithm or module. It also currently retains a few compute entry points registered directly in the program list, including Bloom.comp.glsl, rtwsm/*.comp.glsl, and atmospheric LUT/cloud passes:

  • gi/: shared ReSTIR, reprojection, reservoir, and GI-denoising implementations; the SST core is SST2.glsl at the technique root.
  • atmospherics/: atmospheric-scattering LUTs, epipolar scattering, underwater volumetrics, and clouds.
  • rtwsm/: shadow importance maps, warping, and coordinate mapping.
  • displaytransform/: exposure, DRT, and final display transforms.
  • ffx/: the FSR1/RCAS/SPD code currently in use and third-party compatibility layers.
  • Files at the directory root include shared bloom, DOF, Hi-Z, lighting, environment-probe, and water-wave implementations.

Treat the existing direct compute entries as existing layout, not as a template for new entry points.

util/

This directory contains helpers that are genuinely shared across modules: math, coordinate, sampling, random-number, material/G-buffer, BSDF/Fresnel, and color-space utilities. Debug implementations live under shaders/techniques/debug/. Code used by one major module should stay in its corresponding techniques/<module>/ directory rather than expanding the shared layer.

Root wrappers and properties

The core generation chain is programs.main.kts, options.main.kts, shadesmith.ps1, and make-zip.main.kts. The remaining *.kts/*.main.kts files mainly generate offline textures/LUTs or perform release operations; see other scripts. scripts/shaders.properties is a handwritten property source, not generated output.

Placement rules

  • New entry points with main: shaders/pass/; without main: shaders/techniques/ or shaders/util/. Maintain existing technique compute entries in place unless a dedicated structure refactor moves them.
  • Reuse an existing module directory unless a genuinely separate pipeline responsibility appears.
  • Update generated files through their source script.
  • New settings go through the options DSL, tiles through shadesmith.json, and compute passes through the program list.