testshade --shader <shadername> <layername>#763
Merged
lgritz merged 1 commit intoAcademySoftwareFoundation:masterfrom Jun 2, 2017
Merged
testshade --shader <shadername> <layername>#763lgritz merged 1 commit intoAcademySoftwareFoundation:masterfrom
lgritz merged 1 commit intoAcademySoftwareFoundation:masterfrom
Conversation
`--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
```
Contributor
|
LGTM |
lgritz
added a commit
to lgritz/OpenShadingLanguage
that referenced
this pull request
Jun 7, 2017
…n#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 ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--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:
corresponds very symmetrically to the shader group
whereas, in comparison, using the old --layer notation works, but is
a less direct mapping to the serialization format: