testshade improvements#757
Merged
lgritz merged 5 commits intoAcademySoftwareFoundation:masterfrom May 31, 2017
Merged
Conversation
Because it modifies the u and v range. There is no s and t.
This is useful if you are trying to unit-test or directly inspect the outputs of a shader, without needing 'printf' calls in the shader. It's probably not helpful to do this when using -g to produce big output images -- too much console output to be useful.
… png. Makes it easier to output directly to web-friendly formats, without a second oiiotool step to apply the right color spaces.
Make sure the main timer doesn't count writing output files to disk.
Contributor
|
LGTM The output to sRGB part would also be nice for |
Collaborator
Author
|
Sure, of course, that can be arranged. |
Collaborator
Author
|
I looked at testrender, hoping to just copy and paste what I did for testshade. But that section of the code is quite different, so I'm going to merge this now do the testrender change as a separate patch. |
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.
A grab-bag of minor testshade improvements:
Rename command line arguments
--scalestand--offsetstto--scaleuvand--offsetuv, since what they do is change the u,v range, had nothing to do with anything named "s" or "t". (For compatibility, the old names also still work, but are no longer documented and are considered deprecated.)New option
--printsends to the console the value of all saved outputs. This is useful if you are trying to unit-test or directly inspect the outputs of a shader, without needing 'printf' calls in the shader. Though it's probably not helpful to do this when using -g to produce big output images -- too much console output to be useful.When
-ois outputting to a JPEG, GIF, or PNG file, automatically convert the linear shader output to the sRGB color space required of those file types. That makes it easier to use testshade to produce output images that are "web ready" without a separate color correction step.--runstatsis more careful about not including the time of writing output images in the statistic of shader runtime.Change the
-odoption to be called-dto match the equivalent option in oiiotool and maketx. I'm not sure why it was ever-od, that's weird. Maybe at some point I thought-dwas going to be something else, maybe debug. Anyway, for compatibility, the-odwill still work, but it's considered deprecated and is no longer documented.