26 shaderDescriptor.
_modules.push_back(vertModule);
27 shaderDescriptor.
_modules.push_back(fragModule);
30 ssr.waitForReady(
false);
90 const vec2<F32> s{ width * 0.5f, height * 0.5f };
107 renderPassCmd->
_name =
"DO_SSR_CLEAR_TARGET";
113 GFX::EnqueueCommand<GFX::EndRenderPassCommand>(bufferInOut);
131 if (screenMipCount > 2u) {
132 screenMipCount -= 2u;
137 auto cmd = GFX::EnqueueCommand<GFX::BindShaderResourcesCommand>(bufferInOut);
149 Set( binding.
_data, normalsTex, normalsAtt->_descriptor._sampler );
156 renderPassCmd->
_name =
"DO_SSR_PASS";
169 auto sendPushConstantsCmd = GFX::EnqueueCommand<GFX::SendPushConstantsCommand>( bufferInOut );
170 sendPushConstantsCmd->_uniformData = &
_uniforms;
173 GFX::EnqueueCommand<GFX::DrawCommand>(bufferInOut)->_drawCommands.emplace_back();
174 GFX::EnqueueCommand<GFX::EndRenderPassCommand>(bufferInOut);
#define WAIT_FOR_CONDITION(...)
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
GFXRTPool & renderTargetPool() noexcept
Pipeline * newPipeline(const PipelineDescriptor &descriptor)
Create and return a new graphics pipeline. This is only used for caching and doesn't use the object a...
const RenderStateBlock & get2DStateBlock() const noexcept
const GFXShaderData::PrevFrameData & previousFrameData(PlayerIndex player) const noexcept
RenderTarget * getRenderTarget(const RenderTargetID target) const
PlatformContext & context() noexcept
Configuration & config() noexcept
RenderTargetHandle screenRT() const noexcept
virtual void reshape(U16 width, U16 height)
virtual void prepare(PlayerIndex idx, GFX::CommandBuffer &bufferInOut)
virtual bool ready() const noexcept
RTDrawDescriptor _screenOnlyDraw
Handle< Texture > texture() const
RTAttachmentDescriptor _descriptor
RTAttachment * getAttachment(RTAttachmentType type, RTColourAttachmentSlot slot=RTColourAttachmentSlot::SLOT_0) const
vec2< U16 > getResolution() const noexcept
GFX::BindPipelineCommand _pipelineCmd
SSRPreRenderOperator(GFXDevice &context, PreRenderBatch &parent)
Handle< ShaderProgram > _ssrShader
mat4< F32 > _projToPixelBasis
void prepare(PlayerIndex idx, GFX::CommandBuffer &bufferInOut) override
bool ready() const noexcept override
bool execute(PlayerIndex idx, const CameraSnapshot &cameraSnapshot, const RenderTargetHandle &input, const RenderTargetHandle &output, GFX::CommandBuffer &bufferInOut) override
Return true if we rendered into "output".
void reshape(U16 width, U16 height) override
FORCE_INLINE T * EnqueueCommand(CommandBuffer &buffer)
Handle console commands that start with a forward slash.
FORCE_INLINE void DestroyResource(Handle< T > &handle, const bool immediate=false)
static constexpr U32 RT_DEPTH_ATTACHMENT_IDX
@ RES_LOADED
The resource is available for usage.
constexpr F32 to_F32(const T value)
void Set(DescriptorSetBindingData &dataInOut, ShaderBuffer *buffer, const BufferRange range) noexcept
constexpr U64 _ID(const char *const str, const U64 value=val_64_const) noexcept
DescriptorSetBinding & AddBinding(DescriptorSet &setInOut, U8 slot, U16 stageVisibilityMask)
FORCE_INLINE Handle< T > CreateResource(const ResourceDescriptor< T > &descriptor, bool &wasInCache, std::atomic_uint &taskCounter)
RTClearEntry DEFAULT_CLEAR_ENTRY
FORCE_INLINE T * Get(const Handle< T > handle)
static const vec4< F32 > VECTOR4_ZERO
constexpr auto to_base(const Type value) -> Type
mat4< F32 > _invViewMatrix
mat4< F32 > _projectionMatrix
mat4< F32 > _invProjectionMatrix
struct Divide::Configuration::Rendering::PostFX::SSR ssr
struct Divide::Configuration::Rendering::PostFX postFX
struct Divide::Configuration::Rendering rendering
DescriptorSetBindingData _data
RTDrawDescriptor _descriptor
RTClearDescriptor _clearDescriptor
const Pipeline * _pipeline
static constexpr RTColourAttachmentSlot ALBEDO
mat4< F32 > _previousViewMatrix
mat4< F32 > _previousViewProjectionMatrix
mat4< F32 > _previousProjectionMatrix
PrimitiveTopology _primitiveTopology
Handle< ShaderProgram > _shaderProgramHandle
RenderStateBlock _stateBlock
vector< ShaderModuleDescriptor > _modules
SamplerDescriptor _sampler
static RenderTargetID NORMALS_RESOLVED
static RenderTargetID SSR_RESULT