From c90ec80dc0cc90e76b78f84d98d1ac9c5f02c4eb Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sun, 11 Oct 2026 21:41:37 +0400 Subject: Fix material categories and transparent background ordering --- docs/reference/materials.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'docs/reference/materials.md') diff --git a/docs/reference/materials.md b/docs/reference/materials.md index bfeccf4..c148bc8 100644 --- a/docs/reference/materials.md +++ b/docs/reference/materials.md @@ -57,10 +57,12 @@ struct Phase34 { ### Pipeline category -Call site извлекает native category как `(attr1 >> 2) & 0xF` и передаёт её в -`LegacyPipelineState::with_material_category`. Таблица содержит пять -подтверждённых категорий; helper возвращает `None` для остальных значений и не -меняет уже выбранные depth и cull state. +Call site извлекает native category как `(attr1 >> 2) & 0xF` и сохраняет её на +разрешённом phase material. World draw ranges получают состояние для начального +selector при подготовке, а animated selector обновляет category вместе с +material selector. Fixed environment ranges keep their authored pipeline state. +Таблица содержит пять подтверждённых категорий; helper возвращает `None` для +остальных значений и не меняет уже выбранные depth и cull state. | category | source/destination colour factors | alpha test | | ---: | --- | --- | @@ -75,6 +77,13 @@ material category. Alpha reference remains draw-range data, while the Vulkan pipeline key includes the blend mode, depth mode, cull mode and alpha-test variant so ranges with different native state do not share a pipeline. +World transparency is a separate draw-queue decision. A world range joins that +queue when sampled diffuse opacity is below one or any bit in the native +`0x108` batch-flag mask is set; the MAT0 category alone does not make it +transparent. A queued range +with a depth attachment tests depth without writing it. Unsupported categories +fail world-range setup instead of silently falling back to opaque state. + Каждая phase занимает 34 байта: 18 parameter bytes и 16-byte C string имени текстуры. Loader переводит параметры в коэффициенты так: -- cgit v1.2.3