Layer program split
This commit is contained in:
@@ -101,6 +101,8 @@ std::vector<RenderPassDescriptor> OpenGLRenderPass::BuildLayerPassDescriptors(
|
|||||||
{
|
{
|
||||||
const RuntimeRenderState& state = layerStates[index];
|
const RuntimeRenderState& state = layerStates[index];
|
||||||
LayerProgram& layerProgram = layerPrograms[index];
|
LayerProgram& layerProgram = layerPrograms[index];
|
||||||
|
if (layerProgram.passes.empty())
|
||||||
|
continue;
|
||||||
const std::size_t remaining = layerStates.size() - index;
|
const std::size_t remaining = layerStates.size() - index;
|
||||||
const bool writeToMain = (remaining % 2) == 1;
|
const bool writeToMain = (remaining % 2) == 1;
|
||||||
|
|
||||||
@@ -115,6 +117,7 @@ std::vector<RenderPassDescriptor> OpenGLRenderPass::BuildLayerPassDescriptors(
|
|||||||
pass.sourceFramebuffer = sourceFramebuffer;
|
pass.sourceFramebuffer = sourceFramebuffer;
|
||||||
pass.destinationFramebuffer = writeToMain ? mRenderer.CompositeFramebuffer() : mRenderer.LayerTempFramebuffer();
|
pass.destinationFramebuffer = writeToMain ? mRenderer.CompositeFramebuffer() : mRenderer.LayerTempFramebuffer();
|
||||||
pass.layerProgram = &layerProgram;
|
pass.layerProgram = &layerProgram;
|
||||||
|
pass.passProgram = &layerProgram.passes.front();
|
||||||
pass.layerState = &state;
|
pass.layerState = &state;
|
||||||
pass.capturePreLayerHistory = state.temporalHistorySource == TemporalHistorySource::PreLayerInput;
|
pass.capturePreLayerHistory = state.temporalHistorySource == TemporalHistorySource::PreLayerInput;
|
||||||
passes.push_back(pass);
|
passes.push_back(pass);
|
||||||
@@ -134,13 +137,13 @@ void OpenGLRenderPass::RenderLayerPass(
|
|||||||
const TextBindingUpdater& updateTextBinding,
|
const TextBindingUpdater& updateTextBinding,
|
||||||
const GlobalParamsUpdater& updateGlobalParams)
|
const GlobalParamsUpdater& updateGlobalParams)
|
||||||
{
|
{
|
||||||
if (pass.layerProgram == nullptr || pass.layerState == nullptr)
|
if (pass.passProgram == nullptr || pass.layerState == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RenderShaderProgram(
|
RenderShaderProgram(
|
||||||
pass.sourceTexture,
|
pass.sourceTexture,
|
||||||
pass.destinationFramebuffer,
|
pass.destinationFramebuffer,
|
||||||
*pass.layerProgram,
|
*pass.passProgram,
|
||||||
*pass.layerState,
|
*pass.layerState,
|
||||||
inputFrameWidth,
|
inputFrameWidth,
|
||||||
inputFrameHeight,
|
inputFrameHeight,
|
||||||
@@ -155,7 +158,7 @@ void OpenGLRenderPass::RenderLayerPass(
|
|||||||
void OpenGLRenderPass::RenderShaderProgram(
|
void OpenGLRenderPass::RenderShaderProgram(
|
||||||
GLuint sourceTexture,
|
GLuint sourceTexture,
|
||||||
GLuint destinationFrameBuffer,
|
GLuint destinationFrameBuffer,
|
||||||
LayerProgram& layerProgram,
|
PassProgram& passProgram,
|
||||||
const RuntimeRenderState& state,
|
const RuntimeRenderState& state,
|
||||||
unsigned inputFrameWidth,
|
unsigned inputFrameWidth,
|
||||||
unsigned inputFrameHeight,
|
unsigned inputFrameHeight,
|
||||||
@@ -163,7 +166,7 @@ void OpenGLRenderPass::RenderShaderProgram(
|
|||||||
const TextBindingUpdater& updateTextBinding,
|
const TextBindingUpdater& updateTextBinding,
|
||||||
const GlobalParamsUpdater& updateGlobalParams)
|
const GlobalParamsUpdater& updateGlobalParams)
|
||||||
{
|
{
|
||||||
for (LayerProgram::TextBinding& textBinding : layerProgram.textBindings)
|
for (LayerProgram::TextBinding& textBinding : passProgram.textBindings)
|
||||||
{
|
{
|
||||||
std::string textError;
|
std::string textError;
|
||||||
if (!updateTextBinding(state, textBinding, textError))
|
if (!updateTextBinding(state, textBinding, textError))
|
||||||
@@ -176,10 +179,10 @@ void OpenGLRenderPass::RenderShaderProgram(
|
|||||||
const std::vector<GLuint> sourceHistoryTextures = mRenderer.TemporalHistory().ResolveSourceHistoryTextures(sourceTexture, state.isTemporal ? historyCap : 0);
|
const std::vector<GLuint> sourceHistoryTextures = mRenderer.TemporalHistory().ResolveSourceHistoryTextures(sourceTexture, state.isTemporal ? historyCap : 0);
|
||||||
const std::vector<GLuint> temporalHistoryTextures = mRenderer.TemporalHistory().ResolveTemporalHistoryTextures(state, sourceTexture, state.isTemporal ? historyCap : 0);
|
const std::vector<GLuint> temporalHistoryTextures = mRenderer.TemporalHistory().ResolveTemporalHistoryTextures(state, sourceTexture, state.isTemporal ? historyCap : 0);
|
||||||
const ShaderTextureBindings::RuntimeTextureBindingPlan texturePlan =
|
const ShaderTextureBindings::RuntimeTextureBindingPlan texturePlan =
|
||||||
mTextureBindings.BuildLayerRuntimeBindingPlan(layerProgram, sourceTexture, sourceHistoryTextures, temporalHistoryTextures);
|
mTextureBindings.BuildLayerRuntimeBindingPlan(passProgram, sourceTexture, sourceHistoryTextures, temporalHistoryTextures);
|
||||||
mTextureBindings.BindRuntimeTexturePlan(texturePlan);
|
mTextureBindings.BindRuntimeTexturePlan(texturePlan);
|
||||||
glBindVertexArray(mRenderer.FullscreenVertexArray());
|
glBindVertexArray(mRenderer.FullscreenVertexArray());
|
||||||
glUseProgram(layerProgram.program);
|
glUseProgram(passProgram.program);
|
||||||
updateGlobalParams(state, mRenderer.TemporalHistory().SourceAvailableCount(), mRenderer.TemporalHistory().AvailableCountForLayer(state.layerId));
|
updateGlobalParams(state, mRenderer.TemporalHistory().SourceAvailableCount(), mRenderer.TemporalHistory().AvailableCountForLayer(state.layerId));
|
||||||
glDrawArrays(GL_TRIANGLES, 0, 3);
|
glDrawArrays(GL_TRIANGLES, 0, 3);
|
||||||
glUseProgram(0);
|
glUseProgram(0);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class OpenGLRenderPass
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using LayerProgram = OpenGLRenderer::LayerProgram;
|
using LayerProgram = OpenGLRenderer::LayerProgram;
|
||||||
|
using PassProgram = OpenGLRenderer::LayerProgram::PassProgram;
|
||||||
using TextBindingUpdater = std::function<bool(const RuntimeRenderState&, LayerProgram::TextBinding&, std::string&)>;
|
using TextBindingUpdater = std::function<bool(const RuntimeRenderState&, LayerProgram::TextBinding&, std::string&)>;
|
||||||
using GlobalParamsUpdater = std::function<bool(const RuntimeRenderState&, unsigned, unsigned)>;
|
using GlobalParamsUpdater = std::function<bool(const RuntimeRenderState&, unsigned, unsigned)>;
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ private:
|
|||||||
void RenderShaderProgram(
|
void RenderShaderProgram(
|
||||||
GLuint sourceTexture,
|
GLuint sourceTexture,
|
||||||
GLuint destinationFrameBuffer,
|
GLuint destinationFrameBuffer,
|
||||||
LayerProgram& layerProgram,
|
PassProgram& passProgram,
|
||||||
const RuntimeRenderState& state,
|
const RuntimeRenderState& state,
|
||||||
unsigned inputFrameWidth,
|
unsigned inputFrameWidth,
|
||||||
unsigned inputFrameHeight,
|
unsigned inputFrameHeight,
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ struct RenderPassDescriptor
|
|||||||
GLuint sourceFramebuffer = 0;
|
GLuint sourceFramebuffer = 0;
|
||||||
GLuint destinationFramebuffer = 0;
|
GLuint destinationFramebuffer = 0;
|
||||||
OpenGLRenderer::LayerProgram* layerProgram = nullptr;
|
OpenGLRenderer::LayerProgram* layerProgram = nullptr;
|
||||||
|
OpenGLRenderer::LayerProgram::PassProgram* passProgram = nullptr;
|
||||||
const RuntimeRenderState* layerState = nullptr;
|
const RuntimeRenderState* layerState = nullptr;
|
||||||
bool capturePreLayerHistory = false;
|
bool capturePreLayerHistory = false;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -155,7 +155,9 @@ void OpenGLRenderer::DestroyResources()
|
|||||||
|
|
||||||
void OpenGLRenderer::DestroySingleLayerProgram(LayerProgram& layerProgram)
|
void OpenGLRenderer::DestroySingleLayerProgram(LayerProgram& layerProgram)
|
||||||
{
|
{
|
||||||
for (LayerProgram::TextureBinding& binding : layerProgram.textureBindings)
|
for (LayerProgram::PassProgram& passProgram : layerProgram.passes)
|
||||||
|
{
|
||||||
|
for (LayerProgram::TextureBinding& binding : passProgram.textureBindings)
|
||||||
{
|
{
|
||||||
if (binding.texture != 0)
|
if (binding.texture != 0)
|
||||||
{
|
{
|
||||||
@@ -163,9 +165,9 @@ void OpenGLRenderer::DestroySingleLayerProgram(LayerProgram& layerProgram)
|
|||||||
binding.texture = 0;
|
binding.texture = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
layerProgram.textureBindings.clear();
|
passProgram.textureBindings.clear();
|
||||||
|
|
||||||
for (LayerProgram::TextBinding& binding : layerProgram.textBindings)
|
for (LayerProgram::TextBinding& binding : passProgram.textBindings)
|
||||||
{
|
{
|
||||||
if (binding.texture != 0)
|
if (binding.texture != 0)
|
||||||
{
|
{
|
||||||
@@ -173,25 +175,27 @@ void OpenGLRenderer::DestroySingleLayerProgram(LayerProgram& layerProgram)
|
|||||||
binding.texture = 0;
|
binding.texture = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
layerProgram.textBindings.clear();
|
passProgram.textBindings.clear();
|
||||||
|
|
||||||
if (layerProgram.program != 0)
|
if (passProgram.program != 0)
|
||||||
{
|
{
|
||||||
glDeleteProgram(layerProgram.program);
|
glDeleteProgram(passProgram.program);
|
||||||
layerProgram.program = 0;
|
passProgram.program = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (layerProgram.fragmentShader != 0)
|
if (passProgram.fragmentShader != 0)
|
||||||
{
|
{
|
||||||
glDeleteShader(layerProgram.fragmentShader);
|
glDeleteShader(passProgram.fragmentShader);
|
||||||
layerProgram.fragmentShader = 0;
|
passProgram.fragmentShader = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (layerProgram.vertexShader != 0)
|
if (passProgram.vertexShader != 0)
|
||||||
{
|
{
|
||||||
glDeleteShader(layerProgram.vertexShader);
|
glDeleteShader(passProgram.vertexShader);
|
||||||
layerProgram.vertexShader = 0;
|
passProgram.vertexShader = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
layerProgram.passes.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGLRenderer::DestroyLayerPrograms()
|
void OpenGLRenderer::DestroyLayerPrograms()
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ public:
|
|||||||
|
|
||||||
std::string layerId;
|
std::string layerId;
|
||||||
std::string shaderId;
|
std::string shaderId;
|
||||||
|
|
||||||
|
struct PassProgram
|
||||||
|
{
|
||||||
|
std::string passId;
|
||||||
GLuint shaderTextureBase = 0;
|
GLuint shaderTextureBase = 0;
|
||||||
GLuint program = 0;
|
GLuint program = 0;
|
||||||
GLuint vertexShader = 0;
|
GLuint vertexShader = 0;
|
||||||
@@ -45,6 +49,9 @@ public:
|
|||||||
std::vector<TextBinding> textBindings;
|
std::vector<TextBinding> textBindings;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::vector<PassProgram> passes;
|
||||||
|
};
|
||||||
|
|
||||||
GLuint CaptureTexture() const { return mCaptureTexture; }
|
GLuint CaptureTexture() const { return mCaptureTexture; }
|
||||||
GLuint DecodedTexture() const { return mRenderTargets.Texture(RenderTargetId::Decoded); }
|
GLuint DecodedTexture() const { return mRenderTargets.Texture(RenderTargetId::Decoded); }
|
||||||
GLuint LayerTempTexture() const { return mRenderTargets.Texture(RenderTargetId::LayerTemp); }
|
GLuint LayerTempTexture() const { return mRenderTargets.Texture(RenderTargetId::LayerTemp); }
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "GlShaderSources.h"
|
#include "GlShaderSources.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@@ -103,9 +104,12 @@ bool ShaderProgramCompiler::CompilePreparedLayerProgram(const RuntimeRenderState
|
|||||||
|
|
||||||
layerProgram.layerId = state.layerId;
|
layerProgram.layerId = state.layerId;
|
||||||
layerProgram.shaderId = state.shaderId;
|
layerProgram.shaderId = state.shaderId;
|
||||||
layerProgram.shaderTextureBase = mTextureBindings.ResolveShaderTextureBase(state, mRuntimeHost.GetMaxTemporalHistoryFrames());
|
|
||||||
layerProgram.textureBindings.swap(textureBindings);
|
PassProgram passProgram;
|
||||||
layerProgram.textBindings.swap(textBindings);
|
passProgram.passId = "main";
|
||||||
|
passProgram.shaderTextureBase = mTextureBindings.ResolveShaderTextureBase(state, mRuntimeHost.GetMaxTemporalHistoryFrames());
|
||||||
|
passProgram.textureBindings.swap(textureBindings);
|
||||||
|
passProgram.textBindings.swap(textBindings);
|
||||||
|
|
||||||
const GLuint globalParamsIndex = glGetUniformBlockIndex(newProgram.get(), "GlobalParams");
|
const GLuint globalParamsIndex = glGetUniformBlockIndex(newProgram.get(), "GlobalParams");
|
||||||
if (globalParamsIndex != GL_INVALID_INDEX)
|
if (globalParamsIndex != GL_INVALID_INDEX)
|
||||||
@@ -113,12 +117,13 @@ bool ShaderProgramCompiler::CompilePreparedLayerProgram(const RuntimeRenderState
|
|||||||
|
|
||||||
const unsigned historyCap = mRuntimeHost.GetMaxTemporalHistoryFrames();
|
const unsigned historyCap = mRuntimeHost.GetMaxTemporalHistoryFrames();
|
||||||
glUseProgram(newProgram.get());
|
glUseProgram(newProgram.get());
|
||||||
mTextureBindings.AssignLayerSamplerUniforms(newProgram.get(), state, layerProgram, historyCap);
|
mTextureBindings.AssignLayerSamplerUniforms(newProgram.get(), state, passProgram, historyCap);
|
||||||
glUseProgram(0);
|
glUseProgram(0);
|
||||||
|
|
||||||
layerProgram.program = newProgram.release();
|
passProgram.program = newProgram.release();
|
||||||
layerProgram.vertexShader = newVertexShader.release();
|
passProgram.vertexShader = newVertexShader.release();
|
||||||
layerProgram.fragmentShader = newFragmentShader.release();
|
passProgram.fragmentShader = newFragmentShader.release();
|
||||||
|
layerProgram.passes.push_back(std::move(passProgram));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class ShaderProgramCompiler
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using LayerProgram = OpenGLRenderer::LayerProgram;
|
using LayerProgram = OpenGLRenderer::LayerProgram;
|
||||||
|
using PassProgram = OpenGLRenderer::LayerProgram::PassProgram;
|
||||||
|
|
||||||
ShaderProgramCompiler(OpenGLRenderer& renderer, RuntimeHost& runtimeHost, ShaderTextureBindings& textureBindings);
|
ShaderProgramCompiler(OpenGLRenderer& renderer, RuntimeHost& runtimeHost, ShaderTextureBindings& textureBindings);
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ GLuint ShaderTextureBindings::ResolveShaderTextureBase(const RuntimeRenderState&
|
|||||||
return state.isTemporal ? kSourceHistoryTextureUnitBase + historyCap + historyCap : kSourceHistoryTextureUnitBase;
|
return state.isTemporal ? kSourceHistoryTextureUnitBase + historyCap + historyCap : kSourceHistoryTextureUnitBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShaderTextureBindings::AssignLayerSamplerUniforms(GLuint program, const RuntimeRenderState& state, const LayerProgram& layerProgram, unsigned historyCap) const
|
void ShaderTextureBindings::AssignLayerSamplerUniforms(GLuint program, const RuntimeRenderState& state, const PassProgram& passProgram, unsigned historyCap) const
|
||||||
{
|
{
|
||||||
const GLuint shaderTextureBase = ResolveShaderTextureBase(state, historyCap);
|
const GLuint shaderTextureBase = ResolveShaderTextureBase(state, historyCap);
|
||||||
|
|
||||||
@@ -129,24 +129,24 @@ void ShaderTextureBindings::AssignLayerSamplerUniforms(GLuint program, const Run
|
|||||||
glUniform1i(temporalSamplerLocation, static_cast<GLint>(kSourceHistoryTextureUnitBase + historyCap + index));
|
glUniform1i(temporalSamplerLocation, static_cast<GLint>(kSourceHistoryTextureUnitBase + historyCap + index));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (std::size_t index = 0; index < layerProgram.textureBindings.size(); ++index)
|
for (std::size_t index = 0; index < passProgram.textureBindings.size(); ++index)
|
||||||
{
|
{
|
||||||
const GLint textureSamplerLocation = FindSamplerUniformLocation(program, layerProgram.textureBindings[index].samplerName);
|
const GLint textureSamplerLocation = FindSamplerUniformLocation(program, passProgram.textureBindings[index].samplerName);
|
||||||
if (textureSamplerLocation >= 0)
|
if (textureSamplerLocation >= 0)
|
||||||
glUniform1i(textureSamplerLocation, static_cast<GLint>(shaderTextureBase + static_cast<GLuint>(index)));
|
glUniform1i(textureSamplerLocation, static_cast<GLint>(shaderTextureBase + static_cast<GLuint>(index)));
|
||||||
}
|
}
|
||||||
|
|
||||||
const GLuint textTextureBase = shaderTextureBase + static_cast<GLuint>(layerProgram.textureBindings.size());
|
const GLuint textTextureBase = shaderTextureBase + static_cast<GLuint>(passProgram.textureBindings.size());
|
||||||
for (std::size_t index = 0; index < layerProgram.textBindings.size(); ++index)
|
for (std::size_t index = 0; index < passProgram.textBindings.size(); ++index)
|
||||||
{
|
{
|
||||||
const GLint textSamplerLocation = FindSamplerUniformLocation(program, layerProgram.textBindings[index].samplerName);
|
const GLint textSamplerLocation = FindSamplerUniformLocation(program, passProgram.textBindings[index].samplerName);
|
||||||
if (textSamplerLocation >= 0)
|
if (textSamplerLocation >= 0)
|
||||||
glUniform1i(textSamplerLocation, static_cast<GLint>(textTextureBase + static_cast<GLuint>(index)));
|
glUniform1i(textSamplerLocation, static_cast<GLint>(textTextureBase + static_cast<GLuint>(index)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderTextureBindings::RuntimeTextureBindingPlan ShaderTextureBindings::BuildLayerRuntimeBindingPlan(
|
ShaderTextureBindings::RuntimeTextureBindingPlan ShaderTextureBindings::BuildLayerRuntimeBindingPlan(
|
||||||
const LayerProgram& layerProgram,
|
const PassProgram& passProgram,
|
||||||
GLuint layerInputTexture,
|
GLuint layerInputTexture,
|
||||||
const std::vector<GLuint>& sourceHistoryTextures,
|
const std::vector<GLuint>& sourceHistoryTextures,
|
||||||
const std::vector<GLuint>& temporalHistoryTextures) const
|
const std::vector<GLuint>& temporalHistoryTextures) const
|
||||||
@@ -175,10 +175,10 @@ ShaderTextureBindings::RuntimeTextureBindingPlan ShaderTextureBindings::BuildLay
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const GLuint shaderTextureBase = layerProgram.shaderTextureBase != 0 ? layerProgram.shaderTextureBase : kSourceHistoryTextureUnitBase;
|
const GLuint shaderTextureBase = passProgram.shaderTextureBase != 0 ? passProgram.shaderTextureBase : kSourceHistoryTextureUnitBase;
|
||||||
for (std::size_t index = 0; index < layerProgram.textureBindings.size(); ++index)
|
for (std::size_t index = 0; index < passProgram.textureBindings.size(); ++index)
|
||||||
{
|
{
|
||||||
const LayerProgram::TextureBinding& textureBinding = layerProgram.textureBindings[index];
|
const LayerProgram::TextureBinding& textureBinding = passProgram.textureBindings[index];
|
||||||
plan.bindings.push_back({
|
plan.bindings.push_back({
|
||||||
"shaderTexture",
|
"shaderTexture",
|
||||||
textureBinding.samplerName,
|
textureBinding.samplerName,
|
||||||
@@ -187,10 +187,10 @@ ShaderTextureBindings::RuntimeTextureBindingPlan ShaderTextureBindings::BuildLay
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const GLuint textTextureBase = shaderTextureBase + static_cast<GLuint>(layerProgram.textureBindings.size());
|
const GLuint textTextureBase = shaderTextureBase + static_cast<GLuint>(passProgram.textureBindings.size());
|
||||||
for (std::size_t index = 0; index < layerProgram.textBindings.size(); ++index)
|
for (std::size_t index = 0; index < passProgram.textBindings.size(); ++index)
|
||||||
{
|
{
|
||||||
const LayerProgram::TextBinding& textBinding = layerProgram.textBindings[index];
|
const LayerProgram::TextBinding& textBinding = passProgram.textBindings[index];
|
||||||
plan.bindings.push_back({
|
plan.bindings.push_back({
|
||||||
"textTexture",
|
"textTexture",
|
||||||
textBinding.samplerName,
|
textBinding.samplerName,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class ShaderTextureBindings
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using LayerProgram = OpenGLRenderer::LayerProgram;
|
using LayerProgram = OpenGLRenderer::LayerProgram;
|
||||||
|
using PassProgram = OpenGLRenderer::LayerProgram::PassProgram;
|
||||||
|
|
||||||
struct RuntimeTextureBinding
|
struct RuntimeTextureBinding
|
||||||
{
|
{
|
||||||
@@ -29,9 +30,9 @@ public:
|
|||||||
bool UpdateTextBindingTexture(const RuntimeRenderState& state, LayerProgram::TextBinding& textBinding, std::string& error);
|
bool UpdateTextBindingTexture(const RuntimeRenderState& state, LayerProgram::TextBinding& textBinding, std::string& error);
|
||||||
GLint FindSamplerUniformLocation(GLuint program, const std::string& samplerName) const;
|
GLint FindSamplerUniformLocation(GLuint program, const std::string& samplerName) const;
|
||||||
GLuint ResolveShaderTextureBase(const RuntimeRenderState& state, unsigned historyCap) const;
|
GLuint ResolveShaderTextureBase(const RuntimeRenderState& state, unsigned historyCap) const;
|
||||||
void AssignLayerSamplerUniforms(GLuint program, const RuntimeRenderState& state, const LayerProgram& layerProgram, unsigned historyCap) const;
|
void AssignLayerSamplerUniforms(GLuint program, const RuntimeRenderState& state, const PassProgram& passProgram, unsigned historyCap) const;
|
||||||
RuntimeTextureBindingPlan BuildLayerRuntimeBindingPlan(
|
RuntimeTextureBindingPlan BuildLayerRuntimeBindingPlan(
|
||||||
const LayerProgram& layerProgram,
|
const PassProgram& passProgram,
|
||||||
GLuint layerInputTexture,
|
GLuint layerInputTexture,
|
||||||
const std::vector<GLuint>& sourceHistoryTextures,
|
const std::vector<GLuint>& sourceHistoryTextures,
|
||||||
const std::vector<GLuint>& temporalHistoryTextures) const;
|
const std::vector<GLuint>& temporalHistoryTextures) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user