Finally attained perspective correctness
This commit is contained in:
parent
c4cc784003
commit
48d9c131ad
1 changed files with 1 additions and 1 deletions
|
@ -390,7 +390,7 @@ static void _scanInterpolate(CameraDefinition* camera, ScanPoint* v1, ScanPoint*
|
||||||
|
|
||||||
result->pixel.x = v1->pixel.x + diff->pixel.x * value;
|
result->pixel.x = v1->pixel.x + diff->pixel.x * value;
|
||||||
result->pixel.y = v1->pixel.y + diff->pixel.y * value;
|
result->pixel.y = v1->pixel.y + diff->pixel.y * value;
|
||||||
result->pixel.z = ((1.0 - value) * (v1->pixel.z / v1depth) + value * (v1->pixel.z + diff->pixel.z) / v2depth) / factor;
|
result->pixel.z = v1->pixel.z + diff->pixel.z * value;
|
||||||
result->location.x = ((1.0 - value) * (v1->location.x / v1depth) + value * (v1->location.x + diff->location.x) / v2depth) / factor;
|
result->location.x = ((1.0 - value) * (v1->location.x / v1depth) + value * (v1->location.x + diff->location.x) / v2depth) / factor;
|
||||||
result->location.y = ((1.0 - value) * (v1->location.y / v1depth) + value * (v1->location.y + diff->location.y) / v2depth) / factor;
|
result->location.y = ((1.0 - value) * (v1->location.y / v1depth) + value * (v1->location.y + diff->location.y) / v2depth) / factor;
|
||||||
result->location.z = ((1.0 - value) * (v1->location.z / v1depth) + value * (v1->location.z + diff->location.z) / v2depth) / factor;
|
result->location.z = ((1.0 - value) * (v1->location.z / v1depth) + value * (v1->location.z + diff->location.z) / v2depth) / factor;
|
||||||
|
|
Loading…
Reference in a new issue