d2b5da16f9
Added comment that translates the UV scaling from the standard shader properties to how that's being done in the godot vertex shader.
27 lines
1.7 KiB
XML
27 lines
1.7 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
||
<class name="BoxMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||
<brief_description>
|
||
Generate an axis-aligned box [PrimitiveMesh].
|
||
</brief_description>
|
||
<description>
|
||
Generate an axis-aligned box [PrimitiveMesh].
|
||
The box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to [code]Vector3(3, 2, 1)[/code]. This is equivalent to adding [code]UV *= vec2(3.0, 2.0)[/code] in a vertex shader.
|
||
[b]Note:[/b] When using a large textured [BoxMesh] (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase [member subdivide_depth], [member subdivide_height] and [member subdivide_width] until you no longer notice UV jittering.
|
||
</description>
|
||
<tutorials>
|
||
</tutorials>
|
||
<members>
|
||
<member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)">
|
||
The box's width, height and depth.
|
||
</member>
|
||
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0">
|
||
Number of extra edge loops inserted along the Z axis.
|
||
</member>
|
||
<member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height" default="0">
|
||
Number of extra edge loops inserted along the Y axis.
|
||
</member>
|
||
<member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" default="0">
|
||
Number of extra edge loops inserted along the X axis.
|
||
</member>
|
||
</members>
|
||
</class>
|