diff --git a/apps/LoopThroughWithOpenGLCompositing/gl/shader/ShaderProgramCompiler.cpp b/apps/LoopThroughWithOpenGLCompositing/gl/shader/ShaderProgramCompiler.cpp index 92798e9..9d80e97 100644 --- a/apps/LoopThroughWithOpenGLCompositing/gl/shader/ShaderProgramCompiler.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/gl/shader/ShaderProgramCompiler.cpp @@ -40,17 +40,6 @@ bool ShaderProgramCompiler::CompileLayerProgram(const RuntimeRenderState& state, return CompilePreparedLayerProgram(state, passSources, layerProgram, errorMessageSize, errorMessage); } -bool ShaderProgramCompiler::CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::string& fragmentShaderSource, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage) -{ - std::vector passSources; - ShaderPassBuildSource passSource; - passSource.passId = "main"; - passSource.fragmentShaderSource = fragmentShaderSource; - passSource.outputName = "layerOutput"; - passSources.push_back(std::move(passSource)); - return CompilePreparedLayerProgram(state, passSources, layerProgram, errorMessageSize, errorMessage); -} - bool ShaderProgramCompiler::CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::vector& passSources, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage) { GLsizei errorBufferSize = 0; diff --git a/apps/LoopThroughWithOpenGLCompositing/gl/shader/ShaderProgramCompiler.h b/apps/LoopThroughWithOpenGLCompositing/gl/shader/ShaderProgramCompiler.h index 40330ea..db2e38f 100644 --- a/apps/LoopThroughWithOpenGLCompositing/gl/shader/ShaderProgramCompiler.h +++ b/apps/LoopThroughWithOpenGLCompositing/gl/shader/ShaderProgramCompiler.h @@ -16,7 +16,6 @@ public: ShaderProgramCompiler(OpenGLRenderer& renderer, RuntimeHost& runtimeHost, ShaderTextureBindings& textureBindings); bool CompileLayerProgram(const RuntimeRenderState& state, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage); - bool CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::string& fragmentShaderSource, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage); bool CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::vector& passSources, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage); bool CompileDecodeShader(int errorMessageSize, char* errorMessage); bool CompileOutputPackShader(int errorMessageSize, char* errorMessage); diff --git a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.cpp b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.cpp index 18f367c..a1569c7 100644 --- a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.cpp @@ -1300,20 +1300,6 @@ bool RuntimeHost::TryAdvanceFrame() return true; } -bool RuntimeHost::BuildLayerFragmentShaderSource(const std::string& layerId, std::string& fragmentShaderSource, std::string& error) -{ - std::vector passSources; - if (!BuildLayerPassFragmentShaderSources(layerId, passSources, error)) - return false; - if (passSources.empty()) - { - error = "Shader layer produced no compiled passes: " + layerId; - return false; - } - fragmentShaderSource = passSources.front().fragmentShaderSource; - return true; -} - bool RuntimeHost::BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector& passSources, std::string& error) { try diff --git a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.h b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.h index a9c6dbf..cbcd158 100644 --- a/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.h +++ b/apps/LoopThroughWithOpenGLCompositing/runtime/RuntimeHost.h @@ -51,7 +51,6 @@ public: void AdvanceFrame(); bool TryAdvanceFrame(); - bool BuildLayerFragmentShaderSource(const std::string& layerId, std::string& fragmentShaderSource, std::string& error); bool BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector& passSources, std::string& error); std::vector GetLayerRenderStates(unsigned outputWidth, unsigned outputHeight) const; bool TryGetLayerRenderStates(unsigned outputWidth, unsigned outputHeight, std::vector& states) const; diff --git a/apps/LoopThroughWithOpenGLCompositing/shader/ShaderCompiler.cpp b/apps/LoopThroughWithOpenGLCompositing/shader/ShaderCompiler.cpp index a7efd61..4d1c46e 100644 --- a/apps/LoopThroughWithOpenGLCompositing/shader/ShaderCompiler.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/shader/ShaderCompiler.cpp @@ -143,16 +143,6 @@ ShaderCompiler::ShaderCompiler( { } -bool ShaderCompiler::BuildLayerFragmentShaderSource(const ShaderPackage& shaderPackage, std::string& fragmentShaderSource, std::string& error) const -{ - if (shaderPackage.passes.empty()) - { - error = "Shader package has no render passes: " + shaderPackage.id; - return false; - } - return BuildPassFragmentShaderSource(shaderPackage, shaderPackage.passes.front(), fragmentShaderSource, error); -} - bool ShaderCompiler::BuildPassFragmentShaderSource(const ShaderPackage& shaderPackage, const ShaderPassDefinition& pass, std::string& fragmentShaderSource, std::string& error) const { std::string wrapperSource; diff --git a/apps/LoopThroughWithOpenGLCompositing/shader/ShaderCompiler.h b/apps/LoopThroughWithOpenGLCompositing/shader/ShaderCompiler.h index 8bf913d..9fc8c03 100644 --- a/apps/LoopThroughWithOpenGLCompositing/shader/ShaderCompiler.h +++ b/apps/LoopThroughWithOpenGLCompositing/shader/ShaderCompiler.h @@ -15,7 +15,6 @@ public: const std::filesystem::path& patchedGlslPath, unsigned maxTemporalHistoryFrames); - bool BuildLayerFragmentShaderSource(const ShaderPackage& shaderPackage, std::string& fragmentShaderSource, std::string& error) const; bool BuildPassFragmentShaderSource(const ShaderPackage& shaderPackage, const ShaderPassDefinition& pass, std::string& fragmentShaderSource, std::string& error) const; private: