Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 6d3e7ab7 authored by TAVERNIER Vincent's avatar TAVERNIER Vincent
Browse files

Fix support for iGlobalTime

parent a9331b43
No related branches found
No related tags found
No related merge requests found
#include <iostream>
#include <string>
#include <sstream>
#include <regex>
#include <curl/curl.h>
#include <json/json.h>
......@@ -161,8 +160,6 @@ int loadRemote(const string &shaderId, const string &shaderApiKey,
dump.close();
// Create buffer configs for each render pass
regex rxiGlobalTime("\\biGlobalTime\\b");
for (int i = 0; i < shaderSpec["Shader"]["renderpass"].size(); ++i)
{
auto &pass(shaderSpec["Shader"]["renderpass"][i]);
......@@ -188,9 +185,7 @@ int loadRemote(const string &shaderId, const string &shaderApiKey,
if (!fs::exists(p))
{
ofstream ofs(p.string());
ofs << regex_replace(pass["code"].asString(),
rxiGlobalTime,
"iTime");
ofs << pass["code"].asString();
ofs.close();
}
......
......@@ -8,3 +8,5 @@ precision highp sampler2D;
in vec2 vtexCoord;
// Output fragment color
out vec4 fragColor;
// Compatibility with legacy iGlobalTime
#define iGlobalTime iTime
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment