Skip to content

01 · Your first color effect ​

Read this chapter

This ZIP contains every required file; no earlier chapter is needed. Extract it as a direct child of the game’s shaderpacks directory. Static receipts and actual game observations have separate evidence scopes.

Download and identity ​

Download chapter ZIP · Source inventory · Static receipt

ZIP SHA-256:

8f856c88429f6f3bcab9a48101e23badd686d4a08af824b375134606d17f78e0

Source fingerprint:

588f68099eaaf03bd7835e7d591d84bcc8f5fbe6453fcf1bb9f356621ef4474e

Complete source ​

README.md

Download file

md
# 01-first-post / 第一个调色效果

Your first color effect.

This is a complete, independent Manifest v5 / Scene ABI v2 snapshot for the
DawnlightCore author course. Host baseline: candidate-f8aaa5c4, commit
f8aaa5c4218f54536ccf994a2d512aed2e3678b7.

Extract into a fresh directory. The root must contain shaderpack.json and shaders/.
The file sources belong to this pack; built-in Terrain fallback shaders are not copied.
There are 2 persistent viewport textures and 5 commands.
All four Terrain categories use built-in fallback.

Static checks are separate from game evidence. No driver compilation, game image,
reload, resize, device reset or switch-back test is claimed by this source snapshot.
Use a disposable world, preserve the previous selected pack and verify lifecycle
behavior before using this pack for normal play. No performance claim is made.

Course: https://core.eltancex.top/tutorial/01-first-post
English: https://core.eltancex.top/en/tutorial/01-first-post
Source: https://github.com/EltanceX/dawnlight-core-docs/tree/main/examples/course/01-first-post
shaderpack.json

Download file

