24#ifndef PXR_IMAGING_HDX_FULLSCREENSHADER_H
25#define PXR_IMAGING_HDX_FULLSCREENSHADER_H
29#include "pxr/imaging/hdx/api.h"
30#include "pxr/imaging/hdx/effectsShader.h"
32#include "pxr/imaging/hgi/buffer.h"
33#include "pxr/imaging/hgi/graphicsPipeline.h"
34#include "pxr/imaging/hgi/shaderProgram.h"
35#include "pxr/imaging/hgi/texture.h"
44PXR_NAMESPACE_OPEN_SCOPE
110 HgiTextureHandleVector
const& textures);
123 HgiBlendFactor srcColorBlendFactor,
124 HgiBlendFactor dstColorBlendFactor,
125 HgiBlendOp colorBlendOp,
126 HgiBlendFactor srcAlphaBlendFactor,
127 HgiBlendFactor dstAlphaBlendFactor,
128 HgiBlendOp alphaBlendOp);
134 HgiAttachmentLoadOp attachmentLoadOp,
135 HgiAttachmentStoreOp attachmentStoreOp);
164 void _CreateBufferResources();
167 void _SetResourceBindings();
170 void _SetVertexBufferDescriptor();
173 bool _CreateSampler();
176 void _SetDefaultProgram(
bool writeDepth);
186 void _RecordDrawCmds()
override;
189 void _PrintCompileErrors();
191 HgiTextureHandleVector _textures;
192 HgiBufferHandleVector _buffers;
208PXR_NAMESPACE_CLOSE_SCOPE
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 BindTextures(HgiTextureHandleVector const &textures)
Bind (externally managed) textures to the shader program.
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 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 SetAttachmentLoadStoreOp(HgiAttachmentLoadOp attachmentLoadOp, HgiAttachmentStoreOp attachmentStoreOp)
By default HdxFullscreenShader uses LoadOpDontCare and StoreOpStore.
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...