mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 17:50:32 +01:00
Fix broken fog.
Note that fogcoord and front-facing attribs are in the same register, in the X and Y channels, respectively.
This commit is contained in:
parent
ecc9cf43af
commit
bdc3825461
1 changed files with 11 additions and 7 deletions
|
|
@ -554,12 +554,6 @@ static void setup_tri_coefficients( struct setup_stage *setup )
|
|||
*/
|
||||
setup_fragcoord_coeff(setup);
|
||||
}
|
||||
else if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
|
||||
/* FOG.y = front/back facing XXX fix this */
|
||||
setup->coef[fragSlot].a0[1] = 1 - setup->quad.facing;
|
||||
setup->coef[fragSlot].dadx[1] = 0.0;
|
||||
setup->coef[fragSlot].dady[1] = 0.0;
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
uint j;
|
||||
|
|
@ -578,8 +572,18 @@ static void setup_tri_coefficients( struct setup_stage *setup )
|
|||
break;
|
||||
default:
|
||||
/* invalid interp mode */
|
||||
assert(0);
|
||||
/* assert(0); re-enable this and run demos/fogcoord.c ... */
|
||||
;
|
||||
}
|
||||
|
||||
if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
|
||||
/* FOG.y = front/back facing XXX fix this */
|
||||
setup->coef[fragSlot].a0[1] = 1 - setup->quad.facing;
|
||||
setup->coef[fragSlot].dadx[1] = 0.0;
|
||||
setup->coef[fragSlot].dady[1] = 0.0;
|
||||
}
|
||||
|
||||
|
||||
#if USE_INPUT_MAP
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue