do { \
const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; \
GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; \
- const GLfloat wStep = haveW ? span->dwdx : 0.0F; \
- GLfloat w = haveW ? span->w : 1.0F; \
+ const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F;\
+ GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F; \
GLuint i; \
for (i = 0; i < span->end; i++) { \
GLfloat f, oneMinusF; \
? 1.0F : 1.0F / (ctx->Fog.End - ctx->Fog.Start);
const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0];
GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0];
- const GLfloat wStep = haveW ? span->dwdx : 0.0F;
- GLfloat w = haveW ? span->w : 1.0F;
+ const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F;
+ GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F;
GLuint i;
for (i = 0; i < span->end; i++) {
GLfloat f = (fogEnd - fogCoord / w) * fogScale;
const GLfloat density = -ctx->Fog.Density;
const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0];
GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0];
- const GLfloat wStep = haveW ? span->dwdx : 0.0F;
- GLfloat w = haveW ? span->w : 1.0F;
+ const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F;
+ GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F;
GLuint i;
for (i = 0; i < span->end; i++) {
GLfloat f = EXPF(density * fogCoord / w);
const GLfloat negDensitySquared = -ctx->Fog.Density * ctx->Fog.Density;
const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0];
GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0];
- const GLfloat wStep = haveW ? span->dwdx : 0.0F;
- GLfloat w = haveW ? span->w : 1.0F;
+ const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F;
+ GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F;
GLuint i;
for (i = 0; i < span->end; i++) {
const GLfloat coord = fogCoord / w;
*/
const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0];
GLfloat fog = span->attrStart[FRAG_ATTRIB_FOGC][0];
- const GLfloat wStep = haveW ? span->dwdx : 0.0F;
- GLfloat w = haveW ? span->w : 1.0F;
+ const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F;
+ GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F;
GLuint i;
ASSERT(span->interpMask & SPAN_FOG);
for (i = 0; i < span->end; i++) {