Rasterizer: Pre-divide vertex attributes by W
Execute the division-by-W for perspective-correct interpolation of values in the clipper, moving them out of the rasterization inner loop.
This commit is contained in:
parent
fe186d3a59
commit
8369ee5803
3 changed files with 32 additions and 8 deletions
|
@ -757,6 +757,26 @@ struct float24 {
|
|||
return float24::FromFloat32(ToFloat32() - flt.ToFloat32());
|
||||
}
|
||||
|
||||
float24& operator *= (const float24& flt) {
|
||||
value *= flt.ToFloat32();
|
||||
return *this;
|
||||
}
|
||||
|
||||
float24& operator /= (const float24& flt) {
|
||||
value /= flt.ToFloat32();
|
||||
return *this;
|
||||
}
|
||||
|
||||
float24& operator += (const float24& flt) {
|
||||
value += flt.ToFloat32();
|
||||
return *this;
|
||||
}
|
||||
|
||||
float24& operator -= (const float24& flt) {
|
||||
value -= flt.ToFloat32();
|
||||
return *this;
|
||||
}
|
||||
|
||||
float24 operator - () const {
|
||||
return float24::FromFloat32(-ToFloat32());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue