Add functionality to reset an edited shader to original. Closes #2334

* We also add the ability to toggle on/off the replacement being active without
  needing to intentionally add a compile error (and this also makes it more
  explicitly clear when the shader replacement is enabled or not. This could be
  useful for quick A/B testing between the edited version and the original.
This commit is contained in:
baldurk
2021-11-02 14:09:50 +00:00
parent de38cf7b9c
commit d4a5592780
8 changed files with 161 additions and 38 deletions
+2 -2
View File
@@ -747,11 +747,11 @@ struct CaptureContextInvoker : ObjectForwarder<ICaptureContext>
const rdcstrpairs &files, ShaderEncoding shaderEncoding,
ShaderCompileFlags flags,
IShaderViewer::SaveCallback saveCallback,
IShaderViewer::CloseCallback closeCallback) override
IShaderViewer::RevertCallback revertCallback) override
{
return InvokeRetFunction<IShaderViewer *>(&ICaptureContext::EditShader, id, stage, entryPoint,
files, shaderEncoding, flags, saveCallback,
closeCallback);
revertCallback);
}
virtual IShaderViewer *DebugShader(const ShaderBindpointMapping *bind,