Skip to content

testshade improvements#757

Merged
lgritz merged 5 commits intoAcademySoftwareFoundation:masterfrom
lgritz:lg-testshade
May 31, 2017
Merged

testshade improvements#757
lgritz merged 5 commits intoAcademySoftwareFoundation:masterfrom
lgritz:lg-testshade

Conversation

@lgritz
Copy link
Copy Markdown
Collaborator

@lgritz lgritz commented May 30, 2017

A grab-bag of minor testshade improvements:

  • Rename command line arguments --scalest and --offsetst to --scaleuv and --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 --print sends 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 -o is 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.

  • --runstats is more careful about not including the time of writing output images in the statistic of shader runtime.

  • Change the -od option to be called -d to 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 -d was going to be something else, maybe debug. Anyway, for compatibility, the -od will still work, but it's considered deprecated and is no longer documented.

lgritz added 5 commits May 30, 2017 12:11
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.
@fpsunflower
Copy link
Copy Markdown
Contributor

LGTM

The output to sRGB part would also be nice for testrender.

@lgritz
Copy link
Copy Markdown
Collaborator Author

lgritz commented May 31, 2017

Sure, of course, that can be arranged.

@lgritz
Copy link
Copy Markdown
Collaborator Author

lgritz commented May 31, 2017

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.

@lgritz lgritz merged commit d19ce99 into AcademySoftwareFoundation:master May 31, 2017
@lgritz lgritz deleted the lg-testshade branch May 31, 2017 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants