glviewvol
diff src/rend_fast.cc @ 7:71b479ffb9f7
curve manipulation works
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 30 Dec 2014 17:28:38 +0200 |
parents | f22be47a3572 |
children | fb6d93471352 |
line diff
1.1 --- a/src/rend_fast.cc Tue Dec 30 06:22:54 2014 +0200 1.2 +++ b/src/rend_fast.cc Tue Dec 30 17:28:38 2014 +0200 1.3 @@ -3,8 +3,6 @@ 1.4 #include "rend_fast.h" 1.5 #include "sdr.h" 1.6 1.7 -static inline float smoothstep(float a, float b, float x); 1.8 - 1.9 #define XFER_MAP_SZ 1024 1.10 1.11 static unsigned int sdr; 1.12 @@ -117,6 +115,7 @@ 1.13 1.14 if(xfer) { 1.15 xfer->map(x, pptr); 1.16 + pptr[3] = std::max(pptr[0], std::max(pptr[1], pptr[2])); 1.17 } else { 1.18 pptr[0] = pptr[1] = pptr[2] = pptr[3] = x; 1.19 } 1.20 @@ -168,12 +167,3 @@ 1.21 glMatrixMode(GL_MODELVIEW); 1.22 glPopMatrix(); 1.23 } 1.24 - 1.25 -static inline float smoothstep(float a, float b, float x) 1.26 -{ 1.27 - if(x < a) return 0.0; 1.28 - if(x >= b) return 1.0; 1.29 - 1.30 - x = (x - a) / (b - a); 1.31 - return x * x * (3.0 - 2.0 * x); 1.32 -}