7#ifndef PXR_IMAGING_HDX_FULLSCREENSHADER_H
8#define PXR_IMAGING_HDX_FULLSCREENSHADER_H
12#include "pxr/imaging/hdx/api.h"
13#include "pxr/imaging/hdx/effectsShader.h"
15#include "pxr/imaging/hgi/buffer.h"
16#include "pxr/imaging/hgi/graphicsPipeline.h"
17#include "pxr/imaging/hgi/shaderProgram.h"
18#include "pxr/imaging/hgi/texture.h"
27PXR_NAMESPACE_OPEN_SCOPE
96 HgiTextureHandleVector
const& textures,
97 HgiSamplerHandleVector
const& samplers = HgiSamplerHandleVector());
113 HgiBlendFactor srcColorBlendFactor,
114 HgiBlendFactor dstColorBlendFactor,
115 HgiBlendOp colorBlendOp,
116 HgiBlendFactor srcAlphaBlendFactor,
117 HgiBlendFactor dstAlphaBlendFactor,
118 HgiBlendOp alphaBlendOp);
156 void _CreateBufferResources();
159 void _SetResourceBindings();
162 void _SetVertexBufferDescriptor();
168 void _SetDefaultProgram(
bool writeDepth);
178 void _RecordDrawCmds()
override;
181 void _PrintCompileErrors();
183 HgiTextureHandleVector _textures;
184 HgiSamplerHandleVector _samplers;
185 HgiBufferHandleVector _buffers;
201PXR_NAMESPACE_CLOSE_SCOPE
Basic type for a vector of 4 float components.
Basic type for a vector of 4 int components.
This class provides functionality to create and manage a single HgiGraphicsPipeline instance and to i...
This class is a utility for rendering deep raytracer or aov output (color/depth) to a hgi texture.
HDX_API void SetBlendState(bool enableBlending, HgiBlendFactor srcColorBlendFactor, HgiBlendFactor dstColorBlendFactor, HgiBlendOp colorBlendOp, HgiBlendFactor srcAlphaBlendFactor, HgiBlendFactor dstAlphaBlendFactor, HgiBlendOp alphaBlendOp)
By default HdxFullscreenShader uses no blending (opaque).
HDX_API void SetProgram(const TfToken &glslfxPath, const TfToken &shaderName, HgiShaderFunctionDesc &fragDesc)
Set the program for the class to use for its fragment shader.
HDX_API void BindTextures(HgiTextureHandleVector const &textures, HgiSamplerHandleVector const &samplers=HgiSamplerHandleVector())
Bind (externally managed) textures to the shader program and use the optionally provided samplers for...
HDX_API void SetDepthState(HgiDepthStencilState const &state)
By default HdxFullscreenShader creates a pipeline object that enables depth testing and enables depth...
HDX_API void SetShaderConstants(uint32_t byteSize, const void *data)
Provide the shader constant values (uniforms).
HDX_API HdxFullscreenShader(Hgi *hgi, const std::string &debugName)
Create a new fullscreen shader object.
HDX_API ~HdxFullscreenShader() override
Destroy the fullscreen shader object, releasing GPU resources.
HDX_API void BindBuffers(HgiBufferHandleVector const &buffers)
Bind (externally managed) buffers to the shader program.
HDX_API void SetProgram(const HgiShaderFunctionDesc &fragDesc)
Bypasses any cache checking or HioGlslfx processing and just re-creates the shader program using the ...
HDX_API void Draw(HgiTextureHandle const &colorDst, HgiTextureHandle const &depthDst)
Draw the internal textures to the provided destination textures.
HDX_API void SetClearState(GfVec4f clearColor, GfVec4f clearDepth)
Ask HdxFullscreenShader to do a color/depth clear.
Hydra Graphics Interface.
A class representing the config and shader source of a glslfx file.
Token for efficient comparison, assignment, and hashing of known strings.
Describes the properties of a framebuffer attachment.
Properties to configure depth and stencil test.
Describes the properties needed to create a GPU shader function.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...