Inheritance #
- AudioServer
- CameraServer
- ClassDB
- DisplayServer
- EditorFileSystemDirectory
- EditorInterface
- EditorPaths
- EditorSelection
- EditorUndoRedoManager
- EditorVCSInterface
- Engine
- EngineDebugger
- FramebufferCacheRD
- GDExtensionManager
- Geometry2D
- Geometry3D
- IP
- Input
- InputMap
- JNISingleton
- JSONRPC
- JavaClassWrapper
- JavaScriptBridge
- MainLoop (1)
- Marshalls
- MovieWriter
- NativeMenu
- NavigationMeshGenerator
- NavigationServer2D
- NavigationServer3D
- Node (21)
- OS
- OpenXRExtensionWrapperExtension
- OpenXRInteractionProfileMetadata
- Performance
- PhysicsDirectBodyState2D (1)
- PhysicsDirectBodyState3D (1)
- PhysicsDirectSpaceState2D (1)
- PhysicsDirectSpaceState3D (1)
- PhysicsServer2D (1)
- PhysicsServer2DManager
- PhysicsServer3D (1)
- PhysicsServer3DManager
- PhysicsServer3DRendering
ServerHandler
- ProjectSettings
- RefCounted (121)
- RenderData (2)
- RenderSceneData (2)
- RenderingDevice
- RenderingServer
- ResourceLoader
- ResourceSaver
- ResourceUID
- ScriptLanguage (1)
- ShaderIncludeDB
- TextServerManager
- ThemeDB
- TileData
- Time
- TranslationServer
- TreeItem
- UndoRedo
- UniformSetCacheRD
- WorkerThreadPool
- XRServer
- XRVRS
Table of contents
-
var render_loop_enabled: bool -
func bake_render_uv2(image_size: Vector2i) -> Image[] -
func call_on_render_thread(callable: Callable) -> void -
func camera_attributes_create() -> RID -
func camera_attributes_set_auto_exposure(scale: float) -> void -
func camera_attributes_set_dof_blur(amount: float) -> void -
func camera_attributes_set_dof_blur_bokeh_shape(shape: int enumRenderingServer.DOFBokehShape) -> void -
func camera_attributes_set_dof_blur_quality(use_jitter: bool) -> void -
func camera_attributes_set_exposure(normalization: float) -> void -
func camera_create() -> RID -
func camera_set_camera_attributes(effects: RID) -> void -
func camera_set_compositor(compositor: RID) -> void -
func camera_set_cull_mask(layers: int) -> void -
func camera_set_environment(env: RID) -> void -
func camera_set_frustum(z_far: float) -> void -
func camera_set_orthogonal(z_far: float) -> void -
func camera_set_perspective(z_far: float) -> void -
func camera_set_transform(transform: Transform3D) -> void -
func camera_set_use_vertical_aspect(enable: bool) -> void -
func canvas_create() -> RID -
func canvas_item_add_animation_slice(offset: float = 0.0) -> void -
func canvas_item_add_circle(antialiased: bool = false) -> void -
func canvas_item_add_clip_ignore(ignore: bool) -> void -
func canvas_item_add_lcd_texture_rect_region(modulate: Color) -> void -
func canvas_item_add_line(antialiased: bool = false) -> void -
func canvas_item_add_mesh(texture: RID = RID()) -> void -
func canvas_item_add_msdf_texture_rect_region(scale: float = 1.0) -> void -
func canvas_item_add_multiline(antialiased: bool = false) -> void -
func canvas_item_add_multimesh(texture: RID = RID()) -> void -
func canvas_item_add_nine_patch(modulate: Color = Color(1, 1, 1, 1)) -> void -
func canvas_item_add_particles(texture: RID) -> void -
func canvas_item_add_polygon(texture: RID = RID()) -> void -
func canvas_item_add_polyline(antialiased: bool = false) -> void -
func canvas_item_add_primitive(texture: RID) -> void -
func canvas_item_add_rect(antialiased: bool = false) -> void -
func canvas_item_add_set_transform(transform: Transform2D) -> void -
func canvas_item_add_texture_rect(transpose: bool = false) -> void -
func canvas_item_add_texture_rect_region(clip_uv: bool = true) -> void -
func canvas_item_add_triangle_array(count: int = -1) -> void -
func canvas_item_attach_skeleton(skeleton: RID) -> void -
func canvas_item_clear(item: RID) -> void -
func canvas_item_create() -> RID -
const func canvas_item_get_instance_shader_parameter(parameter: StringName) -> Variant -
const func canvas_item_get_instance_shader_parameter_default_value(parameter: StringName) -> Variant -
const func canvas_item_get_instance_shader_parameter_list(instance: RID) -> Dictionary[] -
func canvas_item_reset_physics_interpolation(item: RID) -> void -
func canvas_item_set_canvas_group_mode(blur_mipmaps: bool = false) -> void -
func canvas_item_set_clip(clip: bool) -> void -
func canvas_item_set_copy_to_backbuffer(rect: Rect2) -> void -
func canvas_item_set_custom_rect(rect: Rect2 = Rect2(0, 0, 0, 0)) -> void -
func canvas_item_set_default_texture_filter(filter: int enumRenderingServer.CanvasItemTextureFilter) -> void -
func canvas_item_set_default_texture_repeat(repeat: int enumRenderingServer.CanvasItemTextureRepeat) -> void -
func canvas_item_set_distance_field_mode(enabled: bool) -> void -
func canvas_item_set_draw_behind_parent(enabled: bool) -> void -
func canvas_item_set_draw_index(index: int) -> void -
func canvas_item_set_instance_shader_parameter(value: Variant) -> void -
func canvas_item_set_interpolated(interpolated: bool) -> void -
func canvas_item_set_light_mask(mask: int) -> void -
func canvas_item_set_material(material: RID) -> void -
func canvas_item_set_modulate(color: Color) -> void -
func canvas_item_set_parent(parent: RID) -> void -
func canvas_item_set_self_modulate(color: Color) -> void -
func canvas_item_set_sort_children_by_y(enabled: bool) -> void -
func canvas_item_set_transform(transform: Transform2D) -> void -
func canvas_item_set_use_parent_material(enabled: bool) -> void -
func canvas_item_set_visibility_layer(visibility_layer: int) -> void -
func canvas_item_set_visibility_notifier(exit_callable: Callable) -> void -
func canvas_item_set_visible(visible: bool) -> void -
func canvas_item_set_z_as_relative_to_parent(enabled: bool) -> void -
func canvas_item_set_z_index(z_index: int) -> void -
func canvas_item_transform_physics_interpolation(transform: Transform2D) -> void -
func canvas_light_attach_to_canvas(canvas: RID) -> void -
func canvas_light_create() -> RID -
func canvas_light_occluder_attach_to_canvas(canvas: RID) -> void -
func canvas_light_occluder_create() -> RID -
func canvas_light_occluder_reset_physics_interpolation(occluder: RID) -> void -
func canvas_light_occluder_set_as_sdf_collision(enable: bool) -> void -
func canvas_light_occluder_set_enabled(enabled: bool) -> void -
func canvas_light_occluder_set_interpolated(interpolated: bool) -> void -
func canvas_light_occluder_set_light_mask(mask: int) -> void -
func canvas_light_occluder_set_polygon(polygon: RID) -> void -
func canvas_light_occluder_set_transform(transform: Transform2D) -> void -
func canvas_light_occluder_transform_physics_interpolation(transform: Transform2D) -> void -
func canvas_light_reset_physics_interpolation(light: RID) -> void -
func canvas_light_set_blend_mode(mode: int enumRenderingServer.CanvasLightBlendMode) -> void -
func canvas_light_set_color(color: Color) -> void -
func canvas_light_set_enabled(enabled: bool) -> void -
func canvas_light_set_energy(energy: float) -> void -
func canvas_light_set_height(height: float) -> void -
func canvas_light_set_interpolated(interpolated: bool) -> void -
func canvas_light_set_item_cull_mask(mask: int) -> void -
func canvas_light_set_item_shadow_cull_mask(mask: int) -> void -
func canvas_light_set_layer_range(max_layer: int) -> void -
func canvas_light_set_mode(mode: int enumRenderingServer.CanvasLightMode) -> void -
func canvas_light_set_shadow_color(color: Color) -> void -
func canvas_light_set_shadow_enabled(enabled: bool) -> void -
func canvas_light_set_shadow_filter(filter: int enumRenderingServer.CanvasLightShadowFilter) -> void -
func canvas_light_set_shadow_smooth(smooth: float) -> void -
func canvas_light_set_texture(texture: RID) -> void -
func canvas_light_set_texture_offset(offset: Vector2) -> void -
func canvas_light_set_texture_scale(scale: float) -> void -
func canvas_light_set_transform(transform: Transform2D) -> void -
func canvas_light_set_z_range(max_z: int) -> void -
func canvas_light_transform_physics_interpolation(transform: Transform2D) -> void -
func canvas_occluder_polygon_create() -> RID -
func canvas_occluder_polygon_set_cull_mode(mode: int enumRenderingServer.CanvasOccluderPolygonCullMode) -> void -
func canvas_occluder_polygon_set_shape(closed: bool) -> void -
func canvas_set_disable_scale(disable: bool) -> void -
func canvas_set_item_mirroring(mirroring: Vector2) -> void -
func canvas_set_item_repeat(repeat_times: int) -> void -
func canvas_set_modulate(color: Color) -> void -
func canvas_set_shadow_texture_size(size: int) -> void -
func canvas_texture_create() -> RID -
func canvas_texture_set_channel(texture: RID) -> void -
func canvas_texture_set_shading_parameters(shininess: float) -> void -
func canvas_texture_set_texture_filter(filter: int enumRenderingServer.CanvasItemTextureFilter) -> void -
func canvas_texture_set_texture_repeat(repeat: int enumRenderingServer.CanvasItemTextureRepeat) -> void -
func compositor_create() -> RID -
func compositor_effect_create() -> RID -
func compositor_effect_set_callback(callback: Callable) -> void -
func compositor_effect_set_enabled(enabled: bool) -> void -
func compositor_effect_set_flag(set: bool) -> void -
func compositor_set_compositor_effects(effects: RID[]) -> void -
const func create_local_rendering_device() -> RenderingDevice -
func debug_canvas_item_get_rect(item: RID) -> Rect2 -
func decal_create() -> RID -
func decal_set_albedo_mix(albedo_mix: float) -> void -
func decal_set_cull_mask(mask: int) -> void -
func decal_set_distance_fade(length: float) -> void -
func decal_set_emission_energy(energy: float) -> void -
func decal_set_fade(below: float) -> void -
func decal_set_modulate(color: Color) -> void -
func decal_set_normal_fade(fade: float) -> void -
func decal_set_size(size: Vector3) -> void -
func decal_set_texture(texture: RID) -> void -
func decals_set_filter(filter: int enumRenderingServer.DecalFilter) -> void -
func directional_light_create() -> RID -
func directional_shadow_atlas_set_size(is_16bits: bool) -> void -
func directional_soft_shadow_filter_set_quality(quality: int enumRenderingServer.ShadowQuality) -> void -
func environment_bake_panorama(size: Vector2i) -> Image -
func environment_create() -> RID -
func environment_glow_set_use_bicubic_upscale(enable: bool) -> void -
func environment_set_adjustment(color_correction: RID) -> void -
func environment_set_ambient_light(reflection_source: int = 0 enumRenderingServer.EnvironmentReflectionSource) -> void -
func environment_set_background(bg: int enumRenderingServer.EnvironmentBG) -> void -
func environment_set_bg_color(color: Color) -> void -
func environment_set_bg_energy(exposure_value: float) -> void -
func environment_set_camera_id(id: int) -> void -
func environment_set_canvas_max_layer(max_layer: int) -> void -
func environment_set_fog(fog_mode: int = 0 enumRenderingServer.EnvironmentFogMode) -> void -
func environment_set_glow(glow_map: RID) -> void -
func environment_set_sdfgi(probe_bias: float) -> void -
func environment_set_sdfgi_frames_to_converge(frames: int enumRenderingServer.EnvironmentSDFGIFramesToConverge) -> void -
func environment_set_sdfgi_frames_to_update_light(frames: int enumRenderingServer.EnvironmentSDFGIFramesToUpdateLight) -> void -
func environment_set_sdfgi_ray_count(ray_count: int enumRenderingServer.EnvironmentSDFGIRayCount) -> void -
func environment_set_sky(sky: RID) -> void -
func environment_set_sky_custom_fov(scale: float) -> void -
func environment_set_sky_orientation(orientation: Basis) -> void -
func environment_set_ssao(ao_channel_affect: float) -> void -
func environment_set_ssao_quality(fadeout_to: float) -> void -
func environment_set_ssil_quality(fadeout_to: float) -> void -
func environment_set_ssr(depth_tolerance: float) -> void -
func environment_set_ssr_roughness_quality(quality: int enumRenderingServer.EnvironmentSSRRoughnessQuality) -> void -
func environment_set_tonemap(white: float) -> void -
func environment_set_volumetric_fog(sky_affect: float) -> void -
func environment_set_volumetric_fog_filter_active(active: bool) -> void -
func environment_set_volumetric_fog_volume_size(depth: int) -> void -
func fog_volume_create() -> RID -
func fog_volume_set_material(material: RID) -> void -
func fog_volume_set_shape(shape: int enumRenderingServer.FogVolumeShape) -> void -
func fog_volume_set_size(size: Vector3) -> void -
func force_draw(frame_step: float = 0.0) -> void -
func force_sync() -> void -
func free_rid(rid: RID) -> void -
const func get_current_rendering_driver_name() -> String -
const func get_current_rendering_method() -> String -
func get_default_clear_color() -> Color -
const func get_frame_setup_time_cpu() -> float -
const func get_rendering_device() -> RenderingDevice -
func get_rendering_info(info: int enumRenderingServer.RenderingInfo) -> int -
const func get_shader_parameter_list(shader: RID) -> Dictionary[] -
func get_test_cube() -> RID -
func get_test_texture() -> RID -
const func get_video_adapter_api_version() -> String -
const func get_video_adapter_name() -> String -
const func get_video_adapter_type() -> intRenderingDevice.DeviceType -
const func get_video_adapter_vendor() -> String -
func get_white_texture() -> RID -
func gi_set_use_half_resolution(half_resolution: bool) -> void -
func global_shader_parameter_add(default_value: Variant) -> void -
const func global_shader_parameter_get(name: StringName) -> Variant -
const func global_shader_parameter_get_list() -> StringName[] -
const func global_shader_parameter_get_type(name: StringName) -> intRenderingServer.GlobalShaderParameterType -
func global_shader_parameter_remove(name: StringName) -> void -
func global_shader_parameter_set(value: Variant) -> void -
func global_shader_parameter_set_override(value: Variant) -> void -
const func has_changed() -> bool -
const func has_feature(feature: int enumRenderingServer.Features) -> bool -
const func has_os_feature(feature: String) -> bool -
func instance_attach_object_instance_id(id: int) -> void -
func instance_attach_skeleton(skeleton: RID) -> void -
func instance_create() -> RID -
func instance_create2(scenario: RID) -> RID -
const func instance_geometry_get_shader_parameter(parameter: StringName) -> Variant -
const func instance_geometry_get_shader_parameter_default_value(parameter: StringName) -> Variant -
const func instance_geometry_get_shader_parameter_list(instance: RID) -> Dictionary[] -
func instance_geometry_set_cast_shadows_setting(shadow_casting_setting: int enumRenderingServer.ShadowCastingSetting) -> void -
func instance_geometry_set_flag(enabled: bool) -> void -
func instance_geometry_set_lightmap(lightmap_slice: int) -> void -
func instance_geometry_set_lod_bias(lod_bias: float) -> void -
func instance_geometry_set_material_overlay(material: RID) -> void -
func instance_geometry_set_material_override(material: RID) -> void -
func instance_geometry_set_shader_parameter(value: Variant) -> void -
func instance_geometry_set_transparency(transparency: float) -> void -
func instance_geometry_set_visibility_range(fade_mode: int enumRenderingServer.VisibilityRangeFadeMode) -> void -
func instance_reset_physics_interpolation(instance: RID) -> void -
func instance_set_base(base: RID) -> void -
func instance_set_blend_shape_weight(weight: float) -> void -
func instance_set_custom_aabb(aabb: AABB) -> void -
func instance_set_extra_visibility_margin(margin: float) -> void -
func instance_set_ignore_culling(enabled: bool) -> void -
func instance_set_interpolated(interpolated: bool) -> void -
func instance_set_layer_mask(mask: int) -> void -
func instance_set_pivot_data(use_aabb_center: bool) -> void -
func instance_set_scenario(scenario: RID) -> void -
func instance_set_surface_override_material(material: RID) -> void -
func instance_set_transform(transform: Transform3D) -> void -
func instance_set_visibility_parent(parent: RID) -> void -
func instance_set_visible(visible: bool) -> void -
const func instances_cull_aabb(scenario: RID = RID()) -> PackedInt64Array -
const func instances_cull_convex(scenario: RID = RID()) -> PackedInt64Array -
const func instances_cull_ray(scenario: RID = RID()) -> PackedInt64Array -
func is_on_render_thread() -> bool -
func light_directional_set_blend_splits(enable: bool) -> void -
func light_directional_set_shadow_mode(mode: int enumRenderingServer.LightDirectionalShadowMode) -> void -
func light_directional_set_sky_mode(mode: int enumRenderingServer.LightDirectionalSkyMode) -> void -
func light_omni_set_shadow_mode(mode: int enumRenderingServer.LightOmniShadowMode) -> void -
func light_projectors_set_filter(filter: int enumRenderingServer.LightProjectorFilter) -> void -
func light_set_bake_mode(bake_mode: int enumRenderingServer.LightBakeMode) -> void -
func light_set_color(color: Color) -> void -
func light_set_cull_mask(mask: int) -> void -
func light_set_distance_fade(length: float) -> void -
func light_set_max_sdfgi_cascade(cascade: int) -> void -
func light_set_negative(enable: bool) -> void -
func light_set_param(value: float) -> void -
func light_set_projector(texture: RID) -> void -
func light_set_reverse_cull_face_mode(enabled: bool) -> void -
func light_set_shadow(enabled: bool) -> void -
func light_set_shadow_caster_mask(mask: int) -> void -
func lightmap_create() -> RID -
const func lightmap_get_probe_capture_bsp_tree(lightmap: RID) -> PackedInt32Array -
const func lightmap_get_probe_capture_points(lightmap: RID) -> PackedVector3Array -
const func lightmap_get_probe_capture_sh(lightmap: RID) -> PackedColorArray -
const func lightmap_get_probe_capture_tetrahedra(lightmap: RID) -> PackedInt32Array -
func lightmap_set_baked_exposure_normalization(baked_exposure: float) -> void -
func lightmap_set_probe_bounds(bounds: AABB) -> void -
func lightmap_set_probe_capture_data(bsp_tree: PackedInt32Array) -> void -
func lightmap_set_probe_capture_update_speed(speed: float) -> void -
func lightmap_set_probe_interior(interior: bool) -> void -
func lightmap_set_textures(uses_sh: bool) -> void -
func lightmaps_set_bicubic_filter(enable: bool) -> void -
func make_sphere_mesh(radius: float) -> RID -
func material_create() -> RID -
const func material_get_param(parameter: StringName) -> Variant -
func material_set_next_pass(next_material: RID) -> void -
func material_set_param(value: Variant) -> void -
func material_set_render_priority(priority: int) -> void -
func material_set_shader(shader: RID) -> void -
func mesh_add_surface(surface: Dictionary) -> void -
func mesh_add_surface_from_arrays(compress_format: int = 0 enumRenderingServer.ArrayFormat) -> void -
func mesh_clear(mesh: RID) -> void -
func mesh_create() -> RID -
func mesh_create_from_surfaces(blend_shape_count: int = 0) -> RID -
const func mesh_get_blend_shape_count(mesh: RID) -> int -
const func mesh_get_blend_shape_mode(mesh: RID) -> intRenderingServer.BlendShapeMode -
const func mesh_get_custom_aabb(mesh: RID) -> AABB -
func mesh_get_surface(surface: int) -> Dictionary -
const func mesh_get_surface_count(mesh: RID) -> int -
func mesh_set_blend_shape_mode(mode: int enumRenderingServer.BlendShapeMode) -> void -
func mesh_set_custom_aabb(aabb: AABB) -> void -
func mesh_set_shadow_mesh(shadow_mesh: RID) -> void -
const func mesh_surface_get_arrays(surface: int) -> Array -
const func mesh_surface_get_blend_shape_arrays(surface: int) -> Array[] -
const func mesh_surface_get_format_attribute_stride(vertex_count: int) -> int -
const func mesh_surface_get_format_normal_tangent_stride(vertex_count: int) -> int -
const func mesh_surface_get_format_offset(array_index: int) -> int -
const func mesh_surface_get_format_skin_stride(vertex_count: int) -> int -
const func mesh_surface_get_format_vertex_stride(vertex_count: int) -> int -
const func mesh_surface_get_material(surface: int) -> RID -
func mesh_surface_remove(surface: int) -> void -
func mesh_surface_set_material(material: RID) -> void -
func mesh_surface_update_attribute_region(data: PackedByteArray) -> void -
func mesh_surface_update_skin_region(data: PackedByteArray) -> void -
func mesh_surface_update_vertex_region(data: PackedByteArray) -> void -
func multimesh_allocate_data(use_indirect: bool = false) -> void -
func multimesh_create() -> RID -
const func multimesh_get_aabb(multimesh: RID) -> AABB -
const func multimesh_get_buffer(multimesh: RID) -> PackedFloat32Array -
const func multimesh_get_buffer_rd_rid(multimesh: RID) -> RID -
const func multimesh_get_command_buffer_rd_rid(multimesh: RID) -> RID -
const func multimesh_get_custom_aabb(multimesh: RID) -> AABB -
const func multimesh_get_instance_count(multimesh: RID) -> int -
const func multimesh_get_mesh(multimesh: RID) -> RID -
const func multimesh_get_visible_instances(multimesh: RID) -> int -
const func multimesh_instance_get_color(index: int) -> Color -
const func multimesh_instance_get_custom_data(index: int) -> Color -
const func multimesh_instance_get_transform(index: int) -> Transform3D -
const func multimesh_instance_get_transform_2d(index: int) -> Transform2D -
func multimesh_instance_reset_physics_interpolation(index: int) -> void -
func multimesh_instance_set_color(color: Color) -> void -
func multimesh_instance_set_custom_data(custom_data: Color) -> void -
func multimesh_instance_set_transform(transform: Transform3D) -> void -
func multimesh_instance_set_transform_2d(transform: Transform2D) -> void -
func multimesh_set_buffer(buffer: PackedFloat32Array) -> void -
func multimesh_set_buffer_interpolated(buffer_previous: PackedFloat32Array) -> void -
func multimesh_set_custom_aabb(aabb: AABB) -> void -
func multimesh_set_mesh(mesh: RID) -> void -
func multimesh_set_physics_interpolated(interpolated: bool) -> void -
func multimesh_set_physics_interpolation_quality(quality: int enumRenderingServer.MultimeshPhysicsInterpolationQuality) -> void -
func multimesh_set_visible_instances(visible: int) -> void -
func occluder_create() -> RID -
func occluder_set_mesh(indices: PackedInt32Array) -> void -
func omni_light_create() -> RID -
func particles_collision_create() -> RID -
func particles_collision_height_field_update(particles_collision: RID) -> void -
func particles_collision_set_attractor_attenuation(curve: float) -> void -
func particles_collision_set_attractor_directionality(amount: float) -> void -
func particles_collision_set_attractor_strength(strength: float) -> void -
func particles_collision_set_box_extents(extents: Vector3) -> void -
func particles_collision_set_collision_type(type: int enumRenderingServer.ParticlesCollisionType) -> void -
func particles_collision_set_cull_mask(mask: int) -> void -
func particles_collision_set_field_texture(texture: RID) -> void -
func particles_collision_set_height_field_mask(mask: int) -> void -
func particles_collision_set_height_field_resolution(resolution: int enumRenderingServer.ParticlesCollisionHeightfieldResolution) -> void -
func particles_collision_set_sphere_radius(radius: float) -> void -
func particles_create() -> RID -
func particles_emit(emit_flags: int) -> void -
func particles_get_current_aabb(particles: RID) -> AABB -
func particles_get_emitting(particles: RID) -> bool -
func particles_is_inactive(particles: RID) -> bool -
func particles_request_process(particles: RID) -> void -
func particles_request_process_time(time: float) -> void -
func particles_restart(particles: RID) -> void -
func particles_set_amount(amount: int) -> void -
func particles_set_amount_ratio(ratio: float) -> void -
func particles_set_collision_base_size(size: float) -> void -
func particles_set_custom_aabb(aabb: AABB) -> void -
func particles_set_draw_order(order: int enumRenderingServer.ParticlesDrawOrder) -> void -
func particles_set_draw_pass_mesh(mesh: RID) -> void -
func particles_set_draw_passes(count: int) -> void -
func particles_set_emission_transform(transform: Transform3D) -> void -
func particles_set_emitter_velocity(velocity: Vector3) -> void -
func particles_set_emitting(emitting: bool) -> void -
func particles_set_explosiveness_ratio(ratio: float) -> void -
func particles_set_fixed_fps(fps: int) -> void -
func particles_set_fractional_delta(enable: bool) -> void -
func particles_set_interp_to_end(factor: float) -> void -
func particles_set_interpolate(enable: bool) -> void -
func particles_set_lifetime(lifetime: float) -> void -
func particles_set_mode(mode: int enumRenderingServer.ParticlesMode) -> void -
func particles_set_one_shot(one_shot: bool) -> void -
func particles_set_pre_process_time(time: float) -> void -
func particles_set_process_material(material: RID) -> void -
func particles_set_randomness_ratio(ratio: float) -> void -
func particles_set_speed_scale(scale: float) -> void -
func particles_set_subemitter(subemitter_particles: RID) -> void -
func particles_set_trail_bind_poses(bind_poses: Transform3D[]) -> void -
func particles_set_trails(length_sec: float) -> void -
func particles_set_transform_align(align: int enumRenderingServer.ParticlesTransformAlign) -> void -
func particles_set_use_local_coordinates(enable: bool) -> void -
func positional_soft_shadow_filter_set_quality(quality: int enumRenderingServer.ShadowQuality) -> void -
func reflection_probe_create() -> RID -
func reflection_probe_set_ambient_color(color: Color) -> void -
func reflection_probe_set_ambient_energy(energy: float) -> void -
func reflection_probe_set_ambient_mode(mode: int enumRenderingServer.ReflectionProbeAmbientMode) -> void -
func reflection_probe_set_as_interior(enable: bool) -> void -
func reflection_probe_set_blend_distance(blend_distance: float) -> void -
func reflection_probe_set_cull_mask(layers: int) -> void -
func reflection_probe_set_enable_box_projection(enable: bool) -> void -
func reflection_probe_set_enable_shadows(enable: bool) -> void -
func reflection_probe_set_intensity(intensity: float) -> void -
func reflection_probe_set_max_distance(distance: float) -> void -
func reflection_probe_set_mesh_lod_threshold(pixels: float) -> void -
func reflection_probe_set_origin_offset(offset: Vector3) -> void -
func reflection_probe_set_reflection_mask(layers: int) -> void -
func reflection_probe_set_resolution(resolution: int) -> void -
func reflection_probe_set_size(size: Vector3) -> void -
func reflection_probe_set_update_mode(mode: int enumRenderingServer.ReflectionProbeUpdateMode) -> void -
func request_frame_drawn_callback(callable: Callable) -> void -
func scenario_create() -> RID -
func scenario_set_camera_attributes(effects: RID) -> void -
func scenario_set_compositor(compositor: RID) -> void -
func scenario_set_environment(environment: RID) -> void -
func scenario_set_fallback_environment(environment: RID) -> void -
func screen_space_roughness_limiter_set_active(limit: float) -> void -
func set_boot_image(use_filter: bool = true) -> void -
func set_debug_generate_wireframes(generate: bool) -> void -
func set_default_clear_color(color: Color) -> void -
func shader_create() -> RID -
const func shader_get_code(shader: RID) -> String -
const func shader_get_default_texture_parameter(index: int = 0) -> RID -
const func shader_get_parameter_default(name: StringName) -> Variant -
func shader_set_code(code: String) -> void -
func shader_set_default_texture_parameter(index: int = 0) -> void -
func shader_set_path_hint(path: String) -> void -
func skeleton_allocate_data(is_2d_skeleton: bool = false) -> void -
const func skeleton_bone_get_transform(bone: int) -> Transform3D -
const func skeleton_bone_get_transform_2d(bone: int) -> Transform2D -
func skeleton_bone_set_transform(transform: Transform3D) -> void -
func skeleton_bone_set_transform_2d(transform: Transform2D) -> void -
func skeleton_create() -> RID -
const func skeleton_get_bone_count(skeleton: RID) -> int -
func skeleton_set_base_transform_2d(base_transform: Transform2D) -> void -
func sky_bake_panorama(size: Vector2i) -> Image -
func sky_create() -> RID -
func sky_set_material(material: RID) -> void -
func sky_set_mode(mode: int enumRenderingServer.SkyMode) -> void -
func sky_set_radiance_size(radiance_size: int) -> void -
func spot_light_create() -> RID -
func sub_surface_scattering_set_quality(quality: int enumRenderingServer.SubSurfaceScatteringQuality) -> void -
func sub_surface_scattering_set_scale(depth_scale: float) -> void -
func texture_2d_create(image: Image) -> RID -
const func texture_2d_get(texture: RID) -> Image -
const func texture_2d_layer_get(layer: int) -> Image -
func texture_2d_layered_create(layered_type: int enumRenderingServer.TextureLayeredType) -> RID -
func texture_2d_layered_placeholder_create(layered_type: int enumRenderingServer.TextureLayeredType) -> RID -
func texture_2d_placeholder_create() -> RID -
func texture_2d_update(layer: int) -> void -
func texture_3d_create(data: Image[]) -> RID -
const func texture_3d_get(texture: RID) -> Image[] -
func texture_3d_placeholder_create() -> RID -
func texture_3d_update(data: Image[]) -> void -
func texture_create_from_native_handle(layered_type: int = 0 enumRenderingServer.TextureLayeredType) -> RID -
const func texture_get_format(texture: RID) -> intImage.Format -
const func texture_get_native_handle(srgb: bool = false) -> int -
const func texture_get_path(texture: RID) -> String -
const func texture_get_rd_texture(srgb: bool = false) -> RID -
func texture_proxy_create(base: RID) -> RID -
func texture_proxy_update(proxy_to: RID) -> void -
func texture_rd_create(layer_type: int = 0 enumRenderingServer.TextureLayeredType) -> RID -
func texture_replace(by_texture: RID) -> void -
func texture_set_force_redraw_if_visible(enable: bool) -> void -
func texture_set_path(path: String) -> void -
func texture_set_size_override(height: int) -> void -
func viewport_attach_camera(camera: RID) -> void -
func viewport_attach_canvas(canvas: RID) -> void -
func viewport_attach_to_screen(screen: int = 0) -> void -
func viewport_create() -> RID -
const func viewport_get_measured_render_time_cpu(viewport: RID) -> float -
const func viewport_get_measured_render_time_gpu(viewport: RID) -> float -
func viewport_get_render_info(info: int enumRenderingServer.ViewportRenderInfo) -> int -
const func viewport_get_render_target(viewport: RID) -> RID -
const func viewport_get_texture(viewport: RID) -> RID -
const func viewport_get_update_mode(viewport: RID) -> intRenderingServer.ViewportUpdateMode -
func viewport_remove_canvas(canvas: RID) -> void -
func viewport_set_active(active: bool) -> void -
func viewport_set_anisotropic_filtering_level(anisotropic_filtering_level: int enumRenderingServer.ViewportAnisotropicFiltering) -> void -
func viewport_set_canvas_cull_mask(canvas_cull_mask: int) -> void -
func viewport_set_canvas_stacking(sublayer: int) -> void -
func viewport_set_canvas_transform(offset: Transform2D) -> void -
func viewport_set_clear_mode(clear_mode: int enumRenderingServer.ViewportClearMode) -> void -
func viewport_set_debug_draw(draw: int enumRenderingServer.ViewportDebugDraw) -> void -
func viewport_set_default_canvas_item_texture_filter(filter: int enumRenderingServer.CanvasItemTextureFilter) -> void -
func viewport_set_default_canvas_item_texture_repeat(repeat: int enumRenderingServer.CanvasItemTextureRepeat) -> void -
func viewport_set_disable_2d(disable: bool) -> void -
func viewport_set_disable_3d(disable: bool) -> void -
func viewport_set_environment_mode(mode: int enumRenderingServer.ViewportEnvironmentMode) -> void -
func viewport_set_fsr_sharpness(sharpness: float) -> void -
func viewport_set_global_canvas_transform(transform: Transform2D) -> void -
func viewport_set_measure_render_time(enable: bool) -> void -
func viewport_set_msaa_2d(msaa: int enumRenderingServer.ViewportMSAA) -> void -
func viewport_set_msaa_3d(msaa: int enumRenderingServer.ViewportMSAA) -> void -
func viewport_set_occlusion_culling_build_quality(quality: int enumRenderingServer.ViewportOcclusionCullingBuildQuality) -> void -
func viewport_set_occlusion_rays_per_thread(rays_per_thread: int) -> void -
func viewport_set_parent_viewport(parent_viewport: RID) -> void -
func viewport_set_positional_shadow_atlas_quadrant_subdivision(subdivision: int) -> void -
func viewport_set_positional_shadow_atlas_size(use_16_bits: bool = false) -> void -
func viewport_set_render_direct_to_screen(enabled: bool) -> void -
func viewport_set_scaling_3d_mode(scaling_3d_mode: int enumRenderingServer.ViewportScaling3DMode) -> void -
func viewport_set_scaling_3d_scale(scale: float) -> void -
func viewport_set_scenario(scenario: RID) -> void -
func viewport_set_screen_space_aa(mode: int enumRenderingServer.ViewportScreenSpaceAA) -> void -
func viewport_set_sdf_oversize_and_scale(scale: int enumRenderingServer.ViewportSDFScale) -> void -
func viewport_set_size(height: int) -> void -
func viewport_set_snap_2d_transforms_to_pixel(enabled: bool) -> void -
func viewport_set_snap_2d_vertices_to_pixel(enabled: bool) -> void -
func viewport_set_texture_mipmap_bias(mipmap_bias: float) -> void -
func viewport_set_transparent_background(enabled: bool) -> void -
func viewport_set_update_mode(update_mode: int enumRenderingServer.ViewportUpdateMode) -> void -
func viewport_set_use_debanding(enable: bool) -> void -
func viewport_set_use_hdr_2d(enabled: bool) -> void -
func viewport_set_use_occlusion_culling(enable: bool) -> void -
func viewport_set_use_taa(enable: bool) -> void -
func viewport_set_use_xr(use_xr: bool) -> void -
func viewport_set_vrs_mode(mode: int enumRenderingServer.ViewportVRSMode) -> void -
func viewport_set_vrs_texture(texture: RID) -> void -
func viewport_set_vrs_update_mode(mode: int enumRenderingServer.ViewportVRSUpdateMode) -> void -
func visibility_notifier_create() -> RID -
func visibility_notifier_set_aabb(aabb: AABB) -> void -
func visibility_notifier_set_callbacks(exit_callable: Callable) -> void -
func voxel_gi_allocate_data(level_counts: PackedInt32Array) -> void -
func voxel_gi_create() -> RID -
const func voxel_gi_get_data_cells(voxel_gi: RID) -> PackedByteArray -
const func voxel_gi_get_distance_field(voxel_gi: RID) -> PackedByteArray -
const func voxel_gi_get_level_counts(voxel_gi: RID) -> PackedInt32Array -
const func voxel_gi_get_octree_cells(voxel_gi: RID) -> PackedByteArray -
const func voxel_gi_get_octree_size(voxel_gi: RID) -> Vector3i -
const func voxel_gi_get_to_cell_xform(voxel_gi: RID) -> Transform3D -
func voxel_gi_set_baked_exposure_normalization(baked_exposure: float) -> void -
func voxel_gi_set_bias(bias: float) -> void -
func voxel_gi_set_dynamic_range(range: float) -> void -
func voxel_gi_set_energy(energy: float) -> void -
func voxel_gi_set_interior(enable: bool) -> void -
func voxel_gi_set_normal_bias(bias: float) -> void -
func voxel_gi_set_propagation(amount: float) -> void -
func voxel_gi_set_quality(quality: int enumRenderingServer.VoxelGIQuality) -> void -
func voxel_gi_set_use_two_bounces(enable: bool) -> void -
const NO_INDEX_ARRAY = -1 -
const ARRAY_WEIGHTS_SIZE = 4 -
const CANVAS_ITEM_Z_MIN = -4096 -
const CANVAS_ITEM_Z_MAX = 4096 -
const MAX_GLOW_LEVELS = 7 -
const MAX_CURSORS = 8Deprecated -
const MAX_2D_DIRECTIONAL_LIGHTS = 8 -
const MAX_MESH_SURFACES = 256 -
const TEXTURE_TYPE_2D = 0 enum TextureType -
const TEXTURE_TYPE_LAYERED = 1 enum TextureType -
const TEXTURE_TYPE_3D = 2 enum TextureType -
const TEXTURE_LAYERED_2D_ARRAY = 0 enum TextureLayeredType -
const TEXTURE_LAYERED_CUBEMAP = 1 enum TextureLayeredType -
const TEXTURE_LAYERED_CUBEMAP_ARRAY = 2 enum TextureLayeredType -
const CUBEMAP_LAYER_LEFT = 0 enum CubeMapLayer -
const CUBEMAP_LAYER_RIGHT = 1 enum CubeMapLayer -
const CUBEMAP_LAYER_BOTTOM = 2 enum CubeMapLayer -
const CUBEMAP_LAYER_TOP = 3 enum CubeMapLayer -
const CUBEMAP_LAYER_FRONT = 4 enum CubeMapLayer -
const CUBEMAP_LAYER_BACK = 5 enum CubeMapLayer -
const SHADER_SPATIAL = 0 enum ShaderMode -
const SHADER_CANVAS_ITEM = 1 enum ShaderMode -
const SHADER_PARTICLES = 2 enum ShaderMode -
const SHADER_SKY = 3 enum ShaderMode -
const SHADER_FOG = 4 enum ShaderMode -
const SHADER_MAX = 5 enum ShaderMode -
const MATERIAL_RENDER_PRIORITY_MIN = -128 -
const MATERIAL_RENDER_PRIORITY_MAX = 127 -
const ARRAY_VERTEX = 0 enum ArrayType -
const ARRAY_NORMAL = 1 enum ArrayType -
const ARRAY_TANGENT = 2 enum ArrayType -
const ARRAY_COLOR = 3 enum ArrayType -
const ARRAY_TEX_UV = 4 enum ArrayType -
const ARRAY_TEX_UV2 = 5 enum ArrayType -
const ARRAY_CUSTOM0 = 6 enum ArrayType -
const ARRAY_CUSTOM1 = 7 enum ArrayType -
const ARRAY_CUSTOM2 = 8 enum ArrayType -
const ARRAY_CUSTOM3 = 9 enum ArrayType -
const ARRAY_BONES = 10 enum ArrayType -
const ARRAY_WEIGHTS = 11 enum ArrayType -
const ARRAY_INDEX = 12 enum ArrayType -
const ARRAY_MAX = 13 enum ArrayType -
const ARRAY_CUSTOM_COUNT = 4 -
const ARRAY_CUSTOM_RGBA8_UNORM = 0 enum ArrayCustomFormat -
const ARRAY_CUSTOM_RGBA8_SNORM = 1 enum ArrayCustomFormat -
const ARRAY_CUSTOM_RG_HALF = 2 enum ArrayCustomFormat -
const ARRAY_CUSTOM_RGBA_HALF = 3 enum ArrayCustomFormat -
const ARRAY_CUSTOM_R_FLOAT = 4 enum ArrayCustomFormat -
const ARRAY_CUSTOM_RG_FLOAT = 5 enum ArrayCustomFormat -
const ARRAY_CUSTOM_RGB_FLOAT = 6 enum ArrayCustomFormat -
const ARRAY_CUSTOM_RGBA_FLOAT = 7 enum ArrayCustomFormat -
const ARRAY_CUSTOM_MAX = 8 enum ArrayCustomFormat -
const ARRAY_FORMAT_VERTEX = 1 enum ArrayFormatBitfield -
const ARRAY_FORMAT_NORMAL = 2 enum ArrayFormatBitfield -
const ARRAY_FORMAT_TANGENT = 4 enum ArrayFormatBitfield -
const ARRAY_FORMAT_COLOR = 8 enum ArrayFormatBitfield -
const ARRAY_FORMAT_TEX_UV = 16 enum ArrayFormatBitfield -
const ARRAY_FORMAT_TEX_UV2 = 32 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM0 = 64 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM1 = 128 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM2 = 256 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM3 = 512 enum ArrayFormatBitfield -
const ARRAY_FORMAT_BONES = 1024 enum ArrayFormatBitfield -
const ARRAY_FORMAT_WEIGHTS = 2048 enum ArrayFormatBitfield -
const ARRAY_FORMAT_INDEX = 4096 enum ArrayFormatBitfield -
const ARRAY_FORMAT_BLEND_SHAPE_MASK = 7 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM_BASE = 13 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM_BITS = 3 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM0_SHIFT = 13 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM1_SHIFT = 16 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM2_SHIFT = 19 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM3_SHIFT = 22 enum ArrayFormatBitfield -
const ARRAY_FORMAT_CUSTOM_MASK = 7 enum ArrayFormatBitfield -
const ARRAY_COMPRESS_FLAGS_BASE = 25 enum ArrayFormatBitfield -
const ARRAY_FLAG_USE_2D_VERTICES = 33554432 enum ArrayFormatBitfield -
const ARRAY_FLAG_USE_DYNAMIC_UPDATE = 67108864 enum ArrayFormatBitfield -
const ARRAY_FLAG_USE_8_BONE_WEIGHTS = 134217728 enum ArrayFormatBitfield -
const ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY = 268435456 enum ArrayFormatBitfield -
const ARRAY_FLAG_COMPRESS_ATTRIBUTES = 536870912 enum ArrayFormatBitfield -
const ARRAY_FLAG_FORMAT_VERSION_BASE = 35 enum ArrayFormatBitfield -
const ARRAY_FLAG_FORMAT_VERSION_SHIFT = 35 enum ArrayFormatBitfield -
const ARRAY_FLAG_FORMAT_VERSION_1 = 0 enum ArrayFormatBitfield -
const ARRAY_FLAG_FORMAT_VERSION_2 = 34359738368 enum ArrayFormatBitfield -
const ARRAY_FLAG_FORMAT_CURRENT_VERSION = 34359738368 enum ArrayFormatBitfield -
const ARRAY_FLAG_FORMAT_VERSION_MASK = 255 enum ArrayFormatBitfield -
const PRIMITIVE_POINTS = 0 enum PrimitiveType -
const PRIMITIVE_LINES = 1 enum PrimitiveType -
const PRIMITIVE_LINE_STRIP = 2 enum PrimitiveType -
const PRIMITIVE_TRIANGLES = 3 enum PrimitiveType -
const PRIMITIVE_TRIANGLE_STRIP = 4 enum PrimitiveType -
const PRIMITIVE_MAX = 5 enum PrimitiveType -
const BLEND_SHAPE_MODE_NORMALIZED = 0 enum BlendShapeMode -
const BLEND_SHAPE_MODE_RELATIVE = 1 enum BlendShapeMode -
const MULTIMESH_TRANSFORM_2D = 0 enum MultimeshTransformFormat -
const MULTIMESH_TRANSFORM_3D = 1 enum MultimeshTransformFormat -
const MULTIMESH_INTERP_QUALITY_FAST = 0 enum MultimeshPhysicsInterpolationQuality -
const MULTIMESH_INTERP_QUALITY_HIGH = 1 enum MultimeshPhysicsInterpolationQuality -
const LIGHT_PROJECTOR_FILTER_NEAREST = 0 enum LightProjectorFilter -
const LIGHT_PROJECTOR_FILTER_LINEAR = 1 enum LightProjectorFilter -
const LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS = 2 enum LightProjectorFilter -
const LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS = 3 enum LightProjectorFilter -
const LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC = 4 enum LightProjectorFilter -
const LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC = 5 enum LightProjectorFilter -
const LIGHT_DIRECTIONAL = 0 enum LightType -
const LIGHT_OMNI = 1 enum LightType -
const LIGHT_SPOT = 2 enum LightType -
const LIGHT_PARAM_ENERGY = 0 enum LightParam -
const LIGHT_PARAM_INDIRECT_ENERGY = 1 enum LightParam -
const LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY = 2 enum LightParam -
const LIGHT_PARAM_SPECULAR = 3 enum LightParam -
const LIGHT_PARAM_RANGE = 4 enum LightParam -
const LIGHT_PARAM_SIZE = 5 enum LightParam -
const LIGHT_PARAM_ATTENUATION = 6 enum LightParam -
const LIGHT_PARAM_SPOT_ANGLE = 7 enum LightParam -
const LIGHT_PARAM_SPOT_ATTENUATION = 8 enum LightParam -
const LIGHT_PARAM_SHADOW_MAX_DISTANCE = 9 enum LightParam -
const LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET = 10 enum LightParam -
const LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET = 11 enum LightParam -
const LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET = 12 enum LightParam -
const LIGHT_PARAM_SHADOW_FADE_START = 13 enum LightParam -
const LIGHT_PARAM_SHADOW_NORMAL_BIAS = 14 enum LightParam -
const LIGHT_PARAM_SHADOW_BIAS = 15 enum LightParam -
const LIGHT_PARAM_SHADOW_PANCAKE_SIZE = 16 enum LightParam -
const LIGHT_PARAM_SHADOW_OPACITY = 17 enum LightParam -
const LIGHT_PARAM_SHADOW_BLUR = 18 enum LightParam -
const LIGHT_PARAM_TRANSMITTANCE_BIAS = 19 enum LightParam -
const LIGHT_PARAM_INTENSITY = 20 enum LightParam -
const LIGHT_PARAM_MAX = 21 enum LightParam -
const LIGHT_BAKE_DISABLED = 0 enum LightBakeMode -
const LIGHT_BAKE_STATIC = 1 enum LightBakeMode -
const LIGHT_BAKE_DYNAMIC = 2 enum LightBakeMode -
const LIGHT_OMNI_SHADOW_DUAL_PARABOLOID = 0 enum LightOmniShadowMode -
const LIGHT_OMNI_SHADOW_CUBE = 1 enum LightOmniShadowMode -
const LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL = 0 enum LightDirectionalShadowMode -
const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS = 1 enum LightDirectionalShadowMode -
const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS = 2 enum LightDirectionalShadowMode -
const LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY = 0 enum LightDirectionalSkyMode -
const LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY = 1 enum LightDirectionalSkyMode -
const LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY = 2 enum LightDirectionalSkyMode -
const SHADOW_QUALITY_HARD = 0 enum ShadowQuality -
const SHADOW_QUALITY_SOFT_VERY_LOW = 1 enum ShadowQuality -
const SHADOW_QUALITY_SOFT_LOW = 2 enum ShadowQuality -
const SHADOW_QUALITY_SOFT_MEDIUM = 3 enum ShadowQuality -
const SHADOW_QUALITY_SOFT_HIGH = 4 enum ShadowQuality -
const SHADOW_QUALITY_SOFT_ULTRA = 5 enum ShadowQuality -
const SHADOW_QUALITY_MAX = 6 enum ShadowQuality -
const REFLECTION_PROBE_UPDATE_ONCE = 0 enum ReflectionProbeUpdateMode -
const REFLECTION_PROBE_UPDATE_ALWAYS = 1 enum ReflectionProbeUpdateMode -
const REFLECTION_PROBE_AMBIENT_DISABLED = 0 enum ReflectionProbeAmbientMode -
const REFLECTION_PROBE_AMBIENT_ENVIRONMENT = 1 enum ReflectionProbeAmbientMode -
const REFLECTION_PROBE_AMBIENT_COLOR = 2 enum ReflectionProbeAmbientMode -
const DECAL_TEXTURE_ALBEDO = 0 enum DecalTexture -
const DECAL_TEXTURE_NORMAL = 1 enum DecalTexture -
const DECAL_TEXTURE_ORM = 2 enum DecalTexture -
const DECAL_TEXTURE_EMISSION = 3 enum DecalTexture -
const DECAL_TEXTURE_MAX = 4 enum DecalTexture -
const DECAL_FILTER_NEAREST = 0 enum DecalFilter -
const DECAL_FILTER_LINEAR = 1 enum DecalFilter -
const DECAL_FILTER_NEAREST_MIPMAPS = 2 enum DecalFilter -
const DECAL_FILTER_LINEAR_MIPMAPS = 3 enum DecalFilter -
const DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC = 4 enum DecalFilter -
const DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC = 5 enum DecalFilter -
const VOXEL_GI_QUALITY_LOW = 0 enum VoxelGIQuality -
const VOXEL_GI_QUALITY_HIGH = 1 enum VoxelGIQuality -
const PARTICLES_MODE_2D = 0 enum ParticlesMode -
const PARTICLES_MODE_3D = 1 enum ParticlesMode -
const PARTICLES_TRANSFORM_ALIGN_DISABLED = 0 enum ParticlesTransformAlign -
const PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD = 1 enum ParticlesTransformAlign -
const PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY = 2 enum ParticlesTransformAlign -
const PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY = 3 enum ParticlesTransformAlign -
const PARTICLES_EMIT_FLAG_POSITION = 1 -
const PARTICLES_EMIT_FLAG_ROTATION_SCALE = 2 -
const PARTICLES_EMIT_FLAG_VELOCITY = 4 -
const PARTICLES_EMIT_FLAG_COLOR = 8 -
const PARTICLES_EMIT_FLAG_CUSTOM = 16 -
const PARTICLES_DRAW_ORDER_INDEX = 0 enum ParticlesDrawOrder -
const PARTICLES_DRAW_ORDER_LIFETIME = 1 enum ParticlesDrawOrder -
const PARTICLES_DRAW_ORDER_REVERSE_LIFETIME = 2 enum ParticlesDrawOrder -
const PARTICLES_DRAW_ORDER_VIEW_DEPTH = 3 enum ParticlesDrawOrder -
const PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT = 0 enum ParticlesCollisionType -
const PARTICLES_COLLISION_TYPE_BOX_ATTRACT = 1 enum ParticlesCollisionType -
const PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT = 2 enum ParticlesCollisionType -
const PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE = 3 enum ParticlesCollisionType -
const PARTICLES_COLLISION_TYPE_BOX_COLLIDE = 4 enum ParticlesCollisionType -
const PARTICLES_COLLISION_TYPE_SDF_COLLIDE = 5 enum ParticlesCollisionType -
const PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE = 6 enum ParticlesCollisionType -
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256 = 0 enum ParticlesCollisionHeightfieldResolution -
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512 = 1 enum ParticlesCollisionHeightfieldResolution -
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024 = 2 enum ParticlesCollisionHeightfieldResolution -
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048 = 3 enum ParticlesCollisionHeightfieldResolution -
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096 = 4 enum ParticlesCollisionHeightfieldResolution -
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192 = 5 enum ParticlesCollisionHeightfieldResolution -
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX = 6 enum ParticlesCollisionHeightfieldResolution -
const FOG_VOLUME_SHAPE_ELLIPSOID = 0 enum FogVolumeShape -
const FOG_VOLUME_SHAPE_CONE = 1 enum FogVolumeShape -
const FOG_VOLUME_SHAPE_CYLINDER = 2 enum FogVolumeShape -
const FOG_VOLUME_SHAPE_BOX = 3 enum FogVolumeShape -
const FOG_VOLUME_SHAPE_WORLD = 4 enum FogVolumeShape -
const FOG_VOLUME_SHAPE_MAX = 5 enum FogVolumeShape -
const VIEWPORT_SCALING_3D_MODE_BILINEAR = 0 enum ViewportScaling3DMode -
const VIEWPORT_SCALING_3D_MODE_FSR = 1 enum ViewportScaling3DMode -
const VIEWPORT_SCALING_3D_MODE_FSR2 = 2 enum ViewportScaling3DMode -
const VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL = 3 enum ViewportScaling3DMode -
const VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL = 4 enum ViewportScaling3DMode -
const VIEWPORT_SCALING_3D_MODE_MAX = 5 enum ViewportScaling3DMode -
const VIEWPORT_UPDATE_DISABLED = 0 enum ViewportUpdateMode -
const VIEWPORT_UPDATE_ONCE = 1 enum ViewportUpdateMode -
const VIEWPORT_UPDATE_WHEN_VISIBLE = 2 enum ViewportUpdateMode -
const VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE = 3 enum ViewportUpdateMode -
const VIEWPORT_UPDATE_ALWAYS = 4 enum ViewportUpdateMode -
const VIEWPORT_CLEAR_ALWAYS = 0 enum ViewportClearMode -
const VIEWPORT_CLEAR_NEVER = 1 enum ViewportClearMode -
const VIEWPORT_CLEAR_ONLY_NEXT_FRAME = 2 enum ViewportClearMode -
const VIEWPORT_ENVIRONMENT_DISABLED = 0 enum ViewportEnvironmentMode -
const VIEWPORT_ENVIRONMENT_ENABLED = 1 enum ViewportEnvironmentMode -
const VIEWPORT_ENVIRONMENT_INHERIT = 2 enum ViewportEnvironmentMode -
const VIEWPORT_ENVIRONMENT_MAX = 3 enum ViewportEnvironmentMode -
const VIEWPORT_SDF_OVERSIZE_100_PERCENT = 0 enum ViewportSDFOversize -
const VIEWPORT_SDF_OVERSIZE_120_PERCENT = 1 enum ViewportSDFOversize -
const VIEWPORT_SDF_OVERSIZE_150_PERCENT = 2 enum ViewportSDFOversize -
const VIEWPORT_SDF_OVERSIZE_200_PERCENT = 3 enum ViewportSDFOversize -
const VIEWPORT_SDF_OVERSIZE_MAX = 4 enum ViewportSDFOversize -
const VIEWPORT_SDF_SCALE_100_PERCENT = 0 enum ViewportSDFScale -
const VIEWPORT_SDF_SCALE_50_PERCENT = 1 enum ViewportSDFScale -
const VIEWPORT_SDF_SCALE_25_PERCENT = 2 enum ViewportSDFScale -
const VIEWPORT_SDF_SCALE_MAX = 3 enum ViewportSDFScale -
const VIEWPORT_MSAA_DISABLED = 0 enum ViewportMSAA -
const VIEWPORT_MSAA_2X = 1 enum ViewportMSAA -
const VIEWPORT_MSAA_4X = 2 enum ViewportMSAA -
const VIEWPORT_MSAA_8X = 3 enum ViewportMSAA -
const VIEWPORT_MSAA_MAX = 4 enum ViewportMSAA -
const VIEWPORT_ANISOTROPY_DISABLED = 0 enum ViewportAnisotropicFiltering -
const VIEWPORT_ANISOTROPY_2X = 1 enum ViewportAnisotropicFiltering -
const VIEWPORT_ANISOTROPY_4X = 2 enum ViewportAnisotropicFiltering -
const VIEWPORT_ANISOTROPY_8X = 3 enum ViewportAnisotropicFiltering -
const VIEWPORT_ANISOTROPY_16X = 4 enum ViewportAnisotropicFiltering -
const VIEWPORT_ANISOTROPY_MAX = 5 enum ViewportAnisotropicFiltering -
const VIEWPORT_SCREEN_SPACE_AA_DISABLED = 0 enum ViewportScreenSpaceAA -
const VIEWPORT_SCREEN_SPACE_AA_FXAA = 1 enum ViewportScreenSpaceAA -
const VIEWPORT_SCREEN_SPACE_AA_MAX = 2 enum ViewportScreenSpaceAA -
const VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW = 0 enum ViewportOcclusionCullingBuildQuality -
const VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM = 1 enum ViewportOcclusionCullingBuildQuality -
const VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH = 2 enum ViewportOcclusionCullingBuildQuality -
const VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME = 0 enum ViewportRenderInfo -
const VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME = 1 enum ViewportRenderInfo -
const VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME = 2 enum ViewportRenderInfo -
const VIEWPORT_RENDER_INFO_MAX = 3 enum ViewportRenderInfo -
const VIEWPORT_RENDER_INFO_TYPE_VISIBLE = 0 enum ViewportRenderInfoType -
const VIEWPORT_RENDER_INFO_TYPE_SHADOW = 1 enum ViewportRenderInfoType -
const VIEWPORT_RENDER_INFO_TYPE_CANVAS = 2 enum ViewportRenderInfoType -
const VIEWPORT_RENDER_INFO_TYPE_MAX = 3 enum ViewportRenderInfoType -
const VIEWPORT_DEBUG_DRAW_DISABLED = 0 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_UNSHADED = 1 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_LIGHTING = 2 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_OVERDRAW = 3 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_WIREFRAME = 4 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER = 5 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO = 6 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING = 7 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION = 8 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS = 9 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS = 10 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE = 11 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_SSAO = 12 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_SSIL = 13 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_PSSM_SPLITS = 14 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_DECAL_ATLAS = 15 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_SDFGI = 16 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_SDFGI_PROBES = 17 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_GI_BUFFER = 18 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_DISABLE_LOD = 19 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS = 20 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS = 21 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS = 22 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES = 23 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_OCCLUDERS = 24 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_MOTION_VECTORS = 25 enum ViewportDebugDraw -
const VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER = 26 enum ViewportDebugDraw -
const VIEWPORT_VRS_DISABLED = 0 enum ViewportVRSMode -
const VIEWPORT_VRS_TEXTURE = 1 enum ViewportVRSMode -
const VIEWPORT_VRS_XR = 2 enum ViewportVRSMode -
const VIEWPORT_VRS_MAX = 3 enum ViewportVRSMode -
const VIEWPORT_VRS_UPDATE_DISABLED = 0 enum ViewportVRSUpdateMode -
const VIEWPORT_VRS_UPDATE_ONCE = 1 enum ViewportVRSUpdateMode -
const VIEWPORT_VRS_UPDATE_ALWAYS = 2 enum ViewportVRSUpdateMode -
const VIEWPORT_VRS_UPDATE_MAX = 3 enum ViewportVRSUpdateMode -
const SKY_MODE_AUTOMATIC = 0 enum SkyMode -
const SKY_MODE_QUALITY = 1 enum SkyMode -
const SKY_MODE_INCREMENTAL = 2 enum SkyMode -
const SKY_MODE_REALTIME = 3 enum SkyMode -
const COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR = 1 enum CompositorEffectFlags -
const COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH = 2 enum CompositorEffectFlags -
const COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS = 4 enum CompositorEffectFlags -
const COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS = 8 enum CompositorEffectFlags -
const COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR = 16 enum CompositorEffectFlags -
const COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_OPAQUE = 0 enum CompositorEffectCallbackType -
const COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_OPAQUE = 1 enum CompositorEffectCallbackType -
const COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_SKY = 2 enum CompositorEffectCallbackType -
const COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT = 3 enum CompositorEffectCallbackType -
const COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT = 4 enum CompositorEffectCallbackType -
const COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY = -1 enum CompositorEffectCallbackType -
const ENV_BG_CLEAR_COLOR = 0 enum EnvironmentBG -
const ENV_BG_COLOR = 1 enum EnvironmentBG -
const ENV_BG_SKY = 2 enum EnvironmentBG -
const ENV_BG_CANVAS = 3 enum EnvironmentBG -
const ENV_BG_KEEP = 4 enum EnvironmentBG -
const ENV_BG_CAMERA_FEED = 5 enum EnvironmentBG -
const ENV_BG_MAX = 6 enum EnvironmentBG -
const ENV_AMBIENT_SOURCE_BG = 0 enum EnvironmentAmbientSource -
const ENV_AMBIENT_SOURCE_DISABLED = 1 enum EnvironmentAmbientSource -
const ENV_AMBIENT_SOURCE_COLOR = 2 enum EnvironmentAmbientSource -
const ENV_AMBIENT_SOURCE_SKY = 3 enum EnvironmentAmbientSource -
const ENV_REFLECTION_SOURCE_BG = 0 enum EnvironmentReflectionSource -
const ENV_REFLECTION_SOURCE_DISABLED = 1 enum EnvironmentReflectionSource -
const ENV_REFLECTION_SOURCE_SKY = 2 enum EnvironmentReflectionSource -
const ENV_GLOW_BLEND_MODE_ADDITIVE = 0 enum EnvironmentGlowBlendMode -
const ENV_GLOW_BLEND_MODE_SCREEN = 1 enum EnvironmentGlowBlendMode -
const ENV_GLOW_BLEND_MODE_SOFTLIGHT = 2 enum EnvironmentGlowBlendMode -
const ENV_GLOW_BLEND_MODE_REPLACE = 3 enum EnvironmentGlowBlendMode -
const ENV_GLOW_BLEND_MODE_MIX = 4 enum EnvironmentGlowBlendMode -
const ENV_FOG_MODE_EXPONENTIAL = 0 enum EnvironmentFogMode -
const ENV_FOG_MODE_DEPTH = 1 enum EnvironmentFogMode -
const ENV_TONE_MAPPER_LINEAR = 0 enum EnvironmentToneMapper -
const ENV_TONE_MAPPER_REINHARD = 1 enum EnvironmentToneMapper -
const ENV_TONE_MAPPER_FILMIC = 2 enum EnvironmentToneMapper -
const ENV_TONE_MAPPER_ACES = 3 enum EnvironmentToneMapper -
const ENV_TONE_MAPPER_AGX = 4 enum EnvironmentToneMapper -
const ENV_SSR_ROUGHNESS_QUALITY_DISABLED = 0 enum EnvironmentSSRRoughnessQuality -
const ENV_SSR_ROUGHNESS_QUALITY_LOW = 1 enum EnvironmentSSRRoughnessQuality -
const ENV_SSR_ROUGHNESS_QUALITY_MEDIUM = 2 enum EnvironmentSSRRoughnessQuality -
const ENV_SSR_ROUGHNESS_QUALITY_HIGH = 3 enum EnvironmentSSRRoughnessQuality -
const ENV_SSAO_QUALITY_VERY_LOW = 0 enum EnvironmentSSAOQuality -
const ENV_SSAO_QUALITY_LOW = 1 enum EnvironmentSSAOQuality -
const ENV_SSAO_QUALITY_MEDIUM = 2 enum EnvironmentSSAOQuality -
const ENV_SSAO_QUALITY_HIGH = 3 enum EnvironmentSSAOQuality -
const ENV_SSAO_QUALITY_ULTRA = 4 enum EnvironmentSSAOQuality -
const ENV_SSIL_QUALITY_VERY_LOW = 0 enum EnvironmentSSILQuality -
const ENV_SSIL_QUALITY_LOW = 1 enum EnvironmentSSILQuality -
const ENV_SSIL_QUALITY_MEDIUM = 2 enum EnvironmentSSILQuality -
const ENV_SSIL_QUALITY_HIGH = 3 enum EnvironmentSSILQuality -
const ENV_SSIL_QUALITY_ULTRA = 4 enum EnvironmentSSILQuality -
const ENV_SDFGI_Y_SCALE_50_PERCENT = 0 enum EnvironmentSDFGIYScale -
const ENV_SDFGI_Y_SCALE_75_PERCENT = 1 enum EnvironmentSDFGIYScale -
const ENV_SDFGI_Y_SCALE_100_PERCENT = 2 enum EnvironmentSDFGIYScale -
const ENV_SDFGI_RAY_COUNT_4 = 0 enum EnvironmentSDFGIRayCount -
const ENV_SDFGI_RAY_COUNT_8 = 1 enum EnvironmentSDFGIRayCount -
const ENV_SDFGI_RAY_COUNT_16 = 2 enum EnvironmentSDFGIRayCount -
const ENV_SDFGI_RAY_COUNT_32 = 3 enum EnvironmentSDFGIRayCount -
const ENV_SDFGI_RAY_COUNT_64 = 4 enum EnvironmentSDFGIRayCount -
const ENV_SDFGI_RAY_COUNT_96 = 5 enum EnvironmentSDFGIRayCount -
const ENV_SDFGI_RAY_COUNT_128 = 6 enum EnvironmentSDFGIRayCount -
const ENV_SDFGI_RAY_COUNT_MAX = 7 enum EnvironmentSDFGIRayCount -
const ENV_SDFGI_CONVERGE_IN_5_FRAMES = 0 enum EnvironmentSDFGIFramesToConverge -
const ENV_SDFGI_CONVERGE_IN_10_FRAMES = 1 enum EnvironmentSDFGIFramesToConverge -
const ENV_SDFGI_CONVERGE_IN_15_FRAMES = 2 enum EnvironmentSDFGIFramesToConverge -
const ENV_SDFGI_CONVERGE_IN_20_FRAMES = 3 enum EnvironmentSDFGIFramesToConverge -
const ENV_SDFGI_CONVERGE_IN_25_FRAMES = 4 enum EnvironmentSDFGIFramesToConverge -
const ENV_SDFGI_CONVERGE_IN_30_FRAMES = 5 enum EnvironmentSDFGIFramesToConverge -
const ENV_SDFGI_CONVERGE_MAX = 6 enum EnvironmentSDFGIFramesToConverge -
const ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME = 0 enum EnvironmentSDFGIFramesToUpdateLight -
const ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES = 1 enum EnvironmentSDFGIFramesToUpdateLight -
const ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES = 2 enum EnvironmentSDFGIFramesToUpdateLight -
const ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES = 3 enum EnvironmentSDFGIFramesToUpdateLight -
const ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES = 4 enum EnvironmentSDFGIFramesToUpdateLight -
const ENV_SDFGI_UPDATE_LIGHT_MAX = 5 enum EnvironmentSDFGIFramesToUpdateLight -
const SUB_SURFACE_SCATTERING_QUALITY_DISABLED = 0 enum SubSurfaceScatteringQuality -
const SUB_SURFACE_SCATTERING_QUALITY_LOW = 1 enum SubSurfaceScatteringQuality -
const SUB_SURFACE_SCATTERING_QUALITY_MEDIUM = 2 enum SubSurfaceScatteringQuality -
const SUB_SURFACE_SCATTERING_QUALITY_HIGH = 3 enum SubSurfaceScatteringQuality -
const DOF_BOKEH_BOX = 0 enum DOFBokehShape -
const DOF_BOKEH_HEXAGON = 1 enum DOFBokehShape -
const DOF_BOKEH_CIRCLE = 2 enum DOFBokehShape -
const DOF_BLUR_QUALITY_VERY_LOW = 0 enum DOFBlurQuality -
const DOF_BLUR_QUALITY_LOW = 1 enum DOFBlurQuality -
const DOF_BLUR_QUALITY_MEDIUM = 2 enum DOFBlurQuality -
const DOF_BLUR_QUALITY_HIGH = 3 enum DOFBlurQuality -
const INSTANCE_NONE = 0 enum InstanceType -
const INSTANCE_MESH = 1 enum InstanceType -
const INSTANCE_MULTIMESH = 2 enum InstanceType -
const INSTANCE_PARTICLES = 3 enum InstanceType -
const INSTANCE_PARTICLES_COLLISION = 4 enum InstanceType -
const INSTANCE_LIGHT = 5 enum InstanceType -
const INSTANCE_REFLECTION_PROBE = 6 enum InstanceType -
const INSTANCE_DECAL = 7 enum InstanceType -
const INSTANCE_VOXEL_GI = 8 enum InstanceType -
const INSTANCE_LIGHTMAP = 9 enum InstanceType -
const INSTANCE_OCCLUDER = 10 enum InstanceType -
const INSTANCE_VISIBLITY_NOTIFIER = 11 enum InstanceType -
const INSTANCE_FOG_VOLUME = 12 enum InstanceType -
const INSTANCE_MAX = 13 enum InstanceType -
const INSTANCE_GEOMETRY_MASK = 14 enum InstanceType -
const INSTANCE_FLAG_USE_BAKED_LIGHT = 0 enum InstanceFlags -
const INSTANCE_FLAG_USE_DYNAMIC_GI = 1 enum InstanceFlags -
const INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE = 2 enum InstanceFlags -
const INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING = 3 enum InstanceFlags -
const INSTANCE_FLAG_MAX = 4 enum InstanceFlags -
const SHADOW_CASTING_SETTING_OFF = 0 enum ShadowCastingSetting -
const SHADOW_CASTING_SETTING_ON = 1 enum ShadowCastingSetting -
const SHADOW_CASTING_SETTING_DOUBLE_SIDED = 2 enum ShadowCastingSetting -
const SHADOW_CASTING_SETTING_SHADOWS_ONLY = 3 enum ShadowCastingSetting -
const VISIBILITY_RANGE_FADE_DISABLED = 0 enum VisibilityRangeFadeMode -
const VISIBILITY_RANGE_FADE_SELF = 1 enum VisibilityRangeFadeMode -
const VISIBILITY_RANGE_FADE_DEPENDENCIES = 2 enum VisibilityRangeFadeMode -
const BAKE_CHANNEL_ALBEDO_ALPHA = 0 enum BakeChannels -
const BAKE_CHANNEL_NORMAL = 1 enum BakeChannels -
const BAKE_CHANNEL_ORM = 2 enum BakeChannels -
const BAKE_CHANNEL_EMISSION = 3 enum BakeChannels -
const CANVAS_TEXTURE_CHANNEL_DIFFUSE = 0 enum CanvasTextureChannel -
const CANVAS_TEXTURE_CHANNEL_NORMAL = 1 enum CanvasTextureChannel -
const CANVAS_TEXTURE_CHANNEL_SPECULAR = 2 enum CanvasTextureChannel -
const NINE_PATCH_STRETCH = 0 enum NinePatchAxisMode -
const NINE_PATCH_TILE = 1 enum NinePatchAxisMode -
const NINE_PATCH_TILE_FIT = 2 enum NinePatchAxisMode -
const CANVAS_ITEM_TEXTURE_FILTER_DEFAULT = 0 enum CanvasItemTextureFilter -
const CANVAS_ITEM_TEXTURE_FILTER_NEAREST = 1 enum CanvasItemTextureFilter -
const CANVAS_ITEM_TEXTURE_FILTER_LINEAR = 2 enum CanvasItemTextureFilter -
const CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS = 3 enum CanvasItemTextureFilter -
const CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS = 4 enum CanvasItemTextureFilter -
const CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC = 5 enum CanvasItemTextureFilter -
const CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC = 6 enum CanvasItemTextureFilter -
const CANVAS_ITEM_TEXTURE_FILTER_MAX = 7 enum CanvasItemTextureFilter -
const CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT = 0 enum CanvasItemTextureRepeat -
const CANVAS_ITEM_TEXTURE_REPEAT_DISABLED = 1 enum CanvasItemTextureRepeat -
const CANVAS_ITEM_TEXTURE_REPEAT_ENABLED = 2 enum CanvasItemTextureRepeat -
const CANVAS_ITEM_TEXTURE_REPEAT_MIRROR = 3 enum CanvasItemTextureRepeat -
const CANVAS_ITEM_TEXTURE_REPEAT_MAX = 4 enum CanvasItemTextureRepeat -
const CANVAS_GROUP_MODE_DISABLED = 0 enum CanvasGroupMode -
const CANVAS_GROUP_MODE_CLIP_ONLY = 1 enum CanvasGroupMode -
const CANVAS_GROUP_MODE_CLIP_AND_DRAW = 2 enum CanvasGroupMode -
const CANVAS_GROUP_MODE_TRANSPARENT = 3 enum CanvasGroupMode -
const CANVAS_LIGHT_MODE_POINT = 0 enum CanvasLightMode -
const CANVAS_LIGHT_MODE_DIRECTIONAL = 1 enum CanvasLightMode -
const CANVAS_LIGHT_BLEND_MODE_ADD = 0 enum CanvasLightBlendMode -
const CANVAS_LIGHT_BLEND_MODE_SUB = 1 enum CanvasLightBlendMode -
const CANVAS_LIGHT_BLEND_MODE_MIX = 2 enum CanvasLightBlendMode -
const CANVAS_LIGHT_FILTER_NONE = 0 enum CanvasLightShadowFilter -
const CANVAS_LIGHT_FILTER_PCF5 = 1 enum CanvasLightShadowFilter -
const CANVAS_LIGHT_FILTER_PCF13 = 2 enum CanvasLightShadowFilter -
const CANVAS_LIGHT_FILTER_MAX = 3 enum CanvasLightShadowFilter -
const CANVAS_OCCLUDER_POLYGON_CULL_DISABLED = 0 enum CanvasOccluderPolygonCullMode -
const CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE = 1 enum CanvasOccluderPolygonCullMode -
const CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE = 2 enum CanvasOccluderPolygonCullMode -
const GLOBAL_VAR_TYPE_BOOL = 0 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_BVEC2 = 1 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_BVEC3 = 2 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_BVEC4 = 3 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_INT = 4 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_IVEC2 = 5 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_IVEC3 = 6 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_IVEC4 = 7 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_RECT2I = 8 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_UINT = 9 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_UVEC2 = 10 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_UVEC3 = 11 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_UVEC4 = 12 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_FLOAT = 13 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_VEC2 = 14 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_VEC3 = 15 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_VEC4 = 16 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_COLOR = 17 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_RECT2 = 18 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_MAT2 = 19 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_MAT3 = 20 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_MAT4 = 21 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_TRANSFORM_2D = 22 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_TRANSFORM = 23 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_SAMPLER2D = 24 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_SAMPLER2DARRAY = 25 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_SAMPLER3D = 26 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_SAMPLERCUBE = 27 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_SAMPLEREXT = 28 enum GlobalShaderParameterType -
const GLOBAL_VAR_TYPE_MAX = 29 enum GlobalShaderParameterType -
const RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME = 0 enum RenderingInfo -
const RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME = 1 enum RenderingInfo -
const RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME = 2 enum RenderingInfo -
const RENDERING_INFO_TEXTURE_MEM_USED = 3 enum RenderingInfo -
const RENDERING_INFO_BUFFER_MEM_USED = 4 enum RenderingInfo -
const RENDERING_INFO_VIDEO_MEM_USED = 5 enum RenderingInfo -
const RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS = 6 enum RenderingInfo -
const RENDERING_INFO_PIPELINE_COMPILATIONS_MESH = 7 enum RenderingInfo -
const RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE = 8 enum RenderingInfo -
const RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW = 9 enum RenderingInfo -
const RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION = 10 enum RenderingInfo -
const PIPELINE_SOURCE_CANVAS = 0 enum PipelineSource -
const PIPELINE_SOURCE_MESH = 1 enum PipelineSource -
const PIPELINE_SOURCE_SURFACE = 2 enum PipelineSource -
const PIPELINE_SOURCE_DRAW = 3 enum PipelineSource -
const PIPELINE_SOURCE_SPECIALIZATION = 4 enum PipelineSource -
const PIPELINE_SOURCE_MAX = 5 enum PipelineSource -
const FEATURE_SHADERS = 0 enum FeaturesDeprecated -
const FEATURE_MULTITHREADED = 1 enum FeaturesDeprecated -
enum TextureType -
enum TextureLayeredType -
enum CubeMapLayer -
enum ShaderMode -
enum ArrayType -
enum ArrayCustomFormat -
enum ArrayFormat -
enum PrimitiveType -
enum BlendShapeMode -
enum MultimeshTransformFormat -
enum MultimeshPhysicsInterpolationQuality -
enum LightProjectorFilter -
enum LightType -
enum LightParam -
enum LightBakeMode -
enum LightOmniShadowMode -
enum LightDirectionalShadowMode -
enum LightDirectionalSkyMode -
enum ShadowQuality -
enum ReflectionProbeUpdateMode -
enum ReflectionProbeAmbientMode -
enum DecalTexture -
enum DecalFilter -
enum VoxelGIQuality -
enum ParticlesMode -
enum ParticlesTransformAlign -
enum ParticlesDrawOrder -
enum ParticlesCollisionType -
enum ParticlesCollisionHeightfieldResolution -
enum FogVolumeShape -
enum ViewportScaling3DMode -
enum ViewportUpdateMode -
enum ViewportClearMode -
enum ViewportEnvironmentMode -
enum ViewportSDFOversize -
enum ViewportSDFScale -
enum ViewportMSAA -
enum ViewportAnisotropicFiltering -
enum ViewportScreenSpaceAA -
enum ViewportOcclusionCullingBuildQuality -
enum ViewportRenderInfo -
enum ViewportRenderInfoType -
enum ViewportDebugDraw -
enum ViewportVRSMode -
enum ViewportVRSUpdateMode -
enum SkyMode -
enum CompositorEffectFlags -
enum CompositorEffectCallbackType -
enum EnvironmentBG -
enum EnvironmentAmbientSource -
enum EnvironmentReflectionSource -
enum EnvironmentGlowBlendMode -
enum EnvironmentFogMode -
enum EnvironmentToneMapper -
enum EnvironmentSSRRoughnessQuality -
enum EnvironmentSSAOQuality -
enum EnvironmentSSILQuality -
enum EnvironmentSDFGIYScale -
enum EnvironmentSDFGIRayCount -
enum EnvironmentSDFGIFramesToConverge -
enum EnvironmentSDFGIFramesToUpdateLight -
enum SubSurfaceScatteringQuality -
enum DOFBokehShape -
enum DOFBlurQuality -
enum InstanceType -
enum InstanceFlags -
enum ShadowCastingSetting -
enum VisibilityRangeFadeMode -
enum BakeChannels -
enum CanvasTextureChannel -
enum NinePatchAxisMode -
enum CanvasItemTextureFilter -
enum CanvasItemTextureRepeat -
enum CanvasGroupMode -
enum CanvasLightMode -
enum CanvasLightBlendMode -
enum CanvasLightShadowFilter -
enum CanvasOccluderPolygonCullMode -
enum GlobalShaderParameterType -
enum RenderingInfo -
enum PipelineSource -
enum Features -
signal frame_post_draw() -
signal frame_pre_draw()
RenderingServer #
core, not_builtin_classes, singleton
Server for anything visible.
The rendering server is the API backend for everything visible. The whole scene system mounts on it to display. The rendering server is completely opaque: the internals are entirely implementation-specific and cannot be accessed.
The rendering server can be used to bypass the scene/Node system entirely. This can improve performance in cases where the scene system is the bottleneck, but won't improve performance otherwise (for instance, if the GPU is already fully utilized).
Resources are created using the *_create functions. These functions return RIDs which are not references to the objects themselves, but opaque pointers towards these objects.
All objects are drawn to a viewport. You can use the Viewport attached to the SceneTree or you can create one yourself with viewport_create. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using viewport_set_scenario or viewport_attach_canvas.
Scenarios: In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any Node3D node with Node3D.get_world_3d. Otherwise, a scenario can be created with scenario_create.
Similarly, in 2D, a canvas is needed to draw all canvas items.
3D: In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using instance_set_base. The instance must also be attached to the scenario using instance_set_scenario in order to be visible. RenderingServer methods that don't have a prefix are usually 3D-specific (but not always).
2D: In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. 2D-specific RenderingServer methods generally start with canvas_*.
Headless mode: Starting the engine with the --headless command line argument disables all rendering and window management functions. Most functions from RenderingServer will return dummy values in this case.
Members #
var render_loop_enabled: bool#
If false, disables rendering completely, but the engine logic is still being processed. You can call force_draw to draw a frame even with rendering disabled.
Methods #
func bake_render_uv2(image_size: Vector2i) -> Image[]#
Bakes the material data of the Mesh passed in the base parameter with optional material_overrides to a set of Images of size image_size. Returns an array of Images containing material properties as specified in BakeChannels.
func call_on_render_thread(callable: Callable) -> void#
As the RenderingServer actual logic may run on an separate thread, accessing its internals from the main (or any other) thread will result in errors. To make it easier to run code that can safely access the rendering internals (such as RenderingDevice and similar RD classes), push a callable via this function so it will be executed on the render thread.
func camera_attributes_create() -> RID#
Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all camera_attributes_ RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is CameraAttributes.
func camera_attributes_set_auto_exposure(scale: float) -> void#
Sets the parameters to use with the auto-exposure effect. These parameters take on the same meaning as their counterparts in CameraAttributes and CameraAttributesPractical.
func camera_attributes_set_dof_blur(amount: float) -> void#
Sets the parameters to use with the DOF blur effect. These parameters take on the same meaning as their counterparts in CameraAttributesPractical.
func camera_attributes_set_dof_blur_bokeh_shape(shape: int enumRenderingServer.DOFBokehShape) -> void#
Sets the shape of the DOF bokeh pattern. Different shapes may be used to achieve artistic effect, or to meet performance targets. For more detail on available options see DOFBokehShape.
func camera_attributes_set_dof_blur_quality(use_jitter: bool) -> void#
Sets the quality level of the DOF blur effect to one of the options in DOFBlurQuality. use_jitter can be used to jitter samples taken during the blur pass to hide artifacts at the cost of looking more fuzzy.
func camera_attributes_set_exposure(normalization: float) -> void#
Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene.
The normalization factor can be calculated from exposure value (EV100) as follows:
func get_exposure_normalization(ev100: float):
return 1.0 / (pow(2.0, ev100) * 1.2)The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows:
func get_exposure(aperture: float, shutter_speed: float, sensitivity: float):
return log((aperture * aperture) / shutter_speed * (100.0 / sensitivity)) / log(2)func camera_create() -> RID#
Creates a 3D camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all camera_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent node is Camera3D.
func camera_set_camera_attributes(effects: RID) -> void#
Sets the camera_attributes created with camera_attributes_create to the given camera.
func camera_set_compositor(compositor: RID) -> void#
Sets the compositor used by this camera. Equivalent to Camera3D.compositor.
func camera_set_cull_mask(layers: int) -> void#
Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to Camera3D.cull_mask.
func camera_set_environment(env: RID) -> void#
Sets the environment used by this camera. Equivalent to Camera3D.environment.
func camera_set_frustum(z_far: float) -> void#
Sets camera to use frustum projection. This mode allows adjusting the offset argument to create "tilted frustum" effects.
func camera_set_orthogonal(z_far: float) -> void#
Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are.
func camera_set_perspective(z_far: float) -> void#
Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away.
func camera_set_transform(transform: Transform3D) -> void#
Sets Transform3D of camera.
func camera_set_use_vertical_aspect(enable: bool) -> void#
If true, preserves the horizontal aspect ratio which is equivalent to Camera3D.KEEP_WIDTH. If false, preserves the vertical aspect ratio which is equivalent to Camera3D.KEEP_HEIGHT.
func canvas_create() -> RID#
Creates a canvas and returns the assigned RID. It can be accessed with the RID that is returned. This RID will be used in all canvas_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
func canvas_item_add_animation_slice(offset: float = 0.0) -> void#
Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly.
func canvas_item_add_circle(antialiased: bool = false) -> void#
Draws a circle on the CanvasItem pointed to by the item RID. See also CanvasItem.draw_circle.
func canvas_item_add_clip_ignore(ignore: bool) -> void#
If ignore is true, ignore clipping on items drawn with this canvas item until this is called again with ignore set to false.
func canvas_item_add_lcd_texture_rect_region(modulate: Color) -> void#
See also CanvasItem.draw_lcd_texture_rect_region.
func canvas_item_add_line(antialiased: bool = false) -> void#
Draws a line on the CanvasItem pointed to by the item RID. See also CanvasItem.draw_line.
func canvas_item_add_mesh(texture: RID = RID()) -> void#
Draws a mesh created with mesh_create with given transform, modulate color, and texture. This is used internally by MeshInstance2D.
func canvas_item_add_msdf_texture_rect_region(scale: float = 1.0) -> void#
See also CanvasItem.draw_msdf_texture_rect_region.
func canvas_item_add_multiline(antialiased: bool = false) -> void#
Draws a 2D multiline on the CanvasItem pointed to by the item RID. See also CanvasItem.draw_multiline and CanvasItem.draw_multiline_colors.
func canvas_item_add_multimesh(texture: RID = RID()) -> void#
Draws a 2D MultiMesh on the CanvasItem pointed to by the item RID. See also CanvasItem.draw_multimesh.
func canvas_item_add_nine_patch(modulate: Color = Color(1, 1, 1, 1)) -> void#
Draws a nine-patch rectangle on the CanvasItem pointed to by the item RID.
func canvas_item_add_particles(texture: RID) -> void#
Draws particles on the CanvasItem pointed to by the item RID.
func canvas_item_add_polygon(texture: RID = RID()) -> void#
Draws a 2D polygon on the CanvasItem pointed to by the item RID. If you need more flexibility (such as being able to use bones), use canvas_item_add_triangle_array instead. See also CanvasItem.draw_polygon.
Note: If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with Geometry2D.triangulate_polygon and using CanvasItem.draw_mesh, CanvasItem.draw_multimesh, or canvas_item_add_triangle_array.
func canvas_item_add_polyline(antialiased: bool = false) -> void#
Draws a 2D polyline on the CanvasItem pointed to by the item RID. See also CanvasItem.draw_polyline and CanvasItem.draw_polyline_colors.
func canvas_item_add_primitive(texture: RID) -> void#
Draws a 2D primitive on the CanvasItem pointed to by the item RID. See also CanvasItem.draw_primitive.
func canvas_item_add_rect(antialiased: bool = false) -> void#
Draws a rectangle on the CanvasItem pointed to by the item RID. See also CanvasItem.draw_rect.
func canvas_item_add_set_transform(transform: Transform2D) -> void#
Sets a Transform2D that will be used to transform subsequent canvas item commands.
func canvas_item_add_texture_rect(transpose: bool = false) -> void#
Draws a 2D textured rectangle on the CanvasItem pointed to by the item RID. See also CanvasItem.draw_texture_rect and Texture2D.draw_rect.
func canvas_item_add_texture_rect_region(clip_uv: bool = true) -> void#
Draws the specified region of a 2D textured rectangle on the CanvasItem pointed to by the item RID. See also CanvasItem.draw_texture_rect_region and Texture2D.draw_rect_region.
func canvas_item_add_triangle_array(count: int = -1) -> void#
Draws a triangle array on the CanvasItem pointed to by the item RID. This is internally used by Line2D and StyleBoxFlat for rendering. canvas_item_add_triangle_array is highly flexible, but more complex to use than canvas_item_add_polygon.
Note: count is unused and can be left unspecified.
func canvas_item_attach_skeleton(skeleton: RID) -> void#
Attaches a skeleton to the CanvasItem. Removes the previous skeleton.
func canvas_item_clear(item: RID) -> void#
Clears the CanvasItem and removes all commands in it.
func canvas_item_create() -> RID#
Creates a new CanvasItem instance and returns its RID. It can be accessed with the RID that is returned. This RID will be used in all canvas_item_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent node is CanvasItem.
const func canvas_item_get_instance_shader_parameter(parameter: StringName) -> Variant#
Returns the value of the per-instance shader uniform from the specified canvas item instance. Equivalent to CanvasItem.get_instance_shader_parameter.
const func canvas_item_get_instance_shader_parameter_default_value(parameter: StringName) -> Variant#
Returns the default value of the per-instance shader uniform from the specified canvas item instance. Equivalent to CanvasItem.get_instance_shader_parameter.
const func canvas_item_get_instance_shader_parameter_list(instance: RID) -> Dictionary[]#
Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified canvas item instance.
The returned dictionary is in PropertyInfo format, with the keys name, class_name, type, hint, hint_string, and usage.
func canvas_item_reset_physics_interpolation(item: RID) -> void#
Prevents physics interpolation for the current physics tick.
This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location.
func canvas_item_set_canvas_group_mode(blur_mipmaps: bool = false) -> void#
Sets the canvas group mode used during 2D rendering for the canvas item specified by the item RID. For faster but more limited clipping, use canvas_item_set_clip instead.
Note: The equivalent node functionality is found in CanvasGroup and CanvasItem.clip_children.
func canvas_item_set_clip(clip: bool) -> void#
If clip is true, makes the canvas item specified by the item RID not draw anything outside of its rect's coordinates. This clipping is fast, but works only with axis-aligned rectangles. This means that rotation is ignored by the clipping rectangle. For more advanced clipping shapes, use canvas_item_set_canvas_group_mode instead.
Note: The equivalent node functionality is found in Label.clip_text, RichTextLabel (always enabled) and more.
func canvas_item_set_copy_to_backbuffer(rect: Rect2) -> void#
Sets the CanvasItem to copy a rect to the backbuffer.
func canvas_item_set_custom_rect(rect: Rect2 = Rect2(0, 0, 0, 0)) -> void#
If use_custom_rect is true, sets the custom visibility rectangle (used for culling) to rect for the canvas item specified by item. Setting a custom visibility rect can reduce CPU load when drawing lots of 2D instances. If use_custom_rect is false, automatically computes a visibility rectangle based on the canvas item's draw commands.
func canvas_item_set_default_texture_filter(filter: int enumRenderingServer.CanvasItemTextureFilter) -> void#
Sets the default texture filter mode for the canvas item specified by the item RID. Equivalent to CanvasItem.texture_filter.
func canvas_item_set_default_texture_repeat(repeat: int enumRenderingServer.CanvasItemTextureRepeat) -> void#
Sets the default texture repeat mode for the canvas item specified by the item RID. Equivalent to CanvasItem.texture_repeat.
func canvas_item_set_distance_field_mode(enabled: bool) -> void#
If enabled is true, enables multichannel signed distance field rendering mode for the canvas item specified by the item RID. This is meant to be used for font rendering, or with specially generated images using msdfgen.
func canvas_item_set_draw_behind_parent(enabled: bool) -> void#
If enabled is true, draws the canvas item specified by the item RID behind its parent. Equivalent to CanvasItem.show_behind_parent.
func canvas_item_set_draw_index(index: int) -> void#
Sets the index for the CanvasItem.
func canvas_item_set_instance_shader_parameter(value: Variant) -> void#
Sets the per-instance shader uniform on the specified canvas item instance. Equivalent to CanvasItem.set_instance_shader_parameter.
func canvas_item_set_interpolated(interpolated: bool) -> void#
If interpolated is true, turns on physics interpolation for the canvas item.
func canvas_item_set_light_mask(mask: int) -> void#
Sets the light mask for the canvas item specified by the item RID. Equivalent to CanvasItem.light_mask.
func canvas_item_set_material(material: RID) -> void#
Sets a new material to the canvas item specified by the item RID. Equivalent to CanvasItem.material.
func canvas_item_set_modulate(color: Color) -> void#
Multiplies the color of the canvas item specified by the item RID, while affecting its children. See also canvas_item_set_self_modulate. Equivalent to CanvasItem.modulate.
func canvas_item_set_parent(parent: RID) -> void#
Sets a parent CanvasItem to the CanvasItem. The item will inherit transform, modulation and visibility from its parent, like CanvasItem nodes in the scene tree.
func canvas_item_set_self_modulate(color: Color) -> void#
Multiplies the color of the canvas item specified by the item RID, without affecting its children. See also canvas_item_set_modulate. Equivalent to CanvasItem.self_modulate.
func canvas_item_set_sort_children_by_y(enabled: bool) -> void#
If enabled is true, child nodes with the lowest Y position are drawn before those with a higher Y position. Y-sorting only affects children that inherit from the canvas item specified by the item RID, not the canvas item itself. Equivalent to CanvasItem.y_sort_enabled.
func canvas_item_set_transform(transform: Transform2D) -> void#
Sets the transform of the canvas item specified by the item RID. This affects where and how the item will be drawn. Child canvas items' transforms are multiplied by their parent's transform. Equivalent to Node2D.transform.
func canvas_item_set_use_parent_material(enabled: bool) -> void#
Sets if the CanvasItem uses its parent's material.
func canvas_item_set_visibility_layer(visibility_layer: int) -> void#
Sets the rendering visibility layer associated with this CanvasItem. Only Viewport nodes with a matching rendering mask will render this CanvasItem.
func canvas_item_set_visibility_notifier(exit_callable: Callable) -> void#
Sets the given CanvasItem as visibility notifier. area defines the area of detecting visibility. enter_callable is called when the CanvasItem enters the screen, exit_callable is called when the CanvasItem exits the screen. If enable is false, the item will no longer function as notifier.
This method can be used to manually mimic VisibleOnScreenNotifier2D.
func canvas_item_set_visible(visible: bool) -> void#
Sets the visibility of the CanvasItem.
func canvas_item_set_z_as_relative_to_parent(enabled: bool) -> void#
If this is enabled, the Z index of the parent will be added to the children's Z index.
func canvas_item_set_z_index(z_index: int) -> void#
Sets the CanvasItem's Z index, i.e. its draw order (lower indexes are drawn first).
func canvas_item_transform_physics_interpolation(transform: Transform2D) -> void#
Transforms both the current and previous stored transform for a canvas item.
This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.
func canvas_light_attach_to_canvas(canvas: RID) -> void#
Attaches the canvas light to the canvas. Removes it from its previous canvas.
func canvas_light_create() -> RID#
Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_light_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent node is Light2D.
func canvas_light_occluder_attach_to_canvas(canvas: RID) -> void#
Attaches a light occluder to the canvas. Removes it from its previous canvas.
func canvas_light_occluder_create() -> RID#
Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_light_occluder_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent node is LightOccluder2D.
func canvas_light_occluder_reset_physics_interpolation(occluder: RID) -> void#
Prevents physics interpolation for the current physics tick.
This is useful when moving an occluder to a new location, to give an instantaneous change rather than interpolation from the previous location.
func canvas_light_occluder_set_as_sdf_collision(enable: bool) -> void#
func canvas_light_occluder_set_enabled(enabled: bool) -> void#
Enables or disables light occluder.
func canvas_light_occluder_set_interpolated(interpolated: bool) -> void#
If interpolated is true, turns on physics interpolation for the light occluder.
func canvas_light_occluder_set_light_mask(mask: int) -> void#
The light mask. See LightOccluder2D for more information on light masks.
func canvas_light_occluder_set_polygon(polygon: RID) -> void#
Sets a light occluder's polygon.
func canvas_light_occluder_set_transform(transform: Transform2D) -> void#
Sets a light occluder's Transform2D.
func canvas_light_occluder_transform_physics_interpolation(transform: Transform2D) -> void#
Transforms both the current and previous stored transform for a light occluder.
This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.
func canvas_light_reset_physics_interpolation(light: RID) -> void#
Prevents physics interpolation for the current physics tick.
This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location.
func canvas_light_set_blend_mode(mode: int enumRenderingServer.CanvasLightBlendMode) -> void#
Sets the blend mode for the given canvas light. See CanvasLightBlendMode for options. Equivalent to Light2D.blend_mode.
func canvas_light_set_color(color: Color) -> void#
Sets the color for a light.
func canvas_light_set_enabled(enabled: bool) -> void#
Enables or disables a canvas light.
func canvas_light_set_energy(energy: float) -> void#
Sets a canvas light's energy.
func canvas_light_set_height(height: float) -> void#
Sets a canvas light's height.
func canvas_light_set_interpolated(interpolated: bool) -> void#
If interpolated is true, turns on physics interpolation for the canvas light.
func canvas_light_set_item_cull_mask(mask: int) -> void#
The light mask. See LightOccluder2D for more information on light masks.
func canvas_light_set_item_shadow_cull_mask(mask: int) -> void#
The binary mask used to determine which layers this canvas light's shadows affects. See LightOccluder2D for more information on light masks.
func canvas_light_set_layer_range(max_layer: int) -> void#
The layer range that gets rendered with this light.
func canvas_light_set_mode(mode: int enumRenderingServer.CanvasLightMode) -> void#
The mode of the light, see CanvasLightMode constants.
func canvas_light_set_shadow_color(color: Color) -> void#
Sets the color of the canvas light's shadow.
func canvas_light_set_shadow_enabled(enabled: bool) -> void#
Enables or disables the canvas light's shadow.
func canvas_light_set_shadow_filter(filter: int enumRenderingServer.CanvasLightShadowFilter) -> void#
Sets the canvas light's shadow's filter, see CanvasLightShadowFilter constants.
func canvas_light_set_shadow_smooth(smooth: float) -> void#
Smoothens the shadow. The lower, the smoother.
func canvas_light_set_texture(texture: RID) -> void#
Sets the texture to be used by a PointLight2D. Equivalent to PointLight2D.texture.
func canvas_light_set_texture_offset(offset: Vector2) -> void#
Sets the offset of a PointLight2D's texture. Equivalent to PointLight2D.offset.
func canvas_light_set_texture_scale(scale: float) -> void#
Sets the scale factor of a PointLight2D's texture. Equivalent to PointLight2D.texture_scale.
func canvas_light_set_transform(transform: Transform2D) -> void#
Sets the canvas light's Transform2D.
func canvas_light_set_z_range(max_z: int) -> void#
Sets the Z range of objects that will be affected by this light. Equivalent to Light2D.range_z_min and Light2D.range_z_max.
func canvas_light_transform_physics_interpolation(transform: Transform2D) -> void#
Transforms both the current and previous stored transform for a canvas light.
This allows transforming a light without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.
func canvas_occluder_polygon_create() -> RID#
Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_occluder_polygon_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is OccluderPolygon2D.
func canvas_occluder_polygon_set_cull_mode(mode: int enumRenderingServer.CanvasOccluderPolygonCullMode) -> void#
Sets an occluder polygons cull mode. See CanvasOccluderPolygonCullMode constants.
func canvas_occluder_polygon_set_shape(closed: bool) -> void#
Sets the shape of the occluder polygon.
func canvas_set_disable_scale(disable: bool) -> void#
func canvas_set_item_mirroring(mirroring: Vector2) -> void#
A copy of the canvas item will be drawn with a local offset of the mirroring.
Note: This is equivalent to calling canvas_set_item_repeat like canvas_set_item_repeat(item, mirroring, 1), with an additional check ensuring canvas is a parent of item.
func canvas_set_item_repeat(repeat_times: int) -> void#
A copy of the canvas item will be drawn with a local offset of the repeat_size by the number of times of the repeat_times. As the repeat_times increases, the copies will spread away from the origin texture.
func canvas_set_modulate(color: Color) -> void#
Modulates all colors in the given canvas.
func canvas_set_shadow_texture_size(size: int) -> void#
Sets the ProjectSettings.rendering/2d/shadow_atlas/size to use for Light2D shadow rendering (in pixels). The value is rounded up to the nearest power of 2.
func canvas_texture_create() -> RID#
Creates a canvas texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_texture_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method. See also texture_2d_create.
Note: The equivalent resource is CanvasTexture and is only meant to be used in 2D rendering, not 3D.
func canvas_texture_set_channel(texture: RID) -> void#
Sets the channel's texture for the canvas texture specified by the canvas_texture RID. Equivalent to CanvasTexture.diffuse_texture, CanvasTexture.normal_texture and CanvasTexture.specular_texture.
func canvas_texture_set_shading_parameters(shininess: float) -> void#
Sets the base_color and shininess to use for the canvas texture specified by the canvas_texture RID. Equivalent to CanvasTexture.specular_color and CanvasTexture.specular_shininess.
func canvas_texture_set_texture_filter(filter: int enumRenderingServer.CanvasItemTextureFilter) -> void#
Sets the texture filter mode to use for the canvas texture specified by the canvas_texture RID.
func canvas_texture_set_texture_repeat(repeat: int enumRenderingServer.CanvasItemTextureRepeat) -> void#
Sets the texture repeat mode to use for the canvas texture specified by the canvas_texture RID.
func compositor_create() -> RID#
Creates a new compositor and adds it to the RenderingServer. It can be accessed with the RID that is returned.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
func compositor_effect_create() -> RID#
Creates a new rendering effect and adds it to the RenderingServer. It can be accessed with the RID that is returned.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
func compositor_effect_set_callback(callback: Callable) -> void#
Sets the callback type (callback_type) and callback method(callback) for this rendering effect.
func compositor_effect_set_enabled(enabled: bool) -> void#
Enables/disables this rendering effect.
func compositor_effect_set_flag(set: bool) -> void#
Sets the flag (flag) for this rendering effect to true or false (set).
func compositor_set_compositor_effects(effects: RID[]) -> void#
Sets the compositor effects for the specified compositor RID. effects should be an array containing RIDs created with compositor_effect_create.
const func create_local_rendering_device() -> RenderingDevice#
Creates a RenderingDevice that can be used to do draw and compute operations on a separate thread. Cannot draw to the screen nor share data with the global RenderingDevice.
Note: When using the OpenGL rendering driver or when running in headless mode, this function always returns null.
func debug_canvas_item_get_rect(item: RID) -> Rect2#
Returns the bounding rectangle for a canvas item in local space, as calculated by the renderer. This bound is used internally for culling.
Warning: This function is intended for debugging in the editor, and will pass through and return a zero Rect2 in exported projects.
func decal_create() -> RID#
Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all decal_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
To place in a scene, attach this decal to an instance using instance_set_base using the returned RID.
Note: The equivalent node is Decal.
func decal_set_albedo_mix(albedo_mix: float) -> void#
Sets the albedo_mix in the decal specified by the decal RID. Equivalent to Decal.albedo_mix.
func decal_set_cull_mask(mask: int) -> void#
Sets the cull mask in the decal specified by the decal RID. Equivalent to Decal.cull_mask.
func decal_set_distance_fade(length: float) -> void#
Sets the distance fade parameters in the decal specified by the decal RID. Equivalent to Decal.distance_fade_enabled, Decal.distance_fade_begin and Decal.distance_fade_length.
func decal_set_emission_energy(energy: float) -> void#
Sets the emission energy in the decal specified by the decal RID. Equivalent to Decal.emission_energy.
func decal_set_fade(below: float) -> void#
Sets the upper fade (above) and lower fade (below) in the decal specified by the decal RID. Equivalent to Decal.upper_fade and Decal.lower_fade.
func decal_set_modulate(color: Color) -> void#
Sets the color multiplier in the decal specified by the decal RID to color. Equivalent to Decal.modulate.
func decal_set_normal_fade(fade: float) -> void#
Sets the normal fade in the decal specified by the decal RID. Equivalent to Decal.normal_fade.
func decal_set_size(size: Vector3) -> void#
Sets the size of the decal specified by the decal RID. Equivalent to Decal.size.
func decal_set_texture(texture: RID) -> void#
Sets the texture in the given texture type slot for the specified decal. Equivalent to Decal.set_texture.
func decals_set_filter(filter: int enumRenderingServer.DecalFilter) -> void#
Sets the texture filter mode to use when rendering decals. This parameter is global and cannot be set on a per-decal basis.
func directional_light_create() -> RID#
Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
To place in a scene, attach this directional light to an instance using instance_set_base using the returned RID.
Note: The equivalent node is DirectionalLight3D.
func directional_shadow_atlas_set_size(is_16bits: bool) -> void#
Sets the size of the directional light shadows in 3D. See also ProjectSettings.rendering/lights_and_shadows/directional_shadow/size. This parameter is global and cannot be set on a per-viewport basis.
func directional_soft_shadow_filter_set_quality(quality: int enumRenderingServer.ShadowQuality) -> void#
Sets the filter quality for directional light shadows in 3D. See also ProjectSettings.rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality. This parameter is global and cannot be set on a per-viewport basis.
func environment_bake_panorama(size: Vector2i) -> Image#
Generates and returns an Image containing the radiance map for the specified environment RID's sky. This supports built-in sky material and custom sky shaders. If bake_irradiance is true, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also sky_bake_panorama.
Note: The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor.
Note: size should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than Sky.radiance_size, as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map.
func environment_create() -> RID#
Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all environment_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is Environment.
func environment_glow_set_use_bicubic_upscale(enable: bool) -> void#
If enable is true, enables bicubic upscaling for glow which improves quality at the cost of performance. Equivalent to ProjectSettings.rendering/environment/glow/upscale_mode.
func environment_set_adjustment(color_correction: RID) -> void#
Sets the values to be used with the "adjustments" post-process effect. See Environment for more details.
func environment_set_ambient_light(reflection_source: int = 0 enumRenderingServer.EnvironmentReflectionSource) -> void#
Sets the values to be used for ambient light rendering. See Environment for more details.
func environment_set_background(bg: int enumRenderingServer.EnvironmentBG) -> void#
Sets the environment's background mode. Equivalent to Environment.background_mode.
func environment_set_bg_color(color: Color) -> void#
Color displayed for clear areas of the scene. Only effective if using the ENV_BG_COLOR background mode.
func environment_set_bg_energy(exposure_value: float) -> void#
Sets the intensity of the background color.
func environment_set_camera_id(id: int) -> void#
Sets the camera ID to be used as environment background.
func environment_set_canvas_max_layer(max_layer: int) -> void#
Sets the maximum layer to use if using Canvas background mode.
func environment_set_fog(fog_mode: int = 0 enumRenderingServer.EnvironmentFogMode) -> void#
Configures fog for the specified environment RID. See fog_* properties in Environment for more information.
func environment_set_glow(glow_map: RID) -> void#
Configures glow for the specified environment RID. See glow_* properties in Environment for more information.
func environment_set_sdfgi(probe_bias: float) -> void#
Configures signed distance field global illumination for the specified environment RID. See sdfgi_* properties in Environment for more information.
func environment_set_sdfgi_frames_to_converge(frames: int enumRenderingServer.EnvironmentSDFGIFramesToConverge) -> void#
Sets the number of frames to use for converging signed distance field global illumination. Equivalent to ProjectSettings.rendering/global_illumination/sdfgi/frames_to_converge.
func environment_set_sdfgi_frames_to_update_light(frames: int enumRenderingServer.EnvironmentSDFGIFramesToUpdateLight) -> void#
Sets the update speed for dynamic lights' indirect lighting when computing signed distance field global illumination. Equivalent to ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights.
func environment_set_sdfgi_ray_count(ray_count: int enumRenderingServer.EnvironmentSDFGIRayCount) -> void#
Sets the number of rays to throw per frame when computing signed distance field global illumination. Equivalent to ProjectSettings.rendering/global_illumination/sdfgi/probe_ray_count.
func environment_set_sky(sky: RID) -> void#
Sets the Sky to be used as the environment's background when using BGMode sky. Equivalent to Environment.sky.
func environment_set_sky_custom_fov(scale: float) -> void#
Sets a custom field of view for the background Sky. Equivalent to Environment.sky_custom_fov.
func environment_set_sky_orientation(orientation: Basis) -> void#
Sets the rotation of the background Sky expressed as a Basis. Equivalent to Environment.sky_rotation, where the rotation vector is used to construct the Basis.
func environment_set_ssao(ao_channel_affect: float) -> void#
Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See Environment for more details.
func environment_set_ssao_quality(fadeout_to: float) -> void#
Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See Environment for more details.
func environment_set_ssil_quality(fadeout_to: float) -> void#
Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See Environment for more details.
func environment_set_ssr(depth_tolerance: float) -> void#
Sets the variables to be used with the screen-space reflections (SSR) post-process effect. See Environment for more details.
func environment_set_ssr_roughness_quality(quality: int enumRenderingServer.EnvironmentSSRRoughnessQuality) -> void#
func environment_set_tonemap(white: float) -> void#
Sets the variables to be used with the "tonemap" post-process effect. See Environment for more details.
func environment_set_volumetric_fog(sky_affect: float) -> void#
Sets the variables to be used with the volumetric fog post-process effect. See Environment for more details.
func environment_set_volumetric_fog_filter_active(active: bool) -> void#
Enables filtering of the volumetric fog scattering buffer. This results in much smoother volumes with very few under-sampling artifacts.
func environment_set_volumetric_fog_volume_size(depth: int) -> void#
Sets the resolution of the volumetric fog's froxel buffer. size is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While depth is directly used to set the depth of the buffer.
func fog_volume_create() -> RID#
Creates a new fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all fog_volume_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent node is FogVolume.
func fog_volume_set_material(material: RID) -> void#
Sets the Material of the fog volume. Can be either a FogMaterial or a custom ShaderMaterial.
func fog_volume_set_shape(shape: int enumRenderingServer.FogVolumeShape) -> void#
Sets the shape of the fog volume to either RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID, RenderingServer.FOG_VOLUME_SHAPE_CONE, RenderingServer.FOG_VOLUME_SHAPE_CYLINDER, RenderingServer.FOG_VOLUME_SHAPE_BOX or RenderingServer.FOG_VOLUME_SHAPE_WORLD.
func fog_volume_set_size(size: Vector3) -> void#
Sets the size of the fog volume when shape is RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID, RenderingServer.FOG_VOLUME_SHAPE_CONE, RenderingServer.FOG_VOLUME_SHAPE_CYLINDER or RenderingServer.FOG_VOLUME_SHAPE_BOX.
func force_draw(frame_step: float = 0.0) -> void#
Forces redrawing of all viewports at once. Must be called from the main thread.
func force_sync() -> void#
Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost.
func free_rid(rid: RID) -> void#
Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingServer directly.
const func get_current_rendering_driver_name() -> String#
Returns the name of the current rendering driver. This can be vulkan, d3d12, metal, opengl3, opengl3_es, or opengl3_angle. See also get_current_rendering_method.
The rendering driver is determined by ProjectSettings.rendering/rendering_device/driver, the --rendering-driver command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware.
const func get_current_rendering_method() -> String#
Returns the name of the current rendering method. This can be forward_plus, mobile, or gl_compatibility. See also get_current_rendering_driver_name.
The rendering method is determined by ProjectSettings.rendering/renderer/rendering_method, the --rendering-method command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware.
func get_default_clear_color() -> Color#
Returns the default clear color which is used when a specific clear color has not been selected. See also set_default_clear_color.
const func get_frame_setup_time_cpu() -> float#
Returns the time taken to setup rendering on the CPU in milliseconds. This value is shared across all viewports and does not require viewport_set_measure_render_time to be enabled on a viewport to be queried. See also viewport_get_measured_render_time_cpu.
const func get_rendering_device() -> RenderingDevice#
Returns the global RenderingDevice.
Note: When using the OpenGL rendering driver or when running in headless mode, this function always returns null.
func get_rendering_info(info: int enumRenderingServer.RenderingInfo) -> int#
Returns a statistic about the rendering engine which can be used for performance profiling. See RenderingServer.RenderingInfo for a list of values that can be queried. See also viewport_get_render_info, which returns information specific to a viewport.
Note: Only 3D rendering is currently taken into account by some of these values, such as the number of draw calls.
Note: Rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, get_rendering_info returns 0. To print rendering information in _ready() successfully, use the following:
func _ready():
for _i in 2:
await get_tree().process_frame
print(RenderingServer.get_rendering_info(RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME))const func get_shader_parameter_list(shader: RID) -> Dictionary[]#
Returns the parameters of a shader.
func get_test_cube() -> RID#
Returns the RID of the test cube. This mesh will be created and returned on the first call to get_test_cube, then it will be cached for subsequent calls. See also make_sphere_mesh.
func get_test_texture() -> RID#
Returns the RID of a 256×256 texture with a testing pattern on it (in Image.FORMAT_RGB8 format). This texture will be created and returned on the first call to get_test_texture, then it will be cached for subsequent calls. See also get_white_texture.
Example: Get the test texture and apply it to a Sprite2D node:
var texture_rid = RenderingServer.get_test_texture()
var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid))
$Sprite2D.texture = textureconst func get_video_adapter_api_version() -> String#
Returns the version of the graphics video adapter currently in use (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. See also OS.get_video_adapter_driver_info.
Note: When running a headless or server binary, this function returns an empty string.
const func get_video_adapter_name() -> String#
Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2").
Note: When running a headless or server binary, this function returns an empty string.
Note: On the web platform, some browsers such as Firefox may report a different, fixed GPU name such as "GeForce GTX 980" (regardless of the user's actual GPU model). This is done to make fingerprinting more difficult.
const func get_video_adapter_type() -> intRenderingDevice.DeviceType#
Returns the type of the video adapter. Since dedicated graphics cards from a given generation will usually be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings.
Note: When using the OpenGL rendering driver or when running in headless mode, this function always returns RenderingDevice.DEVICE_TYPE_OTHER.
const func get_video_adapter_vendor() -> String#
Returns the vendor of the video adapter (e.g. "NVIDIA Corporation").
Note: When running a headless or server binary, this function returns an empty string.
func get_white_texture() -> RID#
Returns the ID of a 4×4 white texture (in Image.FORMAT_RGB8 format). This texture will be created and returned on the first call to get_white_texture, then it will be cached for subsequent calls. See also get_test_texture.
Example: Get the white texture and apply it to a Sprite2D node:
var texture_rid = RenderingServer.get_white_texture()
var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid))
$Sprite2D.texture = texturefunc gi_set_use_half_resolution(half_resolution: bool) -> void#
If half_resolution is true, renders VoxelGI and SDFGI (Environment.sdfgi_enabled) buffers at halved resolution on each axis (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. LightmapGI rendering is not affected by this setting. Equivalent to ProjectSettings.rendering/global_illumination/gi/use_half_resolution.
func global_shader_parameter_add(default_value: Variant) -> void#
Creates a new global shader uniform.
Note: Global shader parameter names are case-sensitive.
const func global_shader_parameter_get(name: StringName) -> Variant#
Returns the value of the global shader uniform specified by name.
Note: global_shader_parameter_get has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters.
const func global_shader_parameter_get_list() -> StringName[]#
Returns the list of global shader uniform names.
Note: global_shader_parameter_get has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters.
const func global_shader_parameter_get_type(name: StringName) -> intRenderingServer.GlobalShaderParameterType#
Returns the type associated to the global shader uniform specified by name.
Note: global_shader_parameter_get has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters.
func global_shader_parameter_remove(name: StringName) -> void#
Removes the global shader uniform specified by name.
func global_shader_parameter_set(value: Variant) -> void#
Sets the global shader uniform name to value.
func global_shader_parameter_set_override(value: Variant) -> void#
Overrides the global shader uniform name with value. Equivalent to the ShaderGlobalsOverride node.
const func has_changed() -> bool#
Returns true if changes have been made to the RenderingServer's data. force_draw is usually called if this happens.
const func has_feature(feature: int enumRenderingServer.Features) -> bool#
This method does nothing and always returns false.
const func has_os_feature(feature: String) -> bool#
Returns true if the OS supports a certain feature. Features might be s3tc, etc, and etc2.
func instance_attach_object_instance_id(id: int) -> void#
Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with instances_cull_aabb, instances_cull_convex, and instances_cull_ray.
func instance_attach_skeleton(skeleton: RID) -> void#
Attaches a skeleton to an instance. Removes the previous skeleton from the instance.
func instance_create() -> RID#
Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all instance_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, reflection probes and decals need to be associated with an instance to be visible in the scenario using instance_set_base.
Note: The equivalent node is VisualInstance3D.
func instance_create2(scenario: RID) -> RID#
Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all instance_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method. This is a shorthand for using instance_create and setting the base and scenario manually.
const func instance_geometry_get_shader_parameter(parameter: StringName) -> Variant#
Returns the value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to GeometryInstance3D.get_instance_shader_parameter.
Note: Per-instance shader parameter names are case-sensitive.
const func instance_geometry_get_shader_parameter_default_value(parameter: StringName) -> Variant#
Returns the default value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to GeometryInstance3D.get_instance_shader_parameter.
const func instance_geometry_get_shader_parameter_list(instance: RID) -> Dictionary[]#
Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified 3D geometry instance. The returned dictionary is in PropertyInfo format, with the keys name, class_name, type, hint, hint_string and usage. Equivalent to GeometryInstance3D.get_instance_shader_parameter.
func instance_geometry_set_cast_shadows_setting(shadow_casting_setting: int enumRenderingServer.ShadowCastingSetting) -> void#
Sets the shadow casting setting to one of ShadowCastingSetting. Equivalent to GeometryInstance3D.cast_shadow.
func instance_geometry_set_flag(enabled: bool) -> void#
Sets the flag for a given InstanceFlags. See InstanceFlags for more details.
func instance_geometry_set_lightmap(lightmap_slice: int) -> void#
Sets the lightmap GI instance to use for the specified 3D geometry instance. The lightmap UV scale for the specified instance (equivalent to GeometryInstance3D.gi_lightmap_scale) and lightmap atlas slice must also be specified.
func instance_geometry_set_lod_bias(lod_bias: float) -> void#
Sets the level of detail bias to use when rendering the specified 3D geometry instance. Higher values result in higher detail from further away. Equivalent to GeometryInstance3D.lod_bias.
func instance_geometry_set_material_overlay(material: RID) -> void#
Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to GeometryInstance3D.material_overlay.
func instance_geometry_set_material_override(material: RID) -> void#
Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to GeometryInstance3D.material_override.
func instance_geometry_set_shader_parameter(value: Variant) -> void#
Sets the per-instance shader uniform on the specified 3D geometry instance. Equivalent to GeometryInstance3D.set_instance_shader_parameter.
func instance_geometry_set_transparency(transparency: float) -> void#
Sets the transparency for the given geometry instance. Equivalent to GeometryInstance3D.transparency.
A transparency of 0.0 is fully opaque, while 1.0 is fully transparent. Values greater than 0.0 (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting transparency to a value greater than 0.0 (exclusive) will not disable shadow rendering.
In spatial shaders, 1.0 - transparency is set as the default value of the ALPHA built-in.
Note: transparency is clamped between 0.0 and 1.0, so this property cannot be used to make transparent materials more opaque than they originally are.
func instance_geometry_set_visibility_range(fade_mode: int enumRenderingServer.VisibilityRangeFadeMode) -> void#
Sets the visibility range values for the given geometry instance. Equivalent to GeometryInstance3D.visibility_range_begin and related properties.
func instance_reset_physics_interpolation(instance: RID) -> void#
Prevents physics interpolation for the current physics tick.
This is useful when moving an instance to a new location, to give an instantaneous change rather than interpolation from the previous location.
func instance_set_base(base: RID) -> void#
Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, particle system, reflection probe, decal, lightmap, voxel GI and visibility notifiers are all types that can be set as the base of an instance in order to be displayed in the scenario.
func instance_set_blend_shape_weight(weight: float) -> void#
Sets the weight for a given blend shape associated with this instance.
func instance_set_custom_aabb(aabb: AABB) -> void#
Sets a custom AABB to use when culling objects from the view frustum. Equivalent to setting GeometryInstance3D.custom_aabb.
func instance_set_extra_visibility_margin(margin: float) -> void#
Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to GeometryInstance3D.extra_cull_margin.
func instance_set_ignore_culling(enabled: bool) -> void#
If true, ignores both frustum and occlusion culling on the specified 3D geometry instance. This is not the same as GeometryInstance3D.ignore_occlusion_culling, which only ignores occlusion culling and leaves frustum culling intact.
func instance_set_interpolated(interpolated: bool) -> void#
Turns on and off physics interpolation for the instance.
func instance_set_layer_mask(mask: int) -> void#
Sets the render layers that this instance will be drawn to. Equivalent to VisualInstance3D.layers.
func instance_set_pivot_data(use_aabb_center: bool) -> void#
Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting.
func instance_set_scenario(scenario: RID) -> void#
Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in.
func instance_set_surface_override_material(material: RID) -> void#
Sets the override material of a specific surface. Equivalent to MeshInstance3D.set_surface_override_material.
func instance_set_transform(transform: Transform3D) -> void#
Sets the world space transform of the instance. Equivalent to Node3D.global_transform.
func instance_set_visibility_parent(parent: RID) -> void#
Sets the visibility parent for the given instance. Equivalent to Node3D.visibility_parent.
func instance_set_visible(visible: bool) -> void#
Sets whether an instance is drawn or not. Equivalent to Node3D.visible.
const func instances_cull_aabb(scenario: RID = RID()) -> PackedInt64Array#
Returns an array of object IDs intersecting with the provided AABB. Only 3D nodes that inherit from VisualInstance3D are considered, such as MeshInstance3D or DirectionalLight3D. Use @GlobalScope.instance_from_id to obtain the actual nodes. A scenario RID must be provided, which is available in the World3D you want to query. This forces an update for all resources queued to update.
Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
const func instances_cull_convex(scenario: RID = RID()) -> PackedInt64Array#
Returns an array of object IDs intersecting with the provided convex shape. Only 3D nodes that inherit from VisualInstance3D are considered, such as MeshInstance3D or DirectionalLight3D. Use @GlobalScope.instance_from_id to obtain the actual nodes. A scenario RID must be provided, which is available in the World3D you want to query. This forces an update for all resources queued to update.
Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
const func instances_cull_ray(scenario: RID = RID()) -> PackedInt64Array#
Returns an array of object IDs intersecting with the provided 3D ray. Only 3D nodes that inherit from VisualInstance3D are considered, such as MeshInstance3D or DirectionalLight3D. Use @GlobalScope.instance_from_id to obtain the actual nodes. A scenario RID must be provided, which is available in the World3D you want to query. This forces an update for all resources queued to update.
Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
func is_on_render_thread() -> bool#
Returns true if our code is currently executing on the rendering thread.
func light_directional_set_blend_splits(enable: bool) -> void#
If true, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to DirectionalLight3D.directional_shadow_blend_splits.
func light_directional_set_shadow_mode(mode: int enumRenderingServer.LightDirectionalShadowMode) -> void#
Sets the shadow mode for this directional light. Equivalent to DirectionalLight3D.directional_shadow_mode. See LightDirectionalShadowMode for options.
func light_directional_set_sky_mode(mode: int enumRenderingServer.LightDirectionalSkyMode) -> void#
If true, this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.
func light_omni_set_shadow_mode(mode: int enumRenderingServer.LightOmniShadowMode) -> void#
Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to OmniLight3D.omni_shadow_mode.
func light_projectors_set_filter(filter: int enumRenderingServer.LightProjectorFilter) -> void#
Sets the texture filter mode to use when rendering light projectors. This parameter is global and cannot be set on a per-light basis.
func light_set_bake_mode(bake_mode: int enumRenderingServer.LightBakeMode) -> void#
Sets the bake mode to use for the specified 3D light. Equivalent to Light3D.light_bake_mode.
func light_set_color(color: Color) -> void#
Sets the color of the light. Equivalent to Light3D.light_color.
func light_set_cull_mask(mask: int) -> void#
Sets the cull mask for this 3D light. Lights only affect objects in the selected layers. Equivalent to Light3D.light_cull_mask.
func light_set_distance_fade(length: float) -> void#
Sets the distance fade for this 3D light. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to Light3D.distance_fade_enabled, Light3D.distance_fade_begin, Light3D.distance_fade_shadow, and Light3D.distance_fade_length.
func light_set_max_sdfgi_cascade(cascade: int) -> void#
Sets the maximum SDFGI cascade in which the 3D light's indirect lighting is rendered. Higher values allow the light to be rendered in SDFGI further away from the camera.
func light_set_negative(enable: bool) -> void#
If true, the 3D light will subtract light instead of adding light. Equivalent to Light3D.light_negative.
func light_set_param(value: float) -> void#
Sets the specified 3D light parameter. See LightParam for options. Equivalent to Light3D.set_param.
func light_set_projector(texture: RID) -> void#
Sets the projector texture to use for the specified 3D light. Equivalent to Light3D.light_projector.
func light_set_reverse_cull_face_mode(enabled: bool) -> void#
If true, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with instance_geometry_set_cast_shadows_setting. Equivalent to Light3D.shadow_reverse_cull_face.
func light_set_shadow(enabled: bool) -> void#
If true, light will cast shadows. Equivalent to Light3D.shadow_enabled.
func light_set_shadow_caster_mask(mask: int) -> void#
Sets the shadow caster mask for this 3D light. Shadows will only be cast using objects in the selected layers. Equivalent to Light3D.shadow_caster_mask.
func lightmap_create() -> RID#
Creates a new lightmap global illumination instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all lightmap_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent node is LightmapGI.
const func lightmap_get_probe_capture_bsp_tree(lightmap: RID) -> PackedInt32Array#
const func lightmap_get_probe_capture_points(lightmap: RID) -> PackedVector3Array#
const func lightmap_get_probe_capture_sh(lightmap: RID) -> PackedColorArray#
const func lightmap_get_probe_capture_tetrahedra(lightmap: RID) -> PackedInt32Array#
func lightmap_set_baked_exposure_normalization(baked_exposure: float) -> void#
Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see camera_attributes_set_exposure.
func lightmap_set_probe_bounds(bounds: AABB) -> void#
func lightmap_set_probe_capture_data(bsp_tree: PackedInt32Array) -> void#
func lightmap_set_probe_capture_update_speed(speed: float) -> void#
func lightmap_set_probe_interior(interior: bool) -> void#
func lightmap_set_textures(uses_sh: bool) -> void#
Set the textures on the given lightmap GI instance to the texture array pointed to by the light RID. If the lightmap texture was baked with LightmapGI.directional set to true, then uses_sh must also be true.
func lightmaps_set_bicubic_filter(enable: bool) -> void#
Toggles whether a bicubic filter should be used when lightmaps are sampled. This smoothens their appearance at a performance cost.
func make_sphere_mesh(radius: float) -> RID#
Returns a mesh of a sphere with the given number of horizontal subdivisions, vertical subdivisions and radius. See also get_test_cube.
func material_create() -> RID#
Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all material_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is Material.
const func material_get_param(parameter: StringName) -> Variant#
Returns the value of a certain material's parameter.
func material_set_next_pass(next_material: RID) -> void#
Sets an object's next material.
func material_set_param(value: Variant) -> void#
Sets a material's parameter.
func material_set_render_priority(priority: int) -> void#
Sets a material's render priority.
func material_set_shader(shader: RID) -> void#
Sets a shader material's shader.
func mesh_add_surface(surface: Dictionary) -> void#
func mesh_add_surface_from_arrays(compress_format: int = 0 enumRenderingServer.ArrayFormat) -> void#
func mesh_clear(mesh: RID) -> void#
Removes all surfaces from a mesh.
func mesh_create() -> RID#
Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all mesh_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
To place in a scene, attach this mesh to an instance using instance_set_base using the returned RID.
Note: The equivalent resource is Mesh.
func mesh_create_from_surfaces(blend_shape_count: int = 0) -> RID#
const func mesh_get_blend_shape_count(mesh: RID) -> int#
Returns a mesh's blend shape count.
const func mesh_get_blend_shape_mode(mesh: RID) -> intRenderingServer.BlendShapeMode#
Returns a mesh's blend shape mode.
const func mesh_get_custom_aabb(mesh: RID) -> AABB#
Returns a mesh's custom aabb.
func mesh_get_surface(surface: int) -> Dictionary#
const func mesh_get_surface_count(mesh: RID) -> int#
Returns a mesh's number of surfaces.
func mesh_set_blend_shape_mode(mode: int enumRenderingServer.BlendShapeMode) -> void#
Sets a mesh's blend shape mode.
func mesh_set_custom_aabb(aabb: AABB) -> void#
Sets a mesh's custom aabb.
func mesh_set_shadow_mesh(shadow_mesh: RID) -> void#
const func mesh_surface_get_arrays(surface: int) -> Array#
Returns a mesh's surface's buffer arrays.
const func mesh_surface_get_blend_shape_arrays(surface: int) -> Array[]#
Returns a mesh's surface's arrays for blend shapes.
const func mesh_surface_get_format_attribute_stride(vertex_count: int) -> int#
Returns the stride of the attribute buffer for a mesh with given format.
const func mesh_surface_get_format_normal_tangent_stride(vertex_count: int) -> int#
Returns the stride of the combined normals and tangents for a mesh with given format. Note importantly that, while normals and tangents are in the vertex buffer with vertices, they are only interleaved with each other and so have a different stride than vertex positions.
const func mesh_surface_get_format_offset(array_index: int) -> int#
Returns the offset of a given attribute by array_index in the start of its respective buffer.
const func mesh_surface_get_format_skin_stride(vertex_count: int) -> int#
Returns the stride of the skin buffer for a mesh with given format.
const func mesh_surface_get_format_vertex_stride(vertex_count: int) -> int#
Returns the stride of the vertex positions for a mesh with given format. Note importantly that vertex positions are stored consecutively and are not interleaved with the other attributes in the vertex buffer (normals and tangents).
const func mesh_surface_get_material(surface: int) -> RID#
Returns a mesh's surface's material.
func mesh_surface_remove(surface: int) -> void#
Removes the surface at the given index from the Mesh, shifting surfaces with higher index down by one.
func mesh_surface_set_material(material: RID) -> void#
Sets a mesh's surface's material.
func mesh_surface_update_attribute_region(data: PackedByteArray) -> void#
func mesh_surface_update_skin_region(data: PackedByteArray) -> void#
func mesh_surface_update_vertex_region(data: PackedByteArray) -> void#
func multimesh_allocate_data(use_indirect: bool = false) -> void#
func multimesh_create() -> RID#
Creates a new multimesh on the RenderingServer and returns an RID handle. This RID will be used in all multimesh_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
To place in a scene, attach this multimesh to an instance using instance_set_base using the returned RID.
Note: The equivalent resource is MultiMesh.
const func multimesh_get_aabb(multimesh: RID) -> AABB#
Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh.
const func multimesh_get_buffer(multimesh: RID) -> PackedFloat32Array#
Returns the MultiMesh data (such as instance transforms, colors, etc.). See multimesh_set_buffer for details on the returned data.
Note: If the buffer is in the engine's internal cache, it will have to be fetched from GPU memory and possibly decompressed. This means multimesh_get_buffer is potentially a slow operation and should be avoided whenever possible.
const func multimesh_get_buffer_rd_rid(multimesh: RID) -> RID#
Returns the RenderingDevice RID handle of the MultiMesh, which can be used as any other buffer on the Rendering Device.
const func multimesh_get_command_buffer_rd_rid(multimesh: RID) -> RID#
Returns the RenderingDevice RID handle of the MultiMesh command buffer. This RID is only valid if use_indirect is set to true when allocating data through multimesh_allocate_data. It can be used to directly modify the instance count via buffer.
The data structure is dependent on both how many surfaces the mesh contains and whether it is indexed or not, the buffer has 5 integers in it, with the last unused if the mesh is not indexed.
Each of the values in the buffer correspond to these options:
[codeblock lang=text]
Indexed:
0 - indexCount;
1 - instanceCount;
2 - firstIndex;
3 - vertexOffset;
4 - firstInstance;
Non Indexed:
0 - vertexCount;
1 - instanceCount;
2 - firstVertex;
3 - firstInstance;
4 - unused;
const func multimesh_get_custom_aabb(multimesh: RID) -> AABB#
Returns the custom AABB defined for this MultiMesh resource.
const func multimesh_get_instance_count(multimesh: RID) -> int#
Returns the number of instances allocated for this multimesh.
const func multimesh_get_mesh(multimesh: RID) -> RID#
Returns the RID of the mesh that will be used in drawing this multimesh.
const func multimesh_get_visible_instances(multimesh: RID) -> int#
Returns the number of visible instances for this multimesh.
const func multimesh_instance_get_color(index: int) -> Color#
Returns the color by which the specified instance will be modulated.
const func multimesh_instance_get_custom_data(index: int) -> Color#
Returns the custom data associated with the specified instance.
const func multimesh_instance_get_transform(index: int) -> Transform3D#
Returns the Transform3D of the specified instance.
const func multimesh_instance_get_transform_2d(index: int) -> Transform2D#
Returns the Transform2D of the specified instance. For use when the multimesh is set to use 2D transforms.
func multimesh_instance_reset_physics_interpolation(index: int) -> void#
Prevents physics interpolation for the specified instance during the current physics tick.
This is useful when moving an instance to a new location, to give an instantaneous change rather than interpolation from the previous location.
func multimesh_instance_set_color(color: Color) -> void#
Sets the color by which this instance will be modulated. Equivalent to MultiMesh.set_instance_color.
func multimesh_instance_set_custom_data(custom_data: Color) -> void#
Sets the custom data for this instance. Custom data is passed as a Color, but is interpreted as a vec4 in the shader. Equivalent to MultiMesh.set_instance_custom_data.
func multimesh_instance_set_transform(transform: Transform3D) -> void#
Sets the Transform3D for this instance. Equivalent to MultiMesh.set_instance_transform.
func multimesh_instance_set_transform_2d(transform: Transform2D) -> void#
Sets the Transform2D for this instance. For use when multimesh is used in 2D. Equivalent to MultiMesh.set_instance_transform_2d.
func multimesh_set_buffer(buffer: PackedFloat32Array) -> void#
Set the entire data to use for drawing the multimesh at once to buffer (such as instance transforms and colors). buffer's size must match the number of instances multiplied by the per-instance data size (which depends on the enabled MultiMesh fields). Otherwise, an error message is printed and nothing is rendered. See also multimesh_get_buffer.
The per-instance data size and expected data order is:
[codeblock lang=text]
2D:
- Position: 8 floats (8 floats for Transform2D)
- Position + Vertex color: 12 floats (8 floats for Transform2D, 4 floats for Color)
- Position + Custom data: 12 floats (8 floats for Transform2D, 4 floats of custom data)
- Position + Vertex color + Custom data: 16 floats (8 floats for Transform2D, 4 floats for Color, 4 floats of custom data)
3D:
- Position: 12 floats (12 floats for Transform3D)
- Position + Vertex color: 16 floats (12 floats for Transform3D, 4 floats for Color)
- Position + Custom data: 16 floats (12 floats for Transform3D, 4 floats of custom data)
- Position + Vertex color + Custom data: 20 floats (12 floats for Transform3D, 4 floats for Color, 4 floats of custom data)
Instance transforms are in row-major order. Specifically:
- For Transform2D the float-order is: (x.x, y.x, padding_float, origin.x, x.y, y.y, padding_float, origin.y).
- For Transform3D the float-order is: (basis.x.x, basis.y.x, basis.z.x, origin.x, basis.x.y, basis.y.y, basis.z.y, origin.y, basis.x.z, basis.y.z, basis.z.z, origin.z).
func multimesh_set_buffer_interpolated(buffer_previous: PackedFloat32Array) -> void#
Alternative version of multimesh_set_buffer for use with physics interpolation.
Takes both an array of current data and an array of data for the previous physics tick.
func multimesh_set_custom_aabb(aabb: AABB) -> void#
Sets the custom AABB for this MultiMesh resource.
func multimesh_set_mesh(mesh: RID) -> void#
Sets the mesh to be drawn by the multimesh. Equivalent to MultiMesh.mesh.
func multimesh_set_physics_interpolated(interpolated: bool) -> void#
Turns on and off physics interpolation for this MultiMesh resource.
func multimesh_set_physics_interpolation_quality(quality: int enumRenderingServer.MultimeshPhysicsInterpolationQuality) -> void#
Sets the physics interpolation quality for the MultiMesh.
A value of MULTIMESH_INTERP_QUALITY_FAST gives fast but low quality interpolation, a value of MULTIMESH_INTERP_QUALITY_HIGH gives slower but higher quality interpolation.
func multimesh_set_visible_instances(visible: int) -> void#
Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to MultiMesh.visible_instance_count.
func occluder_create() -> RID#
Creates an occluder instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all occluder_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is Occluder3D (not to be confused with the OccluderInstance3D node).
func occluder_set_mesh(indices: PackedInt32Array) -> void#
Sets the mesh data for the given occluder RID, which controls the shape of the occlusion culling that will be performed.
func omni_light_create() -> RID#
Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
To place in a scene, attach this omni light to an instance using instance_set_base using the returned RID.
Note: The equivalent node is OmniLight3D.
func particles_collision_create() -> RID#
Creates a new 3D GPU particle collision or attractor and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most particles_collision_* RenderingServer functions.
Note: The equivalent nodes are GPUParticlesCollision3D and GPUParticlesAttractor3D.
func particles_collision_height_field_update(particles_collision: RID) -> void#
Requests an update for the 3D GPU particle collision heightfield. This may be automatically called by the 3D GPU particle collision heightfield depending on its GPUParticlesCollisionHeightField3D.update_mode.
func particles_collision_set_attractor_attenuation(curve: float) -> void#
Sets the attenuation curve for the 3D GPU particles attractor specified by the particles_collision RID. Only used for attractors, not colliders. Equivalent to GPUParticlesAttractor3D.attenuation.
func particles_collision_set_attractor_directionality(amount: float) -> void#
Sets the directionality amount for the 3D GPU particles attractor specified by the particles_collision RID. Only used for attractors, not colliders. Equivalent to GPUParticlesAttractor3D.directionality.
func particles_collision_set_attractor_strength(strength: float) -> void#
Sets the strength for the 3D GPU particles attractor specified by the particles_collision RID. Only used for attractors, not colliders. Equivalent to GPUParticlesAttractor3D.strength.
func particles_collision_set_box_extents(extents: Vector3) -> void#
Sets the extents for the 3D GPU particles collision by the particles_collision RID. Equivalent to GPUParticlesCollisionBox3D.size, GPUParticlesCollisionSDF3D.size, GPUParticlesCollisionHeightField3D.size, GPUParticlesAttractorBox3D.size or GPUParticlesAttractorVectorField3D.size depending on the particles_collision type.
func particles_collision_set_collision_type(type: int enumRenderingServer.ParticlesCollisionType) -> void#
Sets the collision or attractor shape type for the 3D GPU particles collision or attractor specified by the particles_collision RID.
func particles_collision_set_cull_mask(mask: int) -> void#
Sets the cull mask for the 3D GPU particles collision or attractor specified by the particles_collision RID. Equivalent to GPUParticlesCollision3D.cull_mask or GPUParticlesAttractor3D.cull_mask depending on the particles_collision type.
func particles_collision_set_field_texture(texture: RID) -> void#
Sets the signed distance field texture for the 3D GPU particles collision specified by the particles_collision RID. Equivalent to GPUParticlesCollisionSDF3D.texture or GPUParticlesAttractorVectorField3D.texture depending on the particles_collision type.
func particles_collision_set_height_field_mask(mask: int) -> void#
Sets the heightfield mask for the 3D GPU particles heightfield collision specified by the particles_collision RID. Equivalent to GPUParticlesCollisionHeightField3D.heightfield_mask.
func particles_collision_set_height_field_resolution(resolution: int enumRenderingServer.ParticlesCollisionHeightfieldResolution) -> void#
Sets the heightmap resolution for the 3D GPU particles heightfield collision specified by the particles_collision RID. Equivalent to GPUParticlesCollisionHeightField3D.resolution.
func particles_collision_set_sphere_radius(radius: float) -> void#
Sets the radius for the 3D GPU particles sphere collision or attractor specified by the particles_collision RID. Equivalent to GPUParticlesCollisionSphere3D.radius or GPUParticlesAttractorSphere3D.radius depending on the particles_collision type.
func particles_create() -> RID#
Creates a GPU-based particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all particles_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
To place in a scene, attach these particles to an instance using instance_set_base using the returned RID.
Note: The equivalent nodes are GPUParticles2D and GPUParticles3D.
Note: All particles_* methods only apply to GPU-based particles, not CPU-based particles. CPUParticles2D and CPUParticles3D do not have equivalent RenderingServer functions available, as these use MultiMeshInstance2D and MultiMeshInstance3D under the hood (see multimesh_* methods).
func particles_emit(emit_flags: int) -> void#
Manually emits particles from the particles instance.
func particles_get_current_aabb(particles: RID) -> AABB#
Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to GPUParticles3D.capture_aabb.
func particles_get_emitting(particles: RID) -> bool#
Returns true if particles are currently set to emitting.
func particles_is_inactive(particles: RID) -> bool#
Returns true if particles are not emitting and particles are set to inactive.
func particles_request_process(particles: RID) -> void#
Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to instances_cull_aabb, instances_cull_convex, or instances_cull_ray.
func particles_request_process_time(time: float) -> void#
Requests particles to process for extra process time during a single frame.
func particles_restart(particles: RID) -> void#
Reset the particles on the next update. Equivalent to GPUParticles3D.restart.
func particles_set_amount(amount: int) -> void#
Sets the number of particles to be drawn and allocates the memory for them. Equivalent to GPUParticles3D.amount.
func particles_set_amount_ratio(ratio: float) -> void#
Sets the amount ratio for particles to be emitted. Equivalent to GPUParticles3D.amount_ratio.
func particles_set_collision_base_size(size: float) -> void#
func particles_set_custom_aabb(aabb: AABB) -> void#
Sets a custom axis-aligned bounding box for the particle system. Equivalent to GPUParticles3D.visibility_aabb.
func particles_set_draw_order(order: int enumRenderingServer.ParticlesDrawOrder) -> void#
Sets the draw order of the particles to one of the named enums from ParticlesDrawOrder. See ParticlesDrawOrder for options. Equivalent to GPUParticles3D.draw_order.
func particles_set_draw_pass_mesh(mesh: RID) -> void#
Sets the mesh to be used for the specified draw pass. Equivalent to GPUParticles3D.draw_pass_1, GPUParticles3D.draw_pass_2, GPUParticles3D.draw_pass_3, and GPUParticles3D.draw_pass_4.
func particles_set_draw_passes(count: int) -> void#
Sets the number of draw passes to use. Equivalent to GPUParticles3D.draw_passes.
func particles_set_emission_transform(transform: Transform3D) -> void#
Sets the Transform3D that will be used by the particles when they first emit.
func particles_set_emitter_velocity(velocity: Vector3) -> void#
Sets the velocity of a particle node, that will be used by ParticleProcessMaterial.inherit_velocity_ratio.
func particles_set_emitting(emitting: bool) -> void#
If true, particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to GPUParticles3D.emitting.
func particles_set_explosiveness_ratio(ratio: float) -> void#
Sets the explosiveness ratio. Equivalent to GPUParticles3D.explosiveness.
func particles_set_fixed_fps(fps: int) -> void#
Sets the frame rate that the particle system rendering will be fixed to. Equivalent to GPUParticles3D.fixed_fps.
func particles_set_fractional_delta(enable: bool) -> void#
If true, uses fractional delta which smooths the movement of the particles. Equivalent to GPUParticles3D.fract_delta.
func particles_set_interp_to_end(factor: float) -> void#
Sets the value that informs a ParticleProcessMaterial to rush all particles towards the end of their lifetime.
func particles_set_interpolate(enable: bool) -> void#
func particles_set_lifetime(lifetime: float) -> void#
Sets the lifetime of each particle in the system. Equivalent to GPUParticles3D.lifetime.
func particles_set_mode(mode: int enumRenderingServer.ParticlesMode) -> void#
Sets whether the GPU particles specified by the particles RID should be rendered in 2D or 3D according to mode.
func particles_set_one_shot(one_shot: bool) -> void#
If true, particles will emit once and then stop. Equivalent to GPUParticles3D.one_shot.
func particles_set_pre_process_time(time: float) -> void#
Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to GPUParticles3D.preprocess.
func particles_set_process_material(material: RID) -> void#
Sets the material for processing the particles.
Note: This is not the material used to draw the materials. Equivalent to GPUParticles3D.process_material.
func particles_set_randomness_ratio(ratio: float) -> void#
Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to GPUParticles3D.randomness.
func particles_set_speed_scale(scale: float) -> void#
Sets the speed scale of the particle system. Equivalent to GPUParticles3D.speed_scale.
func particles_set_subemitter(subemitter_particles: RID) -> void#
func particles_set_trail_bind_poses(bind_poses: Transform3D[]) -> void#
func particles_set_trails(length_sec: float) -> void#
If enable is true, enables trails for the particles with the specified length_sec in seconds. Equivalent to GPUParticles3D.trail_enabled and GPUParticles3D.trail_lifetime.
func particles_set_transform_align(align: int enumRenderingServer.ParticlesTransformAlign) -> void#
func particles_set_use_local_coordinates(enable: bool) -> void#
If true, particles use local coordinates. If false they use global coordinates. Equivalent to GPUParticles3D.local_coords.
func positional_soft_shadow_filter_set_quality(quality: int enumRenderingServer.ShadowQuality) -> void#
Sets the filter quality for omni and spot light shadows in 3D. See also ProjectSettings.rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality. This parameter is global and cannot be set on a per-viewport basis.
func reflection_probe_create() -> RID#
Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all reflection_probe_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
To place in a scene, attach this reflection probe to an instance using instance_set_base using the returned RID.
Note: The equivalent node is ReflectionProbe.
func reflection_probe_set_ambient_color(color: Color) -> void#
Sets the reflection probe's custom ambient light color. Equivalent to ReflectionProbe.ambient_color.
func reflection_probe_set_ambient_energy(energy: float) -> void#
Sets the reflection probe's custom ambient light energy. Equivalent to ReflectionProbe.ambient_color_energy.
func reflection_probe_set_ambient_mode(mode: int enumRenderingServer.ReflectionProbeAmbientMode) -> void#
Sets the reflection probe's ambient light mode. Equivalent to ReflectionProbe.ambient_mode.
func reflection_probe_set_as_interior(enable: bool) -> void#
If true, reflections will ignore sky contribution. Equivalent to ReflectionProbe.interior.
func reflection_probe_set_blend_distance(blend_distance: float) -> void#
Sets the distance in meters over which a probe blends into the scene.
func reflection_probe_set_cull_mask(layers: int) -> void#
Sets the render cull mask for this reflection probe. Only instances with a matching layer will be reflected by this probe. Equivalent to ReflectionProbe.cull_mask.
func reflection_probe_set_enable_box_projection(enable: bool) -> void#
If true, uses box projection. This can make reflections look more correct in certain situations. Equivalent to ReflectionProbe.box_projection.
func reflection_probe_set_enable_shadows(enable: bool) -> void#
If true, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to ReflectionProbe.enable_shadows.
func reflection_probe_set_intensity(intensity: float) -> void#
Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to ReflectionProbe.intensity.
func reflection_probe_set_max_distance(distance: float) -> void#
Sets the max distance away from the probe an object can be before it is culled. Equivalent to ReflectionProbe.max_distance.
func reflection_probe_set_mesh_lod_threshold(pixels: float) -> void#
Sets the mesh level of detail to use in the reflection probe rendering. Higher values will use less detailed versions of meshes that have LOD variations generated, which can improve performance. Equivalent to ReflectionProbe.mesh_lod_threshold.
func reflection_probe_set_origin_offset(offset: Vector3) -> void#
Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to ReflectionProbe.origin_offset.
func reflection_probe_set_reflection_mask(layers: int) -> void#
Sets the render reflection mask for this reflection probe. Only instances with a matching layer will have reflections applied from this probe. Equivalent to ReflectionProbe.reflection_mask.
func reflection_probe_set_resolution(resolution: int) -> void#
Sets the resolution to use when rendering the specified reflection probe. The resolution is specified for each cubemap face: for instance, specifying 512 will allocate 6 faces of 512×512 each (plus mipmaps for roughness levels).
func reflection_probe_set_size(size: Vector3) -> void#
Sets the size of the area that the reflection probe will capture. Equivalent to ReflectionProbe.size.
func reflection_probe_set_update_mode(mode: int enumRenderingServer.ReflectionProbeUpdateMode) -> void#
Sets how often the reflection probe updates. Can either be once or every frame. See ReflectionProbeUpdateMode for options.
func request_frame_drawn_callback(callable: Callable) -> void#
Schedules a callback to the given callable after a frame has been drawn.
func scenario_create() -> RID#
Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all scenario_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
The scenario is the 3D world that all the visual instances exist in.
func scenario_set_camera_attributes(effects: RID) -> void#
Sets the camera attributes (effects) that will be used with this scenario. See also CameraAttributes.
func scenario_set_compositor(compositor: RID) -> void#
Sets the compositor (compositor) that will be used with this scenario. See also Compositor.
func scenario_set_environment(environment: RID) -> void#
Sets the environment that will be used with this scenario. See also Environment.
func scenario_set_fallback_environment(environment: RID) -> void#
Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment.
func screen_space_roughness_limiter_set_active(limit: float) -> void#
Sets the screen-space roughness limiter parameters, such as whether it should be enabled and its thresholds. Equivalent to ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/enabled, ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/amount and ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/limit.
func set_boot_image(use_filter: bool = true) -> void#
Sets a boot image. The color defines the background color. If scale is true, the image will be scaled to fit the screen size. If use_filter is true, the image will be scaled with linear interpolation. If use_filter is false, the image will be scaled with nearest-neighbor interpolation.
func set_debug_generate_wireframes(generate: bool) -> void#
If generate is true, generates debug wireframes for all meshes that are loaded when using the Compatibility renderer. By default, the engine does not generate debug wireframes at runtime, since they slow down loading of assets and take up VRAM.
Note: You must call this method before loading any meshes when using the Compatibility renderer, otherwise wireframes will not be used.
func set_default_clear_color(color: Color) -> void#
Sets the default clear color which is used when a specific clear color has not been selected. See also get_default_clear_color.
func shader_create() -> RID#
Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all shader_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is Shader.
const func shader_get_code(shader: RID) -> String#
Returns a shader's source code as a string.
const func shader_get_default_texture_parameter(index: int = 0) -> RID#
Returns a default texture from a shader searched by name.
Note: If the sampler array is used use index to access the specified texture.
const func shader_get_parameter_default(name: StringName) -> Variant#
Returns the default value for the specified shader uniform. This is usually the value written in the shader source code.
func shader_set_code(code: String) -> void#
Sets the shader's source code (which triggers recompilation after being changed).
func shader_set_default_texture_parameter(index: int = 0) -> void#
Sets a shader's default texture. Overwrites the texture given by name.
Note: If the sampler array is used use index to access the specified texture.
func shader_set_path_hint(path: String) -> void#
Sets the path hint for the specified shader. This should generally match the Shader resource's Resource.resource_path.
func skeleton_allocate_data(is_2d_skeleton: bool = false) -> void#
const func skeleton_bone_get_transform(bone: int) -> Transform3D#
Returns the Transform3D set for a specific bone of this skeleton.
const func skeleton_bone_get_transform_2d(bone: int) -> Transform2D#
Returns the Transform2D set for a specific bone of this skeleton.
func skeleton_bone_set_transform(transform: Transform3D) -> void#
Sets the Transform3D for a specific bone of this skeleton.
func skeleton_bone_set_transform_2d(transform: Transform2D) -> void#
Sets the Transform2D for a specific bone of this skeleton.
func skeleton_create() -> RID#
Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all skeleton_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
const func skeleton_get_bone_count(skeleton: RID) -> int#
Returns the number of bones allocated for this skeleton.
func skeleton_set_base_transform_2d(base_transform: Transform2D) -> void#
func sky_bake_panorama(size: Vector2i) -> Image#
Generates and returns an Image containing the radiance map for the specified sky RID. This supports built-in sky material and custom sky shaders. If bake_irradiance is true, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also environment_bake_panorama.
Note: The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. energy values above 1.0 can be used to brighten the resulting image.
Note: size should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than Sky.radiance_size, as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map.
func sky_create() -> RID#
Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all sky_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
func sky_set_material(material: RID) -> void#
Sets the material that the sky uses to render the background, ambient and reflection maps.
func sky_set_mode(mode: int enumRenderingServer.SkyMode) -> void#
Sets the process mode of the sky specified by the sky RID. Equivalent to Sky.process_mode.
func sky_set_radiance_size(radiance_size: int) -> void#
Sets the radiance_size of the sky specified by the sky RID (in pixels). Equivalent to Sky.radiance_size.
func spot_light_create() -> RID#
Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
To place in a scene, attach this spot light to an instance using instance_set_base using the returned RID.
func sub_surface_scattering_set_quality(quality: int enumRenderingServer.SubSurfaceScatteringQuality) -> void#
Sets ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality to use when rendering materials that have subsurface scattering enabled.
func sub_surface_scattering_set_scale(depth_scale: float) -> void#
Sets the ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale and ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale to use when rendering materials that have subsurface scattering enabled.
func texture_2d_create(image: Image) -> RID#
Creates a 2-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is Texture2D.
Note: Not to be confused with RenderingDevice.texture_create, which creates the graphics API's own texture type as opposed to the Godot-specific Texture2D resource.
const func texture_2d_get(texture: RID) -> Image#
Returns an Image instance from the given texture RID.
Example: Get the test texture from get_test_texture and apply it to a Sprite2D node:
var texture_rid = RenderingServer.get_test_texture()
var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid))
$Sprite2D.texture = textureconst func texture_2d_layer_get(layer: int) -> Image#
Returns an Image instance from the given texture RID and layer.
func texture_2d_layered_create(layered_type: int enumRenderingServer.TextureLayeredType) -> RID#
Creates a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_layered_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is TextureLayered.
func texture_2d_layered_placeholder_create(layered_type: int enumRenderingServer.TextureLayeredType) -> RID#
Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_layered_* RenderingServer functions, although it does nothing when used. See also texture_2d_placeholder_create.
Note: The equivalent resource is PlaceholderTextureLayered.
func texture_2d_placeholder_create() -> RID#
Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_layered_* RenderingServer functions, although it does nothing when used. See also texture_2d_layered_placeholder_create.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is PlaceholderTexture2D.
func texture_2d_update(layer: int) -> void#
Updates the texture specified by the texture RID with the data in image. A layer must also be specified, which should be 0 when updating a single-layer texture (Texture2D).
Note: The image must have the same width, height and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height or format, use texture_replace instead.
const func texture_3d_get(texture: RID) -> Image[]#
Returns 3D texture data as an array of Images for the specified texture RID.
func texture_3d_placeholder_create() -> RID#
Creates a placeholder for a 3-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_3d_* RenderingServer functions, although it does nothing when used.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent resource is PlaceholderTexture3D.
func texture_3d_update(data: Image[]) -> void#
Updates the texture specified by the texture RID's data with the data in data. All the texture's layers must be replaced at once.
Note: The texture must have the same width, height, depth and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height, depth or format, use texture_replace instead.
func texture_create_from_native_handle(layered_type: int = 0 enumRenderingServer.TextureLayeredType) -> RID#
Creates a texture based on a native handle that was created outside of Godot's renderer.
Note: If using only the rendering device renderer, it's recommend to use RenderingDevice.texture_create_from_extension together with RenderingServer.texture_rd_create, rather than this method. It will give you much more control over the texture's format and usage.
const func texture_get_format(texture: RID) -> intImage.Format#
Returns the format for the texture.
const func texture_get_native_handle(srgb: bool = false) -> int#
Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension.
Note: This function returns a uint64_t which internally maps to a GLuint (OpenGL) or VkImage (Vulkan).
const func texture_get_path(texture: RID) -> String#
const func texture_get_rd_texture(srgb: bool = false) -> RID#
Returns a texture RID that can be used with RenderingDevice.
func texture_proxy_create(base: RID) -> RID#
This method does nothing and always returns an invalid RID.
func texture_proxy_update(proxy_to: RID) -> void#
This method does nothing.
func texture_rd_create(layer_type: int = 0 enumRenderingServer.TextureLayeredType) -> RID#
Creates a new texture object based on a texture created directly on the RenderingDevice. If the texture contains layers, layer_type is used to define the layer type.
func texture_replace(by_texture: RID) -> void#
Replaces texture's texture data by the texture specified by the by_texture RID, without changing texture's RID.
func texture_set_force_redraw_if_visible(enable: bool) -> void#
func texture_set_path(path: String) -> void#
func texture_set_size_override(height: int) -> void#
func viewport_attach_camera(camera: RID) -> void#
Sets a viewport's camera.
func viewport_attach_canvas(canvas: RID) -> void#
Sets a viewport's canvas.
func viewport_attach_to_screen(screen: int = 0) -> void#
Copies the viewport to a region of the screen specified by rect. If viewport_set_render_direct_to_screen is true, then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
For example, you can set the root viewport to not render at all with the following code:
func _ready():
RenderingServer.viewport_attach_to_screen(get_viewport().get_viewport_rid(), Rect2())
RenderingServer.viewport_attach_to_screen($Viewport.get_viewport_rid(), Rect2(0, 0, 600, 600))Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see viewport_set_render_direct_to_screen.
func viewport_create() -> RID#
Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all viewport_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent node is Viewport.
const func viewport_get_measured_render_time_cpu(viewport: RID) -> float#
Returns the CPU time taken to render the last frame in milliseconds. This only includes time spent in rendering-related operations; scripts' _process functions and other engine subsystems are not included in this readout. To get a complete readout of CPU time spent to render the scene, sum the render times of all viewports that are drawn every frame plus get_frame_setup_time_cpu. Unlike Engine.get_frames_per_second, this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or Engine.max_fps. See also viewport_get_measured_render_time_gpu.
Note: Requires measurements to be enabled on the specified viewport using viewport_set_measure_render_time. Otherwise, this method returns 0.0.
const func viewport_get_measured_render_time_gpu(viewport: RID) -> float#
Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike Engine.get_frames_per_second, this method accurately reflects GPU utilization even if framerate is capped via V-Sync or Engine.max_fps. See also viewport_get_measured_render_time_cpu.
Note: Requires measurements to be enabled on the specified viewport using viewport_set_measure_render_time. Otherwise, this method returns 0.0.
Note: When GPU utilization is low enough during a certain period of time, GPUs will decrease their power state (which in turn decreases core and memory clock speeds). This can cause the reported GPU time to increase if GPU utilization is kept low enough by a framerate cap (compared to what it would be at the GPU's highest power state). Keep this in mind when benchmarking using viewport_get_measured_render_time_gpu. This behavior can be overridden in the graphics driver settings at the cost of higher power usage.
func viewport_get_render_info(info: int enumRenderingServer.ViewportRenderInfo) -> int#
Returns a statistic about the rendering engine which can be used for performance profiling. This is separated into render pass types, each of them having the same infos you can query (different passes will return different values). See RenderingServer.ViewportRenderInfoType for a list of render pass types and RenderingServer.ViewportRenderInfo for a list of information that can be queried.
See also get_rendering_info, which returns global information across all viewports.
Note: Viewport rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, viewport_get_render_info returns 0. To print rendering information in _ready() successfully, use the following:
func _ready():
for _i in 2:
await get_tree().process_frame
print(
RenderingServer.viewport_get_render_info(get_viewport().get_viewport_rid(),
RenderingServer.VIEWPORT_RENDER_INFO_TYPE_VISIBLE,
RenderingServer.VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME)
)const func viewport_get_render_target(viewport: RID) -> RID#
Returns the render target for the viewport.
const func viewport_get_texture(viewport: RID) -> RID#
Returns the viewport's last rendered frame.
const func viewport_get_update_mode(viewport: RID) -> intRenderingServer.ViewportUpdateMode#
Returns the viewport's update mode. See ViewportUpdateMode constants for options.
Warning: Calling this from any thread other than the rendering thread will be detrimental to performance.
func viewport_remove_canvas(canvas: RID) -> void#
Detaches a viewport from a canvas.
func viewport_set_active(active: bool) -> void#
If true, sets the viewport active, else sets it inactive.
func viewport_set_anisotropic_filtering_level(anisotropic_filtering_level: int enumRenderingServer.ViewportAnisotropicFiltering) -> void#
Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of 0 forcibly disables anisotropic filtering, even on materials where it is enabled.
The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See ProjectSettings.rendering/textures/decals/filter and ProjectSettings.rendering/textures/light_projectors/filter.
Note: In 3D, for this setting to have an effect, set BaseMaterial3D.texture_filter to BaseMaterial3D.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC or BaseMaterial3D.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC on materials.
Note: In 2D, for this setting to have an effect, set CanvasItem.texture_filter to CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC or CanvasItem.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC on the CanvasItem node displaying the texture (or in CanvasTexture). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference.
func viewport_set_canvas_cull_mask(canvas_cull_mask: int) -> void#
Sets the rendering mask associated with this Viewport. Only CanvasItem nodes with a matching rendering visibility layer will be rendered by this Viewport.
func viewport_set_canvas_stacking(sublayer: int) -> void#
Sets the stacking order for a viewport's canvas.
layer is the actual canvas layer, while sublayer specifies the stacking order of the canvas among those in the same layer.
func viewport_set_canvas_transform(offset: Transform2D) -> void#
Sets the transformation of a viewport's canvas.
func viewport_set_clear_mode(clear_mode: int enumRenderingServer.ViewportClearMode) -> void#
Sets the clear mode of a viewport. See ViewportClearMode for options.
func viewport_set_debug_draw(draw: int enumRenderingServer.ViewportDebugDraw) -> void#
Sets the debug draw mode of a viewport. See ViewportDebugDraw for options.
func viewport_set_default_canvas_item_texture_filter(filter: int enumRenderingServer.CanvasItemTextureFilter) -> void#
Sets the default texture filtering mode for the specified viewport RID. See CanvasItemTextureFilter for options.
func viewport_set_default_canvas_item_texture_repeat(repeat: int enumRenderingServer.CanvasItemTextureRepeat) -> void#
Sets the default texture repeat mode for the specified viewport RID. See CanvasItemTextureRepeat for options.
func viewport_set_disable_2d(disable: bool) -> void#
If true, the viewport's canvas (i.e. 2D and GUI elements) is not rendered.
func viewport_set_disable_3d(disable: bool) -> void#
If true, the viewport's 3D elements are not rendered.
func viewport_set_environment_mode(mode: int enumRenderingServer.ViewportEnvironmentMode) -> void#
Sets the viewport's environment mode which allows enabling or disabling rendering of 3D environment over 2D canvas. When disabled, 2D will not be affected by the environment. When enabled, 2D will be affected by the environment if the environment background mode is ENV_BG_CANVAS. The default behavior is to inherit the setting from the viewport's parent. If the topmost parent is also set to VIEWPORT_ENVIRONMENT_INHERIT, then the behavior will be the same as if it was set to VIEWPORT_ENVIRONMENT_ENABLED.
func viewport_set_fsr_sharpness(sharpness: float) -> void#
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.
func viewport_set_global_canvas_transform(transform: Transform2D) -> void#
Sets the viewport's global transformation matrix.
func viewport_set_measure_render_time(enable: bool) -> void#
Sets the measurement for the given viewport RID (obtained using Viewport.get_viewport_rid). Once enabled, viewport_get_measured_render_time_cpu and viewport_get_measured_render_time_gpu will return values greater than 0.0 when queried with the given viewport.
func viewport_set_msaa_2d(msaa: int enumRenderingServer.ViewportMSAA) -> void#
Sets the multisample antialiasing mode for 2D/Canvas on the specified viewport RID. See ViewportMSAA for options. Equivalent to ProjectSettings.rendering/anti_aliasing/quality/msaa_2d or Viewport.msaa_2d.
func viewport_set_msaa_3d(msaa: int enumRenderingServer.ViewportMSAA) -> void#
Sets the multisample antialiasing mode for 3D on the specified viewport RID. See ViewportMSAA for options. Equivalent to ProjectSettings.rendering/anti_aliasing/quality/msaa_3d or Viewport.msaa_3d.
func viewport_set_occlusion_culling_build_quality(quality: int enumRenderingServer.ViewportOcclusionCullingBuildQuality) -> void#
Sets the ProjectSettings.rendering/occlusion_culling/bvh_build_quality to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis.
func viewport_set_occlusion_rays_per_thread(rays_per_thread: int) -> void#
Sets the ProjectSettings.rendering/occlusion_culling/occlusion_rays_per_thread to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis.
func viewport_set_parent_viewport(parent_viewport: RID) -> void#
Sets the viewport's parent to the viewport specified by the parent_viewport RID.
func viewport_set_positional_shadow_atlas_quadrant_subdivision(subdivision: int) -> void#
Sets the number of subdivisions to use in the specified shadow atlas quadrant for omni and spot shadows. See also Viewport.set_positional_shadow_atlas_quadrant_subdiv.
func viewport_set_positional_shadow_atlas_size(use_16_bits: bool = false) -> void#
Sets the size of the shadow atlas's images (used for omni and spot lights) on the viewport specified by the viewport RID. The value is rounded up to the nearest power of 2. If use_16_bits is true, use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices.
Note: If this is set to 0, no positional shadows will be visible at all. This can improve performance significantly on low-end systems by reducing both the CPU and GPU load (as fewer draw calls are needed to draw the scene without shadows).
func viewport_set_render_direct_to_screen(enabled: bool) -> void#
If true, render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the screen_texture. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.
func viewport_set_scaling_3d_mode(scaling_3d_mode: int enumRenderingServer.ViewportScaling3DMode) -> void#
Sets the 3D resolution scaling 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.
func viewport_set_scaling_3d_scale(scale: float) -> void#
Scales the 3D render buffer based on the viewport size uses an image filter specified in ViewportScaling3DMode 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 ViewportMSAA 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.
func viewport_set_scenario(scenario: RID) -> void#
Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas, etc.
func viewport_set_screen_space_aa(mode: int enumRenderingServer.ViewportScreenSpaceAA) -> void#
Sets the viewport's screen-space antialiasing mode. Equivalent to ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa or Viewport.screen_space_aa.
func viewport_set_sdf_oversize_and_scale(scale: int enumRenderingServer.ViewportSDFScale) -> void#
Sets the viewport's 2D signed distance field ProjectSettings.rendering/2d/sdf/oversize and ProjectSettings.rendering/2d/sdf/scale. This is used when sampling the signed distance field in CanvasItem shaders as well as GPUParticles2D collision. This is not used by SDFGI in 3D rendering.
func viewport_set_size(height: int) -> void#
Sets the viewport's width and height in pixels.
func viewport_set_snap_2d_transforms_to_pixel(enabled: bool) -> void#
If true, canvas item transforms (i.e. origin position) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when Camera2D smoothing is enabled. Equivalent to ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel.
func viewport_set_snap_2d_vertices_to_pixel(enabled: bool) -> void#
If true, canvas item vertices (i.e. polygon points) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when Camera2D smoothing is enabled. Equivalent to ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel.
func viewport_set_texture_mipmap_bias(mipmap_bias: float) -> void#
Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between -0.75 and 0.0. Enabling temporal antialiasing (ProjectSettings.rendering/anti_aliasing/quality/use_taa) can help reduce the graininess visible when using negative mipmap bias.
Note: When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is -log2(1.0 / scale) + mipmap_bias.
func viewport_set_transparent_background(enabled: bool) -> void#
If true, the viewport renders its background as transparent.
func viewport_set_update_mode(update_mode: int enumRenderingServer.ViewportUpdateMode) -> void#
Sets when the viewport should be updated. See ViewportUpdateMode constants for options.
func viewport_set_use_debanding(enable: bool) -> void#
If true, enables debanding on the specified viewport. Equivalent to ProjectSettings.rendering/anti_aliasing/quality/use_debanding or Viewport.use_debanding.
func viewport_set_use_hdr_2d(enabled: bool) -> void#
If true, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an RGBA16 framebuffer, while when using the Mobile renderer it will be an RGB10_A2 framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the 0-1 range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as Viewport.use_hdr_2d.
Note: This setting will have no effect when using the Compatibility renderer, which always renders in low dynamic range for performance reasons.
func viewport_set_use_occlusion_culling(enable: bool) -> void#
If true, enables occlusion culling on the specified viewport. Equivalent to ProjectSettings.rendering/occlusion_culling/use_occlusion_culling.
func viewport_set_use_taa(enable: bool) -> void#
If true, use temporal antialiasing. Equivalent to ProjectSettings.rendering/anti_aliasing/quality/use_taa or Viewport.use_taa.
func viewport_set_use_xr(use_xr: bool) -> void#
If true, the viewport uses augmented or virtual reality technologies. See XRInterface.
func viewport_set_vrs_mode(mode: int enumRenderingServer.ViewportVRSMode) -> void#
Sets the Variable Rate Shading (VRS) mode for the viewport. If the GPU does not support VRS, this property is ignored. Equivalent to ProjectSettings.rendering/vrs/mode.
func viewport_set_vrs_texture(texture: RID) -> void#
The texture to use when the VRS mode is set to RenderingServer.VIEWPORT_VRS_TEXTURE. Equivalent to ProjectSettings.rendering/vrs/texture.
func viewport_set_vrs_update_mode(mode: int enumRenderingServer.ViewportVRSUpdateMode) -> void#
Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored.
If set to RenderingServer.VIEWPORT_VRS_UPDATE_ONCE, the input texture is copied once and the mode is changed to RenderingServer.VIEWPORT_VRS_UPDATE_DISABLED.
func visibility_notifier_create() -> RID#
Creates a new 3D visibility notifier object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all visibility_notifier_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
To place in a scene, attach this notifier to an instance using instance_set_base using the returned RID.
Note: The equivalent node is VisibleOnScreenNotifier3D.
func visibility_notifier_set_aabb(aabb: AABB) -> void#
func visibility_notifier_set_callbacks(exit_callable: Callable) -> void#
func voxel_gi_allocate_data(level_counts: PackedInt32Array) -> void#
func voxel_gi_create() -> RID#
Creates a new voxel-based global illumination object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all voxel_gi_* RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer's free_rid method.
Note: The equivalent node is VoxelGI.
const func voxel_gi_get_data_cells(voxel_gi: RID) -> PackedByteArray#
const func voxel_gi_get_distance_field(voxel_gi: RID) -> PackedByteArray#
const func voxel_gi_get_level_counts(voxel_gi: RID) -> PackedInt32Array#
const func voxel_gi_get_octree_cells(voxel_gi: RID) -> PackedByteArray#
const func voxel_gi_get_octree_size(voxel_gi: RID) -> Vector3i#
const func voxel_gi_get_to_cell_xform(voxel_gi: RID) -> Transform3D#
func voxel_gi_set_baked_exposure_normalization(baked_exposure: float) -> void#
Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see camera_attributes_set_exposure.
func voxel_gi_set_bias(bias: float) -> void#
Sets the VoxelGIData.bias value to use on the specified voxel_gi's RID.
func voxel_gi_set_dynamic_range(range: float) -> void#
Sets the VoxelGIData.dynamic_range value to use on the specified voxel_gi's RID.
func voxel_gi_set_energy(energy: float) -> void#
Sets the VoxelGIData.energy value to use on the specified voxel_gi's RID.
func voxel_gi_set_interior(enable: bool) -> void#
Sets the VoxelGIData.interior value to use on the specified voxel_gi's RID.
func voxel_gi_set_normal_bias(bias: float) -> void#
Sets the VoxelGIData.normal_bias value to use on the specified voxel_gi's RID.
func voxel_gi_set_propagation(amount: float) -> void#
Sets the VoxelGIData.propagation value to use on the specified voxel_gi's RID.
func voxel_gi_set_quality(quality: int enumRenderingServer.VoxelGIQuality) -> void#
Sets the ProjectSettings.rendering/global_illumination/voxel_gi/quality value to use when rendering. This parameter is global and cannot be set on a per-VoxelGI basis.
func voxel_gi_set_use_two_bounces(enable: bool) -> void#
Sets the VoxelGIData.use_two_bounces value to use on the specified voxel_gi's RID.
Annotations #
Constants #
const NO_INDEX_ARRAY = -1#
Marks an error that shows that the index array is empty.
const ARRAY_WEIGHTS_SIZE = 4#
Number of weights/bones per vertex.
const CANVAS_ITEM_Z_MIN = -4096#
The minimum Z-layer for canvas items.
const CANVAS_ITEM_Z_MAX = 4096#
The maximum Z-layer for canvas items.
const MAX_GLOW_LEVELS = 7#
The maximum number of glow levels that can be used with the glow post-processing effect.
const MAX_CURSORS = 8Deprecated#
const MAX_2D_DIRECTIONAL_LIGHTS = 8#
The maximum number of directional lights that can be rendered at a given time in 2D.
const MAX_MESH_SURFACES = 256#
The maximum number of surfaces a mesh can have.
const TEXTURE_TYPE_2D = 0 enum TextureType#
2D texture.
const TEXTURE_TYPE_LAYERED = 1 enum TextureType#
Layered texture.
const TEXTURE_TYPE_3D = 2 enum TextureType#
3D texture.
const TEXTURE_LAYERED_2D_ARRAY = 0 enum TextureLayeredType#
Array of 2-dimensional textures (see Texture2DArray).
const TEXTURE_LAYERED_CUBEMAP = 1 enum TextureLayeredType#
Cubemap texture (see Cubemap).
const TEXTURE_LAYERED_CUBEMAP_ARRAY = 2 enum TextureLayeredType#
Array of cubemap textures (see CubemapArray).
const CUBEMAP_LAYER_LEFT = 0 enum CubeMapLayer#
Left face of a Cubemap.
const CUBEMAP_LAYER_RIGHT = 1 enum CubeMapLayer#
Right face of a Cubemap.
const CUBEMAP_LAYER_BOTTOM = 2 enum CubeMapLayer#
Bottom face of a Cubemap.
const CUBEMAP_LAYER_TOP = 3 enum CubeMapLayer#
Top face of a Cubemap.
const CUBEMAP_LAYER_FRONT = 4 enum CubeMapLayer#
Front face of a Cubemap.
const CUBEMAP_LAYER_BACK = 5 enum CubeMapLayer#
Back face of a Cubemap.
const SHADER_SPATIAL = 0 enum ShaderMode#
Shader is a 3D shader.
const SHADER_CANVAS_ITEM = 1 enum ShaderMode#
Shader is a 2D shader.
const SHADER_PARTICLES = 2 enum ShaderMode#
Shader is a particle shader (can be used in both 2D and 3D).
const SHADER_SKY = 3 enum ShaderMode#
Shader is a 3D sky shader.
const SHADER_FOG = 4 enum ShaderMode#
Shader is a 3D fog shader.
const SHADER_MAX = 5 enum ShaderMode#
Represents the size of the ShaderMode enum.
const MATERIAL_RENDER_PRIORITY_MIN = -128#
The minimum renderpriority of all materials.
const MATERIAL_RENDER_PRIORITY_MAX = 127#
The maximum renderpriority of all materials.
const ARRAY_VERTEX = 0 enum ArrayType#
Array is a vertex position array.
const ARRAY_NORMAL = 1 enum ArrayType#
Array is a normal array.
const ARRAY_TANGENT = 2 enum ArrayType#
Array is a tangent array.
const ARRAY_COLOR = 3 enum ArrayType#
Array is a vertex color array.
const ARRAY_TEX_UV = 4 enum ArrayType#
Array is a UV coordinates array.
const ARRAY_TEX_UV2 = 5 enum ArrayType#
Array is a UV coordinates array for the second set of UV coordinates.
const ARRAY_CUSTOM0 = 6 enum ArrayType#
Array is a custom data array for the first set of custom data.
const ARRAY_CUSTOM1 = 7 enum ArrayType#
Array is a custom data array for the second set of custom data.
const ARRAY_CUSTOM2 = 8 enum ArrayType#
Array is a custom data array for the third set of custom data.
const ARRAY_CUSTOM3 = 9 enum ArrayType#
Array is a custom data array for the fourth set of custom data.
const ARRAY_BONES = 10 enum ArrayType#
Array contains bone information.
const ARRAY_WEIGHTS = 11 enum ArrayType#
Array is weight information.
const ARRAY_INDEX = 12 enum ArrayType#
Array is an index array.
const ARRAY_MAX = 13 enum ArrayType#
Represents the size of the ArrayType enum.
const ARRAY_CUSTOM_COUNT = 4#
The number of custom data arrays available (ARRAY_CUSTOM0, ARRAY_CUSTOM1, ARRAY_CUSTOM2, ARRAY_CUSTOM3).
const ARRAY_CUSTOM_RGBA8_UNORM = 0 enum ArrayCustomFormat#
Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, unsigned floating-point in the [0.0, 1.0] range.
const ARRAY_CUSTOM_RGBA8_SNORM = 1 enum ArrayCustomFormat#
Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, signed floating-point in the [-1.0, 1.0] range.
const ARRAY_CUSTOM_RG_HALF = 2 enum ArrayCustomFormat#
Custom data array contains 16-bit-per-channel red/green color data. Values are floating-point in half precision.
const ARRAY_CUSTOM_RGBA_HALF = 3 enum ArrayCustomFormat#
Custom data array contains 16-bit-per-channel red/green/blue/alpha color data. Values are floating-point in half precision.
const ARRAY_CUSTOM_R_FLOAT = 4 enum ArrayCustomFormat#
Custom data array contains 32-bit-per-channel red color data. Values are floating-point in single precision.
const ARRAY_CUSTOM_RG_FLOAT = 5 enum ArrayCustomFormat#
Custom data array contains 32-bit-per-channel red/green color data. Values are floating-point in single precision.
const ARRAY_CUSTOM_RGB_FLOAT = 6 enum ArrayCustomFormat#
Custom data array contains 32-bit-per-channel red/green/blue color data. Values are floating-point in single precision.
const ARRAY_CUSTOM_RGBA_FLOAT = 7 enum ArrayCustomFormat#
Custom data array contains 32-bit-per-channel red/green/blue/alpha color data. Values are floating-point in single precision.
const ARRAY_CUSTOM_MAX = 8 enum ArrayCustomFormat#
Represents the size of the ArrayCustomFormat enum.
const ARRAY_FORMAT_VERTEX = 1 enum ArrayFormatBitfield#
Flag used to mark a vertex position array.
const ARRAY_FORMAT_NORMAL = 2 enum ArrayFormatBitfield#
Flag used to mark a normal array.
const ARRAY_FORMAT_TANGENT = 4 enum ArrayFormatBitfield#
Flag used to mark a tangent array.
const ARRAY_FORMAT_COLOR = 8 enum ArrayFormatBitfield#
Flag used to mark a vertex color array.
const ARRAY_FORMAT_TEX_UV = 16 enum ArrayFormatBitfield#
Flag used to mark a UV coordinates array.
const ARRAY_FORMAT_TEX_UV2 = 32 enum ArrayFormatBitfield#
Flag used to mark a UV coordinates array for the second UV coordinates.
const ARRAY_FORMAT_CUSTOM0 = 64 enum ArrayFormatBitfield#
Flag used to mark an array of custom per-vertex data for the first set of custom data.
const ARRAY_FORMAT_CUSTOM1 = 128 enum ArrayFormatBitfield#
Flag used to mark an array of custom per-vertex data for the second set of custom data.
const ARRAY_FORMAT_CUSTOM2 = 256 enum ArrayFormatBitfield#
Flag used to mark an array of custom per-vertex data for the third set of custom data.
const ARRAY_FORMAT_CUSTOM3 = 512 enum ArrayFormatBitfield#
Flag used to mark an array of custom per-vertex data for the fourth set of custom data.
const ARRAY_FORMAT_BONES = 1024 enum ArrayFormatBitfield#
Flag used to mark a bone information array.
const ARRAY_FORMAT_WEIGHTS = 2048 enum ArrayFormatBitfield#
Flag used to mark a weights array.
const ARRAY_FORMAT_INDEX = 4096 enum ArrayFormatBitfield#
Flag used to mark an index array.
const ARRAY_FORMAT_BLEND_SHAPE_MASK = 7 enum ArrayFormatBitfield#
Mask of mesh channels permitted in blend shapes.
const ARRAY_FORMAT_CUSTOM_BASE = 13 enum ArrayFormatBitfield#
Shift of first custom channel.
const ARRAY_FORMAT_CUSTOM_BITS = 3 enum ArrayFormatBitfield#
Number of format bits per custom channel. See ArrayCustomFormat.
const ARRAY_FORMAT_CUSTOM0_SHIFT = 13 enum ArrayFormatBitfield#
Amount to shift ArrayCustomFormat for custom channel index 0.
const ARRAY_FORMAT_CUSTOM1_SHIFT = 16 enum ArrayFormatBitfield#
Amount to shift ArrayCustomFormat for custom channel index 1.
const ARRAY_FORMAT_CUSTOM2_SHIFT = 19 enum ArrayFormatBitfield#
Amount to shift ArrayCustomFormat for custom channel index 2.
const ARRAY_FORMAT_CUSTOM3_SHIFT = 22 enum ArrayFormatBitfield#
Amount to shift ArrayCustomFormat for custom channel index 3.
const ARRAY_FORMAT_CUSTOM_MASK = 7 enum ArrayFormatBitfield#
Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See ArrayCustomFormat.
const ARRAY_COMPRESS_FLAGS_BASE = 25 enum ArrayFormatBitfield#
Shift of first compress flag. Compress flags should be passed to ArrayMesh.add_surface_from_arrays and SurfaceTool.commit.
const ARRAY_FLAG_USE_2D_VERTICES = 33554432 enum ArrayFormatBitfield#
Flag used to mark that the array contains 2D vertices.
const ARRAY_FLAG_USE_DYNAMIC_UPDATE = 67108864 enum ArrayFormatBitfield#
Flag indices that the mesh data will use GL_DYNAMIC_DRAW on GLES. Unused on Vulkan.
const ARRAY_FLAG_USE_8_BONE_WEIGHTS = 134217728 enum ArrayFormatBitfield#
Flag used to mark that the array uses 8 bone weights instead of 4.
const ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY = 268435456 enum ArrayFormatBitfield#
Flag used to mark that the mesh does not have a vertex array and instead will infer vertex positions in the shader using indices and other information.
const ARRAY_FLAG_COMPRESS_ATTRIBUTES = 536870912 enum ArrayFormatBitfield#
Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can.
const ARRAY_FLAG_FORMAT_VERSION_BASE = 35 enum ArrayFormatBitfield#
Flag used to mark the start of the bits used to store the mesh version.
const ARRAY_FLAG_FORMAT_VERSION_SHIFT = 35 enum ArrayFormatBitfield#
Flag used to shift a mesh format int to bring the version into the lowest digits.
const ARRAY_FLAG_FORMAT_VERSION_1 = 0 enum ArrayFormatBitfield#
Flag used to record the format used by prior mesh versions before the introduction of a version.
const ARRAY_FLAG_FORMAT_VERSION_2 = 34359738368 enum ArrayFormatBitfield#
Flag used to record the second iteration of the mesh version flag. The primary difference between this and ARRAY_FLAG_FORMAT_VERSION_1 is that this version supports ARRAY_FLAG_COMPRESS_ATTRIBUTES and in this version vertex positions are de-interleaved from normals and tangents.
const ARRAY_FLAG_FORMAT_CURRENT_VERSION = 34359738368 enum ArrayFormatBitfield#
Flag used to record the current version that the engine expects. Currently this is the same as ARRAY_FLAG_FORMAT_VERSION_2.
const ARRAY_FLAG_FORMAT_VERSION_MASK = 255 enum ArrayFormatBitfield#
Flag used to isolate the bits used for mesh version after using ARRAY_FLAG_FORMAT_VERSION_SHIFT to shift them into place.
const PRIMITIVE_POINTS = 0 enum PrimitiveType#
Primitive to draw consists of points.
const PRIMITIVE_LINES = 1 enum PrimitiveType#
Primitive to draw consists of lines.
const PRIMITIVE_LINE_STRIP = 2 enum PrimitiveType#
Primitive to draw consists of a line strip from start to end.
const PRIMITIVE_TRIANGLES = 3 enum PrimitiveType#
Primitive to draw consists of triangles.
const PRIMITIVE_TRIANGLE_STRIP = 4 enum PrimitiveType#
Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle).
const PRIMITIVE_MAX = 5 enum PrimitiveType#
Represents the size of the PrimitiveType enum.
const BLEND_SHAPE_MODE_NORMALIZED = 0 enum BlendShapeMode#
Blend shapes are normalized.
const BLEND_SHAPE_MODE_RELATIVE = 1 enum BlendShapeMode#
Blend shapes are relative to base weight.
const MULTIMESH_TRANSFORM_2D = 0 enum MultimeshTransformFormat#
Use Transform2D to store MultiMesh transform.
const MULTIMESH_TRANSFORM_3D = 1 enum MultimeshTransformFormat#
Use Transform3D to store MultiMesh transform.
const MULTIMESH_INTERP_QUALITY_FAST = 0 enum MultimeshPhysicsInterpolationQuality#
MultiMesh physics interpolation favors speed over quality.
const MULTIMESH_INTERP_QUALITY_HIGH = 1 enum MultimeshPhysicsInterpolationQuality#
MultiMesh physics interpolation favors quality over speed.
const LIGHT_PROJECTOR_FILTER_NEAREST = 0 enum LightProjectorFilter#
Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.
const LIGHT_PROJECTOR_FILTER_LINEAR = 1 enum LightProjectorFilter#
Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.
const LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS = 2 enum LightProjectorFilter#
Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
const LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS = 3 enum LightProjectorFilter#
Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
const LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC = 4 enum LightProjectorFilter#
Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.
const LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC = 5 enum LightProjectorFilter#
Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.
const LIGHT_DIRECTIONAL = 0 enum LightType#
Directional (sun/moon) light (see DirectionalLight3D).
const LIGHT_OMNI = 1 enum LightType#
Omni light (see OmniLight3D).
const LIGHT_SPOT = 2 enum LightType#
Spot light (see SpotLight3D).
const LIGHT_PARAM_ENERGY = 0 enum LightParam#
The light's energy multiplier.
const LIGHT_PARAM_INDIRECT_ENERGY = 1 enum LightParam#
The light's indirect energy multiplier (final indirect energy is LIGHT_PARAM_ENERGY * LIGHT_PARAM_INDIRECT_ENERGY).
const LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY = 2 enum LightParam#
The light's volumetric fog energy multiplier (final volumetric fog energy is LIGHT_PARAM_ENERGY * LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY).
const LIGHT_PARAM_SPECULAR = 3 enum LightParam#
The light's influence on specularity.
const LIGHT_PARAM_RANGE = 4 enum LightParam#
The light's range.
const LIGHT_PARAM_SIZE = 5 enum LightParam#
The size of the light when using spot light or omni light. The angular size of the light when using directional light.
const LIGHT_PARAM_ATTENUATION = 6 enum LightParam#
The light's attenuation.
const LIGHT_PARAM_SPOT_ANGLE = 7 enum LightParam#
The spotlight's angle.
const LIGHT_PARAM_SPOT_ATTENUATION = 8 enum LightParam#
The spotlight's attenuation.
const LIGHT_PARAM_SHADOW_MAX_DISTANCE = 9 enum LightParam#
The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering).
const LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET = 10 enum LightParam#
Proportion of shadow atlas occupied by the first split.
const LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET = 11 enum LightParam#
Proportion of shadow atlas occupied by the second split.
const LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET = 12 enum LightParam#
Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest.
const LIGHT_PARAM_SHADOW_FADE_START = 13 enum LightParam#
Proportion of shadow max distance where the shadow will start to fade out.
const LIGHT_PARAM_SHADOW_NORMAL_BIAS = 14 enum LightParam#
Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts.
const LIGHT_PARAM_SHADOW_BIAS = 15 enum LightParam#
Bias the shadow lookup to fix self-shadowing artifacts.
const LIGHT_PARAM_SHADOW_PANCAKE_SIZE = 16 enum LightParam#
Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to 0 turns off the pancaking effect.
const LIGHT_PARAM_SHADOW_OPACITY = 17 enum LightParam#
The light's shadow opacity. Values lower than 1.0 make the light appear through shadows. This can be used to fake global illumination at a low performance cost.
const LIGHT_PARAM_SHADOW_BLUR = 18 enum LightParam#
Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible.
const LIGHT_PARAM_TRANSMITTANCE_BIAS = 19 enum LightParam#
const LIGHT_PARAM_INTENSITY = 20 enum LightParam#
Constant representing the intensity of the light, measured in Lumens when dealing with a SpotLight3D or OmniLight3D, or measured in Lux with a DirectionalLight3D. Only used when ProjectSettings.rendering/lights_and_shadows/use_physical_light_units is true.
const LIGHT_PARAM_MAX = 21 enum LightParam#
Represents the size of the LightParam enum.
const LIGHT_BAKE_DISABLED = 0 enum LightBakeMode#
Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights.
const LIGHT_BAKE_STATIC = 1 enum LightBakeMode#
Light is taken into account in static baking (VoxelGI, LightmapGI, SDFGI (Environment.sdfgi_enabled)). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off.
const LIGHT_BAKE_DYNAMIC = 2 enum LightBakeMode#
Light is taken into account in dynamic baking (VoxelGI and SDFGI (Environment.sdfgi_enabled) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to LIGHT_BAKE_STATIC. This has a greater performance cost compared to LIGHT_BAKE_STATIC. When using SDFGI, the update speed of dynamic lights is affected by ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights.
const LIGHT_OMNI_SHADOW_DUAL_PARABOLOID = 0 enum LightOmniShadowMode#
Use a dual paraboloid shadow map for omni lights.
const LIGHT_OMNI_SHADOW_CUBE = 1 enum LightOmniShadowMode#
Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid.
const LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL = 0 enum LightDirectionalShadowMode#
Use orthogonal shadow projection for directional light.
const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS = 1 enum LightDirectionalShadowMode#
Use 2 splits for shadow projection when using directional light.
const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS = 2 enum LightDirectionalShadowMode#
Use 4 splits for shadow projection when using directional light.
const LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY = 0 enum LightDirectionalSkyMode#
Use DirectionalLight3D in both sky rendering and scene lighting.
const LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY = 1 enum LightDirectionalSkyMode#
Only use DirectionalLight3D in scene lighting.
const LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY = 2 enum LightDirectionalSkyMode#
Only use DirectionalLight3D in sky rendering.
const SHADOW_QUALITY_HARD = 0 enum ShadowQuality#
Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the Light3D.shadow_blur property is ignored if Light3D.light_size and Light3D.light_angular_distance is 0.0.
Note: The variable shadow blur performed by Light3D.light_size and Light3D.light_angular_distance is still effective when using hard shadow filtering. In this case, Light3D.shadow_blur is taken into account. However, the results will not be blurred, instead the blur amount is treated as a maximum radius for the penumbra.
const SHADOW_QUALITY_SOFT_VERY_LOW = 1 enum ShadowQuality#
Very low shadow filtering quality (faster). When using this quality setting, Light3D.shadow_blur is automatically multiplied by 0.75× to avoid introducing too much noise. This division only applies to lights whose Light3D.light_size or Light3D.light_angular_distance is 0.0).
const SHADOW_QUALITY_SOFT_LOW = 2 enum ShadowQuality#
Low shadow filtering quality (fast).
const SHADOW_QUALITY_SOFT_MEDIUM = 3 enum ShadowQuality#
Medium low shadow filtering quality (average).
const SHADOW_QUALITY_SOFT_HIGH = 4 enum ShadowQuality#
High low shadow filtering quality (slow). When using this quality setting, Light3D.shadow_blur is automatically multiplied by 1.5× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose Light3D.light_size or Light3D.light_angular_distance is 0.0).
const SHADOW_QUALITY_SOFT_ULTRA = 5 enum ShadowQuality#
Highest low shadow filtering quality (slowest). When using this quality setting, Light3D.shadow_blur is automatically multiplied by 2× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose Light3D.light_size or Light3D.light_angular_distance is 0.0).
const SHADOW_QUALITY_MAX = 6 enum ShadowQuality#
Represents the size of the ShadowQuality enum.
const REFLECTION_PROBE_UPDATE_ONCE = 0 enum ReflectionProbeUpdateMode#
Reflection probe will update reflections once and then stop.
const REFLECTION_PROBE_UPDATE_ALWAYS = 1 enum ReflectionProbeUpdateMode#
Reflection probe will update each frame. This mode is necessary to capture moving objects.
const REFLECTION_PROBE_AMBIENT_DISABLED = 0 enum ReflectionProbeAmbientMode#
Do not apply any ambient lighting inside the reflection probe's box defined by its size.
const REFLECTION_PROBE_AMBIENT_ENVIRONMENT = 1 enum ReflectionProbeAmbientMode#
Apply automatically-sourced environment lighting inside the reflection probe's box defined by its size.
const REFLECTION_PROBE_AMBIENT_COLOR = 2 enum ReflectionProbeAmbientMode#
Apply custom ambient lighting inside the reflection probe's box defined by its size. See reflection_probe_set_ambient_color and reflection_probe_set_ambient_energy.
const DECAL_TEXTURE_ALBEDO = 0 enum DecalTexture#
Albedo texture slot in a decal (Decal.texture_albedo).
const DECAL_TEXTURE_NORMAL = 1 enum DecalTexture#
Normal map texture slot in a decal (Decal.texture_normal).
const DECAL_TEXTURE_ORM = 2 enum DecalTexture#
Occlusion/Roughness/Metallic texture slot in a decal (Decal.texture_orm).
const DECAL_TEXTURE_EMISSION = 3 enum DecalTexture#
Emission texture slot in a decal (Decal.texture_emission).
const DECAL_TEXTURE_MAX = 4 enum DecalTexture#
Represents the size of the DecalTexture enum.
const DECAL_FILTER_NEAREST = 0 enum DecalFilter#
Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.
const DECAL_FILTER_LINEAR = 1 enum DecalFilter#
Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.
const DECAL_FILTER_NEAREST_MIPMAPS = 2 enum DecalFilter#
Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
const DECAL_FILTER_LINEAR_MIPMAPS = 3 enum DecalFilter#
Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
const DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC = 4 enum DecalFilter#
Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.
const DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC = 5 enum DecalFilter#
Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.
const VOXEL_GI_QUALITY_LOW = 0 enum VoxelGIQuality#
Low VoxelGI rendering quality using 4 cones.
const VOXEL_GI_QUALITY_HIGH = 1 enum VoxelGIQuality#
High VoxelGI rendering quality using 6 cones.
const PARTICLES_MODE_2D = 0 enum ParticlesMode#
2D particles.
const PARTICLES_MODE_3D = 1 enum ParticlesMode#
3D particles.
const PARTICLES_TRANSFORM_ALIGN_DISABLED = 0 enum ParticlesTransformAlign#
const PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD = 1 enum ParticlesTransformAlign#
const PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY = 2 enum ParticlesTransformAlign#
const PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY = 3 enum ParticlesTransformAlign#
const PARTICLES_EMIT_FLAG_POSITION = 1#
const PARTICLES_EMIT_FLAG_ROTATION_SCALE = 2#
const PARTICLES_EMIT_FLAG_VELOCITY = 4#
const PARTICLES_EMIT_FLAG_COLOR = 8#
const PARTICLES_EMIT_FLAG_CUSTOM = 16#
const PARTICLES_DRAW_ORDER_INDEX = 0 enum ParticlesDrawOrder#
Draw particles in the order that they appear in the particles array.
const PARTICLES_DRAW_ORDER_LIFETIME = 1 enum ParticlesDrawOrder#
Sort particles based on their lifetime. In other words, the particle with the highest lifetime is drawn at the front.
const PARTICLES_DRAW_ORDER_REVERSE_LIFETIME = 2 enum ParticlesDrawOrder#
Sort particles based on the inverse of their lifetime. In other words, the particle with the lowest lifetime is drawn at the front.
const PARTICLES_DRAW_ORDER_VIEW_DEPTH = 3 enum ParticlesDrawOrder#
Sort particles based on their distance to the camera.
const PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT = 0 enum ParticlesCollisionType#
const PARTICLES_COLLISION_TYPE_BOX_ATTRACT = 1 enum ParticlesCollisionType#
const PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT = 2 enum ParticlesCollisionType#
const PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE = 3 enum ParticlesCollisionType#
const PARTICLES_COLLISION_TYPE_BOX_COLLIDE = 4 enum ParticlesCollisionType#
const PARTICLES_COLLISION_TYPE_SDF_COLLIDE = 5 enum ParticlesCollisionType#
const PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE = 6 enum ParticlesCollisionType#
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256 = 0 enum ParticlesCollisionHeightfieldResolution#
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512 = 1 enum ParticlesCollisionHeightfieldResolution#
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024 = 2 enum ParticlesCollisionHeightfieldResolution#
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048 = 3 enum ParticlesCollisionHeightfieldResolution#
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096 = 4 enum ParticlesCollisionHeightfieldResolution#
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192 = 5 enum ParticlesCollisionHeightfieldResolution#
const PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX = 6 enum ParticlesCollisionHeightfieldResolution#
Represents the size of the ParticlesCollisionHeightfieldResolution enum.
const FOG_VOLUME_SHAPE_ELLIPSOID = 0 enum FogVolumeShape#
FogVolume will be shaped like an ellipsoid (stretched sphere).
const FOG_VOLUME_SHAPE_CONE = 1 enum FogVolumeShape#
FogVolume will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the size. The cone will be adjusted to fit within the size. Rotate the FogVolume node to reorient the cone. Non-uniform scaling via size is not supported (scale the FogVolume node instead).
const FOG_VOLUME_SHAPE_CYLINDER = 2 enum FogVolumeShape#
FogVolume will be shaped like an upright cylinder (in local coordinates). Rotate the FogVolume node to reorient the cylinder. The cylinder will be adjusted to fit within the size. Non-uniform scaling via size is not supported (scale the FogVolume node instead).
const FOG_VOLUME_SHAPE_BOX = 3 enum FogVolumeShape#
FogVolume will be shaped like a box.
const FOG_VOLUME_SHAPE_WORLD = 4 enum FogVolumeShape#
FogVolume will have no shape, will cover the whole world and will not be culled.
const FOG_VOLUME_SHAPE_MAX = 5 enum FogVolumeShape#
Represents the size of the FogVolumeShape enum.
const VIEWPORT_SCALING_3D_MODE_BILINEAR = 0 enum ViewportScaling3DMode#
Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.scaling_3d_scale. Values less than 1.0 will result in undersampling while values greater than 1.0 will result in supersampling. A value of 1.0 disables scaling.
const VIEWPORT_SCALING_3D_MODE_FSR = 1 enum ViewportScaling3DMode#
Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.scaling_3d_scale. Values less than 1.0 will be result in the viewport being upscaled using FSR. Values greater than 1.0 are not supported and bilinear downsampling will be used instead. A value of 1.0 disables scaling.
const VIEWPORT_SCALING_3D_MODE_FSR2 = 2 enum ViewportScaling3DMode#
Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.scaling_3d_scale. Values less than 1.0 will be result in the viewport being upscaled using FSR2. Values greater than 1.0 are not supported and bilinear downsampling will be used instead. A value of 1.0 will use FSR2 at native resolution as a TAA solution.
const VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL = 3 enum ViewportScaling3DMode#
Use MetalFX spatial upscaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.scaling_3d_scale. Values less than 1.0 will be result in the viewport being upscaled using MetalFX. Values greater than 1.0 are not supported and bilinear downsampling will be used instead. A value of 1.0 disables scaling.
Note: Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
const VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL = 4 enum ViewportScaling3DMode#
Use MetalFX temporal upscaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.scaling_3d_scale. Values less than 1.0 will be result in the viewport being upscaled using MetalFX. Values greater than 1.0 are not supported and bilinear downsampling will be used instead. A value of 1.0 will use MetalFX at native resolution as a TAA solution.
Note: Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
const VIEWPORT_SCALING_3D_MODE_MAX = 5 enum ViewportScaling3DMode#
Represents the size of the ViewportScaling3DMode enum.
const VIEWPORT_UPDATE_DISABLED = 0 enum ViewportUpdateMode#
Do not update the viewport's render target.
const VIEWPORT_UPDATE_ONCE = 1 enum ViewportUpdateMode#
Update the viewport's render target once, then switch to VIEWPORT_UPDATE_DISABLED.
const VIEWPORT_UPDATE_WHEN_VISIBLE = 2 enum ViewportUpdateMode#
Update the viewport's render target only when it is visible. This is the default value.
const VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE = 3 enum ViewportUpdateMode#
Update the viewport's render target only when its parent is visible.
const VIEWPORT_UPDATE_ALWAYS = 4 enum ViewportUpdateMode#
Always update the viewport's render target.
const VIEWPORT_CLEAR_ALWAYS = 0 enum ViewportClearMode#
Always clear the viewport's render target before drawing.
const VIEWPORT_CLEAR_NEVER = 1 enum ViewportClearMode#
Never clear the viewport's render target.
const VIEWPORT_CLEAR_ONLY_NEXT_FRAME = 2 enum ViewportClearMode#
Clear the viewport's render target on the next frame, then switch to VIEWPORT_CLEAR_NEVER.
const VIEWPORT_ENVIRONMENT_DISABLED = 0 enum ViewportEnvironmentMode#
Disable rendering of 3D environment over 2D canvas.
const VIEWPORT_ENVIRONMENT_ENABLED = 1 enum ViewportEnvironmentMode#
Enable rendering of 3D environment over 2D canvas.
const VIEWPORT_ENVIRONMENT_INHERIT = 2 enum ViewportEnvironmentMode#
Inherit enable/disable value from parent. If the topmost parent is also set to VIEWPORT_ENVIRONMENT_INHERIT, then this has the same behavior as VIEWPORT_ENVIRONMENT_ENABLED.
const VIEWPORT_ENVIRONMENT_MAX = 3 enum ViewportEnvironmentMode#
Represents the size of the ViewportEnvironmentMode enum.
const VIEWPORT_SDF_OVERSIZE_100_PERCENT = 0 enum ViewportSDFOversize#
Do not oversize the 2D signed distance field. Occluders may disappear when touching the viewport's edges, and GPUParticles3D collision may stop working earlier than intended. This has the lowest GPU requirements.
const VIEWPORT_SDF_OVERSIZE_120_PERCENT = 1 enum ViewportSDFOversize#
2D signed distance field covers 20% of the viewport's size outside the viewport on each side (top, right, bottom, left).
const VIEWPORT_SDF_OVERSIZE_150_PERCENT = 2 enum ViewportSDFOversize#
2D signed distance field covers 50% of the viewport's size outside the viewport on each side (top, right, bottom, left).
const VIEWPORT_SDF_OVERSIZE_200_PERCENT = 3 enum ViewportSDFOversize#
2D signed distance field covers 100% of the viewport's size outside the viewport on each side (top, right, bottom, left). This has the highest GPU requirements.
const VIEWPORT_SDF_OVERSIZE_MAX = 4 enum ViewportSDFOversize#
Represents the size of the ViewportSDFOversize enum.
const VIEWPORT_SDF_SCALE_100_PERCENT = 0 enum ViewportSDFScale#
Full resolution 2D signed distance field scale. This has the highest GPU requirements.
const VIEWPORT_SDF_SCALE_50_PERCENT = 1 enum ViewportSDFScale#
Half resolution 2D signed distance field scale on each axis (25% of the viewport pixel count).
const VIEWPORT_SDF_SCALE_25_PERCENT = 2 enum ViewportSDFScale#
Quarter resolution 2D signed distance field scale on each axis (6.25% of the viewport pixel count). This has the lowest GPU requirements.
const VIEWPORT_SDF_SCALE_MAX = 3 enum ViewportSDFScale#
Represents the size of the ViewportSDFScale enum.
const VIEWPORT_MSAA_DISABLED = 0 enum ViewportMSAA#
Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting.
const VIEWPORT_MSAA_2X = 1 enum ViewportMSAA#
Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance.
const VIEWPORT_MSAA_4X = 2 enum ViewportMSAA#
Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance.
const VIEWPORT_MSAA_8X = 3 enum ViewportMSAA#
Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high impact on performance. Likely unsupported on low-end and older hardware.
const VIEWPORT_MSAA_MAX = 4 enum ViewportMSAA#
Represents the size of the ViewportMSAA enum.
const VIEWPORT_ANISOTROPY_DISABLED = 0 enum ViewportAnisotropicFiltering#
Anisotropic filtering is disabled.
const VIEWPORT_ANISOTROPY_2X = 1 enum ViewportAnisotropicFiltering#
Use 2× anisotropic filtering.
const VIEWPORT_ANISOTROPY_4X = 2 enum ViewportAnisotropicFiltering#
Use 4× anisotropic filtering. This is the default value.
const VIEWPORT_ANISOTROPY_8X = 3 enum ViewportAnisotropicFiltering#
Use 8× anisotropic filtering.
const VIEWPORT_ANISOTROPY_16X = 4 enum ViewportAnisotropicFiltering#
Use 16× anisotropic filtering.
const VIEWPORT_ANISOTROPY_MAX = 5 enum ViewportAnisotropicFiltering#
Represents the size of the ViewportAnisotropicFiltering enum.
const VIEWPORT_SCREEN_SPACE_AA_DISABLED = 0 enum ViewportScreenSpaceAA#
Do not perform any antialiasing in the full screen post-process.
const VIEWPORT_SCREEN_SPACE_AA_FXAA = 1 enum ViewportScreenSpaceAA#
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.
const VIEWPORT_SCREEN_SPACE_AA_MAX = 2 enum ViewportScreenSpaceAA#
Represents the size of the ViewportScreenSpaceAA enum.
const VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW = 0 enum ViewportOcclusionCullingBuildQuality#
Low occlusion culling BVH build quality (as defined by Embree). Results in the lowest CPU usage, but least effective culling.
const VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM = 1 enum ViewportOcclusionCullingBuildQuality#
Medium occlusion culling BVH build quality (as defined by Embree).
const VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH = 2 enum ViewportOcclusionCullingBuildQuality#
High occlusion culling BVH build quality (as defined by Embree). Results in the highest CPU usage, but most effective culling.
const VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME = 0 enum ViewportRenderInfo#
Number of objects drawn in a single frame.
const VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME = 1 enum ViewportRenderInfo#
Number of points, lines, or triangles drawn in a single frame.
const VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME = 2 enum ViewportRenderInfo#
Number of draw calls during this frame.
const VIEWPORT_RENDER_INFO_MAX = 3 enum ViewportRenderInfo#
Represents the size of the ViewportRenderInfo enum.
const VIEWPORT_RENDER_INFO_TYPE_VISIBLE = 0 enum ViewportRenderInfoType#
Visible render pass (excluding shadows).
const VIEWPORT_RENDER_INFO_TYPE_SHADOW = 1 enum ViewportRenderInfoType#
Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits.
const VIEWPORT_RENDER_INFO_TYPE_CANVAS = 2 enum ViewportRenderInfoType#
Canvas item rendering. This includes all 2D rendering.
const VIEWPORT_RENDER_INFO_TYPE_MAX = 3 enum ViewportRenderInfoType#
Represents the size of the ViewportRenderInfoType enum.
const VIEWPORT_DEBUG_DRAW_DISABLED = 0 enum ViewportDebugDraw#
Debug draw is disabled. Default setting.
const VIEWPORT_DEBUG_DRAW_UNSHADED = 1 enum ViewportDebugDraw#
Objects are displayed without light information.
const VIEWPORT_DEBUG_DRAW_LIGHTING = 2 enum ViewportDebugDraw#
Objects are displayed with only light information.
const VIEWPORT_DEBUG_DRAW_OVERDRAW = 3 enum ViewportDebugDraw#
Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others.
Note: When using this debug draw mode, custom shaders will be ignored. This means vertex displacement won't be visible anymore.
const VIEWPORT_DEBUG_DRAW_WIREFRAME = 4 enum ViewportDebugDraw#
Debug draw draws objects in wireframe.
Note: set_debug_generate_wireframes must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer.
const VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER = 5 enum ViewportDebugDraw#
Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects.
const VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO = 6 enum ViewportDebugDraw#
Objects are displayed with only the albedo value from VoxelGIs.
const VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING = 7 enum ViewportDebugDraw#
Objects are displayed with only the lighting value from VoxelGIs.
const VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION = 8 enum ViewportDebugDraw#
Objects are displayed with only the emission color from VoxelGIs.
const VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS = 9 enum ViewportDebugDraw#
Draws the shadow atlas that stores shadows from OmniLight3Ds and SpotLight3Ds in the upper left quadrant of the Viewport.
const VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS = 10 enum ViewportDebugDraw#
Draws the shadow atlas that stores shadows from DirectionalLight3Ds in the upper left quadrant of the Viewport.
The slice of the camera frustum related to the shadow map cascade is superimposed to visualize coverage. The color of each slice matches the colors used for VIEWPORT_DEBUG_DRAW_PSSM_SPLITS. When shadow cascades are blended the overlap is taken into account when drawing the frustum slices.
The last cascade shows all frustum slices to illustrate the coverage of all slices.
const VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE = 11 enum ViewportDebugDraw#
Draws the estimated scene luminance. This is a 1×1 texture that is generated when autoexposure is enabled to control the scene's exposure.
const VIEWPORT_DEBUG_DRAW_SSAO = 12 enum ViewportDebugDraw#
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.
const VIEWPORT_DEBUG_DRAW_SSIL = 13 enum ViewportDebugDraw#
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.
const VIEWPORT_DEBUG_DRAW_PSSM_SPLITS = 14 enum ViewportDebugDraw#
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, yellow.
const VIEWPORT_DEBUG_DRAW_DECAL_ATLAS = 15 enum ViewportDebugDraw#
Draws the decal atlas that stores decal textures from Decals.
const VIEWPORT_DEBUG_DRAW_SDFGI = 16 enum ViewportDebugDraw#
Draws SDFGI cascade data. This is the data structure that is used to bounce lighting against and create reflections.
const VIEWPORT_DEBUG_DRAW_SDFGI_PROBES = 17 enum ViewportDebugDraw#
Draws SDFGI probe data. This is the data structure that is used to give indirect lighting dynamic objects moving within the scene.
const VIEWPORT_DEBUG_DRAW_GI_BUFFER = 18 enum ViewportDebugDraw#
Draws the global illumination buffer (VoxelGI or SDFGI).
const VIEWPORT_DEBUG_DRAW_DISABLE_LOD = 19 enum ViewportDebugDraw#
Disable mesh LOD. All meshes are drawn with full detail, which can be used to compare performance.
const VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS = 20 enum ViewportDebugDraw#
Draws the OmniLight3D cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting.
const VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS = 21 enum ViewportDebugDraw#
Draws the SpotLight3D cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting.
const VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS = 22 enum ViewportDebugDraw#
Draws the Decal cluster. Clustering determines where decals are positioned in screen-space, which allows the engine to only process these portions of the screen for decals.
const VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES = 23 enum ViewportDebugDraw#
Draws the ReflectionProbe cluster. Clustering determines where reflection probes are positioned in screen-space, which allows the engine to only process these portions of the screen for reflection probes.
const VIEWPORT_DEBUG_DRAW_OCCLUDERS = 24 enum ViewportDebugDraw#
Draws the occlusion culling buffer. This low-resolution occlusion culling buffer is rasterized on the CPU and is used to check whether instances are occluded by other objects.
const VIEWPORT_DEBUG_DRAW_MOTION_VECTORS = 25 enum ViewportDebugDraw#
Draws the motion vectors buffer. This is used by temporal antialiasing to correct for motion that occurs during gameplay.
const VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER = 26 enum ViewportDebugDraw#
Internal buffer is drawn instead of regular scene so you can see the per-pixel output that will be used by post-processing effects.
const VIEWPORT_VRS_DISABLED = 0 enum ViewportVRSMode#
Variable rate shading is disabled.
const VIEWPORT_VRS_TEXTURE = 1 enum ViewportVRSMode#
Variable rate shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.
const VIEWPORT_VRS_XR = 2 enum ViewportVRSMode#
Variable rate shading texture is supplied by the primary XRInterface. Note that this may override the update mode.
const VIEWPORT_VRS_MAX = 3 enum ViewportVRSMode#
Represents the size of the ViewportVRSMode enum.
const VIEWPORT_VRS_UPDATE_DISABLED = 0 enum ViewportVRSUpdateMode#
The input texture for variable rate shading will not be processed.
const VIEWPORT_VRS_UPDATE_ONCE = 1 enum ViewportVRSUpdateMode#
The input texture for variable rate shading will be processed once.
const VIEWPORT_VRS_UPDATE_ALWAYS = 2 enum ViewportVRSUpdateMode#
The input texture for variable rate shading will be processed each frame.
const VIEWPORT_VRS_UPDATE_MAX = 3 enum ViewportVRSUpdateMode#
Represents the size of the ViewportVRSUpdateMode enum.
const SKY_MODE_AUTOMATIC = 0 enum SkyMode#
Automatically selects the appropriate process mode based on your sky shader. If your shader uses TIME or POSITION, this will use SKY_MODE_REALTIME. If your shader uses any of the LIGHT_* variables or any custom uniforms, this uses SKY_MODE_INCREMENTAL. Otherwise, this defaults to SKY_MODE_QUALITY.
const SKY_MODE_QUALITY = 1 enum SkyMode#
Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than SKY_MODE_REALTIME but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing ProjectSettings.rendering/reflections/sky_reflections/ggx_samples.
const SKY_MODE_INCREMENTAL = 2 enum SkyMode#
Uses the same high quality importance sampling to process the radiance map as SKY_MODE_QUALITY, but updates over several frames. The number of frames is determined by ProjectSettings.rendering/reflections/sky_reflections/roughness_layers. Use this when you need highest quality radiance maps, but have a sky that updates slowly.
const SKY_MODE_REALTIME = 3 enum SkyMode#
Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality.
Note: The fast filtering algorithm is limited to 256×256 cubemaps, so sky_set_radiance_size must be set to 256. Otherwise, a warning is printed and the overridden radiance size is ignored.
const COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR = 1 enum CompositorEffectFlags#
The rendering effect requires the color buffer to be resolved if MSAA is enabled.
const COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH = 2 enum CompositorEffectFlags#
The rendering effect requires the depth buffer to be resolved if MSAA is enabled.
const COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS = 4 enum CompositorEffectFlags#
The rendering effect requires motion vectors to be produced.
const COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS = 8 enum CompositorEffectFlags#
The rendering effect requires normals and roughness g-buffer to be produced (Forward+ only).
const COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR = 16 enum CompositorEffectFlags#
The rendering effect requires specular data to be separated out (Forward+ only).
const COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_OPAQUE = 0 enum CompositorEffectCallbackType#
The callback is called before our opaque rendering pass, but after depth prepass (if applicable).
const COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_OPAQUE = 1 enum CompositorEffectCallbackType#
The callback is called after our opaque rendering pass, but before our sky is rendered.
const COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_SKY = 2 enum CompositorEffectCallbackType#
The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections).
const COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT = 3 enum CompositorEffectCallbackType#
The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers.
const COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT = 4 enum CompositorEffectCallbackType#
The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target.
const COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY = -1 enum CompositorEffectCallbackType#
const ENV_BG_CLEAR_COLOR = 0 enum EnvironmentBG#
Use the clear color as background.
const ENV_BG_COLOR = 1 enum EnvironmentBG#
Use a specified color as the background.
const ENV_BG_SKY = 2 enum EnvironmentBG#
Use a sky resource for the background.
const ENV_BG_CANVAS = 3 enum EnvironmentBG#
Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world.
const ENV_BG_KEEP = 4 enum EnvironmentBG#
Do not clear the background, use whatever was rendered last frame as the background.
const ENV_BG_CAMERA_FEED = 5 enum EnvironmentBG#
Displays a camera feed in the background.
const ENV_BG_MAX = 6 enum EnvironmentBG#
Represents the size of the EnvironmentBG enum.
const ENV_AMBIENT_SOURCE_BG = 0 enum EnvironmentAmbientSource#
Gather ambient light from whichever source is specified as the background.
const ENV_AMBIENT_SOURCE_DISABLED = 1 enum EnvironmentAmbientSource#
Disable ambient light.
const ENV_AMBIENT_SOURCE_COLOR = 2 enum EnvironmentAmbientSource#
Specify a specific Color for ambient light.
const ENV_AMBIENT_SOURCE_SKY = 3 enum EnvironmentAmbientSource#
Gather ambient light from the Sky regardless of what the background is.
const ENV_REFLECTION_SOURCE_BG = 0 enum EnvironmentReflectionSource#
Use the background for reflections.
const ENV_REFLECTION_SOURCE_DISABLED = 1 enum EnvironmentReflectionSource#
Disable reflections.
const ENV_REFLECTION_SOURCE_SKY = 2 enum EnvironmentReflectionSource#
Use the Sky for reflections regardless of what the background is.
const ENV_GLOW_BLEND_MODE_ADDITIVE = 0 enum EnvironmentGlowBlendMode#
Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
const ENV_GLOW_BLEND_MODE_SCREEN = 1 enum EnvironmentGlowBlendMode#
Screen glow blending mode. Increases brightness, used frequently with bloom.
const ENV_GLOW_BLEND_MODE_SOFTLIGHT = 2 enum EnvironmentGlowBlendMode#
Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).
const ENV_GLOW_BLEND_MODE_REPLACE = 3 enum EnvironmentGlowBlendMode#
Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.
const ENV_GLOW_BLEND_MODE_MIX = 4 enum EnvironmentGlowBlendMode#
Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
const ENV_FOG_MODE_EXPONENTIAL = 0 enum EnvironmentFogMode#
Use a physically-based fog model defined primarily by fog density.
const ENV_FOG_MODE_DEPTH = 1 enum EnvironmentFogMode#
Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control.
const ENV_TONE_MAPPER_LINEAR = 0 enum EnvironmentToneMapper#
Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper.
const ENV_TONE_MAPPER_REINHARD = 1 enum EnvironmentToneMapper#
A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than ENV_TONE_MAPPER_LINEAR.
Note: When Environment.tonemap_white is left at the default value of 1.0, ENV_TONE_MAPPER_REINHARD produces an identical image to ENV_TONE_MAPPER_LINEAR.
const ENV_TONE_MAPPER_FILMIC = 2 enum EnvironmentToneMapper#
Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than ENV_TONE_MAPPER_REINHARD. Slightly slower than ENV_TONE_MAPPER_REINHARD.
const ENV_TONE_MAPPER_ACES = 3 enum EnvironmentToneMapper#
Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than ENV_TONE_MAPPER_FILMIC.
Note: This tonemapping operator is called "ACES Fitted" in Godot 3.x.
const ENV_TONE_MAPPER_AGX = 4 enum EnvironmentToneMapper#
Uses a film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option.
Note: Environment.tonemap_white is fixed at a value of 16.29, which makes ENV_TONE_MAPPER_AGX unsuitable for use with the Mobile rendering method.
const ENV_SSR_ROUGHNESS_QUALITY_DISABLED = 0 enum EnvironmentSSRRoughnessQuality#
Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option.
const ENV_SSR_ROUGHNESS_QUALITY_LOW = 1 enum EnvironmentSSRRoughnessQuality#
Low quality of roughness filter for screen-space reflections.
const ENV_SSR_ROUGHNESS_QUALITY_MEDIUM = 2 enum EnvironmentSSRRoughnessQuality#
Medium quality of roughness filter for screen-space reflections.
const ENV_SSR_ROUGHNESS_QUALITY_HIGH = 3 enum EnvironmentSSRRoughnessQuality#
High quality of roughness filter for screen-space reflections. This is the slowest option.
const ENV_SSAO_QUALITY_VERY_LOW = 0 enum EnvironmentSSAOQuality#
Lowest quality of screen-space ambient occlusion.
const ENV_SSAO_QUALITY_LOW = 1 enum EnvironmentSSAOQuality#
Low quality screen-space ambient occlusion.
const ENV_SSAO_QUALITY_MEDIUM = 2 enum EnvironmentSSAOQuality#
Medium quality screen-space ambient occlusion.
const ENV_SSAO_QUALITY_HIGH = 3 enum EnvironmentSSAOQuality#
High quality screen-space ambient occlusion.
const ENV_SSAO_QUALITY_ULTRA = 4 enum EnvironmentSSAOQuality#
Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
const ENV_SSIL_QUALITY_VERY_LOW = 0 enum EnvironmentSSILQuality#
Lowest quality of screen-space indirect lighting.
const ENV_SSIL_QUALITY_LOW = 1 enum EnvironmentSSILQuality#
Low quality screen-space indirect lighting.
const ENV_SSIL_QUALITY_MEDIUM = 2 enum EnvironmentSSILQuality#
High quality screen-space indirect lighting.
const ENV_SSIL_QUALITY_HIGH = 3 enum EnvironmentSSILQuality#
High quality screen-space indirect lighting.
const ENV_SSIL_QUALITY_ULTRA = 4 enum EnvironmentSSILQuality#
Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
const ENV_SDFGI_Y_SCALE_50_PERCENT = 0 enum EnvironmentSDFGIYScale#
Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality.
const ENV_SDFGI_Y_SCALE_75_PERCENT = 1 enum EnvironmentSDFGIYScale#
Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales.
const ENV_SDFGI_Y_SCALE_100_PERCENT = 2 enum EnvironmentSDFGIYScale#
Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings.
const ENV_SDFGI_RAY_COUNT_4 = 0 enum EnvironmentSDFGIRayCount#
Throw 4 rays per frame when converging SDFGI. This has the lowest GPU requirements, but creates the most noisy result.
const ENV_SDFGI_RAY_COUNT_8 = 1 enum EnvironmentSDFGIRayCount#
Throw 8 rays per frame when converging SDFGI.
const ENV_SDFGI_RAY_COUNT_16 = 2 enum EnvironmentSDFGIRayCount#
Throw 16 rays per frame when converging SDFGI.
const ENV_SDFGI_RAY_COUNT_32 = 3 enum EnvironmentSDFGIRayCount#
Throw 32 rays per frame when converging SDFGI.
const ENV_SDFGI_RAY_COUNT_64 = 4 enum EnvironmentSDFGIRayCount#
Throw 64 rays per frame when converging SDFGI.
const ENV_SDFGI_RAY_COUNT_96 = 5 enum EnvironmentSDFGIRayCount#
Throw 96 rays per frame when converging SDFGI. This has high GPU requirements.
const ENV_SDFGI_RAY_COUNT_128 = 6 enum EnvironmentSDFGIRayCount#
Throw 128 rays per frame when converging SDFGI. This has very high GPU requirements, but creates the least noisy result.
const ENV_SDFGI_RAY_COUNT_MAX = 7 enum EnvironmentSDFGIRayCount#
Represents the size of the EnvironmentSDFGIRayCount enum.
const ENV_SDFGI_CONVERGE_IN_5_FRAMES = 0 enum EnvironmentSDFGIFramesToConverge#
Converge SDFGI over 5 frames. This is the most responsive, but creates the most noisy result with a given ray count.
const ENV_SDFGI_CONVERGE_IN_10_FRAMES = 1 enum EnvironmentSDFGIFramesToConverge#
Configure SDFGI to fully converge over 10 frames.
const ENV_SDFGI_CONVERGE_IN_15_FRAMES = 2 enum EnvironmentSDFGIFramesToConverge#
Configure SDFGI to fully converge over 15 frames.
const ENV_SDFGI_CONVERGE_IN_20_FRAMES = 3 enum EnvironmentSDFGIFramesToConverge#
Configure SDFGI to fully converge over 20 frames.
const ENV_SDFGI_CONVERGE_IN_25_FRAMES = 4 enum EnvironmentSDFGIFramesToConverge#
Configure SDFGI to fully converge over 25 frames.
const ENV_SDFGI_CONVERGE_IN_30_FRAMES = 5 enum EnvironmentSDFGIFramesToConverge#
Configure SDFGI to fully converge over 30 frames. This is the least responsive, but creates the least noisy result with a given ray count.
const ENV_SDFGI_CONVERGE_MAX = 6 enum EnvironmentSDFGIFramesToConverge#
Represents the size of the EnvironmentSDFGIFramesToConverge enum.
const ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME = 0 enum EnvironmentSDFGIFramesToUpdateLight#
Update indirect light from dynamic lights in SDFGI over 1 frame. This is the most responsive, but has the highest GPU requirements.
const ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES = 1 enum EnvironmentSDFGIFramesToUpdateLight#
Update indirect light from dynamic lights in SDFGI over 2 frames.
const ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES = 2 enum EnvironmentSDFGIFramesToUpdateLight#
Update indirect light from dynamic lights in SDFGI over 4 frames.
const ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES = 3 enum EnvironmentSDFGIFramesToUpdateLight#
Update indirect light from dynamic lights in SDFGI over 8 frames.
const ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES = 4 enum EnvironmentSDFGIFramesToUpdateLight#
Update indirect light from dynamic lights in SDFGI over 16 frames. This is the least responsive, but has the lowest GPU requirements.
const ENV_SDFGI_UPDATE_LIGHT_MAX = 5 enum EnvironmentSDFGIFramesToUpdateLight#
Represents the size of the EnvironmentSDFGIFramesToUpdateLight enum.
const SUB_SURFACE_SCATTERING_QUALITY_DISABLED = 0 enum SubSurfaceScatteringQuality#
Disables subsurface scattering entirely, even on materials that have BaseMaterial3D.subsurf_scatter_enabled set to true. This has the lowest GPU requirements.
const SUB_SURFACE_SCATTERING_QUALITY_LOW = 1 enum SubSurfaceScatteringQuality#
Low subsurface scattering quality.
const SUB_SURFACE_SCATTERING_QUALITY_MEDIUM = 2 enum SubSurfaceScatteringQuality#
Medium subsurface scattering quality.
const SUB_SURFACE_SCATTERING_QUALITY_HIGH = 3 enum SubSurfaceScatteringQuality#
High subsurface scattering quality. This has the highest GPU requirements.
const DOF_BOKEH_BOX = 0 enum DOFBokehShape#
Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern.
const DOF_BOKEH_HEXAGON = 1 enum DOFBokehShape#
Calculates DOF blur using a hexagon shaped filter.
const DOF_BOKEH_CIRCLE = 2 enum DOFBokehShape#
Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes).
const DOF_BLUR_QUALITY_VERY_LOW = 0 enum DOFBlurQuality#
Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts.
const DOF_BLUR_QUALITY_LOW = 1 enum DOFBlurQuality#
Low quality DOF blur.
const DOF_BLUR_QUALITY_MEDIUM = 2 enum DOFBlurQuality#
Medium quality DOF blur.
const DOF_BLUR_QUALITY_HIGH = 3 enum DOFBlurQuality#
Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower.
const INSTANCE_NONE = 0 enum InstanceType#
The instance does not have a type.
const INSTANCE_MESH = 1 enum InstanceType#
The instance is a mesh.
const INSTANCE_MULTIMESH = 2 enum InstanceType#
The instance is a multimesh.
const INSTANCE_PARTICLES = 3 enum InstanceType#
The instance is a particle emitter.
const INSTANCE_PARTICLES_COLLISION = 4 enum InstanceType#
The instance is a GPUParticles collision shape.
const INSTANCE_LIGHT = 5 enum InstanceType#
The instance is a light.
const INSTANCE_REFLECTION_PROBE = 6 enum InstanceType#
The instance is a reflection probe.
const INSTANCE_DECAL = 7 enum InstanceType#
The instance is a decal.
const INSTANCE_VOXEL_GI = 8 enum InstanceType#
The instance is a VoxelGI.
const INSTANCE_LIGHTMAP = 9 enum InstanceType#
The instance is a lightmap.
const INSTANCE_OCCLUDER = 10 enum InstanceType#
The instance is an occlusion culling occluder.
const INSTANCE_VISIBLITY_NOTIFIER = 11 enum InstanceType#
The instance is a visible on-screen notifier.
const INSTANCE_FOG_VOLUME = 12 enum InstanceType#
The instance is a fog volume.
const INSTANCE_MAX = 13 enum InstanceType#
Represents the size of the InstanceType enum.
const INSTANCE_GEOMETRY_MASK = 14 enum InstanceType#
A combination of the flags of geometry instances (mesh, multimesh, immediate and particles).
const INSTANCE_FLAG_USE_BAKED_LIGHT = 0 enum InstanceFlags#
Allows the instance to be used in baked lighting.
const INSTANCE_FLAG_USE_DYNAMIC_GI = 1 enum InstanceFlags#
Allows the instance to be used with dynamic global illumination.
const INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE = 2 enum InstanceFlags#
When set, manually requests to draw geometry on next frame.
const INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING = 3 enum InstanceFlags#
Always draw, even if the instance would be culled by occlusion culling. Does not affect view frustum culling.
const INSTANCE_FLAG_MAX = 4 enum InstanceFlags#
Represents the size of the InstanceFlags enum.
const SHADOW_CASTING_SETTING_OFF = 0 enum ShadowCastingSetting#
Disable shadows from this instance.
const SHADOW_CASTING_SETTING_ON = 1 enum ShadowCastingSetting#
Cast shadows from this instance.
const SHADOW_CASTING_SETTING_DOUBLE_SIDED = 2 enum ShadowCastingSetting#
Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows.
const SHADOW_CASTING_SETTING_SHADOWS_ONLY = 3 enum ShadowCastingSetting#
Only render the shadows from the object. The object itself will not be drawn.
const VISIBILITY_RANGE_FADE_DISABLED = 0 enum VisibilityRangeFadeMode#
Disable visibility range fading for the given instance.
const VISIBILITY_RANGE_FADE_SELF = 1 enum VisibilityRangeFadeMode#
Fade-out the given instance when it approaches its visibility range limits.
const VISIBILITY_RANGE_FADE_DEPENDENCIES = 2 enum VisibilityRangeFadeMode#
Fade-in the given instance's dependencies when reaching its visibility range limits.
const BAKE_CHANNEL_ALBEDO_ALPHA = 0 enum BakeChannels#
Index of Image in array of Images returned by bake_render_uv2. Image uses Image.FORMAT_RGBA8 and contains albedo color in the .rgb channels and alpha in the .a channel.
const BAKE_CHANNEL_NORMAL = 1 enum BakeChannels#
Index of Image in array of Images returned by bake_render_uv2. Image uses Image.FORMAT_RGBA8 and contains the per-pixel normal of the object in the .rgb channels and nothing in the .a channel. The per-pixel normal is encoded as normal * 0.5 + 0.5.
const BAKE_CHANNEL_ORM = 2 enum BakeChannels#
Index of Image in array of Images returned by bake_render_uv2. Image uses Image.FORMAT_RGBA8 and contains ambient occlusion (from material and decals only) in the .r channel, roughness in the .g channel, metallic in the .b channel and sub surface scattering amount in the .a channel.
const BAKE_CHANNEL_EMISSION = 3 enum BakeChannels#
Index of Image in array of Images returned by bake_render_uv2. Image uses Image.FORMAT_RGBAH and contains emission color in the .rgb channels and nothing in the .a channel.
const CANVAS_TEXTURE_CHANNEL_DIFFUSE = 0 enum CanvasTextureChannel#
Diffuse canvas texture (CanvasTexture.diffuse_texture).
const CANVAS_TEXTURE_CHANNEL_NORMAL = 1 enum CanvasTextureChannel#
Normal map canvas texture (CanvasTexture.normal_texture).
const CANVAS_TEXTURE_CHANNEL_SPECULAR = 2 enum CanvasTextureChannel#
Specular map canvas texture (CanvasTexture.specular_texture).
const NINE_PATCH_STRETCH = 0 enum NinePatchAxisMode#
The nine patch gets stretched where needed.
const NINE_PATCH_TILE = 1 enum NinePatchAxisMode#
The nine patch gets filled with tiles where needed.
const NINE_PATCH_TILE_FIT = 2 enum NinePatchAxisMode#
The nine patch gets filled with tiles where needed and stretches them a bit if needed.
const CANVAS_ITEM_TEXTURE_FILTER_DEFAULT = 0 enum CanvasItemTextureFilter#
Uses the default filter mode for this Viewport.
const CANVAS_ITEM_TEXTURE_FILTER_NEAREST = 1 enum CanvasItemTextureFilter#
The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
const CANVAS_ITEM_TEXTURE_FILTER_LINEAR = 2 enum CanvasItemTextureFilter#
The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
const CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS = 3 enum CanvasItemTextureFilter#
The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look pixelated from up close, and smooth from a distance.
Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to Camera2D zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
const CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS = 4 enum CanvasItemTextureFilter#
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look smooth from up close, and smooth from a distance.
Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to Camera2D zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
const CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC = 5 enum CanvasItemTextureFilter#
The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.
Note: This texture filter is rarely useful in 2D projects. CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS is usually more appropriate in this case.
const CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC = 6 enum CanvasItemTextureFilter#
The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.
Note: This texture filter is rarely useful in 2D projects. CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS is usually more appropriate in this case.
const CANVAS_ITEM_TEXTURE_FILTER_MAX = 7 enum CanvasItemTextureFilter#
Max value for CanvasItemTextureFilter enum.
const CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT = 0 enum CanvasItemTextureRepeat#
Uses the default repeat mode for this Viewport.
const CANVAS_ITEM_TEXTURE_REPEAT_DISABLED = 1 enum CanvasItemTextureRepeat#
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.
const CANVAS_ITEM_TEXTURE_REPEAT_ENABLED = 2 enum CanvasItemTextureRepeat#
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.
const CANVAS_ITEM_TEXTURE_REPEAT_MIRROR = 3 enum CanvasItemTextureRepeat#
Flip the texture when repeating so that the edge lines up instead of abruptly changing.
const CANVAS_ITEM_TEXTURE_REPEAT_MAX = 4 enum CanvasItemTextureRepeat#
Max value for CanvasItemTextureRepeat enum.
const CANVAS_GROUP_MODE_DISABLED = 0 enum CanvasGroupMode#
Child draws over parent and is not clipped.
const CANVAS_GROUP_MODE_CLIP_ONLY = 1 enum CanvasGroupMode#
Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn.
const CANVAS_GROUP_MODE_CLIP_AND_DRAW = 2 enum CanvasGroupMode#
Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area.
const CANVAS_GROUP_MODE_TRANSPARENT = 3 enum CanvasGroupMode#
const CANVAS_LIGHT_MODE_POINT = 0 enum CanvasLightMode#
2D point light (see PointLight2D).
const CANVAS_LIGHT_MODE_DIRECTIONAL = 1 enum CanvasLightMode#
2D directional (sun/moon) light (see DirectionalLight2D).
const CANVAS_LIGHT_BLEND_MODE_ADD = 0 enum CanvasLightBlendMode#
Adds light color additive to the canvas.
const CANVAS_LIGHT_BLEND_MODE_SUB = 1 enum CanvasLightBlendMode#
Adds light color subtractive to the canvas.
const CANVAS_LIGHT_BLEND_MODE_MIX = 2 enum CanvasLightBlendMode#
The light adds color depending on transparency.
const CANVAS_LIGHT_FILTER_NONE = 0 enum CanvasLightShadowFilter#
Do not apply a filter to canvas light shadows.
const CANVAS_LIGHT_FILTER_PCF5 = 1 enum CanvasLightShadowFilter#
Use PCF5 filtering to filter canvas light shadows.
const CANVAS_LIGHT_FILTER_PCF13 = 2 enum CanvasLightShadowFilter#
Use PCF13 filtering to filter canvas light shadows.
const CANVAS_LIGHT_FILTER_MAX = 3 enum CanvasLightShadowFilter#
Max value of the CanvasLightShadowFilter enum.
const CANVAS_OCCLUDER_POLYGON_CULL_DISABLED = 0 enum CanvasOccluderPolygonCullMode#
Culling of the canvas occluder is disabled.
const CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE = 1 enum CanvasOccluderPolygonCullMode#
Culling of the canvas occluder is clockwise.
const CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE = 2 enum CanvasOccluderPolygonCullMode#
Culling of the canvas occluder is counterclockwise.
const GLOBAL_VAR_TYPE_BOOL = 0 enum GlobalShaderParameterType#
Boolean global shader parameter (global uniform bool ...).
const GLOBAL_VAR_TYPE_BVEC2 = 1 enum GlobalShaderParameterType#
2-dimensional boolean vector global shader parameter (global uniform bvec2 ...).
const GLOBAL_VAR_TYPE_BVEC3 = 2 enum GlobalShaderParameterType#
3-dimensional boolean vector global shader parameter (global uniform bvec3 ...).
const GLOBAL_VAR_TYPE_BVEC4 = 3 enum GlobalShaderParameterType#
4-dimensional boolean vector global shader parameter (global uniform bvec4 ...).
const GLOBAL_VAR_TYPE_INT = 4 enum GlobalShaderParameterType#
Integer global shader parameter (global uniform int ...).
const GLOBAL_VAR_TYPE_IVEC2 = 5 enum GlobalShaderParameterType#
2-dimensional integer vector global shader parameter (global uniform ivec2 ...).
const GLOBAL_VAR_TYPE_IVEC3 = 6 enum GlobalShaderParameterType#
3-dimensional integer vector global shader parameter (global uniform ivec3 ...).
const GLOBAL_VAR_TYPE_IVEC4 = 7 enum GlobalShaderParameterType#
4-dimensional integer vector global shader parameter (global uniform ivec4 ...).
const GLOBAL_VAR_TYPE_RECT2I = 8 enum GlobalShaderParameterType#
2-dimensional integer rectangle global shader parameter (global uniform ivec4 ...). Equivalent to GLOBAL_VAR_TYPE_IVEC4 in shader code, but exposed as a Rect2i in the editor UI.
const GLOBAL_VAR_TYPE_UINT = 9 enum GlobalShaderParameterType#
Unsigned integer global shader parameter (global uniform uint ...).
const GLOBAL_VAR_TYPE_UVEC2 = 10 enum GlobalShaderParameterType#
2-dimensional unsigned integer vector global shader parameter (global uniform uvec2 ...).
const GLOBAL_VAR_TYPE_UVEC3 = 11 enum GlobalShaderParameterType#
3-dimensional unsigned integer vector global shader parameter (global uniform uvec3 ...).
const GLOBAL_VAR_TYPE_UVEC4 = 12 enum GlobalShaderParameterType#
4-dimensional unsigned integer vector global shader parameter (global uniform uvec4 ...).
const GLOBAL_VAR_TYPE_FLOAT = 13 enum GlobalShaderParameterType#
Single-precision floating-point global shader parameter (global uniform float ...).
const GLOBAL_VAR_TYPE_VEC2 = 14 enum GlobalShaderParameterType#
2-dimensional floating-point vector global shader parameter (global uniform vec2 ...).
const GLOBAL_VAR_TYPE_VEC3 = 15 enum GlobalShaderParameterType#
3-dimensional floating-point vector global shader parameter (global uniform vec3 ...).
const GLOBAL_VAR_TYPE_VEC4 = 16 enum GlobalShaderParameterType#
4-dimensional floating-point vector global shader parameter (global uniform vec4 ...).
const GLOBAL_VAR_TYPE_COLOR = 17 enum GlobalShaderParameterType#
Color global shader parameter (global uniform vec4 ...). Equivalent to GLOBAL_VAR_TYPE_VEC4 in shader code, but exposed as a Color in the editor UI.
const GLOBAL_VAR_TYPE_RECT2 = 18 enum GlobalShaderParameterType#
2-dimensional floating-point rectangle global shader parameter (global uniform vec4 ...). Equivalent to GLOBAL_VAR_TYPE_VEC4 in shader code, but exposed as a Rect2 in the editor UI.
const GLOBAL_VAR_TYPE_MAT2 = 19 enum GlobalShaderParameterType#
2×2 matrix global shader parameter (global uniform mat2 ...). Exposed as a PackedInt32Array in the editor UI.
const GLOBAL_VAR_TYPE_MAT3 = 20 enum GlobalShaderParameterType#
3×3 matrix global shader parameter (global uniform mat3 ...). Exposed as a Basis in the editor UI.
const GLOBAL_VAR_TYPE_MAT4 = 21 enum GlobalShaderParameterType#
4×4 matrix global shader parameter (global uniform mat4 ...). Exposed as a Projection in the editor UI.
const GLOBAL_VAR_TYPE_TRANSFORM_2D = 22 enum GlobalShaderParameterType#
2-dimensional transform global shader parameter (global uniform mat2x3 ...). Exposed as a Transform2D in the editor UI.
const GLOBAL_VAR_TYPE_TRANSFORM = 23 enum GlobalShaderParameterType#
3-dimensional transform global shader parameter (global uniform mat3x4 ...). Exposed as a Transform3D in the editor UI.
const GLOBAL_VAR_TYPE_SAMPLER2D = 24 enum GlobalShaderParameterType#
2D sampler global shader parameter (global uniform sampler2D ...). Exposed as a Texture2D in the editor UI.
const GLOBAL_VAR_TYPE_SAMPLER2DARRAY = 25 enum GlobalShaderParameterType#
2D sampler array global shader parameter (global uniform sampler2DArray ...). Exposed as a Texture2DArray in the editor UI.
const GLOBAL_VAR_TYPE_SAMPLER3D = 26 enum GlobalShaderParameterType#
3D sampler global shader parameter (global uniform sampler3D ...). Exposed as a Texture3D in the editor UI.
const GLOBAL_VAR_TYPE_SAMPLERCUBE = 27 enum GlobalShaderParameterType#
Cubemap sampler global shader parameter (global uniform samplerCube ...). Exposed as a Cubemap in the editor UI.
const GLOBAL_VAR_TYPE_SAMPLEREXT = 28 enum GlobalShaderParameterType#
External sampler global shader parameter (global uniform samplerExternalOES ...). Exposed as a ExternalTexture in the editor UI.
const GLOBAL_VAR_TYPE_MAX = 29 enum GlobalShaderParameterType#
Represents the size of the GlobalShaderParameterType enum.
const RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME = 0 enum RenderingInfo#
Number of objects rendered in the current 3D scene. This varies depending on camera position and rotation.
const RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME = 1 enum RenderingInfo#
Number of points, lines, or triangles rendered in the current 3D scene. This varies depending on camera position and rotation.
const RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME = 2 enum RenderingInfo#
Number of draw calls performed to render in the current 3D scene. This varies depending on camera position and rotation.
const RENDERING_INFO_TEXTURE_MEM_USED = 3 enum RenderingInfo#
Texture memory used (in bytes).
const RENDERING_INFO_BUFFER_MEM_USED = 4 enum RenderingInfo#
Buffer memory used (in bytes). This includes vertex data, uniform buffers, and many miscellaneous buffer types used internally.
const RENDERING_INFO_VIDEO_MEM_USED = 5 enum RenderingInfo#
Video memory used (in bytes). When using the Forward+ or Mobile renderers, this is always greater than the sum of RENDERING_INFO_TEXTURE_MEM_USED and RENDERING_INFO_BUFFER_MEM_USED, since there is miscellaneous data not accounted for by those two metrics. When using the Compatibility renderer, this is equal to the sum of RENDERING_INFO_TEXTURE_MEM_USED and RENDERING_INFO_BUFFER_MEM_USED.
const RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS = 6 enum RenderingInfo#
Number of pipeline compilations that were triggered by the 2D canvas renderer.
const RENDERING_INFO_PIPELINE_COMPILATIONS_MESH = 7 enum RenderingInfo#
Number of pipeline compilations that were triggered by loading meshes. These compilations will show up as longer loading times the first time a user runs the game and the pipeline is required.
const RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE = 8 enum RenderingInfo#
Number of pipeline compilations that were triggered by building the surface cache before rendering the scene. These compilations will show up as a stutter when loading an scene the first time a user runs the game and the pipeline is required.
const RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW = 9 enum RenderingInfo#
Number of pipeline compilations that were triggered while drawing the scene. These compilations will show up as stutters during gameplay the first time a user runs the game and the pipeline is required.
const RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION = 10 enum RenderingInfo#
Number of pipeline compilations that were triggered to optimize the current scene. These compilations are done in the background and should not cause any stutters whatsoever.
const PIPELINE_SOURCE_CANVAS = 0 enum PipelineSource#
Pipeline compilation that was triggered by the 2D canvas renderer.
const PIPELINE_SOURCE_MESH = 1 enum PipelineSource#
Pipeline compilation that was triggered by loading a mesh.
const PIPELINE_SOURCE_SURFACE = 2 enum PipelineSource#
Pipeline compilation that was triggered by building the surface cache before rendering the scene.
const PIPELINE_SOURCE_DRAW = 3 enum PipelineSource#
Pipeline compilation that was triggered while drawing the scene.
const PIPELINE_SOURCE_SPECIALIZATION = 4 enum PipelineSource#
Pipeline compilation that was triggered to optimize the current scene.
const PIPELINE_SOURCE_MAX = 5 enum PipelineSource#
Represents the size of the PipelineSource enum.
const FEATURE_SHADERS = 0 enum FeaturesDeprecated#
const FEATURE_MULTITHREADED = 1 enum FeaturesDeprecated#
Constructors #
Enums #
TextureType#
enum TextureType {
TEXTURE_TYPE_2D = 0,
TEXTURE_TYPE_LAYERED = 1,
TEXTURE_TYPE_3D = 2,
}TextureLayeredType#
enum TextureLayeredType {
TEXTURE_LAYERED_2D_ARRAY = 0,
TEXTURE_LAYERED_CUBEMAP = 1,
TEXTURE_LAYERED_CUBEMAP_ARRAY = 2,
}CubeMapLayer#
enum CubeMapLayer {
CUBEMAP_LAYER_LEFT = 0,
CUBEMAP_LAYER_RIGHT = 1,
CUBEMAP_LAYER_BOTTOM = 2,
CUBEMAP_LAYER_TOP = 3,
CUBEMAP_LAYER_FRONT = 4,
CUBEMAP_LAYER_BACK = 5,
}ShaderMode#
enum ShaderMode {
SHADER_SPATIAL = 0,
SHADER_CANVAS_ITEM = 1,
SHADER_PARTICLES = 2,
SHADER_SKY = 3,
SHADER_FOG = 4,
SHADER_MAX = 5,
}ArrayType#
enum ArrayType {
ARRAY_VERTEX = 0,
ARRAY_NORMAL = 1,
ARRAY_TANGENT = 2,
ARRAY_COLOR = 3,
ARRAY_TEX_UV = 4,
ARRAY_TEX_UV2 = 5,
ARRAY_CUSTOM0 = 6,
ARRAY_CUSTOM1 = 7,
ARRAY_CUSTOM2 = 8,
ARRAY_CUSTOM3 = 9,
ARRAY_BONES = 10,
ARRAY_WEIGHTS = 11,
ARRAY_INDEX = 12,
ARRAY_MAX = 13,
}ArrayCustomFormat#
enum ArrayCustomFormat {
ARRAY_CUSTOM_RGBA8_UNORM = 0,
ARRAY_CUSTOM_RGBA8_SNORM = 1,
ARRAY_CUSTOM_RG_HALF = 2,
ARRAY_CUSTOM_RGBA_HALF = 3,
ARRAY_CUSTOM_R_FLOAT = 4,
ARRAY_CUSTOM_RG_FLOAT = 5,
ARRAY_CUSTOM_RGB_FLOAT = 6,
ARRAY_CUSTOM_RGBA_FLOAT = 7,
ARRAY_CUSTOM_MAX = 8,
}ArrayFormat#
enum ArrayFormat {
ARRAY_FORMAT_VERTEX = 1,
ARRAY_FORMAT_NORMAL = 2,
ARRAY_FORMAT_TANGENT = 4,
ARRAY_FORMAT_COLOR = 8,
ARRAY_FORMAT_TEX_UV = 16,
ARRAY_FORMAT_TEX_UV2 = 32,
ARRAY_FORMAT_CUSTOM0 = 64,
ARRAY_FORMAT_CUSTOM1 = 128,
ARRAY_FORMAT_CUSTOM2 = 256,
ARRAY_FORMAT_CUSTOM3 = 512,
ARRAY_FORMAT_BONES = 1024,
ARRAY_FORMAT_WEIGHTS = 2048,
ARRAY_FORMAT_INDEX = 4096,
ARRAY_FORMAT_BLEND_SHAPE_MASK = 7,
ARRAY_FORMAT_CUSTOM_BASE = 13,
ARRAY_FORMAT_CUSTOM_BITS = 3,
ARRAY_FORMAT_CUSTOM0_SHIFT = 13,
ARRAY_FORMAT_CUSTOM1_SHIFT = 16,
ARRAY_FORMAT_CUSTOM2_SHIFT = 19,
ARRAY_FORMAT_CUSTOM3_SHIFT = 22,
ARRAY_FORMAT_CUSTOM_MASK = 7,
ARRAY_COMPRESS_FLAGS_BASE = 25,
ARRAY_FLAG_USE_2D_VERTICES = 33554432,
ARRAY_FLAG_USE_DYNAMIC_UPDATE = 67108864,
ARRAY_FLAG_USE_8_BONE_WEIGHTS = 134217728,
ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY = 268435456,
ARRAY_FLAG_COMPRESS_ATTRIBUTES = 536870912,
ARRAY_FLAG_FORMAT_VERSION_BASE = 35,
ARRAY_FLAG_FORMAT_VERSION_SHIFT = 35,
ARRAY_FLAG_FORMAT_VERSION_1 = 0,
ARRAY_FLAG_FORMAT_VERSION_2 = 34359738368,
ARRAY_FLAG_FORMAT_CURRENT_VERSION = 34359738368,
ARRAY_FLAG_FORMAT_VERSION_MASK = 255,
}PrimitiveType#
enum PrimitiveType {
PRIMITIVE_POINTS = 0,
PRIMITIVE_LINES = 1,
PRIMITIVE_LINE_STRIP = 2,
PRIMITIVE_TRIANGLES = 3,
PRIMITIVE_TRIANGLE_STRIP = 4,
PRIMITIVE_MAX = 5,
}BlendShapeMode#
enum BlendShapeMode {
BLEND_SHAPE_MODE_NORMALIZED = 0,
BLEND_SHAPE_MODE_RELATIVE = 1,
}MultimeshTransformFormat#
enum MultimeshTransformFormat {
MULTIMESH_TRANSFORM_2D = 0,
MULTIMESH_TRANSFORM_3D = 1,
}MultimeshPhysicsInterpolationQuality#
enum MultimeshPhysicsInterpolationQuality {
MULTIMESH_INTERP_QUALITY_FAST = 0,
MULTIMESH_INTERP_QUALITY_HIGH = 1,
}LightProjectorFilter#
enum LightProjectorFilter {
LIGHT_PROJECTOR_FILTER_NEAREST = 0,
LIGHT_PROJECTOR_FILTER_LINEAR = 1,
LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS = 2,
LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS = 3,
LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC = 4,
LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC = 5,
}LightType#
enum LightType {
LIGHT_DIRECTIONAL = 0,
LIGHT_OMNI = 1,
LIGHT_SPOT = 2,
}LightParam#
enum LightParam {
LIGHT_PARAM_ENERGY = 0,
LIGHT_PARAM_INDIRECT_ENERGY = 1,
LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY = 2,
LIGHT_PARAM_SPECULAR = 3,
LIGHT_PARAM_RANGE = 4,
LIGHT_PARAM_SIZE = 5,
LIGHT_PARAM_ATTENUATION = 6,
LIGHT_PARAM_SPOT_ANGLE = 7,
LIGHT_PARAM_SPOT_ATTENUATION = 8,
LIGHT_PARAM_SHADOW_MAX_DISTANCE = 9,
LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET = 10,
LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET = 11,
LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET = 12,
LIGHT_PARAM_SHADOW_FADE_START = 13,
LIGHT_PARAM_SHADOW_NORMAL_BIAS = 14,
LIGHT_PARAM_SHADOW_BIAS = 15,
LIGHT_PARAM_SHADOW_PANCAKE_SIZE = 16,
LIGHT_PARAM_SHADOW_OPACITY = 17,
LIGHT_PARAM_SHADOW_BLUR = 18,
LIGHT_PARAM_TRANSMITTANCE_BIAS = 19,
LIGHT_PARAM_INTENSITY = 20,
LIGHT_PARAM_MAX = 21,
}LightBakeMode#
enum LightBakeMode {
LIGHT_BAKE_DISABLED = 0,
LIGHT_BAKE_STATIC = 1,
LIGHT_BAKE_DYNAMIC = 2,
}LightOmniShadowMode#
enum LightOmniShadowMode {
LIGHT_OMNI_SHADOW_DUAL_PARABOLOID = 0,
LIGHT_OMNI_SHADOW_CUBE = 1,
}LightDirectionalShadowMode#
enum LightDirectionalShadowMode {
LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL = 0,
LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS = 1,
LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS = 2,
}LightDirectionalSkyMode#
enum LightDirectionalSkyMode {
LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY = 0,
LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY = 1,
LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY = 2,
}ShadowQuality#
enum ShadowQuality {
SHADOW_QUALITY_HARD = 0,
SHADOW_QUALITY_SOFT_VERY_LOW = 1,
SHADOW_QUALITY_SOFT_LOW = 2,
SHADOW_QUALITY_SOFT_MEDIUM = 3,
SHADOW_QUALITY_SOFT_HIGH = 4,
SHADOW_QUALITY_SOFT_ULTRA = 5,
SHADOW_QUALITY_MAX = 6,
}ReflectionProbeUpdateMode#
enum ReflectionProbeUpdateMode {
REFLECTION_PROBE_UPDATE_ONCE = 0,
REFLECTION_PROBE_UPDATE_ALWAYS = 1,
}ReflectionProbeAmbientMode#
enum ReflectionProbeAmbientMode {
REFLECTION_PROBE_AMBIENT_DISABLED = 0,
REFLECTION_PROBE_AMBIENT_ENVIRONMENT = 1,
REFLECTION_PROBE_AMBIENT_COLOR = 2,
}DecalTexture#
enum DecalTexture {
DECAL_TEXTURE_ALBEDO = 0,
DECAL_TEXTURE_NORMAL = 1,
DECAL_TEXTURE_ORM = 2,
DECAL_TEXTURE_EMISSION = 3,
DECAL_TEXTURE_MAX = 4,
}DecalFilter#
enum DecalFilter {
DECAL_FILTER_NEAREST = 0,
DECAL_FILTER_LINEAR = 1,
DECAL_FILTER_NEAREST_MIPMAPS = 2,
DECAL_FILTER_LINEAR_MIPMAPS = 3,
DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC = 4,
DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC = 5,
}VoxelGIQuality#
enum VoxelGIQuality {
VOXEL_GI_QUALITY_LOW = 0,
VOXEL_GI_QUALITY_HIGH = 1,
}ParticlesMode#
enum ParticlesMode {
PARTICLES_MODE_2D = 0,
PARTICLES_MODE_3D = 1,
}ParticlesTransformAlign#
enum ParticlesTransformAlign {
PARTICLES_TRANSFORM_ALIGN_DISABLED = 0,
PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD = 1,
PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY = 2,
PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY = 3,
}ParticlesDrawOrder#
enum ParticlesDrawOrder {
PARTICLES_DRAW_ORDER_INDEX = 0,
PARTICLES_DRAW_ORDER_LIFETIME = 1,
PARTICLES_DRAW_ORDER_REVERSE_LIFETIME = 2,
PARTICLES_DRAW_ORDER_VIEW_DEPTH = 3,
}ParticlesCollisionType#
enum ParticlesCollisionType {
PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT = 0,
PARTICLES_COLLISION_TYPE_BOX_ATTRACT = 1,
PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT = 2,
PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE = 3,
PARTICLES_COLLISION_TYPE_BOX_COLLIDE = 4,
PARTICLES_COLLISION_TYPE_SDF_COLLIDE = 5,
PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE = 6,
}ParticlesCollisionHeightfieldResolution#
enum ParticlesCollisionHeightfieldResolution {
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256 = 0,
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512 = 1,
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024 = 2,
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048 = 3,
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096 = 4,
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192 = 5,
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX = 6,
}FogVolumeShape#
enum FogVolumeShape {
FOG_VOLUME_SHAPE_ELLIPSOID = 0,
FOG_VOLUME_SHAPE_CONE = 1,
FOG_VOLUME_SHAPE_CYLINDER = 2,
FOG_VOLUME_SHAPE_BOX = 3,
FOG_VOLUME_SHAPE_WORLD = 4,
FOG_VOLUME_SHAPE_MAX = 5,
}ViewportScaling3DMode#
enum ViewportScaling3DMode {
VIEWPORT_SCALING_3D_MODE_BILINEAR = 0,
VIEWPORT_SCALING_3D_MODE_FSR = 1,
VIEWPORT_SCALING_3D_MODE_FSR2 = 2,
VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL = 3,
VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL = 4,
VIEWPORT_SCALING_3D_MODE_MAX = 5,
}ViewportUpdateMode#
enum ViewportUpdateMode {
VIEWPORT_UPDATE_DISABLED = 0,
VIEWPORT_UPDATE_ONCE = 1,
VIEWPORT_UPDATE_WHEN_VISIBLE = 2,
VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE = 3,
VIEWPORT_UPDATE_ALWAYS = 4,
}ViewportClearMode#
enum ViewportClearMode {
VIEWPORT_CLEAR_ALWAYS = 0,
VIEWPORT_CLEAR_NEVER = 1,
VIEWPORT_CLEAR_ONLY_NEXT_FRAME = 2,
}ViewportEnvironmentMode#
enum ViewportEnvironmentMode {
VIEWPORT_ENVIRONMENT_DISABLED = 0,
VIEWPORT_ENVIRONMENT_ENABLED = 1,
VIEWPORT_ENVIRONMENT_INHERIT = 2,
VIEWPORT_ENVIRONMENT_MAX = 3,
}ViewportSDFOversize#
enum ViewportSDFOversize {
VIEWPORT_SDF_OVERSIZE_100_PERCENT = 0,
VIEWPORT_SDF_OVERSIZE_120_PERCENT = 1,
VIEWPORT_SDF_OVERSIZE_150_PERCENT = 2,
VIEWPORT_SDF_OVERSIZE_200_PERCENT = 3,
VIEWPORT_SDF_OVERSIZE_MAX = 4,
}ViewportSDFScale#
enum ViewportSDFScale {
VIEWPORT_SDF_SCALE_100_PERCENT = 0,
VIEWPORT_SDF_SCALE_50_PERCENT = 1,
VIEWPORT_SDF_SCALE_25_PERCENT = 2,
VIEWPORT_SDF_SCALE_MAX = 3,
}ViewportMSAA#
enum ViewportMSAA {
VIEWPORT_MSAA_DISABLED = 0,
VIEWPORT_MSAA_2X = 1,
VIEWPORT_MSAA_4X = 2,
VIEWPORT_MSAA_8X = 3,
VIEWPORT_MSAA_MAX = 4,
}ViewportAnisotropicFiltering#
enum ViewportAnisotropicFiltering {
VIEWPORT_ANISOTROPY_DISABLED = 0,
VIEWPORT_ANISOTROPY_2X = 1,
VIEWPORT_ANISOTROPY_4X = 2,
VIEWPORT_ANISOTROPY_8X = 3,
VIEWPORT_ANISOTROPY_16X = 4,
VIEWPORT_ANISOTROPY_MAX = 5,
}ViewportScreenSpaceAA#
enum ViewportScreenSpaceAA {
VIEWPORT_SCREEN_SPACE_AA_DISABLED = 0,
VIEWPORT_SCREEN_SPACE_AA_FXAA = 1,
VIEWPORT_SCREEN_SPACE_AA_MAX = 2,
}ViewportOcclusionCullingBuildQuality#
enum ViewportOcclusionCullingBuildQuality {
VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW = 0,
VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM = 1,
VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH = 2,
}ViewportRenderInfo#
enum ViewportRenderInfo {
VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME = 0,
VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME = 1,
VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME = 2,
VIEWPORT_RENDER_INFO_MAX = 3,
}ViewportRenderInfoType#
enum ViewportRenderInfoType {
VIEWPORT_RENDER_INFO_TYPE_VISIBLE = 0,
VIEWPORT_RENDER_INFO_TYPE_SHADOW = 1,
VIEWPORT_RENDER_INFO_TYPE_CANVAS = 2,
VIEWPORT_RENDER_INFO_TYPE_MAX = 3,
}ViewportDebugDraw#
enum ViewportDebugDraw {
VIEWPORT_DEBUG_DRAW_DISABLED = 0,
VIEWPORT_DEBUG_DRAW_UNSHADED = 1,
VIEWPORT_DEBUG_DRAW_LIGHTING = 2,
VIEWPORT_DEBUG_DRAW_OVERDRAW = 3,
VIEWPORT_DEBUG_DRAW_WIREFRAME = 4,
VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER = 5,
VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO = 6,
VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING = 7,
VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION = 8,
VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS = 9,
VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS = 10,
VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE = 11,
VIEWPORT_DEBUG_DRAW_SSAO = 12,
VIEWPORT_DEBUG_DRAW_SSIL = 13,
VIEWPORT_DEBUG_DRAW_PSSM_SPLITS = 14,
VIEWPORT_DEBUG_DRAW_DECAL_ATLAS = 15,
VIEWPORT_DEBUG_DRAW_SDFGI = 16,
VIEWPORT_DEBUG_DRAW_SDFGI_PROBES = 17,
VIEWPORT_DEBUG_DRAW_GI_BUFFER = 18,
VIEWPORT_DEBUG_DRAW_DISABLE_LOD = 19,
VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS = 20,
VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS = 21,
VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS = 22,
VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES = 23,
VIEWPORT_DEBUG_DRAW_OCCLUDERS = 24,
VIEWPORT_DEBUG_DRAW_MOTION_VECTORS = 25,
VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER = 26,
}ViewportVRSMode#
enum ViewportVRSMode {
VIEWPORT_VRS_DISABLED = 0,
VIEWPORT_VRS_TEXTURE = 1,
VIEWPORT_VRS_XR = 2,
VIEWPORT_VRS_MAX = 3,
}ViewportVRSUpdateMode#
enum ViewportVRSUpdateMode {
VIEWPORT_VRS_UPDATE_DISABLED = 0,
VIEWPORT_VRS_UPDATE_ONCE = 1,
VIEWPORT_VRS_UPDATE_ALWAYS = 2,
VIEWPORT_VRS_UPDATE_MAX = 3,
}SkyMode#
enum SkyMode {
SKY_MODE_AUTOMATIC = 0,
SKY_MODE_QUALITY = 1,
SKY_MODE_INCREMENTAL = 2,
SKY_MODE_REALTIME = 3,
}CompositorEffectFlags#
enum CompositorEffectFlags {
COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR = 1,
COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH = 2,
COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS = 4,
COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS = 8,
COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR = 16,
}CompositorEffectCallbackType#
enum CompositorEffectCallbackType {
COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_OPAQUE = 0,
COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_OPAQUE = 1,
COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_SKY = 2,
COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT = 3,
COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT = 4,
COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY = -1,
}EnvironmentBG#
enum EnvironmentBG {
ENV_BG_CLEAR_COLOR = 0,
ENV_BG_COLOR = 1,
ENV_BG_SKY = 2,
ENV_BG_CANVAS = 3,
ENV_BG_KEEP = 4,
ENV_BG_CAMERA_FEED = 5,
ENV_BG_MAX = 6,
}EnvironmentAmbientSource#
enum EnvironmentAmbientSource {
ENV_AMBIENT_SOURCE_BG = 0,
ENV_AMBIENT_SOURCE_DISABLED = 1,
ENV_AMBIENT_SOURCE_COLOR = 2,
ENV_AMBIENT_SOURCE_SKY = 3,
}EnvironmentReflectionSource#
enum EnvironmentReflectionSource {
ENV_REFLECTION_SOURCE_BG = 0,
ENV_REFLECTION_SOURCE_DISABLED = 1,
ENV_REFLECTION_SOURCE_SKY = 2,
}EnvironmentGlowBlendMode#
enum EnvironmentGlowBlendMode {
ENV_GLOW_BLEND_MODE_ADDITIVE = 0,
ENV_GLOW_BLEND_MODE_SCREEN = 1,
ENV_GLOW_BLEND_MODE_SOFTLIGHT = 2,
ENV_GLOW_BLEND_MODE_REPLACE = 3,
ENV_GLOW_BLEND_MODE_MIX = 4,
}EnvironmentFogMode#
enum EnvironmentFogMode {
ENV_FOG_MODE_EXPONENTIAL = 0,
ENV_FOG_MODE_DEPTH = 1,
}EnvironmentToneMapper#
enum EnvironmentToneMapper {
ENV_TONE_MAPPER_LINEAR = 0,
ENV_TONE_MAPPER_REINHARD = 1,
ENV_TONE_MAPPER_FILMIC = 2,
ENV_TONE_MAPPER_ACES = 3,
ENV_TONE_MAPPER_AGX = 4,
}EnvironmentSSRRoughnessQuality#
enum EnvironmentSSRRoughnessQuality {
ENV_SSR_ROUGHNESS_QUALITY_DISABLED = 0,
ENV_SSR_ROUGHNESS_QUALITY_LOW = 1,
ENV_SSR_ROUGHNESS_QUALITY_MEDIUM = 2,
ENV_SSR_ROUGHNESS_QUALITY_HIGH = 3,
}EnvironmentSSAOQuality#
enum EnvironmentSSAOQuality {
ENV_SSAO_QUALITY_VERY_LOW = 0,
ENV_SSAO_QUALITY_LOW = 1,
ENV_SSAO_QUALITY_MEDIUM = 2,
ENV_SSAO_QUALITY_HIGH = 3,
ENV_SSAO_QUALITY_ULTRA = 4,
}EnvironmentSSILQuality#
enum EnvironmentSSILQuality {
ENV_SSIL_QUALITY_VERY_LOW = 0,
ENV_SSIL_QUALITY_LOW = 1,
ENV_SSIL_QUALITY_MEDIUM = 2,
ENV_SSIL_QUALITY_HIGH = 3,
ENV_SSIL_QUALITY_ULTRA = 4,
}EnvironmentSDFGIYScale#
enum EnvironmentSDFGIYScale {
ENV_SDFGI_Y_SCALE_50_PERCENT = 0,
ENV_SDFGI_Y_SCALE_75_PERCENT = 1,
ENV_SDFGI_Y_SCALE_100_PERCENT = 2,
}EnvironmentSDFGIRayCount#
enum EnvironmentSDFGIRayCount {
ENV_SDFGI_RAY_COUNT_4 = 0,
ENV_SDFGI_RAY_COUNT_8 = 1,
ENV_SDFGI_RAY_COUNT_16 = 2,
ENV_SDFGI_RAY_COUNT_32 = 3,
ENV_SDFGI_RAY_COUNT_64 = 4,
ENV_SDFGI_RAY_COUNT_96 = 5,
ENV_SDFGI_RAY_COUNT_128 = 6,
ENV_SDFGI_RAY_COUNT_MAX = 7,
}EnvironmentSDFGIFramesToConverge#
enum EnvironmentSDFGIFramesToConverge {
ENV_SDFGI_CONVERGE_IN_5_FRAMES = 0,
ENV_SDFGI_CONVERGE_IN_10_FRAMES = 1,
ENV_SDFGI_CONVERGE_IN_15_FRAMES = 2,
ENV_SDFGI_CONVERGE_IN_20_FRAMES = 3,
ENV_SDFGI_CONVERGE_IN_25_FRAMES = 4,
ENV_SDFGI_CONVERGE_IN_30_FRAMES = 5,
ENV_SDFGI_CONVERGE_MAX = 6,
}EnvironmentSDFGIFramesToUpdateLight#
enum EnvironmentSDFGIFramesToUpdateLight {
ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME = 0,
ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES = 1,
ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES = 2,
ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES = 3,
ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES = 4,
ENV_SDFGI_UPDATE_LIGHT_MAX = 5,
}SubSurfaceScatteringQuality#
enum SubSurfaceScatteringQuality {
SUB_SURFACE_SCATTERING_QUALITY_DISABLED = 0,
SUB_SURFACE_SCATTERING_QUALITY_LOW = 1,
SUB_SURFACE_SCATTERING_QUALITY_MEDIUM = 2,
SUB_SURFACE_SCATTERING_QUALITY_HIGH = 3,
}DOFBokehShape#
enum DOFBokehShape {
DOF_BOKEH_BOX = 0,
DOF_BOKEH_HEXAGON = 1,
DOF_BOKEH_CIRCLE = 2,
}DOFBlurQuality#
enum DOFBlurQuality {
DOF_BLUR_QUALITY_VERY_LOW = 0,
DOF_BLUR_QUALITY_LOW = 1,
DOF_BLUR_QUALITY_MEDIUM = 2,
DOF_BLUR_QUALITY_HIGH = 3,
}InstanceType#
enum InstanceType {
INSTANCE_NONE = 0,
INSTANCE_MESH = 1,
INSTANCE_MULTIMESH = 2,
INSTANCE_PARTICLES = 3,
INSTANCE_PARTICLES_COLLISION = 4,
INSTANCE_LIGHT = 5,
INSTANCE_REFLECTION_PROBE = 6,
INSTANCE_DECAL = 7,
INSTANCE_VOXEL_GI = 8,
INSTANCE_LIGHTMAP = 9,
INSTANCE_OCCLUDER = 10,
INSTANCE_VISIBLITY_NOTIFIER = 11,
INSTANCE_FOG_VOLUME = 12,
INSTANCE_MAX = 13,
INSTANCE_GEOMETRY_MASK = 14,
}InstanceFlags#
enum InstanceFlags {
INSTANCE_FLAG_USE_BAKED_LIGHT = 0,
INSTANCE_FLAG_USE_DYNAMIC_GI = 1,
INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE = 2,
INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING = 3,
INSTANCE_FLAG_MAX = 4,
}ShadowCastingSetting#
enum ShadowCastingSetting {
SHADOW_CASTING_SETTING_OFF = 0,
SHADOW_CASTING_SETTING_ON = 1,
SHADOW_CASTING_SETTING_DOUBLE_SIDED = 2,
SHADOW_CASTING_SETTING_SHADOWS_ONLY = 3,
}VisibilityRangeFadeMode#
enum VisibilityRangeFadeMode {
VISIBILITY_RANGE_FADE_DISABLED = 0,
VISIBILITY_RANGE_FADE_SELF = 1,
VISIBILITY_RANGE_FADE_DEPENDENCIES = 2,
}BakeChannels#
enum BakeChannels {
BAKE_CHANNEL_ALBEDO_ALPHA = 0,
BAKE_CHANNEL_NORMAL = 1,
BAKE_CHANNEL_ORM = 2,
BAKE_CHANNEL_EMISSION = 3,
}CanvasTextureChannel#
enum CanvasTextureChannel {
CANVAS_TEXTURE_CHANNEL_DIFFUSE = 0,
CANVAS_TEXTURE_CHANNEL_NORMAL = 1,
CANVAS_TEXTURE_CHANNEL_SPECULAR = 2,
}NinePatchAxisMode#
enum NinePatchAxisMode {
NINE_PATCH_STRETCH = 0,
NINE_PATCH_TILE = 1,
NINE_PATCH_TILE_FIT = 2,
}CanvasItemTextureFilter#
enum CanvasItemTextureFilter {
CANVAS_ITEM_TEXTURE_FILTER_DEFAULT = 0,
CANVAS_ITEM_TEXTURE_FILTER_NEAREST = 1,
CANVAS_ITEM_TEXTURE_FILTER_LINEAR = 2,
CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS = 3,
CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS = 4,
CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC = 5,
CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC = 6,
CANVAS_ITEM_TEXTURE_FILTER_MAX = 7,
}CanvasItemTextureRepeat#
enum CanvasItemTextureRepeat {
CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT = 0,
CANVAS_ITEM_TEXTURE_REPEAT_DISABLED = 1,
CANVAS_ITEM_TEXTURE_REPEAT_ENABLED = 2,
CANVAS_ITEM_TEXTURE_REPEAT_MIRROR = 3,
CANVAS_ITEM_TEXTURE_REPEAT_MAX = 4,
}CanvasGroupMode#
enum CanvasGroupMode {
CANVAS_GROUP_MODE_DISABLED = 0,
CANVAS_GROUP_MODE_CLIP_ONLY = 1,
CANVAS_GROUP_MODE_CLIP_AND_DRAW = 2,
CANVAS_GROUP_MODE_TRANSPARENT = 3,
}CanvasLightMode#
enum CanvasLightMode {
CANVAS_LIGHT_MODE_POINT = 0,
CANVAS_LIGHT_MODE_DIRECTIONAL = 1,
}CanvasLightBlendMode#
enum CanvasLightBlendMode {
CANVAS_LIGHT_BLEND_MODE_ADD = 0,
CANVAS_LIGHT_BLEND_MODE_SUB = 1,
CANVAS_LIGHT_BLEND_MODE_MIX = 2,
}CanvasLightShadowFilter#
enum CanvasLightShadowFilter {
CANVAS_LIGHT_FILTER_NONE = 0,
CANVAS_LIGHT_FILTER_PCF5 = 1,
CANVAS_LIGHT_FILTER_PCF13 = 2,
CANVAS_LIGHT_FILTER_MAX = 3,
}CanvasOccluderPolygonCullMode#
enum CanvasOccluderPolygonCullMode {
CANVAS_OCCLUDER_POLYGON_CULL_DISABLED = 0,
CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE = 1,
CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE = 2,
}GlobalShaderParameterType#
enum GlobalShaderParameterType {
GLOBAL_VAR_TYPE_BOOL = 0,
GLOBAL_VAR_TYPE_BVEC2 = 1,
GLOBAL_VAR_TYPE_BVEC3 = 2,
GLOBAL_VAR_TYPE_BVEC4 = 3,
GLOBAL_VAR_TYPE_INT = 4,
GLOBAL_VAR_TYPE_IVEC2 = 5,
GLOBAL_VAR_TYPE_IVEC3 = 6,
GLOBAL_VAR_TYPE_IVEC4 = 7,
GLOBAL_VAR_TYPE_RECT2I = 8,
GLOBAL_VAR_TYPE_UINT = 9,
GLOBAL_VAR_TYPE_UVEC2 = 10,
GLOBAL_VAR_TYPE_UVEC3 = 11,
GLOBAL_VAR_TYPE_UVEC4 = 12,
GLOBAL_VAR_TYPE_FLOAT = 13,
GLOBAL_VAR_TYPE_VEC2 = 14,
GLOBAL_VAR_TYPE_VEC3 = 15,
GLOBAL_VAR_TYPE_VEC4 = 16,
GLOBAL_VAR_TYPE_COLOR = 17,
GLOBAL_VAR_TYPE_RECT2 = 18,
GLOBAL_VAR_TYPE_MAT2 = 19,
GLOBAL_VAR_TYPE_MAT3 = 20,
GLOBAL_VAR_TYPE_MAT4 = 21,
GLOBAL_VAR_TYPE_TRANSFORM_2D = 22,
GLOBAL_VAR_TYPE_TRANSFORM = 23,
GLOBAL_VAR_TYPE_SAMPLER2D = 24,
GLOBAL_VAR_TYPE_SAMPLER2DARRAY = 25,
GLOBAL_VAR_TYPE_SAMPLER3D = 26,
GLOBAL_VAR_TYPE_SAMPLERCUBE = 27,
GLOBAL_VAR_TYPE_SAMPLEREXT = 28,
GLOBAL_VAR_TYPE_MAX = 29,
}RenderingInfo#
enum RenderingInfo {
RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME = 0,
RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME = 1,
RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME = 2,
RENDERING_INFO_TEXTURE_MEM_USED = 3,
RENDERING_INFO_BUFFER_MEM_USED = 4,
RENDERING_INFO_VIDEO_MEM_USED = 5,
RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS = 6,
RENDERING_INFO_PIPELINE_COMPILATIONS_MESH = 7,
RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE = 8,
RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW = 9,
RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION = 10,
}PipelineSource#
enum PipelineSource {
PIPELINE_SOURCE_CANVAS = 0,
PIPELINE_SOURCE_MESH = 1,
PIPELINE_SOURCE_SURFACE = 2,
PIPELINE_SOURCE_DRAW = 3,
PIPELINE_SOURCE_SPECIALIZATION = 4,
PIPELINE_SOURCE_MAX = 5,
}Features#
enum Features {
FEATURE_SHADERS = 0,
FEATURE_MULTITHREADED = 1,
} Notifications#
enum {
CANVAS_ITEM_Z_MIN = -4096,
MATERIAL_RENDER_PRIORITY_MIN = -128,
NO_INDEX_ARRAY = -1,
PARTICLES_EMIT_FLAG_POSITION = 1,
PARTICLES_EMIT_FLAG_ROTATION_SCALE = 2,
ARRAY_WEIGHTS_SIZE = 4,
ARRAY_CUSTOM_COUNT = 4,
PARTICLES_EMIT_FLAG_VELOCITY = 4,
MAX_GLOW_LEVELS = 7,
MAX_CURSORS = 8,
MAX_2D_DIRECTIONAL_LIGHTS = 8,
PARTICLES_EMIT_FLAG_COLOR = 8,
PARTICLES_EMIT_FLAG_CUSTOM = 16,
MATERIAL_RENDER_PRIORITY_MAX = 127,
MAX_MESH_SURFACES = 256,
CANVAS_ITEM_Z_MAX = 4096,
}Operators #
Signals #
signal frame_post_draw()#
Emitted at the end of the frame, after the RenderingServer has finished updating all the Viewports.
signal frame_pre_draw()#
Emitted at the beginning of the frame, before the RenderingServer updates all the Viewports.