MaterialX
MaterialX copied to clipboard
HwTimeNode hardcodes frame rate in generated code instead of using the fps uniform
To test: connect a ND_time_float node to the base color of a standard_surface.
Looking at generated code, I see:
float time_out = u_frame / 24.000000;
where I should instead see:
float time_out = u_frame / time_fps;
This means changing the fps value is a topological change that requires recompiling the shader.
Is this per specification (which means there is a missing uniform="true" metadata in the fps input of the time NodeDef), or is it something that should be fixed in HwTimeNode.cpp to use shadergen.emitInput(fpsInput, context, stage); instead of shadergen.emitString(fps, stage);?