Ver Fonte

Document Viewports rendering upside-down by default

This was fixed in `master`, but the default behavior can't be changed
in `3.x` for compatibility reasons.

(cherry picked from commit 6b260122846b373941019bcb2e7b7c492fc34e44)
Hugo Locurcio há 3 anos atrás
pai
commit
4dcce2cf30
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      doc/classes/Viewport.xml

+ 2 - 1
doc/classes/Viewport.xml

@@ -10,6 +10,7 @@
 		Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
 		Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
 		Also, viewports can be assigned to different screens in case the devices have multiple screens.
 		Also, viewports can be assigned to different screens in case the devices have multiple screens.
 		Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
 		Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
+		[b]Note:[/b] By default, a newly created Viewport in Godot 3.x will appear to be upside down. Enabling [member render_target_v_flip] will display the Viewport with the correct orientation.
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 		<link title="Viewport and canvas transforms">https://docs.godotengine.org/en/3.4/tutorials/2d/2d_transforms.html</link>
 		<link title="Viewport and canvas transforms">https://docs.godotengine.org/en/3.4/tutorials/2d/2d_transforms.html</link>
@@ -250,7 +251,7 @@
 			The update mode when viewport used as a render target.
 			The update mode when viewport used as a render target.
 		</member>
 		</member>
 		<member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip" default="false">
 		<member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip" default="false">
-			If [code]true[/code], the result of rendering will be flipped vertically.
+			If [code]true[/code], the result of rendering will be flipped vertically. Since Viewports in Godot 3.x render upside-down, it's recommended to set this to [code]true[/code] in most situations.
 		</member>
 		</member>
 		<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
 		<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
 			The subdivision amount of the first quadrant on the shadow atlas.
 			The subdivision amount of the first quadrant on the shadow atlas.