X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=misc%2Ftools%2Fnormalmap.sh;h=b41b613a0f68598420f3f19933b6eea9f3bdc3c2;hb=58131501bb919b974c3a90b6776eeb868546a9e8;hp=08905b7952a68bba386fd2327eec975d3dfed892;hpb=e6024ca05dbc7f9e0257b4ed2641c929d0b38c4d;p=xonotic%2Fxonotic.git diff --git a/misc/tools/normalmap.sh b/misc/tools/normalmap.sh index 08905b79..b41b613a 100755 --- a/misc/tools/normalmap.sh +++ b/misc/tools/normalmap.sh @@ -2,6 +2,7 @@ # usage: ./bump2norm.sh foo_bump.tga foo_norm.tga # NOTE: unfortunately requires X-server (otherwise file-tga-save won't work... no joke) +# also, alpha channel value 0 is avoided as gimp doesn't save it properly in=$1 out=$2 @@ -13,11 +14,14 @@ out=$2 # Minimun Z (0 to 1) # scale: # Scale (>0) +# heightsource: +# Height source (0 = average RGB, 1 = alpha channel) # conv: # Conversion (0 = none, 1 = Biased RGB, 2 = Red, 3 = Green, 4 = Blue, 5 = Max RGB, 6 = Min RGB, 7 = Colorspace) : ${filter:=0} : ${minz:=0} : ${scale:=1} +: ${heightsource:=0} : ${conv:=0} gimp -i -b - <