Pārlūkot izejas kodu

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

Pavel Alexandrov 5 gadi atpakaļ
vecāks
revīzija
e1fbdc092b
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      h2d/RenderContext.hx

+ 1 - 0
h2d/RenderContext.hx

@@ -90,6 +90,7 @@ class RenderContext extends h3d.impl.RenderContext {
 		curWidth = scene.width;
 		curWidth = scene.width;
 		curHeight = scene.height;
 		curHeight = scene.height;
 		manager.globals.set("time", time);
 		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
 		// 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.pixelAlign = #if flash true #else false #end;
 		baseShader.halfPixelInverse.set(0.5 / engine.width, 0.5 / engine.height);
 		baseShader.halfPixelInverse.set(0.5 / engine.width, 0.5 / engine.height);