Преглед изворни кода

Swap near and far parameters. (#43)

Default renderer seems to initialize near to -1 and far to 1, when pasting code from this doc the image in empty project doesn't render.
Pavel Zavoiskikh пре 6 година
родитељ
комит
66983c4fb4
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      docs/en/manuals/render.md

+ 3 - 3
docs/en/manuals/render.md

@@ -45,7 +45,7 @@ The stretch projection is the default projection but if you have changed from it
 
 ```lua
 function init(self)
-    msg.post("@render:", "use_stretch_projection", { near = 1, far = -1 })
+    msg.post("@render:", "use_stretch_projection", { near = -1, far = 1 })
 end
 ```
 
@@ -69,7 +69,7 @@ You enable the fixed fit projection by sending a message to the render script:
 
 ```lua
 function init(self)
-    msg.post("@render:", "use_fixed_fit_projection", { near = 1, far = -1 })
+    msg.post("@render:", "use_fixed_fit_projection", { near = -1, far = 1 })
 end
 ```
 
@@ -93,7 +93,7 @@ You enable the fixed projection by sending a message to the render script:
 
 ```lua
 function init(self)
-    msg.post("@render:", "use_fixed_projection", { near = 1, far = -1, zoom = 2 })
+    msg.post("@render:", "use_fixed_projection", { near = -1, far = 1, zoom = 2 })
 end
 ```