26 vertModule.
_variant =
"FullScreenQuad";
31 fragModule.
_variant =
"ObjectMotionBlur";
34 shaderDescriptor.
_modules.push_back(vertModule);
35 shaderDescriptor.
_modules.push_back(fragModule);
36 shaderDescriptor.
_globalDefines.emplace_back(
"dvd_velocityScale PushData0[0].x" );
37 shaderDescriptor.
_globalDefines.emplace_back(
"dvd_maxSamples int(PushData0[0].y)" );
40 motionBlur.waitForReady(
false);
83 beginRenderPassCmd->
_name =
"DO_MOTION_BLUR_PASS";
90 auto cmd = GFX::EnqueueCommand<GFX::BindShaderResourcesCommand>( bufferInOut );
94 Set( binding.
_data, screenAtt->texture(), screenAtt->_descriptor._sampler );
98 Set( binding.
_data, velocityAtt->texture(), velocityAtt->_descriptor._sampler );
101 PushConstantsStruct& params = GFX::EnqueueCommand<GFX::SendPushConstantsCommand>( bufferInOut )->_fastData;
104 GFX::EnqueueCommand<GFX::DrawCommand>(bufferInOut)->_drawCommands.emplace_back();
105 GFX::EnqueueCommand<GFX::EndRenderPassCommand>(bufferInOut);
Time::ApplicationTimer & timer() noexcept
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
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
Handle< ShaderProgram > _blurApply
~MotionBlurPreRenderOperator()
bool ready() const noexcept override
GFX::BindPipelineCommand _blurApplyPipelineCmd
void parametersChanged() noexcept
bool execute(PlayerIndex idx, const CameraSnapshot &cameraSnapshot, const RenderTargetHandle &input, const RenderTargetHandle &output, GFX::CommandBuffer &bufferInOut) override
Return true if we rendered into "output".
MotionBlurPreRenderOperator(GFXDevice &context, PreRenderBatch &parent)
PlatformContext & context() noexcept
Application & app() noexcept
Configuration & config() noexcept
RenderTargetHandle screenRT() const noexcept
virtual bool ready() const noexcept
RTDrawDescriptor _screenOnlyDraw
RTAttachment * getAttachment(RTAttachmentType type, RTColourAttachmentSlot slot=RTColourAttachmentSlot::SLOT_0) const
F32 getFps() const noexcept
void set(const T *v) noexcept
set the 2 components of the vector manually using a source pointer to a (large enough) array
constexpr U16 TARGET_FRAME_RATE
Application desired framerate for physics and input simulations.
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)
constexpr F32 to_F32(const T value)
void Set(DescriptorSetBindingData &dataInOut, ShaderBuffer *buffer, const BufferRange range) 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
constexpr auto to_base(const Type value) -> Type
struct Divide::Configuration::Rendering::PostFX::MotionBlur motionBlur
struct Divide::Configuration::Rendering::PostFX postFX
struct Divide::Configuration::Rendering rendering
DescriptorSetBindingData _data
RTDrawDescriptor _descriptor
RTClearDescriptor _clearDescriptor
const Pipeline * _pipeline
static constexpr RTColourAttachmentSlot ALBEDO
static constexpr RTColourAttachmentSlot VELOCITY
PrimitiveTopology _primitiveTopology
Handle< ShaderProgram > _shaderProgramHandle
RenderStateBlock _stateBlock
vector< ShaderModuleDescriptor > _modules
ModuleDefines _globalDefines