diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-02 23:26:16 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-02 23:26:16 +0100 |
| commit | 2519948f03a8fc467614bdfbdf5bd3e065dbcb5e (patch) | |
| tree | 19d6808bb6dd6bd0a89799885c1cce5b64c02f1b /src/gpu/effects/shader_composer.cc | |
| parent | b52200dbfe27355a46ab25dd87cd82799df9c84f (diff) | |
feat: Complete audio tracker system integration and tests
Diffstat (limited to 'src/gpu/effects/shader_composer.cc')
| -rw-r--r-- | src/gpu/effects/shader_composer.cc | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/src/gpu/effects/shader_composer.cc b/src/gpu/effects/shader_composer.cc index 61da6e6..3e08df9 100644 --- a/src/gpu/effects/shader_composer.cc +++ b/src/gpu/effects/shader_composer.cc @@ -5,29 +5,31 @@ #include <sstream> ShaderComposer& ShaderComposer::Get() { - static ShaderComposer instance; - return instance; + static ShaderComposer instance; + return instance; } -void ShaderComposer::RegisterSnippet(const std::string& name, const std::string& code) { - snippets_[name] = code; +void ShaderComposer::RegisterSnippet(const std::string& name, + const std::string& code) { + snippets_[name] = code; } -std::string ShaderComposer::Compose(const std::vector<std::string>& dependencies, const std::string& main_code) { - std::stringstream ss; - ss << "// Generated by ShaderComposer\n\n"; - - for (const auto& dep : dependencies) { - auto it = snippets_.find(dep); - if (it != snippets_.end()) { - ss << "// --- Snippet: " << dep << " ---\n"; - ss << it->second << "\n"; - } +std::string +ShaderComposer::Compose(const std::vector<std::string>& dependencies, + const std::string& main_code) { + std::stringstream ss; + ss << "// Generated by ShaderComposer\n\n"; + + for (const auto& dep : dependencies) { + auto it = snippets_.find(dep); + if (it != snippets_.end()) { + ss << "// --- Snippet: " << dep << " ---\n"; + ss << it->second << "\n"; } - - ss << "// --- Main Code ---\n"; - ss << main_code; - - return ss.str(); -} + } + ss << "// --- Main Code ---\n"; + ss << main_code; + + return ss.str(); +} |
