]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
use "match8" scale for offsetmapping
authorRudolf Polzer <divverent@alientrap.org>
Thu, 1 Sep 2011 07:15:43 +0000 (09:15 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 1 Sep 2011 07:15:43 +0000 (09:15 +0200)
misc/tools/fft-normalmap-to-heightmap-soft.sh

index 9f861fc35dc0c98e5a4fbcbf65279dfd97c7d3d8..708d44484b14b6c14a049f705d0da46a7d082e4c 100755 (executable)
@@ -39,6 +39,6 @@ extraoffset=`echo "($realmedian + $ofs / $realscale)" | bc -l`
 #
 # we need p_d^-1(p_t(x)) = 1 - (128 + 127 * x) / 255
 #
-extraoffset=`echo "(127.0 / 255.0) * (1 - $extraoffset)" | bc -l`
+extraoffset="match8 "`echo "128 + 127 * $extraoffset" | bc -l`
 
 echo " dpoffsetmapping - $extrascale $extraoffset"