json
{
  "manifestVersion": 5,
  "sceneAbiVersion": 2,
  "expectedCatalogSha256": "4bc28c17beffea2311a422fff9f633d2e4f03784460d0254adda8af2e766d84c",
  "id": "course:01-first-post",
  "name": "DawnlightCore Course 01-first-post",
  "version": "0.1.0",
  "author": "EltanceX",
  "description": "Your first color effect; independent v5 course snapshot, runtime not yet verified.",
  "shaderRoot": "shaders",
  "options": [],
  "resources": [
    {
      "id": "course:scene/color",
      "kind": "texture2D",
      "lifetime": "persistent",
      "size": {
        "mode": "viewport"
      },
      "format": "rgba8"
    },
    {
      "id": "course:scene/depth",
      "kind": "texture2D",
      "lifetime": "persistent",
      "size": {
        "mode": "viewport"
      },
      "format": "depth24"
    }
  ],
  "programs": [
    {
      "id": "course:post/present",
      "kind": "graphics",
      "vertex": "fullscreen.vsh",
      "fragment": "present.psh",
      "compileMode": "manifestDriven"
    }
  ],
  "frameTarget": {
    "targets": {
      "colors": [
        {
          "location": 0,
          "resource": "course:scene/color",
          "loadOp": "clear",
          "storeOp": "store",
          "clearValue": [
            0,
            0,
            0,
            1
          ]
        }
      ],
      "depth": {
        "resource": "course:scene/depth",
        "loadOp": "clear",
        "storeOp": "store",
        "clearValue": 1
      }
    }
  },
  "passes": [
    {
      "id": "course:terrain_opaque",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "world",
        "phase": "opaque"
      },
      "services": [],
      "programs": [],
      "commands": [
        {
          "type": "engineDraw",
          "sceneProvider": {
            "id": "dawnlight:scene_draw/terrain_opaque",
            "version": 2
          },
          "targets": {
            "colors": [
              {
                "location": 0,
                "resource": "course:scene/color",
                "loadOp": "load",
                "storeOp": "store"
              }
            ],
            "depth": {
              "resource": "course:scene/depth",
              "loadOp": "clear",
              "storeOp": "store",
              "clearValue": 1
            }
          },
          "state": {
            "blend": "opaque",
            "depth": "default",
            "rasterizer": "cullCounterClockwiseScissor"
          },
          "viewport": {
            "source": "target",
            "restore": "frame",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "course:scene/color",
        "course:scene/depth"
      ],
      "outputs": [
        "course:scene/color",
        "course:scene/depth"
      ]
    },
    {
      "id": "course:terrain_alpha_tested",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "world",
        "phase": "opaque",
        "ordering": {
          "after": [
            "course:terrain_opaque"
          ]
        }
      },
      "services": [],
      "programs": [],
      "commands": [
        {
          "type": "engineDraw",
          "sceneProvider": {
            "id": "dawnlight:scene_draw/terrain_alpha_tested",
            "version": 2
          },
          "targets": {
            "colors": [
              {
                "location": 0,
                "resource": "course:scene/color",
                "loadOp": "load",
                "storeOp": "store"
              }
            ],
            "depth": {
              "resource": "course:scene/depth",
              "loadOp": "load",
              "storeOp": "store"
            }
          },
          "state": {
            "blend": "opaque",
            "depth": "default",
            "rasterizer": "cullCounterClockwiseScissor"
          },
          "viewport": {
            "source": "target",
            "restore": "frame",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "course:scene/color",
        "course:scene/depth"
      ],
      "outputs": [
        "course:scene/color",
        "course:scene/depth"
      ]
    },
    {
      "id": "course:terrain_transparent",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "world",
        "phase": "transparent"
      },
      "services": [],
      "programs": [],
      "commands": [
        {
          "type": "engineDraw",
          "sceneProvider": {
            "id": "dawnlight:scene_draw/terrain_transparent",
            "version": 2
          },
          "targets": {
            "colors": [
              {
                "location": 0,
                "resource": "course:scene/color",
                "loadOp": "load",
                "storeOp": "store"
              }
            ],
            "depth": {
              "resource": "course:scene/depth",
              "loadOp": "load",
              "storeOp": "store"
            }
          },
          "state": {
            "blend": "alphaBlend",
            "depth": "default",
            "rasterizer": "cullCounterClockwiseScissor"
          },
          "viewport": {
            "source": "target",
            "restore": "frame",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "course:scene/color",
        "course:scene/depth"
      ],
      "outputs": [
        "course:scene/color",
        "course:scene/depth"
      ]
    },
    {
      "id": "course:terrain_sorted_translucent",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "world",
        "phase": "transparent",
        "ordering": {
          "after": [
            "course:terrain_transparent"
          ]
        }
      },
      "services": [],
      "programs": [],
      "commands": [
        {
          "type": "engineDraw",
          "sceneProvider": {
            "id": "dawnlight:scene_draw/terrain_sorted_translucent",
            "version": 2
          },
          "targets": {
            "colors": [
              {
                "location": 0,
                "resource": "course:scene/color",
                "loadOp": "load",
                "storeOp": "store"
              }
            ],
            "depth": {
              "resource": "course:scene/depth",
              "loadOp": "load",
              "storeOp": "store"
            }
          },
          "state": {
            "blend": "alphaBlend",
            "depth": "default",
            "rasterizer": "cullCounterClockwiseScissor"
          },
          "viewport": {
            "source": "target",
            "restore": "frame",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "course:scene/color",
        "course:scene/depth"
      ],
      "outputs": [
        "course:scene/color",
        "course:scene/depth"
      ]
    },
    {
      "id": "course:present",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "afterDraw",
        "phase": "screenOutput"
      },
      "services": [],
      "programs": [
        "course:post/present"
      ],
      "commands": [
        {
          "type": "present",
          "program": "course:post/present",
          "bindings": [
            {
              "kind": "sampler2D",
              "symbol": "u_sceneColor",
              "binding": 0,
              "resource": "course:scene/color"
            }
          ],
          "state": {
            "blend": "opaque",
            "depth": "disabled",
            "rasterizer": "cullNoneScissor"
          },
          "viewport": {
            "source": "frame",
            "restore": "none",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "course:scene/color"
      ],
      "outputs": []
    }
  ],
  "sceneCategories": [
    {
      "id": "dawnlight:scene/terrain_opaque",
      "version": 1,
      "mode": "builtin"
    },
    {
      "id": "dawnlight:scene/terrain_alpha_tested",
      "version": 1,
      "mode": "builtin"
    },
    {
      "id": "dawnlight:scene/terrain_transparent",
      "version": 1,
      "mode": "builtin"
    },
    {
      "id": "dawnlight:scene/terrain_sorted_translucent",
      "version": 1,
      "mode": "builtin"
    }
  ]
}
shaders/fullscreen.vsh

Download file

glsl
#version 320 es
precision highp float;
out vec2 v_uv;
void main() {
    const vec2 corners[4] = vec2[4](vec2(-1.0, -1.0), vec2(1.0, -1.0), vec2(-1.0, 1.0), vec2(1.0, 1.0));
    vec2 position = corners[gl_VertexID & 3];
    v_uv = position * 0.5 + 0.5;
    gl_Position = vec4(position, 0.0, 1.0);
}
shaders/present.psh

Download file

glsl
#version 320 es
precision highp float;
uniform sampler2D u_sceneColor;
in vec2 v_uv;
layout(location = 0) out vec4 o_color;
void main() {
    vec3 source = texture(u_sceneColor, v_uv).rgb;
    const vec3 tint = vec3(1.04, 1.0, 0.92);
    const float strength = 0.65;
    vec3 contrast = (source - 0.5) * 1.08 + 0.5;
    o_color = vec4(clamp(mix(source, contrast * tint, strength), 0.0, 1.0), 1.0);
}

Validation scope ​

Pinned Analyzer checks passed for the source and a newly extracted archive: pack, scene, graph and every declared Program interface. Their normalized output hashes agree. This receipt supplies no driver report or live-world claim. See the linked chapter for dated runtime observations and limitations.

Author documentation · Manifest v5 / Scene ABI v2