diff --git a/examples/50-shadertoy/main.cpp b/examples/50-shadertoy/main.cpp
index 76ddb232d4414ad70176a9acdfaa19426b2f09aa..5e47ae27f6c2a3fd69023b8c205a33da1171f8bf 100644
--- a/examples/50-shadertoy/main.cpp
+++ b/examples/50-shadertoy/main.cpp
@@ -1,7 +1,6 @@
 #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();
 			}
 
diff --git a/shaders/wrapper_header.fsh b/shaders/wrapper_header.fsh
index 20d8e53632b249f83aacef84372ced44d9c56f39..1f0f2a6bee9fc7c6f78a9b2edb14f7d8d1b100b1 100644
--- a/shaders/wrapper_header.fsh
+++ b/shaders/wrapper_header.fsh
@@ -8,3 +8,5 @@ precision highp sampler2D;
 in vec2 vtexCoord;
 // Output fragment color
 out vec4 fragColor;
+// Compatibility with legacy iGlobalTime
+#define iGlobalTime iTime