浏览代码

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);