Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions include/hvt/engine/basicLayerParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ struct HVT_API BasicLayerParams
/// Defines the render buffer size.
PXR_NS::GfVec2i renderBufferSize;

/// The AOV buffer ID to visualize (color or depth).
PXR_NS::TfToken visualizeAOV;

/// Enable selection is on by default.
bool enableSelection { true };

Expand Down
29 changes: 15 additions & 14 deletions include/hvt/engine/framePass.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,21 @@ struct HVT_API ViewParams
/// parameters specific to the FramePass.
struct HVT_API FramePassParams : public BasicLayerParams
{
/// Defines the inputs, outputs and the aov to visualize.
/// @{

/// The AOV buffer to visualize e.g., color, depth, etc.
PXR_NS::TfToken visualizeAOV;

/// The list of AOV buffers to render e.g., color, depth, etc.
/// \note This is used to override the default render outputs.
PXR_NS::TfTokenVector renderOutputs;

/// Enable eye relative normal render output.
/// \note this adds an extra cost for all geometry render passes.
bool enableNeyeRenderOutput { false };
/// @}

/// View, model and world settings.
/// @{
ViewParams viewInfo;
Expand All @@ -167,10 +182,6 @@ struct HVT_API FramePassParams : public BasicLayerParams
bool enableMultisampling { true };
size_t msaaSampleCount { 4 };
/// @}

/// Enable eye relative normal render output.
/// \note this adds an extra cost for all geometry render passes.
bool enableNeyeRenderOutput { false };
};

/// A FramePass is used to render or select from a collection of Prims using a set of HdTasks and
Expand Down Expand Up @@ -250,16 +261,6 @@ class HVT_API FramePass
/// \return An handle to the associated render texture or null if not found.
PXR_NS::HgiTextureHandle GetRenderTexture(PXR_NS::TfToken const& aovToken) const;

/// It holds the token (e.g., color, depth) and its corresponding texture handle.
struct RenderOutput
{
/// The AOV tag i.e., color or depth.
PXR_NS::TfToken aovToken;
/// The corresponding render texture handle.
PXR_NS::HgiTextureHandle aovTextureHandle;
};
using RenderOutputs = std::vector<RenderOutput>;

/// Return the render index used by this frame pass.
PXR_NS::HdRenderIndex* GetRenderIndex() const;

Expand Down
26 changes: 22 additions & 4 deletions include/hvt/engine/renderBufferManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ class HVT_API RenderBufferManager : public RenderBufferSettingsProvider
/// Destructor.
~RenderBufferManager();

/// Get the all the possible renderer AOV tokens.
/// \return Returns the renderer AOV tokens.
static PXR_NS::TfTokenVector GetAllRendererAovs();

/// Get the all the renderer AOV tokens supported by the selected render delegate e.g. HdStorm.
/// \return Returns the supported renderer AOV tokens.
PXR_NS::TfTokenVector GetSupportedRendererAovs() const;

/// Gets the dimensions of the render buffers.
/// \return Returns the render buffer dimensions.
inline PXR_NS::GfVec2i const& GetRenderBufferDimensions() const { return _size; }
Expand All @@ -73,9 +81,19 @@ class HVT_API RenderBufferManager : public RenderBufferSettingsProvider
PXR_NS::GfVec2i const& newRenderBufferSize, size_t msaaSampleCount, bool msaaEnabled);

/// Set the render outputs.
/// It does NOT update any RenderTaskParams, but updates the AovParamCache and the viewport AOV.
bool SetRenderOutputs(PXR_NS::TfTokenVector const& names, RenderBufferBindings const& inputs,
PXR_NS::GfVec4d const& viewport);
/// \note It does NOT update any RenderTaskParams, but updates the AovParamCache and the viewport AOV.
/// \param outputToVisualize The AOV to visualize in the viewport.
/// \param outputs The names of the AOVs to be used for the render outputs.
/// \param inputs The bindings of the AOVs to be used for the render inputs.
/// \param viewport The viewport dimensions to be used for the render outputs.
/// \return True if the render outputs were set successfully, false otherwise.
/// \note An empty list of inputs means to create its own render buffers for the inputs.
bool SetRenderOutputs(
PXR_NS::TfToken const& outputToVisualize, PXR_NS::TfTokenVector const& outputs,
RenderBufferBindings const& inputs, PXR_NS::GfVec4d const& viewport);

/// Get the renderer outputs.
PXR_NS::TfTokenVector const& GetRenderOutputs() const;

/// Set the render output clear color in the AovParamCache.
void SetRenderOutputClearColor(PXR_NS::TfToken const& name, PXR_NS::VtValue const& clearValue);
Expand Down Expand Up @@ -134,4 +152,4 @@ class HVT_API RenderBufferManager : public RenderBufferSettingsProvider
std::unique_ptr<Impl> _impl;
};

} // namespace HVT_NS
} // namespace HVT_NS
44 changes: 0 additions & 44 deletions include/hvt/resources/shaders/copy.glslfx

This file was deleted.

2 changes: 2 additions & 0 deletions source/engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ set(_ENGINE_INCLUDE_DIR "${_HVT_INCLUDE_DIR}/hvt/engine")

# Collect the source files.
set(_SOURCE_FILES
"copyDepthShader.cpp"
"copyDepthShader.h"
"delegateStreamUtils.h"
"framePass.cpp"
"framePassUtils.cpp"
Expand Down
Loading