Replaced setPushConstant call in KRCamera with reflection
This commit is contained in:
@@ -448,7 +448,6 @@ void KRCamera::renderPost(RenderInfo& ri)
|
|||||||
|
|
||||||
KRPipeline *postShader = m_pContext->getPipelineManager()->getPipeline(surface, info);
|
KRPipeline *postShader = m_pContext->getPipelineManager()->getPipeline(surface, info);
|
||||||
|
|
||||||
postShader->setPushConstant(KRPipeline::PushConstant::fade_color, m_fade_color);
|
|
||||||
postShader->bind(commandBuffer, *this, m_viewport, Matrix4(), nullptr, nullptr, nullptr, compositeSurface.getRenderPass(RenderPassType::RENDER_PASS_FORWARD_TRANSPARENT));
|
postShader->bind(commandBuffer, *this, m_viewport, Matrix4(), nullptr, nullptr, nullptr, compositeSurface.getRenderPass(RenderPassType::RENDER_PASS_FORWARD_TRANSPARENT));
|
||||||
|
|
||||||
m_pContext->getTextureManager()->selectTexture(GL_TEXTURE_2D, 0, compositeDepthTexture);
|
m_pContext->getTextureManager()->selectTexture(GL_TEXTURE_2D, 0, compositeDepthTexture);
|
||||||
@@ -861,3 +860,14 @@ Vector4 KRCamera::getFadeColor()
|
|||||||
{
|
{
|
||||||
return m_fade_color;
|
return m_fade_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool KRCamera::getShaderValue(ShaderValue value, hydra::Vector4* output) const
|
||||||
|
{
|
||||||
|
switch (value) {
|
||||||
|
case ShaderValue::fade_color:
|
||||||
|
*output = m_fade_color;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return KRNode::getShaderValue(value, output);
|
||||||
|
}
|
||||||
|
|||||||
@@ -81,6 +81,9 @@ public:
|
|||||||
void setSkyBox(const std::string& skyBox);
|
void setSkyBox(const std::string& skyBox);
|
||||||
const std::string getSkyBox() const;
|
const std::string getSkyBox() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool getShaderValue(ShaderValue value, hydra::Vector4* output) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createBuffers(int renderBufferWidth, int renderBufferHeight);
|
void createBuffers(int renderBufferWidth, int renderBufferHeight);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user