Commit Graph

7 Commits

Author SHA1 Message Date
Dipshet dfd8b92a5b D3D12: Fix CONSTANT_ALPHA blend factors collapsing onto constant RGB
The D3D12 PipelineBlendFactor enum had no constant-alpha entry, so the Xenos
CONSTANT_ALPHA and ONE_MINUS_CONSTANT_ALPHA blend factors (14, 15) were mapped
onto the constant-COLOR kBlendFactor / kInvBlendFactor - i.e. D3D12 BLEND_FACTOR
/ INV_BLEND_FACTOR, which use the blend constant's RGB rather than its alpha.

Aircraft ground shadow blends with dst = ONE_MINUS_CONSTANT_ALPHA and aSTANT_ALPHA blend factors collapsing onto
blend constant of (0.03, 0.04, 0.04, 0.30): it wants 1 - 0.30 = 0.70 (scale the
background down -> darken), but got 1 - (0.03,0.04,0.04) ~= 0.97 (barely scaled)
with the white source added on top, so the shadow BRIGHTENED instead of
darkening - the "white shadow" bug. Vulkan has the distinct
ONE_MINUS_CONSTANT_ALPHA factor and renders it correctly.

Add kBlendFactorAlpha / kInvBlendFactorAlpha to the enum, route factors 14/15 to
them in both the colour and alpha maps, and map them to D3D12 ALPHA_FACTOR /
INV_ALPHA_FACTOR. Verified fixed on both the RTV and ROV render-target paths.
2026-07-15 02:03:35 +02:00
salh ead11217b7 Upgraded to RexGlue v0.8 and edited a bit of the Audio code 2026-05-29 22:17:02 +03:00
salh 121c910b57 Add AC6 PAC extraction and texture export tooling 2026-04-24 17:01:15 +03:00
salh a6d3e9b4b7 Fix pipeline generation for POINT and RECTANGLE primitive lists, and resolve audio CVar linkage errors 2026-04-17 23:33:48 +03:00
salh fa136d2920 Revert "fix(gpu): allow VS-expanded primitives in D3D12 pipeline cache"
This reverts commit e41480ebb7.
2026-04-17 23:17:53 +03:00
salh e41480ebb7 fix(gpu): allow VS-expanded primitives in D3D12 pipeline cache
TranslateAnalyzedShader and CreateD3D12Pipeline assumed host vertex type was only kVertex for non-tessellation paths. Point/rectangle list expansion uses kPointListAsTriangleStrip and kRectangleListAsTriangleStrip while still emitting a vertex shader — accept those types for logging and PSO creation.

Made-with: Cursor
2026-04-17 23:00:09 +03:00
salh ddf7c28587 Initial barebones version 2026-04-17 20:09:41 +03:00