#!/bin/csh
#######################################################################################################################################
# #
# M I S E E N M O N T A G N E E T V U E D E C O T E A V E C E F F E T D E L O I N T A I N #
# D ' U N E I M A G E E N V R A I E S C O U L E U R S P A R F A I T E S : #
# #
# #
# Utilisation : #
# #
# $xci/montagne.61$Z <surface> <paletteT> <depth-cueing> <imageR> [Ty=<translationY>] #
# #
# E [0,1] #
# #
# | #
# \|/ #
# . #
# #
# (0. = effet maximum) #
# (1.0 = absent) #
# #
# #
# Author of '$xci/montagne.61$Z' : #
# #
# Jean-Francois Colonna (LACTAMME, AAAAMMJJhhmmss). #
# #
#######################################################################################################################################
set surface=$1
set paletteT=$2
set depth_cueing=$3
set imageR=$4
set Ty=$5
set translation='Ty=0.50'" $Ty"
# Pour translater verticalement l'image. #
set depth='depth=FAUX'
# Pour ne pas avoir de depth-cueing. #
set depth="depth=VRAI min=$depth_cueing"
# Pour avoir du depth-cueing (dans ce cas precis, '0.00' est une bonne valeur...). #
set avion='avion=FAUX alias=VRAI'
# Pour faire une vue de cote. #
set texture=$BLANC
# Recuperation du nom de la texture dans son directory. #
FileTmpB imageS $M
# Nom temporaire pour la montagne sans effet de lointain. #
FileTmpB imageZ
# Nom temporaire pour le 'Z-Buffer'. #
$xci/montagne.01$X A=$surface T=$texture R=$imageS Z-Buffer=VRAI Z=$imageZ $depth $avion $translation $formatI
# Mise en montagne de l'image argument ($surface) avec recuperation #
# du 'Z-Buffer'. #
$xci/complement$X A=$imageZ R=$imageZ $formatI
# Complementation du 'Z-Buffer'. #
$xci/vitre.51$Z $imageS $paletteT $imageZ $imageR
# Et reconstitution finale en fausses couleurs parfaites du lointain. #
FileTmpE imageS
FileTmpE imageZ
# Et nettoyage... #