Skip to content

Feature · Vignette ​

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:

a0b5b58fb179147b09fa884f3757f0a0006e1012c58cc4217bc5f46eee715351

Source fingerprint:

00e02eaa46a886f4e0d64a51562724501b18f1664117d237d6e39ff6002474c0

Complete source ​

README.md

Download file

md
# Feature · Vignette / 独立效果 · 暗角

Standalone Manifest v5 / Scene ABI v2 pack for host f8aaa5c4218f54536ccf994a2d512aed2e3678b7.

Extract directly to shaderpacks/w7-vignette/shaderpack.json. In a creative world use /switchshader w7-vignette; /switchshader builtin restores BuiltIn. Press U → Options → Effect practice, toggle the effect and apply. Switching to the same pack reloads it.

practice:grade defaults true; false removes the post texture and effect Program/command. practice:strength is a 0–1 Program define (default 0.65). No extra Mod, data, history or private API is required. All four Terrain routes use BuiltIn.

This operates on the existing RGBA8 scene image. It does not add HDR, a physical camera, geometry edges or full scene coverage guarantees. Luminance outlines can mark texture detail and miss equal-luminance silhouettes.

Full instructions and cost model: https://core.eltancex.top/recipes/vignette

Validate with the pinned Analyzer; scene/program interface use option overrides and graph branches require JSON-RPC dawnlight/dumpGraph inputs.options. Static receipts do not prove device behavior. Runtime evidence on the website is bound to exact source bytes.

Website-authored source: https://github.com/EltanceX/dawnlight-core-docs/tree/main/examples/features/vignette
Public host: https://gitea.com/EltanceX/DawnlightCore
settings.json

Download file

