中EN

Chapter 9. Deferred Shading in S.T.A.L.K.E.R. — Oles Shishkovtsov

Markdown1 KB 原始文件

Summary of full chapter read

100% deferred, 100% dynamic lighting for STALKER. Motivation: cut CPU batches from dynamic shadows; avoid repeating expensive material work per light.

Myths

Not inherently slower on DX9 if overdraw moderate. Directional lights still benefit when shadowed (sun stencil skip). Materials via MRT attributes + light shaders indexed by material ID (invert forward's light-modifies-material).

Optimizations

Hierarchical cull lights (sector-portal + CPU occ + occlusion query + stencil). Artistic light flags (shadow? project? translucent casters? specular?). Sun: stencil-mask sky, backfacing, AO=0 → ~2× measured. G-buffer: prefer decode simplicity over bit packing; settled on eye-space pos+AO and normal+material in A16R16G16B16F. Omni shadows as six spotlights for filtering/packing. Virtual position offset along normal by height helps parallax+shadow acne. Vertex AO replaces lightmaps. Material LUT (N·L, N·H, material). Edge-detect AA (depth+normal). Bloom-based exposure. Transparency: forward hack without shadows.

引用这一章的笔记

输入关键词开始搜索

滚轮或双指缩放 · 拖动平移 · 双击放大 / 还原