diff --git a/small3dlib.h b/small3dlib.h index 8ef3cce..43f0382 100644 --- a/small3dlib.h +++ b/small3dlib.h @@ -1196,9 +1196,11 @@ void S3L_drawTriangle( p.modelID = modelID; p.triangleID = triangleID; +#if !S3L_STRICT_NEAR_CULLING point0.z = point0.z >= S3L_NEAR ? point0.z : S3L_NEAR; point1.z = point1.z >= S3L_NEAR ? point1.z : S3L_NEAR; point2.z = point2.z >= S3L_NEAR ? point2.z : S3L_NEAR; +#endif S3L_Vec4 *tPointPP, *lPointPP, *rPointPP; /* points in projction plane space (in Units, normalized by diff --git a/testSDL.c b/testSDL.c index ea75d54..f35abef 100644 --- a/testSDL.c +++ b/testSDL.c @@ -10,9 +10,10 @@ //#define S3L_PRESET_HIGHEST_QUALITY -#define S3L_PERSPECTIVE_CORRECTION 1 -#define S3L_Z_BUFFER 1 -#define S3L_SORT 0 +#define S3L_STRICT_NEAR_CULLING 0 +#define S3L_PERSPECTIVE_CORRECTION 0 +#define S3L_SORT 1 +#define S3L_Z_BUFFER 0 #define S3L_PIXEL_FUNCTION drawPixel