Переглянути джерело

Add global.time to 2D shader globals (#798)

Pavel Alexandrov 5 роки тому
батько
коміт
e1fbdc092b
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      h2d/RenderContext.hx

+ 1 - 0
h2d/RenderContext.hx

@@ -90,6 +90,7 @@ class RenderContext extends h3d.impl.RenderContext {
 		curWidth = scene.width;
 		curHeight = scene.height;
 		manager.globals.set("time", time);
+		manager.globals.set("global.time", time);
 		// todo : we might prefer to auto-detect this by running a test and capturing its output
 		baseShader.pixelAlign = #if flash true #else false #end;
 		baseShader.halfPixelInverse.set(0.5 / engine.width, 0.5 / engine.height);