Viewport¶
Inherited By: SubViewport, Window
Base class for viewports.
Description¶
A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera3D 3D nodes will render on it too.
Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
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.
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
Tutorials¶
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Methods¶
find_world_2d ( ) const |
|
find_world_3d ( ) const |
|
get_camera_2d ( ) const |
|
get_camera_3d ( ) const |
|
get_final_transform ( ) const |
|
get_mouse_position ( ) const |
|
get_render_info ( RenderInfoType type, RenderInfo info ) |
|
get_shadow_atlas_quadrant_subdiv ( int quadrant ) const |
|
get_texture ( ) const |
|
get_viewport_rid ( ) const |
|
get_visible_rect ( ) const |
|
gui_get_drag_data ( ) const |
|
gui_is_drag_successful ( ) const |
|
gui_is_dragging ( ) const |
|
void |
|
is_embedding_subwindows ( ) const |
|
is_input_handled ( ) const |
|
void |
push_input ( InputEvent event, bool in_local_coords=false ) |
void |
push_text_input ( String text ) |
void |
push_unhandled_input ( InputEvent event, bool in_local_coords=false ) |
void |
|
void |
set_shadow_atlas_quadrant_subdiv ( int quadrant, ShadowAtlasQuadrantSubdiv subdiv ) |
void |
warp_mouse ( Vector2 to_position ) |
Signals¶
gui_focus_changed ( Control node )
Emitted when a Control node grabs keyboard focus.
size_changed ( )
Emitted when the size of the viewport is changed, whether by resizing of window, or some other means.
Enumerations¶
enum ShadowAtlasQuadrantSubdiv:
SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED = 0 --- This quadrant will not be used.
SHADOW_ATLAS_QUADRANT_SUBDIV_1 = 1 --- This quadrant will only be used by one shadow map.
SHADOW_ATLAS_QUADRANT_SUBDIV_4 = 2 --- This quadrant will be split in 4 and used by up to 4 shadow maps.
SHADOW_ATLAS_QUADRANT_SUBDIV_16 = 3 --- This quadrant will be split 16 ways and used by up to 16 shadow maps.
SHADOW_ATLAS_QUADRANT_SUBDIV_64 = 4 --- This quadrant will be split 64 ways and used by up to 64 shadow maps.
SHADOW_ATLAS_QUADRANT_SUBDIV_256 = 5 --- This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the shadow_atlas_size is very high, the shadows in this quadrant will be very low resolution.
SHADOW_ATLAS_QUADRANT_SUBDIV_1024 = 6 --- This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the shadow_atlas_size is very high, the shadows in this quadrant will be very low resolution.
SHADOW_ATLAS_QUADRANT_SUBDIV_MAX = 7 --- Represents the size of the ShadowAtlasQuadrantSubdiv enum.
enum Scaling3DMode:
SCALING_3D_MODE_BILINEAR = 0 --- Enables bilinear scaling on 3D viewports. The amount of scaling can be set using scaling_3d_scale. Values less then
1.0
will result in undersampling while values greater than1.0
will result in supersampling. A value of1.0
disables scaling.SCALING_3D_MODE_FSR = 1 --- Enables FSR upscaling on 3D viewports. The amount of scaling can be set using scaling_3d_scale. Values less then
1.0
will be result in the viewport being upscaled using FSR. Values greater than1.0
are not supported and bilinear supersampling will be used instead. A value of1.0
disables scaling.SCALING_3D_MODE_MAX = 2 --- Represents the size of the Scaling3DMode enum.
enum MSAA:
MSAA_DISABLED = 0 --- Multisample antialiasing mode disabled. This is the default value, and is also the fastest setting.
MSAA_2X = 1 --- Use 2× Multisample Antialiasing. This has a moderate performance cost. It helps reduce aliasing noticeably, but 4× MSAA still looks substantially better.
MSAA_4X = 2 --- Use 4× Multisample Antialiasing. This has a significant performance cost, and is generally a good compromise between performance and quality.
MSAA_8X = 3 --- Use 8× Multisample Antialiasing. This has a very high performance cost. The difference between 4× and 8× MSAA may not always be visible in real gameplay conditions. Likely unsupported on low-end and older hardware.
MSAA_MAX = 4 --- Represents the size of the MSAA enum.
enum ScreenSpaceAA:
SCREEN_SPACE_AA_DISABLED = 0 --- Do not perform any antialiasing in the full screen post-process.
SCREEN_SPACE_AA_FXAA = 1 --- Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K.
SCREEN_SPACE_AA_MAX = 2 --- Represents the size of the ScreenSpaceAA enum.
enum RenderInfo:
RENDER_INFO_OBJECTS_IN_FRAME = 0 --- Amount of objects in frame.
RENDER_INFO_PRIMITIVES_IN_FRAME = 1 --- Amount of vertices in frame.
RENDER_INFO_DRAW_CALLS_IN_FRAME = 2 --- Amount of draw calls in frame.
RENDER_INFO_MAX = 3 --- Represents the size of the RenderInfo enum.
enum RenderInfoType:
RENDER_INFO_TYPE_VISIBLE = 0
RENDER_INFO_TYPE_SHADOW = 1
RENDER_INFO_TYPE_MAX = 2
enum DebugDraw:
DEBUG_DRAW_DISABLED = 0 --- Objects are displayed normally.
DEBUG_DRAW_UNSHADED = 1 --- Objects are displayed without light information.
DEBUG_DRAW_LIGHTING = 2
DEBUG_DRAW_OVERDRAW = 3 --- Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others.
DEBUG_DRAW_WIREFRAME = 4 --- Objects are displayed in wireframe style.
DEBUG_DRAW_NORMAL_BUFFER = 5
DEBUG_DRAW_VOXEL_GI_ALBEDO = 6 --- Objects are displayed with only the albedo value from VoxelGIs.
DEBUG_DRAW_VOXEL_GI_LIGHTING = 7 --- Objects are displayed with only the lighting value from VoxelGIs.
DEBUG_DRAW_VOXEL_GI_EMISSION = 8 --- Objects are displayed with only the emission color from VoxelGIs.
DEBUG_DRAW_SHADOW_ATLAS = 9 --- Draws the shadow atlas that stores shadows from OmniLight3Ds and SpotLight3Ds in the upper left quadrant of the
Viewport
.DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS = 10 --- Draws the shadow atlas that stores shadows from DirectionalLight3Ds in the upper left quadrant of the
Viewport
.DEBUG_DRAW_SCENE_LUMINANCE = 11
DEBUG_DRAW_SSAO = 12 --- Draws the screen-space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have Environment.ssao_enabled set in your WorldEnvironment.
DEBUG_DRAW_SSIL = 13 --- Draws the screen-space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have Environment.ssil_enabled set in your WorldEnvironment.
DEBUG_DRAW_PSSM_SPLITS = 14 --- Colors each PSSM split for the DirectionalLight3Ds in the scene a different color so you can see where the splits are. In order, they will be colored red, green, blue, and yellow.
DEBUG_DRAW_DECAL_ATLAS = 15 --- Draws the decal atlas used by Decals and light projector textures in the upper left quadrant of the
Viewport
.DEBUG_DRAW_SDFGI = 16
DEBUG_DRAW_SDFGI_PROBES = 17
DEBUG_DRAW_GI_BUFFER = 18
DEBUG_DRAW_DISABLE_LOD = 19
DEBUG_DRAW_CLUSTER_OMNI_LIGHTS = 20
DEBUG_DRAW_CLUSTER_SPOT_LIGHTS = 21
DEBUG_DRAW_CLUSTER_DECALS = 22
DEBUG_DRAW_CLUSTER_REFLECTION_PROBES = 23
DEBUG_DRAW_OCCLUDERS = 24
enum DefaultCanvasItemTextureFilter:
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST = 0 --- The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR = 1 --- The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps.
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS = 2 --- The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps.
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS = 3 --- The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps.
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX = 4 --- Max value for DefaultCanvasItemTextureFilter enum.
enum DefaultCanvasItemTextureRepeat:
DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED = 0 --- Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture.
DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED = 1 --- Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.
DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR = 2 --- Flip the texture when repeating so that the edge lines up instead of abruptly changing.
DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX = 3 --- Max value for DefaultCanvasItemTextureRepeat enum.
enum SDFOversize:
SDF_OVERSIZE_100_PERCENT = 0
SDF_OVERSIZE_120_PERCENT = 1
SDF_OVERSIZE_150_PERCENT = 2
SDF_OVERSIZE_200_PERCENT = 3
SDF_OVERSIZE_MAX = 4
enum SDFScale:
SDF_SCALE_100_PERCENT = 0
SDF_SCALE_50_PERCENT = 1
SDF_SCALE_25_PERCENT = 2
SDF_SCALE_MAX = 3
Property Descriptions¶
bool audio_listener_enable_2d
Default |
|
Setter |
set_as_audio_listener_2d(value) |
Getter |
is_audio_listener_2d() |
If true
, the viewport will process 2D audio streams.
bool audio_listener_enable_3d
Default |
|
Setter |
set_as_audio_listener_3d(value) |
Getter |
is_audio_listener_3d() |
If true
, the viewport will process 3D audio streams.
DefaultCanvasItemTextureFilter canvas_item_default_texture_filter
Default |
|
Setter |
set_default_canvas_item_texture_filter(value) |
Getter |
get_default_canvas_item_texture_filter() |
Sets the default filter mode used by CanvasItems in this Viewport. See DefaultCanvasItemTextureFilter for options.
DefaultCanvasItemTextureRepeat canvas_item_default_texture_repeat
Default |
|
Setter |
set_default_canvas_item_texture_repeat(value) |
Getter |
get_default_canvas_item_texture_repeat() |
Sets the default repeat mode used by CanvasItems in this Viewport. See DefaultCanvasItemTextureRepeat for options.
Transform2D canvas_transform
Setter |
set_canvas_transform(value) |
Getter |
get_canvas_transform() |
The canvas transform of the viewport, useful for changing the on-screen positions of all child CanvasItems. This is relative to the global canvas transform of the viewport.
DebugDraw debug_draw
Default |
|
Setter |
set_debug_draw(value) |
Getter |
get_debug_draw() |
The overlay mode for test rendered geometry in debug purposes.
bool disable_3d
Default |
|
Setter |
set_disable_3d(value) |
Getter |
is_3d_disabled() |
Disable 3D rendering (but keep 2D rendering).
float fsr_mipmap_bias
Default |
|
Setter |
set_fsr_mipmap_bias(value) |
Getter |
get_fsr_mipmap_bias() |
Affects the final texture sharpness by reading from a lower or higher mipmap when using FSR. Mipmap bias does nothing when FSR is not being used. Negative values make textures sharper, while positive values make textures blurrier. This value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is -log2(1.0 / scale) + mipmap_bias
. This updates the rendering server's mipmap bias when called
To control this property on the root viewport, set the ProjectSettings.rendering/scaling_3d/fsr_mipmap_bias project setting.
float fsr_sharpness
Default |
|
Setter |
set_fsr_sharpness(value) |
Getter |
get_fsr_sharpness() |
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
To control this property on the root viewport, set the ProjectSettings.rendering/scaling_3d/fsr_sharpness project setting.
Transform2D global_canvas_transform
Setter |
set_global_canvas_transform(value) |
Getter |
get_global_canvas_transform() |
The global canvas transform of the viewport. The canvas transform is relative to this.
bool gui_disable_input
Default |
|
Setter |
set_disable_input(value) |
Getter |
is_input_disabled() |
If true
, the viewport will not receive input events.
bool gui_embed_subwindows
Default |
|
Setter |
set_embed_subwindows_hint(value) |
Getter |
get_embed_subwindows_hint() |
bool gui_snap_controls_to_pixels
Default |
|
Setter |
set_snap_controls_to_pixels(value) |
Getter |
is_snap_controls_to_pixels_enabled() |
If true
, the GUI controls on the viewport will lay pixel perfectly.
bool handle_input_locally
Default |
|
Setter |
set_handle_input_locally(value) |
Getter |
is_handling_input_locally() |
float mesh_lod_threshold
Default |
|
Setter |
set_mesh_lod_threshold(value) |
Getter |
get_mesh_lod_threshold() |
The automatic LOD bias to use for meshes rendered within the Viewport
(this is analogous to ReflectionProbe.mesh_lod_threshold). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to 0.0
, automatic LOD is disabled. Increase mesh_lod_threshold to improve performance at the cost of geometry detail.
To control this property on the root viewport, set the ProjectSettings.rendering/mesh_lod/lod_change/threshold_pixels project setting.
Note: mesh_lod_threshold does not affect GeometryInstance3D visibility ranges (also known as "manual" LOD or hierarchical LOD).
MSAA msaa
Default |
|
Setter |
set_msaa(value) |
Getter |
get_msaa() |
The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d scaling_3d_mode for supersampling, which provides higher quality but is much more expensive.
bool own_world_3d
Default |
|
Setter |
set_use_own_world_3d(value) |
Getter |
is_using_own_world_3d() |
If true
, the viewport will use the World3D defined in world_3d.
bool physics_object_picking
Default |
|
Setter |
set_physics_object_picking(value) |
Getter |
get_physics_object_picking() |
If true
, the objects rendered by viewport become subjects of mouse picking process.
Scaling3DMode scaling_3d_mode
Default |
|
Setter |
set_scaling_3d_mode(value) |
Getter |
get_scaling_3d_mode() |
Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
To control this property on the root viewport, set the ProjectSettings.rendering/scaling_3d/mode project setting.
float scaling_3d_scale
Default |
|
Setter |
set_scaling_3d_scale(value) |
Getter |
get_scaling_3d_scale() |
Scales the 3D render buffer based on the viewport size uses an image filter specified in ProjectSettings.rendering/scaling_3d/mode to scale the output image to the full viewport size. Values lower than 1.0
can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than 1.0
are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also ProjectSettings.rendering/anti_aliasing/quality/msaa for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.
To control this property on the root viewport, set the ProjectSettings.rendering/scaling_3d/scale project setting.
ScreenSpaceAA screen_space_aa
Default |
|
Setter |
set_screen_space_aa(value) |
Getter |
get_screen_space_aa() |
Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
SDFOversize sdf_oversize
Default |
|
Setter |
set_sdf_oversize(value) |
Getter |
get_sdf_oversize() |
SDFScale sdf_scale
Default |
|
Setter |
set_sdf_scale(value) |
Getter |
get_sdf_scale() |
bool shadow_atlas_16_bits
Default |
|
Setter |
set_shadow_atlas_16_bits(value) |
Getter |
get_shadow_atlas_16_bits() |
ShadowAtlasQuadrantSubdiv shadow_atlas_quad_0
Default |
|
Setter |
set_shadow_atlas_quadrant_subdiv(value) |
Getter |
get_shadow_atlas_quadrant_subdiv() |
The subdivision amount of the first quadrant on the shadow atlas.
ShadowAtlasQuadrantSubdiv shadow_atlas_quad_1
Default |
|
Setter |
set_shadow_atlas_quadrant_subdiv(value) |
Getter |
get_shadow_atlas_quadrant_subdiv() |
The subdivision amount of the second quadrant on the shadow atlas.
ShadowAtlasQuadrantSubdiv shadow_atlas_quad_2
Default |
|
Setter |
set_shadow_atlas_quadrant_subdiv(value) |
Getter |
get_shadow_atlas_quadrant_subdiv() |
The subdivision amount of the third quadrant on the shadow atlas.
ShadowAtlasQuadrantSubdiv shadow_atlas_quad_3
Default |
|
Setter |
set_shadow_atlas_quadrant_subdiv(value) |
Getter |
get_shadow_atlas_quadrant_subdiv() |
The subdivision amount of the fourth quadrant on the shadow atlas.
int shadow_atlas_size
Default |
|
Setter |
set_shadow_atlas_size(value) |
Getter |
get_shadow_atlas_size() |
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
Note: If this is set to 0, shadows won't be visible.
bool snap_2d_transforms_to_pixel
Default |
|
Setter |
set_snap_2d_transforms_to_pixel(value) |
Getter |
is_snap_2d_transforms_to_pixel_enabled() |
bool snap_2d_vertices_to_pixel
Default |
|
Setter |
set_snap_2d_vertices_to_pixel(value) |
Getter |
is_snap_2d_vertices_to_pixel_enabled() |
bool transparent_bg
Default |
|
Setter |
set_transparent_background(value) |
Getter |
has_transparent_background() |
If true
, the viewport should render its background as transparent.
bool use_debanding
Default |
|
Setter |
set_use_debanding(value) |
Getter |
is_using_debanding() |
bool use_occlusion_culling
Default |
|
Setter |
set_use_occlusion_culling(value) |
Getter |
is_using_occlusion_culling() |
If true
, OccluderInstance3D nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, ProjectSettings.rendering/occlusion_culling/use_occlusion_culling must be set to true
instead.
Note: Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (GeometryInstance3D.visibility_range_begin and GeometryInstance3D.visibility_range_end) compared to occlusion culling.
bool use_xr
Default |
|
Setter |
set_use_xr(value) |
Getter |
is_using_xr() |
If true
, the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset.
World2D world_2d
Setter |
set_world_2d(value) |
Getter |
get_world_2d() |
The custom World2D which can be used as 2D environment source.
World3D world_3d
Setter |
set_world_3d(value) |
Getter |
get_world_3d() |
The custom World3D which can be used as 3D environment source.
Method Descriptions¶
World2D find_world_2d ( ) const
Returns the first valid World2D for this viewport, searching the world_2d property of itself and any Viewport ancestor.
World3D find_world_3d ( ) const
Returns the first valid World3D for this viewport, searching the world_3d property of itself and any Viewport ancestor.
Camera2D get_camera_2d ( ) const
Returns the currently active 2D camera. Returns null if there are no active cameras.
Camera3D get_camera_3d ( ) const
Returns the currently active 3D camera.
Transform2D get_final_transform ( ) const
Returns the total transform of the viewport.
Vector2 get_mouse_position ( ) const
Returns the mouse's position in this Viewport
using the coordinate system of this Viewport
.
int get_render_info ( RenderInfoType type, RenderInfo info )
ShadowAtlasQuadrantSubdiv get_shadow_atlas_quadrant_subdiv ( int quadrant ) const
Returns the ShadowAtlasQuadrantSubdiv of the specified quadrant.
ViewportTexture get_texture ( ) const
Returns the viewport's texture.
Note: Due to the way OpenGL works, the resulting ViewportTexture is flipped vertically. You can use Image.flip_y on the result of Texture2D.get_image to flip it back, for example:
var img = get_viewport().get_texture().get_image()
img.flip_y()
Image img = GetViewport().GetTexture().GetImage();
img.FlipY();
RID get_viewport_rid ( ) const
Returns the viewport's RID from the RenderingServer.
Rect2 get_visible_rect ( ) const
Returns the visible rectangle in global screen coordinates.
Variant gui_get_drag_data ( ) const
Returns the drag data from the GUI, that was previously returned by Control._get_drag_data.
Control gui_get_focus_owner ( )
Returns the Control having the focus within this viewport. If no Control has the focus, returns null.
bool gui_is_drag_successful ( ) const
Returns true
if the drag operation is successful.
bool gui_is_dragging ( ) const
Returns true
if the viewport is currently performing a drag operation.
void gui_release_focus ( )
Removes the focus from the currently focused Control within this viewport. If no Control has the focus, does nothing.
bool is_embedding_subwindows ( ) const
bool is_input_handled ( ) const
void push_input ( InputEvent event, bool in_local_coords=false )
void push_text_input ( String text )
Returns true
if the viewport is currently embedding windows.
void push_unhandled_input ( InputEvent event, bool in_local_coords=false )
void set_input_as_handled ( )
Stops the input from propagating further down the SceneTree.
void set_shadow_atlas_quadrant_subdiv ( int quadrant, ShadowAtlasQuadrantSubdiv subdiv )
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
void warp_mouse ( Vector2 to_position )
Moves the mouse pointer to the specified position in this Viewport
using the coordinate system of this Viewport
.