diff options
Diffstat (limited to '')
| -rw-r--r-- | CONTEXT.md | 41 |
1 files changed, 24 insertions, 17 deletions
| @@ -294,31 +294,38 @@ vocabulary / decisions. | |||
| 294 | alpha only. The through-wall pass uses `MATERIAL_VAR_IGNOREZ` (1 << 15) | 294 | alpha only. The through-wall pass uses `MATERIAL_VAR_IGNOREZ` (1 << 15) |
| 295 | through `IMaterial::SetMaterialVarFlag` (slot 29); colours use | 295 | through `IMaterial::SetMaterialVarFlag` (slot 29); colours use |
| 296 | `$color`/`$color2` (IMaterialVar slot 11, SetVecValue 3-float slot 11) and | 296 | `$color`/`$color2` (IMaterialVar slot 11, SetVecValue 3-float slot 11) and |
| 297 | `ColorModulate` (slot 28). Alpha uses `$alpha` (IMaterialVar slot 3, | 297 | `ColorModulate` (slot 28). `$alpha` is set through IMaterialVar slot 3 |
| 298 | SetFloatValue) and `MATERIAL_VAR_TRANSLUCENT` (1 << 21) when alpha < 255. | 298 | (SetFloatValue). Shared materials are restored after each draw. |
| 299 | Shared materials are restored after each draw. | ||
| 300 | - The GUI colour picker (`add_color_alpha`) has an alpha bar, checkerboard | 299 | - The GUI colour picker (`add_color_alpha`) has an alpha bar, checkerboard |
| 301 | preview and `#RRGGBBAA` readout; plain `add_color` keeps the old opaque | 300 | preview and `#RRGGBBAA` readout; plain `add_color` keeps the old opaque |
| 302 | three-component behaviour. Chams colours are four ints (r, g, b, a). | 301 | three-component behaviour. Chams colours are four ints (r, g, b, a). |
| 303 | - Styles are built from `debug/debugtranslucentsinglecolor` (UnlitGeneric, | 302 | - **Alpha is stored but has no visual effect yet.** The usable model |
| 304 | `$color`) and material flags: | 303 | materials are opaque: `debug/debugtranslucentsinglecolor` has no |
| 305 | 0 Flat (solid + FLAT), 1 Wireframe (`debug/debugwireframe`), 2 Additive | 304 | `$translucent`, and toggling `MATERIAL_VAR_TRANSLUCENT` (1 << 21) or |
| 306 | (+ ADDITIVE), 3 Solid, 4 White (colour forced white), 5 Fullbright | 305 | rebuilding the state snapshot does not change the static shader combo. |
| 307 | (ADDITIVE|SELFILLUM, colour forced white so it reads as a white-hot glow | 306 | `debug/debugtranslucentvertexcolor`/`debug/debughitbox` are translucent but |
| 308 | instead of matching Solid), 6 Glow outline | 307 | need vertex colours and render nothing on skinned models. A custom VMT with |
| 309 | (solid plus a `debug/debugwireframe` contour pass drawn with ZNEARER | 308 | `$model 1` + `$translucent 1` (or a white basetexture) is needed to make the |
| 310 | (1 << 10) and a brightened colour so the base cannot bury it). | 309 | alpha control real. |
| 310 | - Styles: 0 Flat (`debug/debugtranslucentsinglecolor` + FLAT), 1 Wireframe | ||
| 311 | (`debug/debugwireframe`), 2 Additive | ||
| 312 | (`debug/debugtranslucentmodelhulls`, whose VMT has `$additive 1` + `$color`; | ||
| 313 | the ADDITIVE flag on the solid material did nothing), 3 Solid, 4 White | ||
| 314 | (solid, colour forced white), 5 Fullbright (the additive material, colour | ||
| 315 | forced white, giving a white-hot glow), 6 Glow outline (solid plus a | ||
| 316 | `debug/debugwireframe` contour pass drawn with ZNEARER (1 << 10) and a | ||
| 317 | brightened colour so the base cannot bury it). | ||
| 311 | `vgui/white` is vertex-colour based and has no `$model`/`$basetexture`, so it | 318 | `vgui/white` is vertex-colour based and has no `$model`/`$basetexture`, so it |
| 312 | is never used for chams; `models/debug/debugwhite` is EP2-only and the old | 319 | is never used for chams; `models/debug/debugwhite` is EP2-only and the old |
| 313 | VGUI additive material was invisible on NPCs. | 320 | VGUI additive material was invisible on NPCs. |
| 314 | - Style materials are preloaded from `outer_draw` (throttled) and cached; the | 321 | - Style materials are preloaded from `outer_draw` (throttled) and cached; the |
| 315 | render hook never calls FindMaterial itself. A missing style uses solid. | 322 | render hook never calls FindMaterial itself. A missing style uses solid. |
| 316 | - Viewmodels are collated by the engine as `RENDER_GROUP_VIEW_MODEL_OPAQUE`, | 323 | `FindMaterial` can return an unreferenced material, so each cached material |
| 317 | so an additive forced material can wash out against a bright sky or wall | 324 | is addref'd (`IncrementReferenceCount`, IMaterial slot 12); without this the |
| 318 | (and the engine may not treat the draw as translucent). Additive styles on | 325 | engine warns "bad reference count 0 when being bound" and the material's |
| 319 | the viewmodel therefore draw a faint translucent base (alpha/8) first, then | 326 | `$color`/`ColorModulate` changes are ignored. |
| 320 | the additive pass, so the model keeps a silhouette on bright backgrounds | 327 | - Additive styles still wash out against a bright sky or wall (inherent to |
| 321 | without becoming an opaque blob. | 328 | additive blending). |
| 322 | - Feature is off by default. Config sections: `[chams]` (active/bind), | 329 | - Feature is off by default. Config sections: `[chams]` (active/bind), |
| 323 | `[chams_hostile|neutral|friendly]` (`vis`, `vis_mat`, `vis_r/g/b/a`, `inv`, | 330 | `[chams_hostile|neutral|friendly]` (`vis`, `vis_mat`, `vis_r/g/b/a`, `inv`, |
| 324 | `inv_mat`, `inv_r/g/b/a`) and `[chams_vm]` (`on`, `mat`, `r/g/b/a`). The GUI | 331 | `inv_mat`, `inv_r/g/b/a`) and `[chams_vm]` (`on`, `mat`, `r/g/b/a`). The GUI |
