mirror of
https://git.coom.tech/drummyfish/small3dlib.git
synced 2024-11-21 20:39:57 +01:00
Add persp. corr. depth
This commit is contained in:
parent
0084e48b2c
commit
15df512cc9
2 changed files with 5 additions and 1 deletions
4
s3l.h
4
s3l.h
|
@ -1421,6 +1421,10 @@ void _S3L_drawFilledTriangle(
|
|||
|
||||
*barycentric1 =
|
||||
S3L_interpolateByUnitFrom0(lT,S3L_FRACTIONS_PER_UNIT - rowT);
|
||||
|
||||
#if S3L_COMPUTE_DEPTH
|
||||
p->depth = S3L_interpolateByUnit(lDepth,rDepth,rowT);
|
||||
#endif
|
||||
#else
|
||||
*barycentric0 = S3L_getFastLerpValue(b0FLS);
|
||||
*barycentric1 = S3L_getFastLerpValue(b1FLS);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#define S3L_RESOLUTION_Y 480
|
||||
|
||||
#define S3L_COMPUTE_DEPTH 1
|
||||
#define S3L_PERSPECTIVE_CORRECTION 0
|
||||
#define S3L_PERSPECTIVE_CORRECTION 1
|
||||
|
||||
#include "s3l.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue