瀏覽代碼

Merge pull request #38466 from Calinou/doc-normal-map-coordinates

Document the expected normal map coordinate system where relevant
Max Hilbrunner 5 年之前
父節點
當前提交
2435d4bdb9

+ 2 - 0
doc/classes/BaseMaterial3D.xml

@@ -159,6 +159,7 @@
 		</member>
 		<member name="detail_normal" type="Texture2D" setter="set_texture" getter="get_texture">
 			Texture that specifies the per-pixel normal of the detail overlay.
+			[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 		</member>
 		<member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV">
 			Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options.
@@ -250,6 +251,7 @@
 		</member>
 		<member name="normal_texture" type="Texture2D" setter="set_texture" getter="get_texture">
 			Texture used to specify the normal at a given pixel. The [code]normal_texture[/code] only uses the red and green channels. The normal read from [code]normal_texture[/code] is oriented around the surface normal provided by the [Mesh].
+			[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 		</member>
 		<member name="orm_texture" type="Texture2D" setter="set_texture" getter="get_texture">
 		</member>

+ 1 - 0
doc/classes/CPUParticles2D.xml

@@ -240,6 +240,7 @@
 		</member>
 		<member name="normalmap" type="Texture2D" setter="set_normalmap" getter="get_normalmap">
 			Normal map to be used for the [member texture] property.
+			[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 		</member>
 		<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
 			If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.

+ 1 - 0
doc/classes/GPUParticles2D.xml

@@ -53,6 +53,7 @@
 		</member>
 		<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
 			Normal map to be used for the [member texture] property.
+			[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 		</member>
 		<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
 			If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.

+ 1 - 0
doc/classes/MeshInstance2D.xml

@@ -17,6 +17,7 @@
 		</member>
 		<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
 			The normal map that will be used if using the default [CanvasItemMaterial].
+			[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 		</member>
 		<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
 			The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.

+ 1 - 0
doc/classes/MultiMeshInstance2D.xml

@@ -17,6 +17,7 @@
 		</member>
 		<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
 			The normal map that will be used if using the default [CanvasItemMaterial].
+			[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 		</member>
 		<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
 			The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.

+ 2 - 0
doc/classes/Polygon2D.xml

@@ -102,6 +102,8 @@
 			If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code].
 		</member>
 		<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
+			The normal map gives depth to the Polygon2D.
+			[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 		</member>
 		<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
 			The offset applied to each vertex.

+ 1 - 0
doc/classes/Sprite2D.xml

@@ -54,6 +54,7 @@
 		</member>
 		<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
 			The normal map gives depth to the Sprite2D.
+			[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 		</member>
 		<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
 			The texture's drawing offset.

+ 1 - 0
doc/classes/StyleBoxTexture.xml

@@ -121,6 +121,7 @@
 		</member>
 		<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
 			The normal map to use when drawing this style box.
+			[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 		</member>
 		<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
 			Species a sub-region of the texture to use.

+ 1 - 0
doc/classes/TileSet.xml

@@ -590,6 +590,7 @@
 			</argument>
 			<description>
 				Sets the tile's normal map texture.
+				[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
 			</description>
 		</method>
 		<method name="tile_set_occluder_offset">