mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
fixed shader stage collapsing happening in cases where it shouldn't
This commit is contained in:
parent
afb9b725e9
commit
e5e9bd8d28
2 changed files with 18 additions and 1 deletions
|
@ -38,6 +38,8 @@ chg: faster map loads by limiting the rendering back-end's frame-rate
|
|||
|
||||
chg: on Windows, the upper limit of open stdio file handles was raised from 512 to 2048
|
||||
|
||||
fix: shader stage collapsing was happening in cases where it would yield incorrect results
|
||||
|
||||
fix: map download improvements
|
||||
add: using numeric addresses as fallbacks in case DNS resolves fail
|
||||
chg: made connections non-blocking so the engine won't freeze for long when starting a download
|
||||
|
|
|
@ -1721,12 +1721,27 @@ static void CollapseStages()
|
|||
if ( collapse[i].blendA == -1 )
|
||||
CollapseFailure;
|
||||
|
||||
// Check that all colors are pure white on the second stage
|
||||
// Check that all colors are opaque white on the second stage
|
||||
// because the stage iterator can't currently specify
|
||||
// another color array.
|
||||
// Example shader broken without this extra test:
|
||||
// "textures/sfx/diamond2cjumppad"
|
||||
// The ring pulses in and out instead of only out.
|
||||
|
||||
// These cases must always be rejected because they depend
|
||||
// on time elapsed, camera position, entity colors, etc.
|
||||
if ( aStages[1].rgbGen == CGEN_LIGHTING_DIFFUSE ||
|
||||
aStages[1].rgbGen == CGEN_WAVEFORM ||
|
||||
aStages[1].rgbGen == CGEN_ENTITY ||
|
||||
aStages[1].rgbGen == CGEN_ONE_MINUS_ENTITY ||
|
||||
aStages[1].alphaGen == AGEN_WAVEFORM ||
|
||||
aStages[1].alphaGen == AGEN_LIGHTING_SPECULAR ||
|
||||
aStages[1].alphaGen == AGEN_ENTITY ||
|
||||
aStages[1].alphaGen == AGEN_ONE_MINUS_ENTITY ||
|
||||
aStages[1].alphaGen == AGEN_PORTAL )
|
||||
CollapseFailure;
|
||||
|
||||
// For the remaining cases, we generate and test the colors.
|
||||
static stageVars_t svarsMT;
|
||||
R_ComputeColors( &aStages[1], svarsMT );
|
||||
const int* colors = (const int*)svarsMT.colors;
|
||||
|
|
Loading…
Reference in a new issue