mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
fixed alpha test and depth write in transparent shaders
This commit is contained in:
parent
a60693ae65
commit
a86504ddad
1 changed files with 6 additions and 2 deletions
|
@ -420,10 +420,14 @@ void GRP::ProcessShader(shader_t& shader)
|
|||
int firstStage = 0;
|
||||
for(int s = 0; s < shader.numStages; ++s)
|
||||
{
|
||||
const unsigned int currStateBits = shader.stages[s]->stateBits & (~(GLS_POLYMODE_LINE | GLS_ATEST_BITS));
|
||||
const unsigned int currStateBits = shader.stages[s]->stateBits & (~GLS_POLYMODE_LINE);
|
||||
if(cache.stageCount > 0)
|
||||
{
|
||||
if(currStateBits == prevStateBits && IsCommutativeBlendState(currStateBits))
|
||||
// we could combine AT/DW in some circumstances, but we don't care to for now
|
||||
const bool cantCombine = (shader.stages[s]->stateBits & (GLS_ATEST_BITS | GLS_DEPTHMASK_TRUE)) != 0;
|
||||
if(currStateBits == prevStateBits &&
|
||||
!cantCombine &&
|
||||
IsCommutativeBlendState(currStateBits))
|
||||
{
|
||||
cache.stageStateBits[cache.stageCount++] = currStateBits;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue