AcademySoftwareFoundation / OpenShadingLanguage

Advanced shading language for production GI renderers
BSD 3-Clause "New" or "Revised" License
2.07k stars 350 forks source link

Test interactive parameter initialization in optix testrender #1687

Closed chellmuth closed 1 year ago

chellmuth commented 1 year ago

Description

This change updates testrender's optix implementation of reparameter, and adds a new test.

Previously we were grabbing the pointers from incorrect SBT records, so this moves them into a global lookup table.

Tests

I don't know how to test that parameter updates work correctly, but this at least validates that initial values are correct.

Checklist:

aconty commented 1 year ago

LGTM!

lgritz commented 1 year ago

I don't want you to bother changing this PR, but just noting that technically, although this is testing that the values you specify for parameters marked "interactive" make it to the shader, I believe it's never calling ReParameter and verifying that you can change the value after the shader has run, and then execute it again to see use of the new value. (That would be a somewhat bigger change to testrender, and probably not worth our time at the moment, since we do test it via testshade.)