json
{
  "schemaVersion": 1,
  "defaultLocale": "en-US",
  "translations": {
    "zh-CN": {
      "page.amber": "效果实践",
      "practice:grade": "效果",
      "practice:strength": "效果强度(重新编译)"
    },
    "en-US": {
      "page.amber": "Effect practice",
      "practice:grade": "Effect enabled",
      "practice:strength": "Effect strength (recompile)"
    }
  },
  "pages": [
    {
      "id": "amber",
      "title": "page.amber",
      "groups": [
        {
          "id": "look",
          "controls": [
            {
              "id": "grade",
              "option": "practice:grade",
              "widget": "toggle",
              "label": "practice:grade"
            },
            {
              "id": "strength",
              "option": "practice:strength",
              "widget": "slider",
              "label": "practice:strength",
              "min": 0,
              "max": 1,
              "step": 0.05,
              "format": "0.00",
              "enabledWhen": [
                {
                  "option": "practice:grade",
                  "equals": true
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
shaderpack.json

Download file

json
{
  "manifestVersion": 5,
  "sceneAbiVersion": 2,
  "expectedCatalogSha256": "4bc28c17beffea2311a422fff9f633d2e4f03784460d0254adda8af2e766d84c",
  "id": "practice:vignette",
  "name": "Practice vignette",
  "version": "1.0.0",
  "author": "EltanceX",
  "description": "Independent LDR vignette example. Static and runtime evidence are recorded separately.",
  "shaderRoot": "shaders",
  "options": [
    {
      "id": "practice:grade",
      "type": "boolean",
      "default": true,
      "impact": [
        "pipeline",
        "resources"
      ]
    },
    {
      "id": "practice:strength",
      "type": "number",
      "default": 0.65,
      "min": 0,
      "max": 1,
      "impact": [
        "program"
      ]
    }
  ],
  "resources": [
    {
      "id": "practice:scene/color",
      "kind": "texture2D",
      "lifetime": "persistent",
      "size": {
        "mode": "viewport"
      },
      "format": "rgba8"
    },
    {
      "id": "practice:scene/depth",
      "kind": "texture2D",
      "lifetime": "persistent",
      "size": {
        "mode": "viewport"
      },
      "format": "depth24"
    },
    {
      "id": "practice:post/color",
      "kind": "texture2D",
      "lifetime": "persistent",
      "size": {
        "mode": "viewport"
      },
      "format": "rgba8"
    }
  ],
  "programs": [
    {
      "id": "practice:post/grade",
      "kind": "graphics",
      "vertex": "fullscreen.vsh",
      "fragment": "grade.psh",
      "compileMode": "manifestDriven",
      "defines": {
        "GRADE_STRENGTH": {
          "option": "practice:strength"
        }
      }
    },
    {
      "id": "practice:post/present",
      "kind": "graphics",
      "vertex": "fullscreen.vsh",
      "fragment": "present.psh",
      "compileMode": "manifestDriven"
    }
  ],
  "frameTarget": {
    "targets": {
      "colors": [
        {
          "location": 0,
          "resource": "practice:scene/color",
          "loadOp": "clear",
          "storeOp": "store",
          "clearValue": [
            0,
            0,
            0,
            1
          ]
        }
      ],
      "depth": {
        "resource": "practice:scene/depth",
        "loadOp": "clear",
        "storeOp": "store",
        "clearValue": 1
      }
    }
  },
  "passes": [
    {
      "id": "practice: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": "practice:scene/color",
                "loadOp": "load",
                "storeOp": "store"
              }
            ],
            "depth": {
              "resource": "practice:scene/depth",
              "loadOp": "clear",
              "storeOp": "store",
              "clearValue": 1
            }
          },
          "state": {
            "blend": "opaque",
            "depth": "default",
            "rasterizer": "cullCounterClockwiseScissor"
          },
          "viewport": {
            "source": "target",
            "restore": "frame",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "practice:scene/color",
        "practice:scene/depth"
      ],
      "outputs": [
        "practice:scene/color",
        "practice:scene/depth"
      ]
    },
    {
      "id": "practice:terrain_alpha_tested",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "world",
        "phase": "opaque",
        "ordering": {
          "after": [
            "practice:terrain_opaque"
          ]
        }
      },
      "services": [],
      "programs": [],
      "commands": [
        {
          "type": "engineDraw",
          "sceneProvider": {
            "id": "dawnlight:scene_draw/terrain_alpha_tested",
            "version": 2
          },
          "targets": {
            "colors": [
              {
                "location": 0,
                "resource": "practice:scene/color",
                "loadOp": "load",
                "storeOp": "store"
              }
            ],
            "depth": {
              "resource": "practice:scene/depth",
              "loadOp": "load",
              "storeOp": "store"
            }
          },
          "state": {
            "blend": "opaque",
            "depth": "default",
            "rasterizer": "cullCounterClockwiseScissor"
          },
          "viewport": {
            "source": "target",
            "restore": "frame",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "practice:scene/color",
        "practice:scene/depth"
      ],
      "outputs": [
        "practice:scene/color",
        "practice:scene/depth"
      ]
    },
    {
      "id": "practice: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": "practice:scene/color",
                "loadOp": "load",
                "storeOp": "store"
              }
            ],
            "depth": {
              "resource": "practice:scene/depth",
              "loadOp": "load",
              "storeOp": "store"
            }
          },
          "state": {
            "blend": "alphaBlend",
            "depth": "default",
            "rasterizer": "cullCounterClockwiseScissor"
          },
          "viewport": {
            "source": "target",
            "restore": "frame",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "practice:scene/color",
        "practice:scene/depth"
      ],
      "outputs": [
        "practice:scene/color",
        "practice:scene/depth"
      ]
    },
    {
      "id": "practice:terrain_sorted_translucent",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "world",
        "phase": "transparent",
        "ordering": {
          "after": [
            "practice:terrain_transparent"
          ]
        }
      },
      "services": [],
      "programs": [],
      "commands": [
        {
          "type": "engineDraw",
          "sceneProvider": {
            "id": "dawnlight:scene_draw/terrain_sorted_translucent",
            "version": 2
          },
          "targets": {
            "colors": [
              {
                "location": 0,
                "resource": "practice:scene/color",
                "loadOp": "load",
                "storeOp": "store"
              }
            ],
            "depth": {
              "resource": "practice:scene/depth",
              "loadOp": "load",
              "storeOp": "store"
            }
          },
          "state": {
            "blend": "alphaBlend",
            "depth": "default",
            "rasterizer": "cullCounterClockwiseScissor"
          },
          "viewport": {
            "source": "target",
            "restore": "frame",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "practice:scene/color",
        "practice:scene/depth"
      ],
      "outputs": [
        "practice:scene/color",
        "practice:scene/depth"
      ]
    },
    {
      "id": "practice:grade",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "afterDraw",
        "phase": "afterDraw"
      },
      "services": [],
      "programs": [
        "practice:post/grade"
      ],
      "commands": [
        {
          "type": "fullscreen",
          "program": "practice:post/grade",
          "bindings": [
            {
              "kind": "sampler2D",
              "symbol": "u_sceneColor",
              "binding": 0,
              "resource": "practice:scene/color"
            }
          ],
          "state": {
            "blend": "opaque",
            "depth": "disabled",
            "rasterizer": "cullNoneScissor"
          },
          "viewport": {
            "source": "target",
            "restore": "frame",
            "synchronizeScissor": true
          },
          "targets": {
            "colors": [
              {
                "location": 0,
                "resource": "practice:post/color",
                "loadOp": "dontCare",
                "storeOp": "store"
              }
            ]
          }
        }
      ],
      "inputs": [
        "practice:scene/color"
      ],
      "outputs": [
        "practice:post/color"
      ],
      "enabledWhen": [
        {
          "option": "practice:grade",
          "equals": true
        }
      ]
    },
    {
      "id": "practice:present-grade",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "afterDraw",
        "phase": "screenOutput",
        "ordering": {
          "after": [
            "practice:grade"
          ]
        }
      },
      "services": [],
      "programs": [
        "practice:post/present"
      ],
      "commands": [
        {
          "type": "present",
          "program": "practice:post/present",
          "bindings": [
            {
              "kind": "sampler2D",
              "symbol": "u_postColor",
              "binding": 0,
              "resource": "practice:post/color"
            }
          ],
          "state": {
            "blend": "opaque",
            "depth": "disabled",
            "rasterizer": "cullNoneScissor"
          },
          "viewport": {
            "source": "frame",
            "restore": "none",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "practice:post/color"
      ],
      "outputs": [],
      "enabledWhen": [
        {
          "option": "practice:grade",
          "equals": true
        }
      ]
    },
    {
      "id": "practice:present-raw",
      "enabled": true,
      "stage": {
        "template": "dawnlight:command_list",
        "version": 1,
        "target": "afterDraw",
        "phase": "screenOutput"
      },
      "services": [],
      "programs": [
        "practice:post/present"
      ],
      "commands": [
        {
          "type": "present",
          "program": "practice:post/present",
          "bindings": [
            {
              "kind": "sampler2D",
              "symbol": "u_postColor",
              "binding": 0,
              "resource": "practice:scene/color"
            }
          ],
          "state": {
            "blend": "opaque",
            "depth": "disabled",
            "rasterizer": "cullNoneScissor"
          },
          "viewport": {
            "source": "frame",
            "restore": "none",
            "synchronizeScissor": true
          }
        }
      ],
      "inputs": [
        "practice:scene/color"
      ],
      "outputs": [],
      "enabledWhen": [
        {
          "option": "practice:grade",
          "equals": false
        }
      ]
    }
  ],
  "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"
    }
  ],
  "settings": "settings.json"
}
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/grade.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 c = texture(u_sceneColor, v_uv).rgb;
    vec2 extent = vec2(textureSize(u_sceneColor, 0));
    vec2 p = (v_uv - 0.5) * vec2(extent.x / extent.y, 1.0);
    float mask = smoothstep(0.22, 0.82, length(p));
    o_color = vec4(c * (1.0 - 0.65 * float(GRADE_STRENGTH) * mask), 1.0);
}
shaders/present.psh

Download file

glsl
#version 320 es
precision highp float;
uniform sampler2D u_postColor;
in vec2 v_uv;
layout(location = 0) out vec4 o_color;
void main() {
    o_color = texture(u_postColor, v_uv);
}

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