Commit 07b2406
authored
testshade --shader <shadername> <layername> (#763)
`--shader` is like a combination of --layer, and then naming the shader
to create an instance of it.
The reason I prefer --shader is that when you use it, the command
line is almost identical to the shader group serialization. So much nicer!
For example:
```
$ testshade -param texturename "grid.tx" \
-shader texturemap tex1 \
-param frequency 4.0 \
-shader noisy noise1 \
-param scale 1.0 \
-shader contrast cont1 \
-shader umixer mix1 \
-connect tex1 out cont1 in \
-connect cont1 out mix1 left \
-connect noise1 out mix1 right \
-g 256 256 -o out noisetex.jpg
```
corresponds very symmetrically to the shader group
```
param string texturename "grid.tx" ;
shader texturemap tex1 ;
param float frequency 4.0 ;
shader noisy noise1 ;
param float scale 1.0 ;
shader contrast cont1 ;
shader umixer mix1 ;
connect tex1.out cont1.in ;
connect cont1.out mix1.left ;
connect noise1.out mix1.right ;
```
whereas, in comparison, using the old --layer notation works, but is
a less direct mapping to the serialization format:
```
$ testshade -layer tex1 -param texturename "grid.tx" texturemap \
-layer noise1 -param frequency 4.0 noisy \
-layer cont1 -param scale 1.0 contrast \
-layer mix1 umixer \
-connect tex1 out cont1 in \
-connect cont1 out mix1 left \
-connect noise1 out mix1 right \
-g 256 256 -o out noisetex.jpg
```1 parent e6f921a commit 07b2406
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
230 | 241 | | |
231 | 242 | | |
232 | 243 | | |
| |||
473 | 484 | | |
474 | 485 | | |
475 | 486 | | |
| 487 | + | |
| 488 | + | |
476 | 489 | | |
477 | 490 | | |
478 | 491 | | |
| |||
0 commit comments