mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-07 16:40:27 +01:00
adjustment to coverage sample positions
This commit is contained in:
parent
16a8e986ce
commit
f1f288182e
2 changed files with 36 additions and 35 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: s_aaline.c,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
|
||||
/* $Id: s_aaline.c,v 1.7 2001/03/28 21:37:24 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -234,8 +234,8 @@ make_sample_table(GLint xSamples, GLint ySamples, GLfloat samples[][2])
|
|||
else {
|
||||
j = i++;
|
||||
}
|
||||
samples[j][0] = x * dx;
|
||||
samples[j][1] = y * dy;
|
||||
samples[j][0] = x * dx + 0.5 * dx;
|
||||
samples[j][1] = y * dy + 0.5 * dy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: s_aatriangle.c,v 1.10 2001/03/19 02:25:36 keithw Exp $ */
|
||||
/* $Id: s_aatriangle.c,v 1.11 2001/03/28 21:37:24 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -138,25 +138,26 @@ static GLfloat
|
|||
compute_coveragef(const GLfloat v0[3], const GLfloat v1[3],
|
||||
const GLfloat v2[3], GLint winx, GLint winy)
|
||||
{
|
||||
#define B 0.125
|
||||
static const GLfloat samples[16][2] = {
|
||||
/* start with the four corners */
|
||||
{ 0.00, 0.00 },
|
||||
{ 0.75, 0.00 },
|
||||
{ 0.00, 0.75 },
|
||||
{ 0.75, 0.75 },
|
||||
{ 0.00+B, 0.00+B },
|
||||
{ 0.75+B, 0.00+B },
|
||||
{ 0.00+B, 0.75+B },
|
||||
{ 0.75+B, 0.75+B },
|
||||
/* continue with interior samples */
|
||||
{ 0.25, 0.00 },
|
||||
{ 0.50, 0.00 },
|
||||
{ 0.00, 0.25 },
|
||||
{ 0.25, 0.25 },
|
||||
{ 0.50, 0.25 },
|
||||
{ 0.75, 0.25 },
|
||||
{ 0.00, 0.50 },
|
||||
{ 0.25, 0.50 },
|
||||
{ 0.50, 0.50 },
|
||||
{ 0.75, 0.50 },
|
||||
{ 0.25, 0.75 },
|
||||
{ 0.50, 0.75 }
|
||||
{ 0.25+B, 0.00+B },
|
||||
{ 0.50+B, 0.00+B },
|
||||
{ 0.00+B, 0.25+B },
|
||||
{ 0.25+B, 0.25+B },
|
||||
{ 0.50+B, 0.25+B },
|
||||
{ 0.75+B, 0.25+B },
|
||||
{ 0.00+B, 0.50+B },
|
||||
{ 0.25+B, 0.50+B },
|
||||
{ 0.50+B, 0.50+B },
|
||||
{ 0.75+B, 0.50+B },
|
||||
{ 0.25+B, 0.75+B },
|
||||
{ 0.50+B, 0.75+B }
|
||||
};
|
||||
const GLfloat x = (GLfloat) winx;
|
||||
const GLfloat y = (GLfloat) winy;
|
||||
|
|
@ -226,23 +227,23 @@ compute_coveragei(const GLfloat v0[3], const GLfloat v1[3],
|
|||
*/
|
||||
static const GLfloat samples[15][2] = {
|
||||
/* start with the four corners */
|
||||
{ 0.00, 0.00 },
|
||||
{ 0.75, 0.00 },
|
||||
{ 0.00, 0.75 },
|
||||
{ 0.75, 0.75 },
|
||||
{ 0.00+B, 0.00+B },
|
||||
{ 0.75+B, 0.00+B },
|
||||
{ 0.00+B, 0.75+B },
|
||||
{ 0.75+B, 0.75+B },
|
||||
/* continue with interior samples */
|
||||
{ 0.25, 0.00 },
|
||||
{ 0.50, 0.00 },
|
||||
{ 0.00, 0.25 },
|
||||
{ 0.25, 0.25 },
|
||||
{ 0.50, 0.25 },
|
||||
{ 0.75, 0.25 },
|
||||
{ 0.00, 0.50 },
|
||||
{ 0.25, 0.50 },
|
||||
{ 0.25+B, 0.00+B },
|
||||
{ 0.50+B, 0.00+B },
|
||||
{ 0.00+B, 0.25+B },
|
||||
{ 0.25+B, 0.25+B },
|
||||
{ 0.50+B, 0.25+B },
|
||||
{ 0.75+B, 0.25+B },
|
||||
{ 0.00+B, 0.50+B },
|
||||
{ 0.25+B, 0.50+B },
|
||||
/*{ 0.50, 0.50 },*/
|
||||
{ 0.75, 0.50 },
|
||||
{ 0.25, 0.75 },
|
||||
{ 0.50, 0.75 }
|
||||
{ 0.75+B, 0.50+B },
|
||||
{ 0.25+B, 0.75+B },
|
||||
{ 0.50+B, 0.75+B }
|
||||
};
|
||||
const GLfloat x = (GLfloat) winx;
|
||||
const GLfloat y = (GLfloat) winy;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue