From 8d710ee3c7db5a6bc8b325061ecd5fbd7e90e9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sun, 2 Jun 2019 13:15:24 +0200 Subject: [PATCH] Remove near clamping (useless) --- small3dlib.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/small3dlib.h b/small3dlib.h index 3d70db4..7726b6c 100644 --- a/small3dlib.h +++ b/small3dlib.h @@ -128,15 +128,6 @@ #define S3L_RESOLUTION_Y 480 ///< Redefine to your screen y resolution. #endif -#ifndef S3L_NEAR_CLAMPING -#define S3L_NEAR_CLAMPING 0 /**< Whether to use depth clamping for the near - plane. Only works with S3L_COMPUTE_DEPTH - enabled! This may be a bit slower, but can - prevent errorneous rendering in specific - cases and is closer to traditional 3D - engines. */ -#endif - #ifndef S3L_STRICT_NEAR_CULLING #define S3L_STRICT_NEAR_CULLING 1 /**< If on, any triangle that only partially intersects the near plane will be culled. @@ -145,10 +136,6 @@ the camera disappear. */ #endif -#if S3L_STRICT_NEAR_CULLING -#define S3L_NEAR_CLAMPING 0 // This would be useless. -#endif - #ifndef S3L_FLAT #define S3L_FLAT 0 /**< If on, disables computation of per-pixel values such as barycentric coordinates and @@ -1605,11 +1592,6 @@ void S3L_drawTriangle( p.depth = S3L_getFastLerpValue(depthFLS); S3L_stepFastLerp(depthFLS); #endif - - #if S3L_NEAR_CLAMPING - if (p.depth < S3L_NEAR) - continue; - #endif #endif #if S3L_Z_BUFFER