Cxbx-Reloaded
Cxbx-Reloaded copied to clipboard
Implement Texture Stage State xbox extensions in HLSL
[ Replacement for accidentally closed PR #2228 ]
This PR addresses #1604, introducing most of what's needed to support COLORSIGN, COLORKEYCOLOR, COLORKEYOP alongside with a small ALPHAKILL refactoring.
To get there, X_D3DFMT_L6V5U5 had to be converted into host D3DFMT_X8L8V8U8, and some HLSL code had to be added to implement these extensions.
Some pieces to the puzzle may still be missing, but at least this is a step in the right direction.
The most important test is to see if JSRF boost dash didn't regress because of this. I can't really judge this well, so please give us some feedback.
ummm something is afoot...lol
ummm something is afoot...lol
This green color likely is the 'WarningColor' I return when the ColorKey operation reaches the end of the function without hitting any of the known cases. The reason this happens, is probably not because we lack a 'known' case, but because one case is disabled due to it causing a shader compilation error - this, based on the following code :
#ifdef ENABLE_FF_ALPHAKILL
if (ColorKeyOp == 3) // = _KILL
discard; // When compiled into FixedFunctionPixelShader.hlsl, compile errors arise
... whereby ENABLE_FF_ALPHAKILL
is currently disabled.
ok at least one change for this pr...it isn't in master but may have been (jackchen has it is his branch from master)
anyway in direct3d9.cpp there is an else if checking for quadstrips...then decoding them (incorrectly) and rendering as a triangle list.... that is incorrect... quad strips should be rendered as is as triangle strips via drawprimitiveUP, no indexing at all....
heatshimmer as triangle strip
heatshimmer as triangle list indexed/decoded per this PR.. clearly missing quads as it is 1/2 the size