22 shaderconds="$shaderconds$LF$*"
28 parse_conditional $2 $3
31 shadertext="$shadertext$LF$TAB$*"
33 parse_shaderstage_pre()
35 shadertext="$shadertext$LF$TAB{"
37 parse_shaderstage_line()
41 parse_conditional $2 $3
44 shadertext="$shadertext$LF$TAB$TAB$*"
46 parse_shaderstage_post()
48 shadertext="$shadertext$LF$TAB}"
50 # note: the conds are what is FALSE, not TRUE
53 parseALLtheconds=$conds
55 case "$parseALLtheconds" in
60 thiscond=${parseALLtheconds%%$LF*}
61 parseALLtheconds=${parseALLtheconds#*$LF}
64 thiscond=$parseALLtheconds
68 [ -n "$thiscond" ] || continue
69 echo "$TAB""dpshaderkillifcvar $thiscond"
75 echo "$shadertext" | while IFS= read -r L; do
76 [ -n "$L" ] || continue
82 case "$LF$conds$LF" in
94 condstack=1${condstack#0}
97 condstack=0${condstack#1}
102 condstack=${condstack#?}
121 echo "$parsing_shader"
130 firstcond="${1%%$LF*}"
139 conds="$conds$LF$firstcond"
140 conditionalize "$restcond"
152 set -- "$1" "$op" "$3"
154 conditionalize "$restcond"
159 allconds=`echo "$shaderconds" | sort -u | grep .`
161 conditionalize "$allconds"