From 0587870c0f211b69da718e45a00fcbcae6a12200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Fri, 14 Jun 2019 04:19:38 +0200 Subject: [PATCH] Add todo --- programs/hqOffline.c | 10 ++++++++-- todo.txt | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/programs/hqOffline.c b/programs/hqOffline.c index 232cf0c..9b1a6a7 100644 --- a/programs/hqOffline.c +++ b/programs/hqOffline.c @@ -3,7 +3,7 @@ #define S3L_PIXEL_FUNCTION drawPixel -#define S3L_PERSPECTIVE_CORRECTION 0 +#define S3L_PERSPECTIVE_CORRECTION 1 #define S3L_SORT 0 #define S3L_Z_BUFFER 1 @@ -135,9 +135,15 @@ void drawPixel(S3L_PixelInfo *p) color[2] = light / 2 + p->modelIndex * 127; } +/* color[0] = S3L_clamp(127 + normal.x / 4,0,255); color[1] = S3L_clamp(127 + normal.y / 4,0,255); color[2] = S3L_clamp(127 + normal.z / 4,0,255); +*/ + +color[0] = S3L_clamp(p->depth - 8000,0,255); +color[1] = color[0]; +color[2] = color[1]; frameBuffer[index] = color[0]; frameBuffer[index + 1] = color[1]; @@ -240,7 +246,7 @@ int main() GRID_TRIANGLES, &(models[MODELS - 1])); - S3L_initScene(models,/*MODELS*/1,&scene); + S3L_initScene(models,MODELS,&scene); animateWater(0); diff --git a/todo.txt b/todo.txt index 39e28aa..23ef8e1 100644 --- a/todo.txt +++ b/todo.txt @@ -77,6 +77,8 @@ bugs: - b0 + b1 can be > 511, which causes b2 (= 511 - b0 - b1) to be negative! - Depth artifacts with PC != 0, can be seen very well in the HQ offline demo. + This appear at bigger depths, which makes the reciprocal values more + imprecise. repeated: