| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#pragma once |
| 32 |
|
| 33 |
#include "core/io/image.h" |
| 34 |
#include "core/math/geometry_3d.h" |
| 35 |
#include "core/math/transform_2d.h" |
| 36 |
#include "core/templates/rid.h" |
| 37 |
#include "core/variant/typed_array.h" |
| 38 |
#include "core/variant/variant.h" |
| 39 |
#include "servers/display/display_server.h" |
| 40 |
#include "servers/rendering/rendering_device.h" |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
#ifdef DEBUG_ENABLED |
| 45 |
#define ERR_NOT_ON_RENDER_THREAD \ |
| 46 |
RenderingServer *rendering_server = RenderingServer::get_singleton(); \ |
| 47 |
ERR_FAIL_NULL(rendering_server); \ |
| 48 |
ERR_FAIL_COND(!rendering_server->is_on_render_thread()); |
| 49 |
#define ERR_NOT_ON_RENDER_THREAD_V(m_ret) \ |
| 50 |
RenderingServer *rendering_server = RenderingServer::get_singleton(); \ |
| 51 |
ERR_FAIL_NULL_V(rendering_server, m_ret); \ |
| 52 |
ERR_FAIL_COND_V(!rendering_server->is_on_render_thread(), m_ret); |
| 53 |
#else |
| 54 |
#define ERR_NOT_ON_RENDER_THREAD |
| 55 |
#define ERR_NOT_ON_RENDER_THREAD_V(m_ret) |
| 56 |
#endif |
| 57 |
|
| 58 |
class RenderingServer : public Object { |
| 59 |
GDCLASS(RenderingServer, Object); |
| 60 |
|
| 61 |
static RenderingServer *singleton; |
| 62 |
|
| 63 |
int mm_policy = 0; |
| 64 |
bool render_loop_enabled = true; |
| 65 |
|
| 66 |
Array _get_array_from_surface(uint64_t p_format, Vector<uint8_t> p_vertex_data, Vector<uint8_t> p_attrib_data, Vector<uint8_t> p_skin_data, int p_vertex_len, Vector<uint8_t> p_index_data, int p_index_len, const AABB &p_aabb, const Vector4 &p_uv_scale) const; |
| 67 |
|
| 68 |
const Vector2 SMALL_VEC2 = Vector2(CMP_EPSILON, CMP_EPSILON); |
| 69 |
const Vector3 SMALL_VEC3 = Vector3(CMP_EPSILON, CMP_EPSILON, CMP_EPSILON); |
| 70 |
|
| 71 |
virtual TypedArray<StringName> _global_shader_parameter_get_list() const; |
| 72 |
|
| 73 |
protected: |
| 74 |
RID _make_test_cube(); |
| 75 |
void _free_internal_rids(); |
| 76 |
RID test_texture; |
| 77 |
RID white_texture; |
| 78 |
RID test_material; |
| 79 |
|
| 80 |
Error _surface_set_data(Array p_arrays, uint64_t p_format, uint32_t *p_offsets, uint32_t p_vertex_stride, uint32_t p_normal_stride, uint32_t p_attrib_stride, uint32_t p_skin_stride, Vector<uint8_t> &r_vertex_array, Vector<uint8_t> &r_attrib_array, Vector<uint8_t> &r_skin_array, int p_vertex_array_len, Vector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb, Vector4 &r_uv_scale); |
| 81 |
|
| 82 |
static RenderingServer *(*create_func)(); |
| 83 |
static void _bind_methods(); |
| 84 |
|
| 85 |
#ifndef DISABLE_DEPRECATED |
| 86 |
void _environment_set_fog_bind_compat_84792(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective, float p_sky_affect); |
| 87 |
void _canvas_item_add_multiline_bind_compat_84523(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width = -1.0); |
| 88 |
void _canvas_item_add_rect_bind_compat_84523(RID p_item, const Rect2 &p_rect, const Color &p_color); |
| 89 |
void _canvas_item_add_circle_bind_compat_84523(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color); |
| 90 |
void _instance_set_interpolated_bind_compat_104269(RID p_instance, bool p_interpolated); |
| 91 |
void _instance_reset_physics_interpolation_bind_compat_104269(RID p_instance); |
| 92 |
|
| 93 |
static void _bind_compatibility_methods(); |
| 94 |
#endif |
| 95 |
|
| 96 |
public: |
| 97 |
static RenderingServer *get_singleton(); |
| 98 |
static RenderingServer *create(); |
| 99 |
|
| 100 |
enum { |
| 101 |
NO_INDEX_ARRAY = -1, |
| 102 |
ARRAY_WEIGHTS_SIZE = 4, |
| 103 |
CANVAS_ITEM_Z_MIN = -4096, |
| 104 |
CANVAS_ITEM_Z_MAX = 4096, |
| 105 |
CANVAS_LAYER_MIN = -2147483648, |
| 106 |
CANVAS_LAYER_MAX = 2147483647, |
| 107 |
MAX_GLOW_LEVELS = 7, |
| 108 |
MAX_CURSORS = 8, |
| 109 |
MAX_2D_DIRECTIONAL_LIGHTS = 8, |
| 110 |
MAX_MESH_SURFACES = 256 |
| 111 |
}; |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
enum TextureType { |
| 116 |
TEXTURE_TYPE_2D, |
| 117 |
TEXTURE_TYPE_LAYERED, |
| 118 |
TEXTURE_TYPE_3D, |
| 119 |
}; |
| 120 |
|
| 121 |
enum TextureLayeredType { |
| 122 |
TEXTURE_LAYERED_2D_ARRAY, |
| 123 |
TEXTURE_LAYERED_CUBEMAP, |
| 124 |
TEXTURE_LAYERED_CUBEMAP_ARRAY, |
| 125 |
}; |
| 126 |
|
| 127 |
enum CubeMapLayer { |
| 128 |
CUBEMAP_LAYER_LEFT, |
| 129 |
CUBEMAP_LAYER_RIGHT, |
| 130 |
CUBEMAP_LAYER_BOTTOM, |
| 131 |
CUBEMAP_LAYER_TOP, |
| 132 |
CUBEMAP_LAYER_FRONT, |
| 133 |
CUBEMAP_LAYER_BACK |
| 134 |
}; |
| 135 |
|
| 136 |
virtual RID texture_2d_create(const Ref<Image> &p_image) = 0; |
| 137 |
virtual RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, TextureLayeredType p_layered_type) = 0; |
| 138 |
virtual RID texture_3d_create(Image::Format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) = 0; |
| 139 |
virtual RID texture_external_create(int p_width, int p_height, uint64_t p_external_buffer = 0) = 0; |
| 140 |
virtual RID texture_proxy_create(RID p_base) = 0; |
| 141 |
|
| 142 |
virtual RID texture_create_from_native_handle(TextureType p_type, Image::Format p_format, uint64_t p_native_handle, int p_width, int p_height, int p_depth, int p_layers = 1, TextureLayeredType p_layered_type = TEXTURE_LAYERED_2D_ARRAY) = 0; |
| 143 |
|
| 144 |
virtual void texture_2d_update(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) = 0; |
| 145 |
virtual void texture_3d_update(RID p_texture, const Vector<Ref<Image>> &p_data) = 0; |
| 146 |
virtual void texture_external_update(RID p_texture, int p_width, int p_height, uint64_t p_external_buffer = 0) = 0; |
| 147 |
virtual void texture_proxy_update(RID p_texture, RID p_proxy_to) = 0; |
| 148 |
|
| 149 |
|
| 150 |
virtual RID texture_2d_placeholder_create() = 0; |
| 151 |
virtual RID texture_2d_layered_placeholder_create(TextureLayeredType p_layered_type) = 0; |
| 152 |
virtual RID texture_3d_placeholder_create() = 0; |
| 153 |
|
| 154 |
virtual Ref<Image> texture_2d_get(RID p_texture) const = 0; |
| 155 |
virtual Ref<Image> texture_2d_layer_get(RID p_texture, int p_layer) const = 0; |
| 156 |
virtual Vector<Ref<Image>> texture_3d_get(RID p_texture) const = 0; |
| 157 |
|
| 158 |
virtual void texture_replace(RID p_texture, RID p_by_texture) = 0; |
| 159 |
virtual void texture_set_size_override(RID p_texture, int p_width, int p_height) = 0; |
| 160 |
|
| 161 |
virtual void texture_set_path(RID p_texture, const String &p_path) = 0; |
| 162 |
virtual String texture_get_path(RID p_texture) const = 0; |
| 163 |
|
| 164 |
virtual Image::Format texture_get_format(RID p_texture) const = 0; |
| 165 |
|
| 166 |
typedef void (*TextureDetectCallback)(void *); |
| 167 |
|
| 168 |
virtual void texture_set_detect_3d_callback(RID p_texture, TextureDetectCallback p_callback, void *p_userdata) = 0; |
| 169 |
virtual void texture_set_detect_normal_callback(RID p_texture, TextureDetectCallback p_callback, void *p_userdata) = 0; |
| 170 |
|
| 171 |
enum TextureDetectRoughnessChannel { |
| 172 |
TEXTURE_DETECT_ROUGHNESS_R, |
| 173 |
TEXTURE_DETECT_ROUGHNESS_G, |
| 174 |
TEXTURE_DETECT_ROUGHNESS_B, |
| 175 |
TEXTURE_DETECT_ROUGHNESS_A, |
| 176 |
TEXTURE_DETECT_ROUGHNESS_GRAY, |
| 177 |
}; |
| 178 |
|
| 179 |
typedef void (*TextureDetectRoughnessCallback)(void *, const String &, TextureDetectRoughnessChannel); |
| 180 |
virtual void texture_set_detect_roughness_callback(RID p_texture, TextureDetectRoughnessCallback p_callback, void *p_userdata) = 0; |
| 181 |
|
| 182 |
struct TextureInfo { |
| 183 |
RID texture; |
| 184 |
uint32_t width; |
| 185 |
uint32_t height; |
| 186 |
uint32_t depth; |
| 187 |
Image::Format format; |
| 188 |
int64_t bytes; |
| 189 |
String path; |
| 190 |
TextureType type; |
| 191 |
}; |
| 192 |
|
| 193 |
virtual void texture_debug_usage(List<TextureInfo> *r_info) = 0; |
| 194 |
Array _texture_debug_usage_bind(); |
| 195 |
|
| 196 |
virtual void texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) = 0; |
| 197 |
|
| 198 |
virtual RID texture_rd_create(const RID &p_rd_texture, const RenderingServer::TextureLayeredType p_layer_type = RenderingServer::TEXTURE_LAYERED_2D_ARRAY) = 0; |
| 199 |
virtual RID texture_get_rd_texture(RID p_texture, bool p_srgb = false) const = 0; |
| 200 |
virtual uint64_t texture_get_native_handle(RID p_texture, bool p_srgb = false) const = 0; |
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
enum PipelineSource { |
| 205 |
PIPELINE_SOURCE_CANVAS, |
| 206 |
PIPELINE_SOURCE_MESH, |
| 207 |
PIPELINE_SOURCE_SURFACE, |
| 208 |
PIPELINE_SOURCE_DRAW, |
| 209 |
PIPELINE_SOURCE_SPECIALIZATION, |
| 210 |
PIPELINE_SOURCE_MAX |
| 211 |
}; |
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
enum ShaderMode { |
| 216 |
SHADER_SPATIAL, |
| 217 |
SHADER_CANVAS_ITEM, |
| 218 |
SHADER_PARTICLES, |
| 219 |
SHADER_SKY, |
| 220 |
SHADER_FOG, |
| 221 |
SHADER_MAX |
| 222 |
}; |
| 223 |
|
| 224 |
enum CullMode { |
| 225 |
CULL_MODE_DISABLED, |
| 226 |
CULL_MODE_FRONT, |
| 227 |
CULL_MODE_BACK, |
| 228 |
}; |
| 229 |
|
| 230 |
virtual RID shader_create() = 0; |
| 231 |
virtual RID shader_create_from_code(const String &p_code, const String &p_path_hint = String()) = 0; |
| 232 |
|
| 233 |
virtual void shader_set_code(RID p_shader, const String &p_code) = 0; |
| 234 |
virtual void shader_set_path_hint(RID p_shader, const String &p_path) = 0; |
| 235 |
virtual String shader_get_code(RID p_shader) const = 0; |
| 236 |
virtual void get_shader_parameter_list(RID p_shader, List<PropertyInfo> *p_param_list) const = 0; |
| 237 |
virtual Variant shader_get_parameter_default(RID p_shader, const StringName &p_param) const = 0; |
| 238 |
|
| 239 |
virtual void shader_set_default_texture_parameter(RID p_shader, const StringName &p_name, RID p_texture, int p_index = 0) = 0; |
| 240 |
virtual RID shader_get_default_texture_parameter(RID p_shader, const StringName &p_name, int p_index = 0) const = 0; |
| 241 |
|
| 242 |
struct ShaderNativeSourceCode { |
| 243 |
struct Version { |
| 244 |
struct Stage { |
| 245 |
String name; |
| 246 |
String code; |
| 247 |
}; |
| 248 |
Vector<Stage> stages; |
| 249 |
}; |
| 250 |
Vector<Version> versions; |
| 251 |
}; |
| 252 |
|
| 253 |
virtual ShaderNativeSourceCode shader_get_native_source_code(RID p_shader) const = 0; |
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
enum { |
| 258 |
MATERIAL_RENDER_PRIORITY_MIN = -128, |
| 259 |
MATERIAL_RENDER_PRIORITY_MAX = 127, |
| 260 |
}; |
| 261 |
|
| 262 |
virtual RID material_create() = 0; |
| 263 |
virtual RID material_create_from_shader(RID p_next_pass, int p_render_priority, RID p_shader) = 0; |
| 264 |
|
| 265 |
virtual void material_set_shader(RID p_shader_material, RID p_shader) = 0; |
| 266 |
|
| 267 |
virtual void material_set_param(RID p_material, const StringName &p_param, const Variant &p_value) = 0; |
| 268 |
virtual Variant material_get_param(RID p_material, const StringName &p_param) const = 0; |
| 269 |
|
| 270 |
virtual void material_set_render_priority(RID p_material, int priority) = 0; |
| 271 |
|
| 272 |
virtual void material_set_next_pass(RID p_material, RID p_next_material) = 0; |
| 273 |
|
| 274 |
virtual void material_set_use_debanding(bool p_enable) = 0; |
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
enum ArrayType { |
| 279 |
ARRAY_VERTEX = 0, |
| 280 |
ARRAY_NORMAL = 1, |
| 281 |
ARRAY_TANGENT = 2, |
| 282 |
ARRAY_COLOR = 3, |
| 283 |
ARRAY_TEX_UV = 4, |
| 284 |
ARRAY_TEX_UV2 = 5, |
| 285 |
ARRAY_CUSTOM0 = 6, |
| 286 |
ARRAY_CUSTOM1 = 7, |
| 287 |
ARRAY_CUSTOM2 = 8, |
| 288 |
ARRAY_CUSTOM3 = 9, |
| 289 |
ARRAY_BONES = 10, |
| 290 |
ARRAY_WEIGHTS = 11, |
| 291 |
ARRAY_INDEX = 12, |
| 292 |
ARRAY_MAX = 13 |
| 293 |
}; |
| 294 |
|
| 295 |
enum { |
| 296 |
ARRAY_CUSTOM_COUNT = ARRAY_BONES - ARRAY_CUSTOM0 |
| 297 |
}; |
| 298 |
|
| 299 |
enum ArrayCustomFormat { |
| 300 |
ARRAY_CUSTOM_RGBA8_UNORM, |
| 301 |
ARRAY_CUSTOM_RGBA8_SNORM, |
| 302 |
ARRAY_CUSTOM_RG_HALF, |
| 303 |
ARRAY_CUSTOM_RGBA_HALF, |
| 304 |
ARRAY_CUSTOM_R_FLOAT, |
| 305 |
ARRAY_CUSTOM_RG_FLOAT, |
| 306 |
ARRAY_CUSTOM_RGB_FLOAT, |
| 307 |
ARRAY_CUSTOM_RGBA_FLOAT, |
| 308 |
ARRAY_CUSTOM_MAX |
| 309 |
}; |
| 310 |
|
| 311 |
enum ArrayFormat : uint64_t { |
| 312 |
|
| 313 |
ARRAY_FORMAT_VERTEX = 1 << ARRAY_VERTEX, |
| 314 |
ARRAY_FORMAT_NORMAL = 1 << ARRAY_NORMAL, |
| 315 |
ARRAY_FORMAT_TANGENT = 1 << ARRAY_TANGENT, |
| 316 |
ARRAY_FORMAT_COLOR = 1 << ARRAY_COLOR, |
| 317 |
ARRAY_FORMAT_TEX_UV = 1 << ARRAY_TEX_UV, |
| 318 |
ARRAY_FORMAT_TEX_UV2 = 1 << ARRAY_TEX_UV2, |
| 319 |
ARRAY_FORMAT_CUSTOM0 = 1 << ARRAY_CUSTOM0, |
| 320 |
ARRAY_FORMAT_CUSTOM1 = 1 << ARRAY_CUSTOM1, |
| 321 |
ARRAY_FORMAT_CUSTOM2 = 1 << ARRAY_CUSTOM2, |
| 322 |
ARRAY_FORMAT_CUSTOM3 = 1 << ARRAY_CUSTOM3, |
| 323 |
ARRAY_FORMAT_BONES = 1 << ARRAY_BONES, |
| 324 |
ARRAY_FORMAT_WEIGHTS = 1 << ARRAY_WEIGHTS, |
| 325 |
ARRAY_FORMAT_INDEX = 1 << ARRAY_INDEX, |
| 326 |
|
| 327 |
ARRAY_FORMAT_BLEND_SHAPE_MASK = ARRAY_FORMAT_VERTEX | ARRAY_FORMAT_NORMAL | ARRAY_FORMAT_TANGENT, |
| 328 |
|
| 329 |
ARRAY_FORMAT_CUSTOM_BASE = (ARRAY_INDEX + 1), |
| 330 |
ARRAY_FORMAT_CUSTOM_BITS = 3, |
| 331 |
ARRAY_FORMAT_CUSTOM_MASK = 0x7, |
| 332 |
ARRAY_FORMAT_CUSTOM0_SHIFT = (ARRAY_FORMAT_CUSTOM_BASE + 0), |
| 333 |
ARRAY_FORMAT_CUSTOM1_SHIFT = (ARRAY_FORMAT_CUSTOM_BASE + ARRAY_FORMAT_CUSTOM_BITS), |
| 334 |
ARRAY_FORMAT_CUSTOM2_SHIFT = (ARRAY_FORMAT_CUSTOM_BASE + ARRAY_FORMAT_CUSTOM_BITS * 2), |
| 335 |
ARRAY_FORMAT_CUSTOM3_SHIFT = (ARRAY_FORMAT_CUSTOM_BASE + ARRAY_FORMAT_CUSTOM_BITS * 3), |
| 336 |
|
| 337 |
ARRAY_COMPRESS_FLAGS_BASE = (ARRAY_INDEX + 1 + 12), |
| 338 |
|
| 339 |
ARRAY_FLAG_USE_2D_VERTICES = 1 << (ARRAY_COMPRESS_FLAGS_BASE + 0), |
| 340 |
ARRAY_FLAG_USE_DYNAMIC_UPDATE = 1 << (ARRAY_COMPRESS_FLAGS_BASE + 1), |
| 341 |
ARRAY_FLAG_USE_8_BONE_WEIGHTS = 1 << (ARRAY_COMPRESS_FLAGS_BASE + 2), |
| 342 |
|
| 343 |
ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY = 1 << (ARRAY_COMPRESS_FLAGS_BASE + 3), |
| 344 |
|
| 345 |
ARRAY_FLAG_COMPRESS_ATTRIBUTES = 1 << (ARRAY_COMPRESS_FLAGS_BASE + 4), |
| 346 |
|
| 347 |
|
| 348 |
ARRAY_FLAG_FORMAT_VERSION_BASE = ARRAY_COMPRESS_FLAGS_BASE + 10, |
| 349 |
ARRAY_FLAG_FORMAT_VERSION_SHIFT = ARRAY_FLAG_FORMAT_VERSION_BASE, |
| 350 |
|
| 351 |
ARRAY_FLAG_FORMAT_VERSION_1 = 0, |
| 352 |
ARRAY_FLAG_FORMAT_VERSION_2 = 1ULL << ARRAY_FLAG_FORMAT_VERSION_SHIFT, |
| 353 |
ARRAY_FLAG_FORMAT_CURRENT_VERSION = ARRAY_FLAG_FORMAT_VERSION_2, |
| 354 |
ARRAY_FLAG_FORMAT_VERSION_MASK = 0xFF, |
| 355 |
}; |
| 356 |
|
| 357 |
static_assert(sizeof(ArrayFormat) == 8, "ArrayFormat should be 64 bits long."); |
| 358 |
|
| 359 |
enum PrimitiveType { |
| 360 |
PRIMITIVE_POINTS, |
| 361 |
PRIMITIVE_LINES, |
| 362 |
PRIMITIVE_LINE_STRIP, |
| 363 |
PRIMITIVE_TRIANGLES, |
| 364 |
PRIMITIVE_TRIANGLE_STRIP, |
| 365 |
PRIMITIVE_MAX, |
| 366 |
}; |
| 367 |
|
| 368 |
struct SurfaceData { |
| 369 |
PrimitiveType primitive = PRIMITIVE_MAX; |
| 370 |
|
| 371 |
uint64_t format = ARRAY_FLAG_FORMAT_CURRENT_VERSION; |
| 372 |
Vector<uint8_t> vertex_data; |
| 373 |
Vector<uint8_t> attribute_data; |
| 374 |
Vector<uint8_t> skin_data; |
| 375 |
uint32_t vertex_count = 0; |
| 376 |
Vector<uint8_t> index_data; |
| 377 |
uint32_t index_count = 0; |
| 378 |
|
| 379 |
AABB aabb; |
| 380 |
struct LOD { |
| 381 |
float edge_length = 0.0f; |
| 382 |
Vector<uint8_t> index_data; |
| 383 |
}; |
| 384 |
Vector<LOD> lods; |
| 385 |
Vector<AABB> bone_aabbs; |
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
Transform3D mesh_to_skeleton_xform; |
| 390 |
|
| 391 |
Vector<uint8_t> blend_shape_data; |
| 392 |
|
| 393 |
Vector4 uv_scale; |
| 394 |
|
| 395 |
RID material; |
| 396 |
}; |
| 397 |
|
| 398 |
virtual RID mesh_create_from_surfaces(const Vector<SurfaceData> &p_surfaces, int p_blend_shape_count = 0) = 0; |
| 399 |
virtual RID mesh_create() = 0; |
| 400 |
|
| 401 |
virtual void mesh_set_blend_shape_count(RID p_mesh, int p_blend_shape_count) = 0; |
| 402 |
|
| 403 |
virtual uint32_t mesh_surface_get_format_offset(BitField<ArrayFormat> p_format, int p_vertex_len, int p_array_index) const; |
| 404 |
virtual uint32_t mesh_surface_get_format_vertex_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const; |
| 405 |
virtual uint32_t mesh_surface_get_format_normal_tangent_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const; |
| 406 |
virtual uint32_t mesh_surface_get_format_attribute_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const; |
| 407 |
virtual uint32_t mesh_surface_get_format_skin_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const; |
| 408 |
virtual uint32_t mesh_surface_get_format_index_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const; |
| 409 |
|
| 410 |
|
| 411 |
virtual void mesh_surface_make_offsets_from_format(uint64_t p_format, int p_vertex_len, int p_index_len, uint32_t *r_offsets, uint32_t &r_vertex_element_size, uint32_t &r_normal_element_size, uint32_t &r_attrib_element_size, uint32_t &r_skin_element_size) const; |
| 412 |
virtual Error mesh_create_surface_data_from_arrays(SurfaceData *r_surface_data, PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes = Array(), const Dictionary &p_lods = Dictionary(), uint64_t p_compress_format = 0); |
| 413 |
Array mesh_create_arrays_from_surface_data(const SurfaceData &p_data) const; |
| 414 |
Array mesh_surface_get_arrays(RID p_mesh, int p_surface) const; |
| 415 |
TypedArray<Array> mesh_surface_get_blend_shape_arrays(RID p_mesh, int p_surface) const; |
| 416 |
Dictionary mesh_surface_get_lods(RID p_mesh, int p_surface) const; |
| 417 |
|
| 418 |
virtual void mesh_add_surface_from_arrays(RID p_mesh, PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes = Array(), const Dictionary &p_lods = Dictionary(), BitField<ArrayFormat> p_compress_format = 0); |
| 419 |
virtual void mesh_add_surface(RID p_mesh, const SurfaceData &p_surface) = 0; |
| 420 |
|
| 421 |
virtual int mesh_get_blend_shape_count(RID p_mesh) const = 0; |
| 422 |
|
| 423 |
enum BlendShapeMode { |
| 424 |
BLEND_SHAPE_MODE_NORMALIZED, |
| 425 |
BLEND_SHAPE_MODE_RELATIVE, |
| 426 |
}; |
| 427 |
|
| 428 |
virtual void mesh_set_blend_shape_mode(RID p_mesh, BlendShapeMode p_mode) = 0; |
| 429 |
virtual BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const = 0; |
| 430 |
|
| 431 |
virtual void mesh_surface_update_vertex_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) = 0; |
| 432 |
virtual void mesh_surface_update_attribute_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) = 0; |
| 433 |
virtual void mesh_surface_update_skin_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) = 0; |
| 434 |
virtual void mesh_surface_update_index_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) = 0; |
| 435 |
|
| 436 |
virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) = 0; |
| 437 |
virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const = 0; |
| 438 |
|
| 439 |
virtual SurfaceData mesh_get_surface(RID p_mesh, int p_surface) const = 0; |
| 440 |
|
| 441 |
virtual int mesh_get_surface_count(RID p_mesh) const = 0; |
| 442 |
|
| 443 |
virtual void mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) = 0; |
| 444 |
virtual AABB mesh_get_custom_aabb(RID p_mesh) const = 0; |
| 445 |
|
| 446 |
virtual void mesh_set_path(RID p_mesh, const String &p_path) = 0; |
| 447 |
virtual String mesh_get_path(RID p_mesh) const = 0; |
| 448 |
|
| 449 |
virtual void mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh) = 0; |
| 450 |
|
| 451 |
virtual void mesh_surface_remove(RID p_mesh, int p_surface) = 0; |
| 452 |
virtual void mesh_clear(RID p_mesh) = 0; |
| 453 |
|
| 454 |
struct MeshInfo { |
| 455 |
RID mesh; |
| 456 |
String path; |
| 457 |
uint32_t vertex_buffer_size = 0; |
| 458 |
uint32_t attribute_buffer_size = 0; |
| 459 |
uint32_t skin_buffer_size = 0; |
| 460 |
uint32_t index_buffer_size = 0; |
| 461 |
uint32_t blend_shape_buffer_size = 0; |
| 462 |
uint32_t lod_index_buffers_size = 0; |
| 463 |
uint64_t vertex_count = 0; |
| 464 |
}; |
| 465 |
|
| 466 |
virtual void mesh_debug_usage(List<MeshInfo> *r_info) = 0; |
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
virtual RID multimesh_create() = 0; |
| 471 |
|
| 472 |
enum MultimeshTransformFormat { |
| 473 |
MULTIMESH_TRANSFORM_2D, |
| 474 |
MULTIMESH_TRANSFORM_3D, |
| 475 |
}; |
| 476 |
|
| 477 |
enum MultimeshPhysicsInterpolationQuality { |
| 478 |
MULTIMESH_INTERP_QUALITY_FAST, |
| 479 |
MULTIMESH_INTERP_QUALITY_HIGH, |
| 480 |
}; |
| 481 |
|
| 482 |
protected: |
| 483 |
#ifndef DISABLE_DEPRECATED |
| 484 |
void _multimesh_allocate_data_bind_compat_99455(RID p_multimesh, int p_instances, MultimeshTransformFormat p_transform_format, bool p_use_colors, bool p_use_custom_data); |
| 485 |
#endif |
| 486 |
public: |
| 487 |
virtual void multimesh_allocate_data(RID p_multimesh, int p_instances, MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false, bool p_use_indirect = false) = 0; |
| 488 |
virtual int multimesh_get_instance_count(RID p_multimesh) const = 0; |
| 489 |
|
| 490 |
virtual void multimesh_set_mesh(RID p_multimesh, RID p_mesh) = 0; |
| 491 |
virtual void multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform3D &p_transform) = 0; |
| 492 |
virtual void multimesh_instance_set_transform_2d(RID p_multimesh, int p_index, const Transform2D &p_transform) = 0; |
| 493 |
virtual void multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color) = 0; |
| 494 |
virtual void multimesh_instance_set_custom_data(RID p_multimesh, int p_index, const Color &p_color) = 0; |
| 495 |
|
| 496 |
virtual RID multimesh_get_mesh(RID p_multimesh) const = 0; |
| 497 |
virtual AABB multimesh_get_aabb(RID p_multimesh) const = 0; |
| 498 |
|
| 499 |
virtual void multimesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) = 0; |
| 500 |
virtual AABB multimesh_get_custom_aabb(RID p_mesh) const = 0; |
| 501 |
|
| 502 |
virtual Transform3D multimesh_instance_get_transform(RID p_multimesh, int p_index) const = 0; |
| 503 |
virtual Transform2D multimesh_instance_get_transform_2d(RID p_multimesh, int p_index) const = 0; |
| 504 |
virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const = 0; |
| 505 |
virtual Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const = 0; |
| 506 |
|
| 507 |
virtual void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) = 0; |
| 508 |
virtual RID multimesh_get_command_buffer_rd_rid(RID p_multimesh) const = 0; |
| 509 |
virtual RID multimesh_get_buffer_rd_rid(RID p_multimesh) const = 0; |
| 510 |
virtual Vector<float> multimesh_get_buffer(RID p_multimesh) const = 0; |
| 511 |
|
| 512 |
|
| 513 |
virtual void multimesh_set_buffer_interpolated(RID p_multimesh, const Vector<float> &p_buffer_curr, const Vector<float> &p_buffer_prev) = 0; |
| 514 |
virtual void multimesh_set_physics_interpolated(RID p_multimesh, bool p_interpolated) = 0; |
| 515 |
virtual void multimesh_set_physics_interpolation_quality(RID p_multimesh, MultimeshPhysicsInterpolationQuality p_quality) = 0; |
| 516 |
virtual void multimesh_instance_reset_physics_interpolation(RID p_multimesh, int p_index) = 0; |
| 517 |
virtual void multimesh_instances_reset_physics_interpolation(RID p_multimesh) = 0; |
| 518 |
|
| 519 |
virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible) = 0; |
| 520 |
virtual int multimesh_get_visible_instances(RID p_multimesh) const = 0; |
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
virtual RID skeleton_create() = 0; |
| 525 |
virtual void skeleton_allocate_data(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) = 0; |
| 526 |
virtual int skeleton_get_bone_count(RID p_skeleton) const = 0; |
| 527 |
virtual void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform3D &p_transform) = 0; |
| 528 |
virtual Transform3D skeleton_bone_get_transform(RID p_skeleton, int p_bone) const = 0; |
| 529 |
virtual void skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform) = 0; |
| 530 |
virtual Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const = 0; |
| 531 |
virtual void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform) = 0; |
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
enum LightType { |
| 536 |
LIGHT_DIRECTIONAL, |
| 537 |
LIGHT_OMNI, |
| 538 |
LIGHT_SPOT |
| 539 |
}; |
| 540 |
|
| 541 |
enum LightParam { |
| 542 |
LIGHT_PARAM_ENERGY, |
| 543 |
LIGHT_PARAM_INDIRECT_ENERGY, |
| 544 |
LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY, |
| 545 |
LIGHT_PARAM_SPECULAR, |
| 546 |
LIGHT_PARAM_RANGE, |
| 547 |
LIGHT_PARAM_SIZE, |
| 548 |
LIGHT_PARAM_ATTENUATION, |
| 549 |
LIGHT_PARAM_SPOT_ANGLE, |
| 550 |
LIGHT_PARAM_SPOT_ATTENUATION, |
| 551 |
LIGHT_PARAM_SHADOW_MAX_DISTANCE, |
| 552 |
LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET, |
| 553 |
LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET, |
| 554 |
LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET, |
| 555 |
LIGHT_PARAM_SHADOW_FADE_START, |
| 556 |
LIGHT_PARAM_SHADOW_NORMAL_BIAS, |
| 557 |
LIGHT_PARAM_SHADOW_BIAS, |
| 558 |
LIGHT_PARAM_SHADOW_PANCAKE_SIZE, |
| 559 |
LIGHT_PARAM_SHADOW_OPACITY, |
| 560 |
LIGHT_PARAM_SHADOW_BLUR, |
| 561 |
LIGHT_PARAM_TRANSMITTANCE_BIAS, |
| 562 |
LIGHT_PARAM_INTENSITY, |
| 563 |
LIGHT_PARAM_MAX |
| 564 |
}; |
| 565 |
|
| 566 |
virtual RID directional_light_create() = 0; |
| 567 |
virtual RID omni_light_create() = 0; |
| 568 |
virtual RID spot_light_create() = 0; |
| 569 |
|
| 570 |
virtual void light_set_color(RID p_light, const Color &p_color) = 0; |
| 571 |
virtual void light_set_param(RID p_light, LightParam p_param, float p_value) = 0; |
| 572 |
virtual void light_set_shadow(RID p_light, bool p_enabled) = 0; |
| 573 |
virtual void light_set_projector(RID p_light, RID p_texture) = 0; |
| 574 |
virtual void light_set_negative(RID p_light, bool p_enable) = 0; |
| 575 |
virtual void light_set_cull_mask(RID p_light, uint32_t p_mask) = 0; |
| 576 |
virtual void light_set_distance_fade(RID p_light, bool p_enabled, float p_begin, float p_shadow, float p_length) = 0; |
| 577 |
virtual void light_set_reverse_cull_face_mode(RID p_light, bool p_enabled) = 0; |
| 578 |
virtual void light_set_shadow_caster_mask(RID p_light, uint32_t p_caster_mask) = 0; |
| 579 |
|
| 580 |
enum LightBakeMode { |
| 581 |
LIGHT_BAKE_DISABLED, |
| 582 |
LIGHT_BAKE_STATIC, |
| 583 |
LIGHT_BAKE_DYNAMIC, |
| 584 |
}; |
| 585 |
|
| 586 |
virtual void light_set_bake_mode(RID p_light, LightBakeMode p_bake_mode) = 0; |
| 587 |
virtual void light_set_max_sdfgi_cascade(RID p_light, uint32_t p_cascade) = 0; |
| 588 |
|
| 589 |
|
| 590 |
enum LightOmniShadowMode { |
| 591 |
LIGHT_OMNI_SHADOW_DUAL_PARABOLOID, |
| 592 |
LIGHT_OMNI_SHADOW_CUBE, |
| 593 |
}; |
| 594 |
|
| 595 |
virtual void light_omni_set_shadow_mode(RID p_light, LightOmniShadowMode p_mode) = 0; |
| 596 |
|
| 597 |
|
| 598 |
enum LightDirectionalShadowMode { |
| 599 |
LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL, |
| 600 |
LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS, |
| 601 |
LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS, |
| 602 |
}; |
| 603 |
|
| 604 |
enum LightDirectionalSkyMode { |
| 605 |
LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY, |
| 606 |
LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY, |
| 607 |
LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY, |
| 608 |
}; |
| 609 |
|
| 610 |
virtual void light_directional_set_shadow_mode(RID p_light, LightDirectionalShadowMode p_mode) = 0; |
| 611 |
virtual void light_directional_set_blend_splits(RID p_light, bool p_enable) = 0; |
| 612 |
virtual void light_directional_set_sky_mode(RID p_light, LightDirectionalSkyMode p_mode) = 0; |
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
virtual RID shadow_atlas_create() = 0; |
| 617 |
virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_use_16_bits = true) = 0; |
| 618 |
virtual void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) = 0; |
| 619 |
|
| 620 |
virtual void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = true) = 0; |
| 621 |
|
| 622 |
enum ShadowQuality { |
| 623 |
SHADOW_QUALITY_HARD, |
| 624 |
SHADOW_QUALITY_SOFT_VERY_LOW, |
| 625 |
SHADOW_QUALITY_SOFT_LOW, |
| 626 |
SHADOW_QUALITY_SOFT_MEDIUM, |
| 627 |
SHADOW_QUALITY_SOFT_HIGH, |
| 628 |
SHADOW_QUALITY_SOFT_ULTRA, |
| 629 |
SHADOW_QUALITY_MAX |
| 630 |
}; |
| 631 |
|
| 632 |
virtual void positional_soft_shadow_filter_set_quality(ShadowQuality p_quality) = 0; |
| 633 |
virtual void directional_soft_shadow_filter_set_quality(ShadowQuality p_quality) = 0; |
| 634 |
|
| 635 |
enum LightProjectorFilter { |
| 636 |
LIGHT_PROJECTOR_FILTER_NEAREST, |
| 637 |
LIGHT_PROJECTOR_FILTER_LINEAR, |
| 638 |
LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS, |
| 639 |
LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS, |
| 640 |
LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC, |
| 641 |
LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC, |
| 642 |
}; |
| 643 |
|
| 644 |
virtual void light_projectors_set_filter(LightProjectorFilter p_filter) = 0; |
| 645 |
|
| 646 |
|
| 647 |
|
| 648 |
virtual RID reflection_probe_create() = 0; |
| 649 |
|
| 650 |
enum ReflectionProbeUpdateMode { |
| 651 |
REFLECTION_PROBE_UPDATE_ONCE, |
| 652 |
REFLECTION_PROBE_UPDATE_ALWAYS, |
| 653 |
}; |
| 654 |
|
| 655 |
virtual void reflection_probe_set_update_mode(RID p_probe, ReflectionProbeUpdateMode p_mode) = 0; |
| 656 |
virtual void reflection_probe_set_intensity(RID p_probe, float p_intensity) = 0; |
| 657 |
virtual void reflection_probe_set_blend_distance(RID p_probe, float p_blend_distance) = 0; |
| 658 |
|
| 659 |
enum ReflectionProbeAmbientMode { |
| 660 |
REFLECTION_PROBE_AMBIENT_DISABLED, |
| 661 |
REFLECTION_PROBE_AMBIENT_ENVIRONMENT, |
| 662 |
REFLECTION_PROBE_AMBIENT_COLOR, |
| 663 |
}; |
| 664 |
|
| 665 |
virtual void reflection_probe_set_ambient_mode(RID p_probe, ReflectionProbeAmbientMode p_mode) = 0; |
| 666 |
virtual void reflection_probe_set_ambient_color(RID p_probe, const Color &p_color) = 0; |
| 667 |
virtual void reflection_probe_set_ambient_energy(RID p_probe, float p_energy) = 0; |
| 668 |
virtual void reflection_probe_set_max_distance(RID p_probe, float p_distance) = 0; |
| 669 |
virtual void reflection_probe_set_size(RID p_probe, const Vector3 &p_size) = 0; |
| 670 |
virtual void reflection_probe_set_origin_offset(RID p_probe, const Vector3 &p_offset) = 0; |
| 671 |
virtual void reflection_probe_set_as_interior(RID p_probe, bool p_enable) = 0; |
| 672 |
virtual void reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable) = 0; |
| 673 |
virtual void reflection_probe_set_enable_shadows(RID p_probe, bool p_enable) = 0; |
| 674 |
virtual void reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers) = 0; |
| 675 |
virtual void reflection_probe_set_reflection_mask(RID p_probe, uint32_t p_layers) = 0; |
| 676 |
virtual void reflection_probe_set_resolution(RID p_probe, int p_resolution) = 0; |
| 677 |
virtual void reflection_probe_set_mesh_lod_threshold(RID p_probe, float p_pixels) = 0; |
| 678 |
|
| 679 |
|
| 680 |
|
| 681 |
enum DecalTexture { |
| 682 |
DECAL_TEXTURE_ALBEDO, |
| 683 |
DECAL_TEXTURE_NORMAL, |
| 684 |
DECAL_TEXTURE_ORM, |
| 685 |
DECAL_TEXTURE_EMISSION, |
| 686 |
DECAL_TEXTURE_MAX |
| 687 |
}; |
| 688 |
|
| 689 |
virtual RID decal_create() = 0; |
| 690 |
virtual void decal_set_size(RID p_decal, const Vector3 &p_size) = 0; |
| 691 |
virtual void decal_set_texture(RID p_decal, DecalTexture p_type, RID p_texture) = 0; |
| 692 |
virtual void decal_set_emission_energy(RID p_decal, float p_energy) = 0; |
| 693 |
virtual void decal_set_albedo_mix(RID p_decal, float p_mix) = 0; |
| 694 |
virtual void decal_set_modulate(RID p_decal, const Color &p_modulate) = 0; |
| 695 |
virtual void decal_set_cull_mask(RID p_decal, uint32_t p_layers) = 0; |
| 696 |
virtual void decal_set_distance_fade(RID p_decal, bool p_enabled, float p_begin, float p_length) = 0; |
| 697 |
virtual void decal_set_fade(RID p_decal, float p_above, float p_below) = 0; |
| 698 |
virtual void decal_set_normal_fade(RID p_decal, float p_fade) = 0; |
| 699 |
|
| 700 |
enum DecalFilter { |
| 701 |
DECAL_FILTER_NEAREST, |
| 702 |
DECAL_FILTER_LINEAR, |
| 703 |
DECAL_FILTER_NEAREST_MIPMAPS, |
| 704 |
DECAL_FILTER_LINEAR_MIPMAPS, |
| 705 |
DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC, |
| 706 |
DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC, |
| 707 |
}; |
| 708 |
|
| 709 |
virtual void decals_set_filter(DecalFilter p_quality) = 0; |
| 710 |
|
| 711 |
|
| 712 |
|
| 713 |
virtual RID voxel_gi_create() = 0; |
| 714 |
|
| 715 |
virtual void voxel_gi_allocate_data(RID p_voxel_gi, const Transform3D &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0; |
| 716 |
|
| 717 |
virtual AABB voxel_gi_get_bounds(RID p_voxel_gi) const = 0; |
| 718 |
virtual Vector3i voxel_gi_get_octree_size(RID p_voxel_gi) const = 0; |
| 719 |
virtual Vector<uint8_t> voxel_gi_get_octree_cells(RID p_voxel_gi) const = 0; |
| 720 |
virtual Vector<uint8_t> voxel_gi_get_data_cells(RID p_voxel_gi) const = 0; |
| 721 |
virtual Vector<uint8_t> voxel_gi_get_distance_field(RID p_voxel_gi) const = 0; |
| 722 |
virtual Vector<int> voxel_gi_get_level_counts(RID p_voxel_gi) const = 0; |
| 723 |
virtual Transform3D voxel_gi_get_to_cell_xform(RID p_voxel_gi) const = 0; |
| 724 |
|
| 725 |
virtual void voxel_gi_set_dynamic_range(RID p_voxel_gi, float p_range) = 0; |
| 726 |
virtual void voxel_gi_set_propagation(RID p_voxel_gi, float p_range) = 0; |
| 727 |
virtual void voxel_gi_set_energy(RID p_voxel_gi, float p_energy) = 0; |
| 728 |
virtual void voxel_gi_set_baked_exposure_normalization(RID p_voxel_gi, float p_baked_exposure) = 0; |
| 729 |
virtual void voxel_gi_set_bias(RID p_voxel_gi, float p_bias) = 0; |
| 730 |
virtual void voxel_gi_set_normal_bias(RID p_voxel_gi, float p_range) = 0; |
| 731 |
virtual void voxel_gi_set_interior(RID p_voxel_gi, bool p_enable) = 0; |
| 732 |
virtual void voxel_gi_set_use_two_bounces(RID p_voxel_gi, bool p_enable) = 0; |
| 733 |
|
| 734 |
enum VoxelGIQuality { |
| 735 |
VOXEL_GI_QUALITY_LOW, |
| 736 |
VOXEL_GI_QUALITY_HIGH, |
| 737 |
}; |
| 738 |
|
| 739 |
virtual void voxel_gi_set_quality(VoxelGIQuality) = 0; |
| 740 |
|
| 741 |
virtual void sdfgi_reset() = 0; |
| 742 |
|
| 743 |
|
| 744 |
|
| 745 |
enum ShadowmaskMode { |
| 746 |
SHADOWMASK_MODE_NONE, |
| 747 |
SHADOWMASK_MODE_REPLACE, |
| 748 |
SHADOWMASK_MODE_OVERLAY, |
| 749 |
SHADOWMASK_MODE_ONLY, |
| 750 |
}; |
| 751 |
|
| 752 |
virtual RID lightmap_create() = 0; |
| 753 |
|
| 754 |
virtual void lightmap_set_textures(RID p_lightmap, RID p_light, bool p_uses_spherical_haromics) = 0; |
| 755 |
virtual void lightmap_set_probe_bounds(RID p_lightmap, const AABB &p_bounds) = 0; |
| 756 |
virtual void lightmap_set_probe_interior(RID p_lightmap, bool p_interior) = 0; |
| 757 |
virtual void lightmap_set_probe_capture_data(RID p_lightmap, const PackedVector3Array &p_points, const PackedColorArray &p_point_sh, const PackedInt32Array &p_tetrahedra, const PackedInt32Array &p_bsp_tree) = 0; |
| 758 |
virtual void lightmap_set_baked_exposure_normalization(RID p_lightmap, float p_exposure) = 0; |
| 759 |
virtual PackedVector3Array lightmap_get_probe_capture_points(RID p_lightmap) const = 0; |
| 760 |
virtual PackedColorArray lightmap_get_probe_capture_sh(RID p_lightmap) const = 0; |
| 761 |
virtual PackedInt32Array lightmap_get_probe_capture_tetrahedra(RID p_lightmap) const = 0; |
| 762 |
virtual PackedInt32Array lightmap_get_probe_capture_bsp_tree(RID p_lightmap) const = 0; |
| 763 |
|
| 764 |
virtual void lightmap_set_probe_capture_update_speed(float p_speed) = 0; |
| 765 |
virtual void lightmaps_set_bicubic_filter(bool p_enable) = 0; |
| 766 |
|
| 767 |
virtual void lightmap_set_shadowmask_textures(RID p_lightmap, RID p_shadow) = 0; |
| 768 |
virtual ShadowmaskMode lightmap_get_shadowmask_mode(RID p_lightmap) = 0; |
| 769 |
virtual void lightmap_set_shadowmask_mode(RID p_lightmap, ShadowmaskMode p_mode) = 0; |
| 770 |
|
| 771 |
|
| 772 |
|
| 773 |
virtual RID particles_create() = 0; |
| 774 |
|
| 775 |
enum ParticlesMode { |
| 776 |
PARTICLES_MODE_2D, |
| 777 |
PARTICLES_MODE_3D |
| 778 |
}; |
| 779 |
virtual void particles_set_mode(RID p_particles, ParticlesMode p_mode) = 0; |
| 780 |
|
| 781 |
virtual void particles_set_emitting(RID p_particles, bool p_enable) = 0; |
| 782 |
virtual bool particles_get_emitting(RID p_particles) = 0; |
| 783 |
virtual void particles_set_amount(RID p_particles, int p_amount) = 0; |
| 784 |
virtual void particles_set_amount_ratio(RID p_particles, float p_amount_ratio) = 0; |
| 785 |
virtual void particles_set_lifetime(RID p_particles, double p_lifetime) = 0; |
| 786 |
virtual void particles_set_one_shot(RID p_particles, bool p_one_shot) = 0; |
| 787 |
virtual void particles_set_pre_process_time(RID p_particles, double p_time) = 0; |
| 788 |
virtual void particles_request_process_time(RID p_particles, real_t p_request_process_time) = 0; |
| 789 |
virtual void particles_set_explosiveness_ratio(RID p_particles, float p_ratio) = 0; |
| 790 |
virtual void particles_set_randomness_ratio(RID p_particles, float p_ratio) = 0; |
| 791 |
virtual void particles_set_custom_aabb(RID p_particles, const AABB &p_aabb) = 0; |
| 792 |
virtual void particles_set_speed_scale(RID p_particles, double p_scale) = 0; |
| 793 |
virtual void particles_set_use_local_coordinates(RID p_particles, bool p_enable) = 0; |
| 794 |
virtual void particles_set_process_material(RID p_particles, RID p_material) = 0; |
| 795 |
virtual void particles_set_fixed_fps(RID p_particles, int p_fps) = 0; |
| 796 |
virtual void particles_set_interpolate(RID p_particles, bool p_enable) = 0; |
| 797 |
virtual void particles_set_fractional_delta(RID p_particles, bool p_enable) = 0; |
| 798 |
virtual void particles_set_collision_base_size(RID p_particles, float p_size) = 0; |
| 799 |
virtual void particles_set_seed(RID p_particles, uint32_t p_seed) = 0; |
| 800 |
|
| 801 |
enum ParticlesTransformAlign { |
| 802 |
PARTICLES_TRANSFORM_ALIGN_DISABLED, |
| 803 |
PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD, |
| 804 |
PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY, |
| 805 |
PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY, |
| 806 |
}; |
| 807 |
|
| 808 |
virtual void particles_set_transform_align(RID p_particles, ParticlesTransformAlign p_transform_align) = 0; |
| 809 |
|
| 810 |
virtual void particles_set_trails(RID p_particles, bool p_enable, float p_length_sec) = 0; |
| 811 |
virtual void particles_set_trail_bind_poses(RID p_particles, const Vector<Transform3D> &p_bind_poses) = 0; |
| 812 |
|
| 813 |
virtual bool particles_is_inactive(RID p_particles) = 0; |
| 814 |
virtual void particles_request_process(RID p_particles) = 0; |
| 815 |
virtual void particles_restart(RID p_particles) = 0; |
| 816 |
|
| 817 |
virtual void particles_set_subemitter(RID p_particles, RID p_subemitter_particles) = 0; |
| 818 |
|
| 819 |
enum ParticlesEmitFlags { |
| 820 |
PARTICLES_EMIT_FLAG_POSITION = 1, |
| 821 |
PARTICLES_EMIT_FLAG_ROTATION_SCALE = 2, |
| 822 |
PARTICLES_EMIT_FLAG_VELOCITY = 4, |
| 823 |
PARTICLES_EMIT_FLAG_COLOR = 8, |
| 824 |
PARTICLES_EMIT_FLAG_CUSTOM = 16 |
| 825 |
}; |
| 826 |
|
| 827 |
virtual void particles_emit(RID p_particles, const Transform3D &p_transform, const Vector3 &p_velocity, const Color &p_color, const Color &p_custom, uint32_t p_emit_flags) = 0; |
| 828 |
|
| 829 |
enum ParticlesDrawOrder { |
| 830 |
PARTICLES_DRAW_ORDER_INDEX, |
| 831 |
PARTICLES_DRAW_ORDER_LIFETIME, |
| 832 |
PARTICLES_DRAW_ORDER_REVERSE_LIFETIME, |
| 833 |
PARTICLES_DRAW_ORDER_VIEW_DEPTH, |
| 834 |
}; |
| 835 |
|
| 836 |
virtual void particles_set_draw_order(RID p_particles, ParticlesDrawOrder p_order) = 0; |
| 837 |
|
| 838 |
virtual void particles_set_draw_passes(RID p_particles, int p_count) = 0; |
| 839 |
virtual void particles_set_draw_pass_mesh(RID p_particles, int p_pass, RID p_mesh) = 0; |
| 840 |
|
| 841 |
virtual AABB particles_get_current_aabb(RID p_particles) = 0; |
| 842 |
|
| 843 |
virtual void particles_set_emission_transform(RID p_particles, const Transform3D &p_transform) = 0; |
| 844 |
virtual void particles_set_emitter_velocity(RID p_particles, const Vector3 &p_velocity) = 0; |
| 845 |
virtual void particles_set_interp_to_end(RID p_particles, float p_interp) = 0; |
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
virtual RID particles_collision_create() = 0; |
| 850 |
|
| 851 |
enum ParticlesCollisionType { |
| 852 |
PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT, |
| 853 |
PARTICLES_COLLISION_TYPE_BOX_ATTRACT, |
| 854 |
PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT, |
| 855 |
PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE, |
| 856 |
PARTICLES_COLLISION_TYPE_BOX_COLLIDE, |
| 857 |
PARTICLES_COLLISION_TYPE_SDF_COLLIDE, |
| 858 |
PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE, |
| 859 |
}; |
| 860 |
|
| 861 |
virtual void particles_collision_set_collision_type(RID p_particles_collision, ParticlesCollisionType p_type) = 0; |
| 862 |
virtual void particles_collision_set_cull_mask(RID p_particles_collision, uint32_t p_cull_mask) = 0; |
| 863 |
virtual void particles_collision_set_sphere_radius(RID p_particles_collision, real_t p_radius) = 0; |
| 864 |
virtual void particles_collision_set_box_extents(RID p_particles_collision, const Vector3 &p_extents) = 0; |
| 865 |
virtual void particles_collision_set_attractor_strength(RID p_particles_collision, real_t p_strength) = 0; |
| 866 |
virtual void particles_collision_set_attractor_directionality(RID p_particles_collision, real_t p_directionality) = 0; |
| 867 |
virtual void particles_collision_set_attractor_attenuation(RID p_particles_collision, real_t p_curve) = 0; |
| 868 |
virtual void particles_collision_set_field_texture(RID p_particles_collision, RID p_texture) = 0; |
| 869 |
|
| 870 |
virtual void particles_collision_height_field_update(RID p_particles_collision) = 0; |
| 871 |
|
| 872 |
enum ParticlesCollisionHeightfieldResolution { |
| 873 |
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256, |
| 874 |
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512, |
| 875 |
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024, |
| 876 |
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048, |
| 877 |
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096, |
| 878 |
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192, |
| 879 |
PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX, |
| 880 |
}; |
| 881 |
|
| 882 |
virtual void particles_collision_set_height_field_resolution(RID p_particles_collision, ParticlesCollisionHeightfieldResolution p_resolution) = 0; |
| 883 |
virtual void particles_collision_set_height_field_mask(RID p_particles_collision, uint32_t p_heightfield_mask) = 0; |
| 884 |
|
| 885 |
|
| 886 |
|
| 887 |
virtual RID fog_volume_create() = 0; |
| 888 |
|
| 889 |
enum FogVolumeShape { |
| 890 |
FOG_VOLUME_SHAPE_ELLIPSOID, |
| 891 |
FOG_VOLUME_SHAPE_CONE, |
| 892 |
FOG_VOLUME_SHAPE_CYLINDER, |
| 893 |
FOG_VOLUME_SHAPE_BOX, |
| 894 |
FOG_VOLUME_SHAPE_WORLD, |
| 895 |
FOG_VOLUME_SHAPE_MAX, |
| 896 |
}; |
| 897 |
|
| 898 |
virtual void fog_volume_set_shape(RID p_fog_volume, FogVolumeShape p_shape) = 0; |
| 899 |
virtual void fog_volume_set_size(RID p_fog_volume, const Vector3 &p_size) = 0; |
| 900 |
virtual void fog_volume_set_material(RID p_fog_volume, RID p_material) = 0; |
| 901 |
|
| 902 |
|
| 903 |
|
| 904 |
virtual RID visibility_notifier_create() = 0; |
| 905 |
virtual void visibility_notifier_set_aabb(RID p_notifier, const AABB &p_aabb) = 0; |
| 906 |
virtual void visibility_notifier_set_callbacks(RID p_notifier, const Callable &p_enter_callbable, const Callable &p_exit_callable) = 0; |
| 907 |
|
| 908 |
|
| 909 |
|
| 910 |
virtual RID occluder_create() = 0; |
| 911 |
virtual void occluder_set_mesh(RID p_occluder, const PackedVector3Array &p_vertices, const PackedInt32Array &p_indices) = 0; |
| 912 |
|
| 913 |
|
| 914 |
|
| 915 |
virtual RID camera_create() = 0; |
| 916 |
virtual void camera_set_perspective(RID p_camera, float p_fovy_degrees, float p_z_near, float p_z_far) = 0; |
| 917 |
virtual void camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far) = 0; |
| 918 |
virtual void camera_set_frustum(RID p_camera, float p_size, Vector2 p_offset, float p_z_near, float p_z_far) = 0; |
| 919 |
virtual void camera_set_transform(RID p_camera, const Transform3D &p_transform) = 0; |
| 920 |
virtual void camera_set_cull_mask(RID p_camera, uint32_t p_layers) = 0; |
| 921 |
virtual void camera_set_environment(RID p_camera, RID p_env) = 0; |
| 922 |
virtual void camera_set_camera_attributes(RID p_camera, RID p_camera_attributes) = 0; |
| 923 |
virtual void camera_set_compositor(RID p_camera, RID p_compositor) = 0; |
| 924 |
virtual void camera_set_use_vertical_aspect(RID p_camera, bool p_enable) = 0; |
| 925 |
|
| 926 |
|
| 927 |
|
| 928 |
enum CanvasItemTextureFilter { |
| 929 |
CANVAS_ITEM_TEXTURE_FILTER_DEFAULT, |
| 930 |
CANVAS_ITEM_TEXTURE_FILTER_NEAREST, |
| 931 |
CANVAS_ITEM_TEXTURE_FILTER_LINEAR, |
| 932 |
CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, |
| 933 |
CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, |
| 934 |
CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, |
| 935 |
CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, |
| 936 |
CANVAS_ITEM_TEXTURE_FILTER_MAX |
| 937 |
}; |
| 938 |
|
| 939 |
enum CanvasItemTextureRepeat { |
| 940 |
CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT, |
| 941 |
CANVAS_ITEM_TEXTURE_REPEAT_DISABLED, |
| 942 |
CANVAS_ITEM_TEXTURE_REPEAT_ENABLED, |
| 943 |
CANVAS_ITEM_TEXTURE_REPEAT_MIRROR, |
| 944 |
CANVAS_ITEM_TEXTURE_REPEAT_MAX, |
| 945 |
}; |
| 946 |
|
| 947 |
virtual RID viewport_create() = 0; |
| 948 |
|
| 949 |
enum ViewportScaling3DMode { |
| 950 |
VIEWPORT_SCALING_3D_MODE_BILINEAR, |
| 951 |
VIEWPORT_SCALING_3D_MODE_FSR, |
| 952 |
VIEWPORT_SCALING_3D_MODE_FSR2, |
| 953 |
VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL, |
| 954 |
VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL, |
| 955 |
VIEWPORT_SCALING_3D_MODE_MAX, |
| 956 |
VIEWPORT_SCALING_3D_MODE_OFF = 255, |
| 957 |
}; |
| 958 |
|
| 959 |
enum ViewportAnisotropicFiltering { |
| 960 |
VIEWPORT_ANISOTROPY_DISABLED, |
| 961 |
VIEWPORT_ANISOTROPY_2X, |
| 962 |
VIEWPORT_ANISOTROPY_4X, |
| 963 |
VIEWPORT_ANISOTROPY_8X, |
| 964 |
VIEWPORT_ANISOTROPY_16X, |
| 965 |
VIEWPORT_ANISOTROPY_MAX |
| 966 |
}; |
| 967 |
|
| 968 |
enum ViewportScaling3DType { |
| 969 |
VIEWPORT_SCALING_3D_TYPE_NONE, |
| 970 |
VIEWPORT_SCALING_3D_TYPE_TEMPORAL, |
| 971 |
VIEWPORT_SCALING_3D_TYPE_SPATIAL, |
| 972 |
VIEWPORT_SCALING_3D_TYPE_MAX, |
| 973 |
}; |
| 974 |
|
| 975 |
_ALWAYS_INLINE_ static ViewportScaling3DType scaling_3d_mode_type(ViewportScaling3DMode p_mode) { |
| 976 |
if (p_mode == VIEWPORT_SCALING_3D_MODE_BILINEAR || p_mode == VIEWPORT_SCALING_3D_MODE_FSR || p_mode == VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL) { |
| 977 |
return VIEWPORT_SCALING_3D_TYPE_SPATIAL; |
| 978 |
} else if (p_mode == VIEWPORT_SCALING_3D_MODE_FSR2 || p_mode == VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL) { |
| 979 |
return VIEWPORT_SCALING_3D_TYPE_TEMPORAL; |
| 980 |
} |
| 981 |
return VIEWPORT_SCALING_3D_TYPE_NONE; |
| 982 |
} |
| 983 |
|
| 984 |
#ifndef XR_DISABLED |
| 985 |
virtual void viewport_set_use_xr(RID p_viewport, bool p_use_xr) = 0; |
| 986 |
#endif |
| 987 |
|
| 988 |
virtual void viewport_set_size(RID p_viewport, int p_width, int p_height) = 0; |
| 989 |
virtual void viewport_set_active(RID p_viewport, bool p_active) = 0; |
| 990 |
virtual void viewport_set_parent_viewport(RID p_viewport, RID p_parent_viewport) = 0; |
| 991 |
virtual void viewport_set_canvas_cull_mask(RID p_viewport, uint32_t p_canvas_cull_mask) = 0; |
| 992 |
|
| 993 |
virtual void viewport_attach_to_screen(RID p_viewport, const Rect2 &p_rect = Rect2(), DisplayServer::WindowID p_screen = DisplayServer::MAIN_WINDOW_ID) = 0; |
| 994 |
virtual void viewport_set_render_direct_to_screen(RID p_viewport, bool p_enable) = 0; |
| 995 |
|
| 996 |
virtual void viewport_set_scaling_3d_mode(RID p_viewport, ViewportScaling3DMode p_scaling_3d_mode) = 0; |
| 997 |
virtual void viewport_set_scaling_3d_scale(RID p_viewport, float p_scaling_3d_scale) = 0; |
| 998 |
virtual void viewport_set_fsr_sharpness(RID p_viewport, float p_fsr_sharpness) = 0; |
| 999 |
virtual void viewport_set_texture_mipmap_bias(RID p_viewport, float p_texture_mipmap_bias) = 0; |
| 1000 |
virtual void viewport_set_anisotropic_filtering_level(RID p_viewport, ViewportAnisotropicFiltering p_anisotropic_filtering_level) = 0; |
| 1001 |
|
| 1002 |
enum ViewportUpdateMode { |
| 1003 |
VIEWPORT_UPDATE_DISABLED, |
| 1004 |
VIEWPORT_UPDATE_ONCE, |
| 1005 |
VIEWPORT_UPDATE_WHEN_VISIBLE, |
| 1006 |
VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE, |
| 1007 |
VIEWPORT_UPDATE_ALWAYS |
| 1008 |
}; |
| 1009 |
|
| 1010 |
virtual void viewport_set_update_mode(RID p_viewport, ViewportUpdateMode p_mode) = 0; |
| 1011 |
virtual ViewportUpdateMode viewport_get_update_mode(RID p_viewport) const = 0; |
| 1012 |
|
| 1013 |
enum ViewportClearMode { |
| 1014 |
VIEWPORT_CLEAR_ALWAYS, |
| 1015 |
VIEWPORT_CLEAR_NEVER, |
| 1016 |
VIEWPORT_CLEAR_ONLY_NEXT_FRAME |
| 1017 |
}; |
| 1018 |
|
| 1019 |
virtual void viewport_set_clear_mode(RID p_viewport, ViewportClearMode p_clear_mode) = 0; |
| 1020 |
|
| 1021 |
virtual RID viewport_get_render_target(RID p_viewport) const = 0; |
| 1022 |
virtual RID viewport_get_texture(RID p_viewport) const = 0; |
| 1023 |
|
| 1024 |
enum ViewportEnvironmentMode { |
| 1025 |
VIEWPORT_ENVIRONMENT_DISABLED, |
| 1026 |
VIEWPORT_ENVIRONMENT_ENABLED, |
| 1027 |
VIEWPORT_ENVIRONMENT_INHERIT, |
| 1028 |
VIEWPORT_ENVIRONMENT_MAX, |
| 1029 |
}; |
| 1030 |
|
| 1031 |
virtual void viewport_set_environment_mode(RID p_viewport, ViewportEnvironmentMode p_mode) = 0; |
| 1032 |
virtual void viewport_set_disable_3d(RID p_viewport, bool p_disable) = 0; |
| 1033 |
virtual void viewport_set_disable_2d(RID p_viewport, bool p_disable) = 0; |
| 1034 |
|
| 1035 |
virtual void viewport_attach_camera(RID p_viewport, RID p_camera) = 0; |
| 1036 |
virtual void viewport_set_scenario(RID p_viewport, RID p_scenario) = 0; |
| 1037 |
virtual void viewport_attach_canvas(RID p_viewport, RID p_canvas) = 0; |
| 1038 |
virtual void viewport_remove_canvas(RID p_viewport, RID p_canvas) = 0; |
| 1039 |
virtual void viewport_set_canvas_transform(RID p_viewport, RID p_canvas, const Transform2D &p_offset) = 0; |
| 1040 |
virtual void viewport_set_transparent_background(RID p_viewport, bool p_enabled) = 0; |
| 1041 |
virtual void viewport_set_use_hdr_2d(RID p_viewport, bool p_use_hdr) = 0; |
| 1042 |
virtual bool viewport_is_using_hdr_2d(RID p_viewport) const = 0; |
| 1043 |
virtual void viewport_set_snap_2d_transforms_to_pixel(RID p_viewport, bool p_enabled) = 0; |
| 1044 |
virtual void viewport_set_snap_2d_vertices_to_pixel(RID p_viewport, bool p_enabled) = 0; |
| 1045 |
|
| 1046 |
virtual void viewport_set_default_canvas_item_texture_filter(RID p_viewport, CanvasItemTextureFilter p_filter) = 0; |
| 1047 |
virtual void viewport_set_default_canvas_item_texture_repeat(RID p_viewport, CanvasItemTextureRepeat p_repeat) = 0; |
| 1048 |
|
| 1049 |
virtual void viewport_set_global_canvas_transform(RID p_viewport, const Transform2D &p_transform) = 0; |
| 1050 |
virtual void viewport_set_canvas_stacking(RID p_viewport, RID p_canvas, int p_layer, int p_sublayer) = 0; |
| 1051 |
|
| 1052 |
enum ViewportSDFOversize { |
| 1053 |
VIEWPORT_SDF_OVERSIZE_100_PERCENT, |
| 1054 |
VIEWPORT_SDF_OVERSIZE_120_PERCENT, |
| 1055 |
VIEWPORT_SDF_OVERSIZE_150_PERCENT, |
| 1056 |
VIEWPORT_SDF_OVERSIZE_200_PERCENT, |
| 1057 |
VIEWPORT_SDF_OVERSIZE_MAX |
| 1058 |
}; |
| 1059 |
|
| 1060 |
enum ViewportSDFScale { |
| 1061 |
VIEWPORT_SDF_SCALE_100_PERCENT, |
| 1062 |
VIEWPORT_SDF_SCALE_50_PERCENT, |
| 1063 |
VIEWPORT_SDF_SCALE_25_PERCENT, |
| 1064 |
VIEWPORT_SDF_SCALE_MAX |
| 1065 |
}; |
| 1066 |
|
| 1067 |
virtual void viewport_set_sdf_oversize_and_scale(RID p_viewport, ViewportSDFOversize p_oversize, ViewportSDFScale p_scale) = 0; |
| 1068 |
|
| 1069 |
virtual void viewport_set_positional_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits = true) = 0; |
| 1070 |
virtual void viewport_set_positional_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv) = 0; |
| 1071 |
|
| 1072 |
enum ViewportMSAA { |
| 1073 |
VIEWPORT_MSAA_DISABLED, |
| 1074 |
VIEWPORT_MSAA_2X, |
| 1075 |
VIEWPORT_MSAA_4X, |
| 1076 |
VIEWPORT_MSAA_8X, |
| 1077 |
VIEWPORT_MSAA_MAX, |
| 1078 |
}; |
| 1079 |
|
| 1080 |
virtual void viewport_set_msaa_3d(RID p_viewport, ViewportMSAA p_msaa) = 0; |
| 1081 |
virtual void viewport_set_msaa_2d(RID p_viewport, ViewportMSAA p_msaa) = 0; |
| 1082 |
|
| 1083 |
enum ViewportScreenSpaceAA { |
| 1084 |
VIEWPORT_SCREEN_SPACE_AA_DISABLED, |
| 1085 |
VIEWPORT_SCREEN_SPACE_AA_FXAA, |
| 1086 |
VIEWPORT_SCREEN_SPACE_AA_SMAA, |
| 1087 |
VIEWPORT_SCREEN_SPACE_AA_MAX, |
| 1088 |
}; |
| 1089 |
|
| 1090 |
virtual void viewport_set_screen_space_aa(RID p_viewport, ViewportScreenSpaceAA p_mode) = 0; |
| 1091 |
|
| 1092 |
virtual void viewport_set_use_taa(RID p_viewport, bool p_use_taa) = 0; |
| 1093 |
|
| 1094 |
virtual void viewport_set_use_debanding(RID p_viewport, bool p_use_debanding) = 0; |
| 1095 |
|
| 1096 |
virtual void viewport_set_force_motion_vectors(RID p_viewport, bool p_force_motion_vectors) = 0; |
| 1097 |
|
| 1098 |
virtual void viewport_set_mesh_lod_threshold(RID p_viewport, float p_pixels) = 0; |
| 1099 |
|
| 1100 |
virtual void viewport_set_use_occlusion_culling(RID p_viewport, bool p_use_occlusion_culling) = 0; |
| 1101 |
virtual void viewport_set_occlusion_rays_per_thread(int p_rays_per_thread) = 0; |
| 1102 |
|
| 1103 |
enum ViewportOcclusionCullingBuildQuality { |
| 1104 |
VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW = 0, |
| 1105 |
VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM = 1, |
| 1106 |
VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH = 2, |
| 1107 |
}; |
| 1108 |
|
| 1109 |
virtual void viewport_set_occlusion_culling_build_quality(ViewportOcclusionCullingBuildQuality p_quality) = 0; |
| 1110 |
|
| 1111 |
enum ViewportRenderInfo { |
| 1112 |
VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME, |
| 1113 |
VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME, |
| 1114 |
VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME, |
| 1115 |
VIEWPORT_RENDER_INFO_MAX, |
| 1116 |
}; |
| 1117 |
|
| 1118 |
enum ViewportRenderInfoType { |
| 1119 |
VIEWPORT_RENDER_INFO_TYPE_VISIBLE, |
| 1120 |
VIEWPORT_RENDER_INFO_TYPE_SHADOW, |
| 1121 |
VIEWPORT_RENDER_INFO_TYPE_CANVAS, |
| 1122 |
VIEWPORT_RENDER_INFO_TYPE_MAX |
| 1123 |
}; |
| 1124 |
|
| 1125 |
virtual int viewport_get_render_info(RID p_viewport, ViewportRenderInfoType p_type, ViewportRenderInfo p_info) = 0; |
| 1126 |
|
| 1127 |
enum ViewportDebugDraw { |
| 1128 |
VIEWPORT_DEBUG_DRAW_DISABLED, |
| 1129 |
VIEWPORT_DEBUG_DRAW_UNSHADED, |
| 1130 |
VIEWPORT_DEBUG_DRAW_LIGHTING, |
| 1131 |
VIEWPORT_DEBUG_DRAW_OVERDRAW, |
| 1132 |
VIEWPORT_DEBUG_DRAW_WIREFRAME, |
| 1133 |
VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER, |
| 1134 |
VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO, |
| 1135 |
VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING, |
| 1136 |
VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION, |
| 1137 |
VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS, |
| 1138 |
VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS, |
| 1139 |
VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE, |
| 1140 |
VIEWPORT_DEBUG_DRAW_SSAO, |
| 1141 |
VIEWPORT_DEBUG_DRAW_SSIL, |
| 1142 |
VIEWPORT_DEBUG_DRAW_PSSM_SPLITS, |
| 1143 |
VIEWPORT_DEBUG_DRAW_DECAL_ATLAS, |
| 1144 |
VIEWPORT_DEBUG_DRAW_SDFGI, |
| 1145 |
VIEWPORT_DEBUG_DRAW_SDFGI_PROBES, |
| 1146 |
VIEWPORT_DEBUG_DRAW_GI_BUFFER, |
| 1147 |
VIEWPORT_DEBUG_DRAW_DISABLE_LOD, |
| 1148 |
VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS, |
| 1149 |
VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS, |
| 1150 |
VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS, |
| 1151 |
VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES, |
| 1152 |
VIEWPORT_DEBUG_DRAW_OCCLUDERS, |
| 1153 |
VIEWPORT_DEBUG_DRAW_MOTION_VECTORS, |
| 1154 |
VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER, |
| 1155 |
}; |
| 1156 |
|
| 1157 |
virtual void viewport_set_debug_draw(RID p_viewport, ViewportDebugDraw p_draw) = 0; |
| 1158 |
|
| 1159 |
virtual void viewport_set_measure_render_time(RID p_viewport, bool p_enable) = 0; |
| 1160 |
virtual double viewport_get_measured_render_time_cpu(RID p_viewport) const = 0; |
| 1161 |
virtual double viewport_get_measured_render_time_gpu(RID p_viewport) const = 0; |
| 1162 |
|
| 1163 |
virtual RID viewport_find_from_screen_attachment(DisplayServer::WindowID p_id = DisplayServer::MAIN_WINDOW_ID) const = 0; |
| 1164 |
|
| 1165 |
enum ViewportVRSMode { |
| 1166 |
VIEWPORT_VRS_DISABLED, |
| 1167 |
VIEWPORT_VRS_TEXTURE, |
| 1168 |
VIEWPORT_VRS_XR, |
| 1169 |
VIEWPORT_VRS_MAX, |
| 1170 |
}; |
| 1171 |
|
| 1172 |
enum ViewportVRSUpdateMode { |
| 1173 |
VIEWPORT_VRS_UPDATE_DISABLED, |
| 1174 |
VIEWPORT_VRS_UPDATE_ONCE, |
| 1175 |
VIEWPORT_VRS_UPDATE_ALWAYS, |
| 1176 |
VIEWPORT_VRS_UPDATE_MAX, |
| 1177 |
}; |
| 1178 |
|
| 1179 |
virtual void viewport_set_vrs_mode(RID p_viewport, ViewportVRSMode p_mode) = 0; |
| 1180 |
virtual void viewport_set_vrs_update_mode(RID p_viewport, ViewportVRSUpdateMode p_mode) = 0; |
| 1181 |
virtual void viewport_set_vrs_texture(RID p_viewport, RID p_texture) = 0; |
| 1182 |
|
| 1183 |
|
| 1184 |
|
| 1185 |
enum SkyMode { |
| 1186 |
SKY_MODE_AUTOMATIC, |
| 1187 |
SKY_MODE_QUALITY, |
| 1188 |
SKY_MODE_INCREMENTAL, |
| 1189 |
SKY_MODE_REALTIME |
| 1190 |
}; |
| 1191 |
|
| 1192 |
virtual RID sky_create() = 0; |
| 1193 |
virtual void sky_set_radiance_size(RID p_sky, int p_radiance_size) = 0; |
| 1194 |
virtual void sky_set_mode(RID p_sky, SkyMode p_mode) = 0; |
| 1195 |
virtual void sky_set_material(RID p_sky, RID p_material) = 0; |
| 1196 |
virtual Ref<Image> sky_bake_panorama(RID p_sky, float p_energy, bool p_bake_irradiance, const Size2i &p_size) = 0; |
| 1197 |
|
| 1198 |
|
| 1199 |
|
| 1200 |
enum CompositorEffectFlags { |
| 1201 |
COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR = 1, |
| 1202 |
COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH = 2, |
| 1203 |
COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS = 4, |
| 1204 |
COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS = 8, |
| 1205 |
COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR = 16, |
| 1206 |
}; |
| 1207 |
|
| 1208 |
enum CompositorEffectCallbackType { |
| 1209 |
COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_OPAQUE, |
| 1210 |
COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_OPAQUE, |
| 1211 |
COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_SKY, |
| 1212 |
COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT, |
| 1213 |
COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT, |
| 1214 |
COMPOSITOR_EFFECT_CALLBACK_TYPE_MAX, |
| 1215 |
COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY = -1, |
| 1216 |
}; |
| 1217 |
|
| 1218 |
virtual RID compositor_effect_create() = 0; |
| 1219 |
virtual void compositor_effect_set_enabled(RID p_effect, bool p_enabled) = 0; |
| 1220 |
virtual void compositor_effect_set_callback(RID p_effect, CompositorEffectCallbackType p_callback_type, const Callable &p_callback) = 0; |
| 1221 |
virtual void compositor_effect_set_flag(RID p_effect, CompositorEffectFlags p_flag, bool p_set) = 0; |
| 1222 |
|
| 1223 |
|
| 1224 |
|
| 1225 |
virtual RID compositor_create() = 0; |
| 1226 |
|
| 1227 |
virtual void compositor_set_compositor_effects(RID p_compositor, const TypedArray<RID> &p_effects) = 0; |
| 1228 |
|
| 1229 |
|
| 1230 |
|
| 1231 |
virtual RID environment_create() = 0; |
| 1232 |
|
| 1233 |
enum EnvironmentBG { |
| 1234 |
ENV_BG_CLEAR_COLOR, |
| 1235 |
ENV_BG_COLOR, |
| 1236 |
ENV_BG_SKY, |
| 1237 |
ENV_BG_CANVAS, |
| 1238 |
ENV_BG_KEEP, |
| 1239 |
ENV_BG_CAMERA_FEED, |
| 1240 |
ENV_BG_MAX |
| 1241 |
}; |
| 1242 |
|
| 1243 |
enum EnvironmentAmbientSource { |
| 1244 |
ENV_AMBIENT_SOURCE_BG, |
| 1245 |
ENV_AMBIENT_SOURCE_DISABLED, |
| 1246 |
ENV_AMBIENT_SOURCE_COLOR, |
| 1247 |
ENV_AMBIENT_SOURCE_SKY, |
| 1248 |
}; |
| 1249 |
|
| 1250 |
enum EnvironmentReflectionSource { |
| 1251 |
ENV_REFLECTION_SOURCE_BG, |
| 1252 |
ENV_REFLECTION_SOURCE_DISABLED, |
| 1253 |
ENV_REFLECTION_SOURCE_SKY, |
| 1254 |
}; |
| 1255 |
|
| 1256 |
virtual void environment_set_background(RID p_env, EnvironmentBG p_bg) = 0; |
| 1257 |
virtual void environment_set_sky(RID p_env, RID p_sky) = 0; |
| 1258 |
virtual void environment_set_sky_custom_fov(RID p_env, float p_scale) = 0; |
| 1259 |
virtual void environment_set_sky_orientation(RID p_env, const Basis &p_orientation) = 0; |
| 1260 |
virtual void environment_set_bg_color(RID p_env, const Color &p_color) = 0; |
| 1261 |
virtual void environment_set_bg_energy(RID p_env, float p_multiplier, float p_exposure_value) = 0; |
| 1262 |
virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer) = 0; |
| 1263 |
virtual void environment_set_ambient_light(RID p_env, const Color &p_color, EnvironmentAmbientSource p_ambient = ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, EnvironmentReflectionSource p_reflection_source = ENV_REFLECTION_SOURCE_BG) = 0; |
| 1264 |
virtual void environment_set_camera_feed_id(RID p_env, int p_camera_feed_id) = 0; |
| 1265 |
|
| 1266 |
enum EnvironmentGlowBlendMode { |
| 1267 |
ENV_GLOW_BLEND_MODE_ADDITIVE, |
| 1268 |
ENV_GLOW_BLEND_MODE_SCREEN, |
| 1269 |
ENV_GLOW_BLEND_MODE_SOFTLIGHT, |
| 1270 |
ENV_GLOW_BLEND_MODE_REPLACE, |
| 1271 |
ENV_GLOW_BLEND_MODE_MIX, |
| 1272 |
}; |
| 1273 |
|
| 1274 |
virtual void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) = 0; |
| 1275 |
|
| 1276 |
virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) = 0; |
| 1277 |
|
| 1278 |
enum EnvironmentToneMapper { |
| 1279 |
ENV_TONE_MAPPER_LINEAR, |
| 1280 |
ENV_TONE_MAPPER_REINHARD, |
| 1281 |
ENV_TONE_MAPPER_FILMIC, |
| 1282 |
ENV_TONE_MAPPER_ACES, |
| 1283 |
ENV_TONE_MAPPER_AGX, |
| 1284 |
}; |
| 1285 |
|
| 1286 |
virtual void environment_set_tonemap(RID p_env, EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white) = 0; |
| 1287 |
virtual void environment_set_tonemap_agx_contrast(RID p_env, float p_agx_contrast) = 0; |
| 1288 |
virtual void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) = 0; |
| 1289 |
|
| 1290 |
virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_in, float p_fade_out, float p_depth_tolerance) = 0; |
| 1291 |
|
| 1292 |
virtual void environment_set_ssr_half_size(bool p_half_size) = 0; |
| 1293 |
|
| 1294 |
enum EnvironmentSSRRoughnessQuality { |
| 1295 |
ENV_SSR_ROUGHNESS_QUALITY_DISABLED, |
| 1296 |
ENV_SSR_ROUGHNESS_QUALITY_LOW, |
| 1297 |
ENV_SSR_ROUGHNESS_QUALITY_MEDIUM, |
| 1298 |
ENV_SSR_ROUGHNESS_QUALITY_HIGH, |
| 1299 |
}; |
| 1300 |
|
| 1301 |
virtual void environment_set_ssr_roughness_quality(EnvironmentSSRRoughnessQuality p_quality) = 0; |
| 1302 |
|
| 1303 |
virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) = 0; |
| 1304 |
|
| 1305 |
enum EnvironmentSSAOQuality { |
| 1306 |
ENV_SSAO_QUALITY_VERY_LOW, |
| 1307 |
ENV_SSAO_QUALITY_LOW, |
| 1308 |
ENV_SSAO_QUALITY_MEDIUM, |
| 1309 |
ENV_SSAO_QUALITY_HIGH, |
| 1310 |
ENV_SSAO_QUALITY_ULTRA, |
| 1311 |
}; |
| 1312 |
|
| 1313 |
virtual void environment_set_ssao_quality(EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0; |
| 1314 |
|
| 1315 |
virtual void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) = 0; |
| 1316 |
|
| 1317 |
enum EnvironmentSSILQuality { |
| 1318 |
ENV_SSIL_QUALITY_VERY_LOW, |
| 1319 |
ENV_SSIL_QUALITY_LOW, |
| 1320 |
ENV_SSIL_QUALITY_MEDIUM, |
| 1321 |
ENV_SSIL_QUALITY_HIGH, |
| 1322 |
ENV_SSIL_QUALITY_ULTRA, |
| 1323 |
}; |
| 1324 |
|
| 1325 |
virtual void environment_set_ssil_quality(EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0; |
| 1326 |
|
| 1327 |
enum EnvironmentSDFGIYScale { |
| 1328 |
ENV_SDFGI_Y_SCALE_50_PERCENT, |
| 1329 |
ENV_SDFGI_Y_SCALE_75_PERCENT, |
| 1330 |
ENV_SDFGI_Y_SCALE_100_PERCENT, |
| 1331 |
}; |
| 1332 |
|
| 1333 |
virtual void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0; |
| 1334 |
|
| 1335 |
enum EnvironmentSDFGIRayCount { |
| 1336 |
ENV_SDFGI_RAY_COUNT_4, |
| 1337 |
ENV_SDFGI_RAY_COUNT_8, |
| 1338 |
ENV_SDFGI_RAY_COUNT_16, |
| 1339 |
ENV_SDFGI_RAY_COUNT_32, |
| 1340 |
ENV_SDFGI_RAY_COUNT_64, |
| 1341 |
ENV_SDFGI_RAY_COUNT_96, |
| 1342 |
ENV_SDFGI_RAY_COUNT_128, |
| 1343 |
ENV_SDFGI_RAY_COUNT_MAX, |
| 1344 |
}; |
| 1345 |
|
| 1346 |
virtual void environment_set_sdfgi_ray_count(EnvironmentSDFGIRayCount p_ray_count) = 0; |
| 1347 |
|
| 1348 |
enum EnvironmentSDFGIFramesToConverge { |
| 1349 |
ENV_SDFGI_CONVERGE_IN_5_FRAMES, |
| 1350 |
ENV_SDFGI_CONVERGE_IN_10_FRAMES, |
| 1351 |
ENV_SDFGI_CONVERGE_IN_15_FRAMES, |
| 1352 |
ENV_SDFGI_CONVERGE_IN_20_FRAMES, |
| 1353 |
ENV_SDFGI_CONVERGE_IN_25_FRAMES, |
| 1354 |
ENV_SDFGI_CONVERGE_IN_30_FRAMES, |
| 1355 |
ENV_SDFGI_CONVERGE_MAX |
| 1356 |
}; |
| 1357 |
|
| 1358 |
virtual void environment_set_sdfgi_frames_to_converge(EnvironmentSDFGIFramesToConverge p_frames) = 0; |
| 1359 |
|
| 1360 |
enum EnvironmentSDFGIFramesToUpdateLight { |
| 1361 |
ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME, |
| 1362 |
ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES, |
| 1363 |
ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES, |
| 1364 |
ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES, |
| 1365 |
ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES, |
| 1366 |
ENV_SDFGI_UPDATE_LIGHT_MAX, |
| 1367 |
}; |
| 1368 |
|
| 1369 |
virtual void environment_set_sdfgi_frames_to_update_light(EnvironmentSDFGIFramesToUpdateLight p_update) = 0; |
| 1370 |
|
| 1371 |
enum EnvironmentFogMode { |
| 1372 |
ENV_FOG_MODE_EXPONENTIAL, |
| 1373 |
ENV_FOG_MODE_DEPTH, |
| 1374 |
}; |
| 1375 |
|
| 1376 |
virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective, float p_sky_affect, EnvironmentFogMode p_mode = EnvironmentFogMode::ENV_FOG_MODE_EXPONENTIAL) = 0; |
| 1377 |
virtual void environment_set_fog_depth(RID p_env, float p_curve, float p_begin, float p_end) = 0; |
| 1378 |
|
| 1379 |
virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject, float p_sky_affect) = 0; |
| 1380 |
virtual void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) = 0; |
| 1381 |
virtual void environment_set_volumetric_fog_filter_active(bool p_enable) = 0; |
| 1382 |
|
| 1383 |
virtual Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) = 0; |
| 1384 |
|
| 1385 |
virtual void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_limit) = 0; |
| 1386 |
|
| 1387 |
enum SubSurfaceScatteringQuality { |
| 1388 |
SUB_SURFACE_SCATTERING_QUALITY_DISABLED, |
| 1389 |
SUB_SURFACE_SCATTERING_QUALITY_LOW, |
| 1390 |
SUB_SURFACE_SCATTERING_QUALITY_MEDIUM, |
| 1391 |
SUB_SURFACE_SCATTERING_QUALITY_HIGH, |
| 1392 |
}; |
| 1393 |
|
| 1394 |
virtual void sub_surface_scattering_set_quality(SubSurfaceScatteringQuality p_quality) = 0; |
| 1395 |
virtual void sub_surface_scattering_set_scale(float p_scale, float p_depth_scale) = 0; |
| 1396 |
|
| 1397 |
|
| 1398 |
|
| 1399 |
virtual RID camera_attributes_create() = 0; |
| 1400 |
|
| 1401 |
enum DOFBlurQuality { |
| 1402 |
DOF_BLUR_QUALITY_VERY_LOW, |
| 1403 |
DOF_BLUR_QUALITY_LOW, |
| 1404 |
DOF_BLUR_QUALITY_MEDIUM, |
| 1405 |
DOF_BLUR_QUALITY_HIGH, |
| 1406 |
}; |
| 1407 |
|
| 1408 |
virtual void camera_attributes_set_dof_blur_quality(DOFBlurQuality p_quality, bool p_use_jitter) = 0; |
| 1409 |
|
| 1410 |
enum DOFBokehShape { |
| 1411 |
DOF_BOKEH_BOX, |
| 1412 |
DOF_BOKEH_HEXAGON, |
| 1413 |
DOF_BOKEH_CIRCLE |
| 1414 |
}; |
| 1415 |
|
| 1416 |
virtual void camera_attributes_set_dof_blur_bokeh_shape(DOFBokehShape p_shape) = 0; |
| 1417 |
|
| 1418 |
virtual void camera_attributes_set_dof_blur(RID p_camera_attributes, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) = 0; |
| 1419 |
virtual void camera_attributes_set_exposure(RID p_camera_attributes, float p_multiplier, float p_exposure_normalization) = 0; |
| 1420 |
virtual void camera_attributes_set_auto_exposure(RID p_camera_attributes, bool p_enable, float p_min_sensitivity, float p_max_sensitivity, float p_speed, float p_scale) = 0; |
| 1421 |
|
| 1422 |
|
| 1423 |
|
| 1424 |
virtual RID scenario_create() = 0; |
| 1425 |
|
| 1426 |
virtual void scenario_set_environment(RID p_scenario, RID p_environment) = 0; |
| 1427 |
virtual void scenario_set_fallback_environment(RID p_scenario, RID p_environment) = 0; |
| 1428 |
virtual void scenario_set_camera_attributes(RID p_scenario, RID p_camera_attributes) = 0; |
| 1429 |
virtual void scenario_set_compositor(RID p_scenario, RID p_compositor) = 0; |
| 1430 |
|
| 1431 |
|
| 1432 |
|
| 1433 |
enum InstanceType { |
| 1434 |
INSTANCE_NONE, |
| 1435 |
INSTANCE_MESH, |
| 1436 |
INSTANCE_MULTIMESH, |
| 1437 |
INSTANCE_PARTICLES, |
| 1438 |
INSTANCE_PARTICLES_COLLISION, |
| 1439 |
INSTANCE_LIGHT, |
| 1440 |
INSTANCE_REFLECTION_PROBE, |
| 1441 |
INSTANCE_DECAL, |
| 1442 |
INSTANCE_VOXEL_GI, |
| 1443 |
INSTANCE_LIGHTMAP, |
| 1444 |
INSTANCE_OCCLUDER, |
| 1445 |
INSTANCE_VISIBLITY_NOTIFIER, |
| 1446 |
INSTANCE_FOG_VOLUME, |
| 1447 |
INSTANCE_MAX, |
| 1448 |
|
| 1449 |
INSTANCE_GEOMETRY_MASK = (1 << INSTANCE_MESH) | (1 << INSTANCE_MULTIMESH) | (1 << INSTANCE_PARTICLES) |
| 1450 |
}; |
| 1451 |
|
| 1452 |
virtual RID instance_create2(RID p_base, RID p_scenario); |
| 1453 |
|
| 1454 |
virtual RID instance_create() = 0; |
| 1455 |
|
| 1456 |
virtual void instance_set_base(RID p_instance, RID p_base) = 0; |
| 1457 |
virtual void instance_set_scenario(RID p_instance, RID p_scenario) = 0; |
| 1458 |
virtual void instance_set_layer_mask(RID p_instance, uint32_t p_mask) = 0; |
| 1459 |
virtual void instance_set_pivot_data(RID p_instance, float p_sorting_offset, bool p_use_aabb_center) = 0; |
| 1460 |
virtual void instance_set_transform(RID p_instance, const Transform3D &p_transform) = 0; |
| 1461 |
virtual void instance_attach_object_instance_id(RID p_instance, ObjectID p_id) = 0; |
| 1462 |
virtual void instance_set_blend_shape_weight(RID p_instance, int p_shape, float p_weight) = 0; |
| 1463 |
virtual void instance_set_surface_override_material(RID p_instance, int p_surface, RID p_material) = 0; |
| 1464 |
virtual void instance_set_visible(RID p_instance, bool p_visible) = 0; |
| 1465 |
|
| 1466 |
virtual void instance_teleport(RID p_instance) = 0; |
| 1467 |
|
| 1468 |
virtual void instance_set_custom_aabb(RID p_instance, AABB aabb) = 0; |
| 1469 |
|
| 1470 |
virtual void instance_attach_skeleton(RID p_instance, RID p_skeleton) = 0; |
| 1471 |
|
| 1472 |
virtual void instance_set_extra_visibility_margin(RID p_instance, real_t p_margin) = 0; |
| 1473 |
virtual void instance_set_visibility_parent(RID p_instance, RID p_parent_instance) = 0; |
| 1474 |
|
| 1475 |
virtual void instance_set_ignore_culling(RID p_instance, bool p_enabled) = 0; |
| 1476 |
|
| 1477 |
|
| 1478 |
virtual Vector<ObjectID> instances_cull_aabb(const AABB &p_aabb, RID p_scenario = RID()) const = 0; |
| 1479 |
virtual Vector<ObjectID> instances_cull_ray(const Vector3 &p_from, const Vector3 &p_to, RID p_scenario = RID()) const = 0; |
| 1480 |
virtual Vector<ObjectID> instances_cull_convex(const Vector<Plane> &p_convex, RID p_scenario = RID()) const = 0; |
| 1481 |
|
| 1482 |
PackedInt64Array _instances_cull_aabb_bind(const AABB &p_aabb, RID p_scenario = RID()) const; |
| 1483 |
PackedInt64Array _instances_cull_ray_bind(const Vector3 &p_from, const Vector3 &p_to, RID p_scenario = RID()) const; |
| 1484 |
PackedInt64Array _instances_cull_convex_bind(const TypedArray<Plane> &p_convex, RID p_scenario = RID()) const; |
| 1485 |
|
| 1486 |
enum InstanceFlags { |
| 1487 |
INSTANCE_FLAG_USE_BAKED_LIGHT, |
| 1488 |
INSTANCE_FLAG_USE_DYNAMIC_GI, |
| 1489 |
INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, |
| 1490 |
INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, |
| 1491 |
INSTANCE_FLAG_MAX |
| 1492 |
}; |
| 1493 |
|
| 1494 |
enum ShadowCastingSetting { |
| 1495 |
SHADOW_CASTING_SETTING_OFF, |
| 1496 |
SHADOW_CASTING_SETTING_ON, |
| 1497 |
SHADOW_CASTING_SETTING_DOUBLE_SIDED, |
| 1498 |
SHADOW_CASTING_SETTING_SHADOWS_ONLY, |
| 1499 |
}; |
| 1500 |
|
| 1501 |
enum VisibilityRangeFadeMode { |
| 1502 |
VISIBILITY_RANGE_FADE_DISABLED, |
| 1503 |
VISIBILITY_RANGE_FADE_SELF, |
| 1504 |
VISIBILITY_RANGE_FADE_DEPENDENCIES, |
| 1505 |
}; |
| 1506 |
|
| 1507 |
virtual void instance_geometry_set_flag(RID p_instance, InstanceFlags p_flags, bool p_enabled) = 0; |
| 1508 |
virtual void instance_geometry_set_cast_shadows_setting(RID p_instance, ShadowCastingSetting p_shadow_casting_setting) = 0; |
| 1509 |
virtual void instance_geometry_set_material_override(RID p_instance, RID p_material) = 0; |
| 1510 |
virtual void instance_geometry_set_material_overlay(RID p_instance, RID p_material) = 0; |
| 1511 |
virtual void instance_geometry_set_visibility_range(RID p_instance, float p_min, float p_max, float p_min_margin, float p_max_margin, VisibilityRangeFadeMode p_fade_mode) = 0; |
| 1512 |
virtual void instance_geometry_set_lightmap(RID p_instance, RID p_lightmap, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice) = 0; |
| 1513 |
virtual void instance_geometry_set_lod_bias(RID p_instance, float p_lod_bias) = 0; |
| 1514 |
virtual void instance_geometry_set_transparency(RID p_instance, float p_transparency) = 0; |
| 1515 |
|
| 1516 |
virtual void instance_geometry_set_shader_parameter(RID p_instance, const StringName &, const Variant &p_value) = 0; |
| 1517 |
virtual Variant instance_geometry_get_shader_parameter(RID p_instance, const StringName &) const = 0; |
| 1518 |
virtual Variant instance_geometry_get_shader_parameter_default_value(RID p_instance, const StringName &) const = 0; |
| 1519 |
virtual void instance_geometry_get_shader_parameter_list(RID p_instance, List<PropertyInfo> *p_parameters) const = 0; |
| 1520 |
|
| 1521 |
|
| 1522 |
|
| 1523 |
enum BakeChannels { |
| 1524 |
BAKE_CHANNEL_ALBEDO_ALPHA, |
| 1525 |
BAKE_CHANNEL_NORMAL, |
| 1526 |
BAKE_CHANNEL_ORM, |
| 1527 |
BAKE_CHANNEL_EMISSION |
| 1528 |
}; |
| 1529 |
|
| 1530 |
virtual TypedArray<Image> bake_render_uv2(RID p_base, const TypedArray<RID> &p_material_overrides, const Size2i &p_image_size) = 0; |
| 1531 |
|
| 1532 |
|
| 1533 |
|
| 1534 |
virtual RID canvas_create() = 0; |
| 1535 |
virtual void canvas_set_item_mirroring(RID p_canvas, RID p_item, const Point2 &p_mirroring) = 0; |
| 1536 |
virtual void canvas_set_item_repeat(RID p_item, const Point2 &p_repeat_size, int p_repeat_times) = 0; |
| 1537 |
virtual void canvas_set_modulate(RID p_canvas, const Color &p_color) = 0; |
| 1538 |
virtual void canvas_set_parent(RID p_canvas, RID p_parent, float p_scale) = 0; |
| 1539 |
|
| 1540 |
virtual void canvas_set_disable_scale(bool p_disable) = 0; |
| 1541 |
|
| 1542 |
|
| 1543 |
virtual RID canvas_texture_create() = 0; |
| 1544 |
|
| 1545 |
enum CanvasTextureChannel { |
| 1546 |
CANVAS_TEXTURE_CHANNEL_DIFFUSE, |
| 1547 |
CANVAS_TEXTURE_CHANNEL_NORMAL, |
| 1548 |
CANVAS_TEXTURE_CHANNEL_SPECULAR, |
| 1549 |
}; |
| 1550 |
virtual void canvas_texture_set_channel(RID p_canvas_texture, CanvasTextureChannel p_channel, RID p_texture) = 0; |
| 1551 |
virtual void canvas_texture_set_shading_parameters(RID p_canvas_texture, const Color &p_base_color, float p_shininess) = 0; |
| 1552 |
|
| 1553 |
|
| 1554 |
virtual void canvas_texture_set_texture_filter(RID p_canvas_texture, CanvasItemTextureFilter p_filter) = 0; |
| 1555 |
virtual void canvas_texture_set_texture_repeat(RID p_canvas_texture, CanvasItemTextureRepeat p_repeat) = 0; |
| 1556 |
|
| 1557 |
|
| 1558 |
|
| 1559 |
virtual RID canvas_item_create() = 0; |
| 1560 |
virtual void canvas_item_set_parent(RID p_item, RID p_parent) = 0; |
| 1561 |
|
| 1562 |
virtual void canvas_item_set_default_texture_filter(RID p_item, CanvasItemTextureFilter p_filter) = 0; |
| 1563 |
virtual void canvas_item_set_default_texture_repeat(RID p_item, CanvasItemTextureRepeat p_repeat) = 0; |
| 1564 |
|
| 1565 |
virtual void canvas_item_set_visible(RID p_item, bool p_visible) = 0; |
| 1566 |
virtual void canvas_item_set_light_mask(RID p_item, int p_mask) = 0; |
| 1567 |
|
| 1568 |
virtual void canvas_item_set_update_when_visible(RID p_item, bool p_update) = 0; |
| 1569 |
|
| 1570 |
virtual void canvas_item_set_transform(RID p_item, const Transform2D &p_transform) = 0; |
| 1571 |
virtual void canvas_item_set_clip(RID p_item, bool p_clip) = 0; |
| 1572 |
virtual void canvas_item_set_distance_field_mode(RID p_item, bool p_enable) = 0; |
| 1573 |
virtual void canvas_item_set_custom_rect(RID p_item, bool p_custom_rect, const Rect2 &p_rect = Rect2()) = 0; |
| 1574 |
virtual void canvas_item_set_modulate(RID p_item, const Color &p_color) = 0; |
| 1575 |
virtual void canvas_item_set_self_modulate(RID p_item, const Color &p_color) = 0; |
| 1576 |
virtual void canvas_item_set_visibility_layer(RID p_item, uint32_t p_visibility_layer) = 0; |
| 1577 |
|
| 1578 |
virtual void canvas_item_set_draw_behind_parent(RID p_item, bool p_enable) = 0; |
| 1579 |
virtual void canvas_item_set_use_identity_transform(RID p_item, bool p_enabled) = 0; |
| 1580 |
|
| 1581 |
enum NinePatchAxisMode { |
| 1582 |
NINE_PATCH_STRETCH, |
| 1583 |
NINE_PATCH_TILE, |
| 1584 |
NINE_PATCH_TILE_FIT, |
| 1585 |
}; |
| 1586 |
|
| 1587 |
virtual void canvas_item_add_line(RID p_item, const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width = -1.0, bool p_antialiased = false) = 0; |
| 1588 |
virtual void canvas_item_add_polyline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width = -1.0, bool p_antialiased = false) = 0; |
| 1589 |
virtual void canvas_item_add_multiline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width = -1.0, bool p_antialiased = false) = 0; |
| 1590 |
virtual void canvas_item_add_rect(RID p_item, const Rect2 &p_rect, const Color &p_color, bool p_antialiased = false) = 0; |
| 1591 |
virtual void canvas_item_add_ellipse(RID p_item, const Point2 &p_pos, float p_major, float p_minor, const Color &p_color, bool p_antialiased = false) = 0; |
| 1592 |
virtual void canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color, bool p_antialiased = false) = 0; |
| 1593 |
virtual void canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false) = 0; |
| 1594 |
virtual void canvas_item_add_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, bool p_clip_uv = false) = 0; |
| 1595 |
virtual void canvas_item_add_msdf_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), int p_outline_size = 0, float p_px_range = 1.0, float p_scale = 1.0) = 0; |
| 1596 |
virtual void canvas_item_add_lcd_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1)) = 0; |
| 1597 |
virtual void canvas_item_add_nine_patch(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector2 &p_topleft, const Vector2 &p_bottomright, NinePatchAxisMode p_x_axis_mode = NINE_PATCH_STRETCH, NinePatchAxisMode p_y_axis_mode = NINE_PATCH_STRETCH, bool p_draw_center = true, const Color &p_modulate = Color(1, 1, 1)) = 0; |
| 1598 |
virtual void canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture) = 0; |
| 1599 |
virtual void canvas_item_add_polygon(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), RID p_texture = RID()) = 0; |
| 1600 |
virtual void canvas_item_add_triangle_array(RID p_item, const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), const Vector<int> &p_bones = Vector<int>(), const Vector<float> &p_weights = Vector<float>(), RID p_texture = RID(), int p_count = -1) = 0; |
| 1601 |
virtual void canvas_item_add_mesh(RID p_item, const RID &p_mesh, const Transform2D &p_transform = Transform2D(), const Color &p_modulate = Color(1, 1, 1), RID p_texture = RID()) = 0; |
| 1602 |
virtual void canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture = RID()) = 0; |
| 1603 |
virtual void canvas_item_add_particles(RID p_item, RID p_particles, RID p_texture) = 0; |
| 1604 |
virtual void canvas_item_add_set_transform(RID p_item, const Transform2D &p_transform) = 0; |
| 1605 |
virtual void canvas_item_add_clip_ignore(RID p_item, bool p_ignore) = 0; |
| 1606 |
virtual void canvas_item_add_animation_slice(RID p_item, double p_animation_length, double p_slice_begin, double p_slice_end, double p_offset) = 0; |
| 1607 |
|
| 1608 |
virtual void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable) = 0; |
| 1609 |
virtual void canvas_item_set_z_index(RID p_item, int p_z) = 0; |
| 1610 |
virtual void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) = 0; |
| 1611 |
virtual void canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable, const Rect2 &p_rect) = 0; |
| 1612 |
|
| 1613 |
virtual void canvas_item_attach_skeleton(RID p_item, RID p_skeleton) = 0; |
| 1614 |
|
| 1615 |
virtual void canvas_item_clear(RID p_item) = 0; |
| 1616 |
virtual void canvas_item_set_draw_index(RID p_item, int p_index) = 0; |
| 1617 |
|
| 1618 |
virtual void canvas_item_set_material(RID p_item, RID p_material) = 0; |
| 1619 |
|
| 1620 |
virtual void canvas_item_set_use_parent_material(RID p_item, bool p_enable) = 0; |
| 1621 |
|
| 1622 |
virtual void canvas_item_set_instance_shader_parameter(RID p_item, const StringName &, const Variant &p_value) = 0; |
| 1623 |
virtual Variant canvas_item_get_instance_shader_parameter(RID p_item, const StringName &) const = 0; |
| 1624 |
virtual Variant canvas_item_get_instance_shader_parameter_default_value(RID p_item, const StringName &) const = 0; |
| 1625 |
virtual void canvas_item_get_instance_shader_parameter_list(RID p_item, List<PropertyInfo> *p_parameters) const = 0; |
| 1626 |
|
| 1627 |
virtual void canvas_item_set_visibility_notifier(RID p_item, bool p_enable, const Rect2 &p_area, const Callable &p_enter_callbable, const Callable &p_exit_callable) = 0; |
| 1628 |
|
| 1629 |
enum CanvasGroupMode { |
| 1630 |
CANVAS_GROUP_MODE_DISABLED, |
| 1631 |
CANVAS_GROUP_MODE_CLIP_ONLY, |
| 1632 |
CANVAS_GROUP_MODE_CLIP_AND_DRAW, |
| 1633 |
CANVAS_GROUP_MODE_TRANSPARENT, |
| 1634 |
}; |
| 1635 |
|
| 1636 |
virtual void canvas_item_set_canvas_group_mode(RID p_item, CanvasGroupMode p_mode, float p_clear_margin = 5.0, bool p_fit_empty = false, float p_fit_margin = 0.0, bool p_blur_mipmaps = false) = 0; |
| 1637 |
|
| 1638 |
virtual void canvas_item_set_debug_redraw(bool p_enabled) = 0; |
| 1639 |
virtual bool canvas_item_get_debug_redraw() const = 0; |
| 1640 |
|
| 1641 |
virtual void canvas_item_set_interpolated(RID p_item, bool p_interpolated) = 0; |
| 1642 |
virtual void canvas_item_reset_physics_interpolation(RID p_item) = 0; |
| 1643 |
virtual void canvas_item_transform_physics_interpolation(RID p_item, const Transform2D &p_transform) = 0; |
| 1644 |
|
| 1645 |
|
| 1646 |
virtual RID canvas_light_create() = 0; |
| 1647 |
|
| 1648 |
enum CanvasLightMode { |
| 1649 |
CANVAS_LIGHT_MODE_POINT, |
| 1650 |
CANVAS_LIGHT_MODE_DIRECTIONAL, |
| 1651 |
}; |
| 1652 |
|
| 1653 |
virtual void canvas_light_set_mode(RID p_light, CanvasLightMode p_mode) = 0; |
| 1654 |
|
| 1655 |
virtual void canvas_light_attach_to_canvas(RID p_light, RID p_canvas) = 0; |
| 1656 |
virtual void canvas_light_set_enabled(RID p_light, bool p_enabled) = 0; |
| 1657 |
virtual void canvas_light_set_transform(RID p_light, const Transform2D &p_transform) = 0; |
| 1658 |
virtual void canvas_light_set_color(RID p_light, const Color &p_color) = 0; |
| 1659 |
virtual void canvas_light_set_height(RID p_light, float p_height) = 0; |
| 1660 |
virtual void canvas_light_set_energy(RID p_light, float p_energy) = 0; |
| 1661 |
virtual void canvas_light_set_z_range(RID p_light, int p_min_z, int p_max_z) = 0; |
| 1662 |
virtual void canvas_light_set_layer_range(RID p_light, int p_min_layer, int p_max_layer) = 0; |
| 1663 |
virtual void canvas_light_set_item_cull_mask(RID p_light, int p_mask) = 0; |
| 1664 |
virtual void canvas_light_set_item_shadow_cull_mask(RID p_light, int p_mask) = 0; |
| 1665 |
|
| 1666 |
virtual void canvas_light_set_directional_distance(RID p_light, float p_distance) = 0; |
| 1667 |
|
| 1668 |
virtual void canvas_light_set_texture_scale(RID p_light, float p_scale) = 0; |
| 1669 |
virtual void canvas_light_set_texture(RID p_light, RID p_texture) = 0; |
| 1670 |
virtual void canvas_light_set_texture_offset(RID p_light, const Vector2 &p_offset) = 0; |
| 1671 |
|
| 1672 |
enum CanvasLightBlendMode { |
| 1673 |
CANVAS_LIGHT_BLEND_MODE_ADD, |
| 1674 |
CANVAS_LIGHT_BLEND_MODE_SUB, |
| 1675 |
CANVAS_LIGHT_BLEND_MODE_MIX, |
| 1676 |
}; |
| 1677 |
|
| 1678 |
virtual void canvas_light_set_blend_mode(RID p_light, CanvasLightBlendMode p_mode) = 0; |
| 1679 |
|
| 1680 |
enum CanvasLightShadowFilter { |
| 1681 |
CANVAS_LIGHT_FILTER_NONE, |
| 1682 |
CANVAS_LIGHT_FILTER_PCF5, |
| 1683 |
CANVAS_LIGHT_FILTER_PCF13, |
| 1684 |
CANVAS_LIGHT_FILTER_MAX |
| 1685 |
}; |
| 1686 |
|
| 1687 |
virtual void canvas_light_set_shadow_enabled(RID p_light, bool p_enabled) = 0; |
| 1688 |
virtual void canvas_light_set_shadow_filter(RID p_light, CanvasLightShadowFilter p_filter) = 0; |
| 1689 |
virtual void canvas_light_set_shadow_color(RID p_light, const Color &p_color) = 0; |
| 1690 |
virtual void canvas_light_set_shadow_smooth(RID p_light, float p_smooth) = 0; |
| 1691 |
|
| 1692 |
virtual void canvas_light_set_interpolated(RID p_light, bool p_interpolated) = 0; |
| 1693 |
virtual void canvas_light_reset_physics_interpolation(RID p_light) = 0; |
| 1694 |
virtual void canvas_light_transform_physics_interpolation(RID p_light, const Transform2D &p_transform) = 0; |
| 1695 |
|
| 1696 |
|
| 1697 |
|
| 1698 |
virtual RID canvas_light_occluder_create() = 0; |
| 1699 |
virtual void canvas_light_occluder_attach_to_canvas(RID p_occluder, RID p_canvas) = 0; |
| 1700 |
virtual void canvas_light_occluder_set_enabled(RID p_occluder, bool p_enabled) = 0; |
| 1701 |
virtual void canvas_light_occluder_set_polygon(RID p_occluder, RID p_polygon) = 0; |
| 1702 |
virtual void canvas_light_occluder_set_as_sdf_collision(RID p_occluder, bool p_enable) = 0; |
| 1703 |
virtual void canvas_light_occluder_set_transform(RID p_occluder, const Transform2D &p_xform) = 0; |
| 1704 |
virtual void canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask) = 0; |
| 1705 |
|
| 1706 |
virtual void canvas_light_occluder_set_interpolated(RID p_occluder, bool p_interpolated) = 0; |
| 1707 |
virtual void canvas_light_occluder_reset_physics_interpolation(RID p_occluder) = 0; |
| 1708 |
virtual void canvas_light_occluder_transform_physics_interpolation(RID p_occluder, const Transform2D &p_transform) = 0; |
| 1709 |
|
| 1710 |
|
| 1711 |
|
| 1712 |
virtual RID canvas_occluder_polygon_create() = 0; |
| 1713 |
virtual void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) = 0; |
| 1714 |
|
| 1715 |
enum CanvasOccluderPolygonCullMode { |
| 1716 |
CANVAS_OCCLUDER_POLYGON_CULL_DISABLED, |
| 1717 |
CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE, |
| 1718 |
CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE, |
| 1719 |
}; |
| 1720 |
|
| 1721 |
virtual void canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon, CanvasOccluderPolygonCullMode p_mode) = 0; |
| 1722 |
|
| 1723 |
virtual void canvas_set_shadow_texture_size(int p_size) = 0; |
| 1724 |
|
| 1725 |
Rect2 debug_canvas_item_get_rect(RID p_item); |
| 1726 |
virtual Rect2 _debug_canvas_item_get_rect(RID p_item) = 0; |
| 1727 |
|
| 1728 |
|
| 1729 |
|
| 1730 |
enum GlobalShaderParameterType { |
| 1731 |
GLOBAL_VAR_TYPE_BOOL, |
| 1732 |
GLOBAL_VAR_TYPE_BVEC2, |
| 1733 |
GLOBAL_VAR_TYPE_BVEC3, |
| 1734 |
GLOBAL_VAR_TYPE_BVEC4, |
| 1735 |
GLOBAL_VAR_TYPE_INT, |
| 1736 |
GLOBAL_VAR_TYPE_IVEC2, |
| 1737 |
GLOBAL_VAR_TYPE_IVEC3, |
| 1738 |
GLOBAL_VAR_TYPE_IVEC4, |
| 1739 |
GLOBAL_VAR_TYPE_RECT2I, |
| 1740 |
GLOBAL_VAR_TYPE_UINT, |
| 1741 |
GLOBAL_VAR_TYPE_UVEC2, |
| 1742 |
GLOBAL_VAR_TYPE_UVEC3, |
| 1743 |
GLOBAL_VAR_TYPE_UVEC4, |
| 1744 |
GLOBAL_VAR_TYPE_FLOAT, |
| 1745 |
GLOBAL_VAR_TYPE_VEC2, |
| 1746 |
GLOBAL_VAR_TYPE_VEC3, |
| 1747 |
GLOBAL_VAR_TYPE_VEC4, |
| 1748 |
GLOBAL_VAR_TYPE_COLOR, |
| 1749 |
GLOBAL_VAR_TYPE_RECT2, |
| 1750 |
GLOBAL_VAR_TYPE_MAT2, |
| 1751 |
GLOBAL_VAR_TYPE_MAT3, |
| 1752 |
GLOBAL_VAR_TYPE_MAT4, |
| 1753 |
GLOBAL_VAR_TYPE_TRANSFORM_2D, |
| 1754 |
GLOBAL_VAR_TYPE_TRANSFORM, |
| 1755 |
GLOBAL_VAR_TYPE_SAMPLER2D, |
| 1756 |
GLOBAL_VAR_TYPE_SAMPLER2DARRAY, |
| 1757 |
GLOBAL_VAR_TYPE_SAMPLER3D, |
| 1758 |
GLOBAL_VAR_TYPE_SAMPLERCUBE, |
| 1759 |
GLOBAL_VAR_TYPE_SAMPLEREXT, |
| 1760 |
GLOBAL_VAR_TYPE_MAX |
| 1761 |
}; |
| 1762 |
|
| 1763 |
virtual void global_shader_parameter_add(const StringName &p_name, GlobalShaderParameterType p_type, const Variant &p_value) = 0; |
| 1764 |
virtual void global_shader_parameter_remove(const StringName &p_name) = 0; |
| 1765 |
virtual Vector<StringName> global_shader_parameter_get_list() const = 0; |
| 1766 |
|
| 1767 |
virtual void global_shader_parameter_set(const StringName &p_name, const Variant &p_value) = 0; |
| 1768 |
virtual void global_shader_parameter_set_override(const StringName &p_name, const Variant &p_value) = 0; |
| 1769 |
|
| 1770 |
virtual Variant global_shader_parameter_get(const StringName &p_name) const = 0; |
| 1771 |
virtual GlobalShaderParameterType global_shader_parameter_get_type(const StringName &p_name) const = 0; |
| 1772 |
|
| 1773 |
virtual void global_shader_parameters_load_settings(bool p_load_textures) = 0; |
| 1774 |
virtual void global_shader_parameters_clear() = 0; |
| 1775 |
|
| 1776 |
static int global_shader_uniform_type_get_shader_datatype(GlobalShaderParameterType p_type); |
| 1777 |
|
| 1778 |
|
| 1779 |
|
| 1780 |
virtual void free_rid(RID p_rid) = 0; |
| 1781 |
#ifndef DISABLE_DEPRECATED |
| 1782 |
[[deprecated("Use `free_rid()` instead.")]] void free(RID p_rid) { |
| 1783 |
free_rid(p_rid); |
| 1784 |
} |
| 1785 |
#endif |
| 1786 |
|
| 1787 |
|
| 1788 |
|
| 1789 |
virtual void set_physics_interpolation_enabled(bool p_enabled) = 0; |
| 1790 |
|
| 1791 |
|
| 1792 |
|
| 1793 |
virtual void request_frame_drawn_callback(const Callable &p_callable) = 0; |
| 1794 |
|
| 1795 |
virtual void draw(bool p_swap_buffers = true, double frame_step = 0.0) = 0; |
| 1796 |
virtual void sync() = 0; |
| 1797 |
virtual bool has_changed() const = 0; |
| 1798 |
virtual void init(); |
| 1799 |
virtual void finish() = 0; |
| 1800 |
virtual void tick() = 0; |
| 1801 |
virtual void pre_draw(bool p_will_draw) = 0; |
| 1802 |
|
| 1803 |
|
| 1804 |
|
| 1805 |
enum RenderingInfo { |
| 1806 |
RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME, |
| 1807 |
RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME, |
| 1808 |
RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME, |
| 1809 |
RENDERING_INFO_TEXTURE_MEM_USED, |
| 1810 |
RENDERING_INFO_BUFFER_MEM_USED, |
| 1811 |
RENDERING_INFO_VIDEO_MEM_USED, |
| 1812 |
RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS, |
| 1813 |
RENDERING_INFO_PIPELINE_COMPILATIONS_MESH, |
| 1814 |
RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE, |
| 1815 |
RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW, |
| 1816 |
RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION, |
| 1817 |
RENDERING_INFO_MAX |
| 1818 |
}; |
| 1819 |
|
| 1820 |
virtual uint64_t get_rendering_info(RenderingInfo p_info) = 0; |
| 1821 |
virtual String get_video_adapter_name() const = 0; |
| 1822 |
virtual String get_video_adapter_vendor() const = 0; |
| 1823 |
virtual RenderingDevice::DeviceType get_video_adapter_type() const = 0; |
| 1824 |
virtual String get_video_adapter_api_version() const = 0; |
| 1825 |
|
| 1826 |
struct FrameProfileArea { |
| 1827 |
String name; |
| 1828 |
double gpu_msec; |
| 1829 |
double cpu_msec; |
| 1830 |
}; |
| 1831 |
|
| 1832 |
virtual void set_frame_profiling_enabled(bool p_enable) = 0; |
| 1833 |
virtual Vector<FrameProfileArea> get_frame_profile() = 0; |
| 1834 |
virtual uint64_t get_frame_profile_frame() = 0; |
| 1835 |
|
| 1836 |
virtual double get_frame_setup_time_cpu() const = 0; |
| 1837 |
|
| 1838 |
virtual void gi_set_use_half_resolution(bool p_enable) = 0; |
| 1839 |
|
| 1840 |
|
| 1841 |
|
| 1842 |
virtual RID get_test_cube() = 0; |
| 1843 |
|
| 1844 |
virtual RID get_test_texture(); |
| 1845 |
virtual RID get_white_texture(); |
| 1846 |
|
| 1847 |
virtual void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) = 0; |
| 1848 |
|
| 1849 |
virtual RID make_sphere_mesh(int p_lats, int p_lons, real_t p_radius); |
| 1850 |
|
| 1851 |
virtual void mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry3D::MeshData &p_mesh_data); |
| 1852 |
virtual void mesh_add_surface_from_planes(RID p_mesh, const Vector<Plane> &p_planes); |
| 1853 |
|
| 1854 |
enum SplashStretchMode { |
| 1855 |
SPLASH_STRETCH_MODE_DISABLED, |
| 1856 |
SPLASH_STRETCH_MODE_KEEP, |
| 1857 |
SPLASH_STRETCH_MODE_KEEP_WIDTH, |
| 1858 |
SPLASH_STRETCH_MODE_KEEP_HEIGHT, |
| 1859 |
SPLASH_STRETCH_MODE_COVER, |
| 1860 |
SPLASH_STRETCH_MODE_IGNORE, |
| 1861 |
}; |
| 1862 |
|
| 1863 |
virtual void set_boot_image_with_stretch(const Ref<Image> &p_image, const Color &p_color, SplashStretchMode p_stretch_mode, bool p_use_filter = true) = 0; |
| 1864 |
static Rect2 get_splash_stretched_screen_rect(const Size2 &p_image_size, const Size2 &p_window_size, SplashStretchMode p_stretch_mode); |
| 1865 |
#ifndef DISABLE_DEPRECATED |
| 1866 |
void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true); |
| 1867 |
#endif |
| 1868 |
_ALWAYS_INLINE_ static SplashStretchMode map_scaling_option_to_stretch_mode(bool p_scale) { |
| 1869 |
return p_scale ? SplashStretchMode::SPLASH_STRETCH_MODE_KEEP : SplashStretchMode::SPLASH_STRETCH_MODE_DISABLED; |
| 1870 |
} |
| 1871 |
virtual Color get_default_clear_color() = 0; |
| 1872 |
virtual void set_default_clear_color(const Color &p_color) = 0; |
| 1873 |
|
| 1874 |
#ifndef DISABLE_DEPRECATED |
| 1875 |
|
| 1876 |
enum Features { |
| 1877 |
FEATURE_SHADERS, |
| 1878 |
FEATURE_MULTITHREADED, |
| 1879 |
}; |
| 1880 |
virtual bool has_feature(Features p_feature) const = 0; |
| 1881 |
#endif |
| 1882 |
virtual bool has_os_feature(const String &p_feature) const = 0; |
| 1883 |
|
| 1884 |
virtual void set_debug_generate_wireframes(bool p_generate) = 0; |
| 1885 |
|
| 1886 |
virtual void call_set_vsync_mode(DisplayServer::VSyncMode p_mode, DisplayServer::WindowID p_window) = 0; |
| 1887 |
|
| 1888 |
virtual bool is_low_end() const = 0; |
| 1889 |
|
| 1890 |
virtual void set_print_gpu_profile(bool p_enable) = 0; |
| 1891 |
|
| 1892 |
virtual Size2i get_maximum_viewport_size() const = 0; |
| 1893 |
|
| 1894 |
RenderingDevice *get_rendering_device() const; |
| 1895 |
RenderingDevice *create_local_rendering_device() const; |
| 1896 |
|
| 1897 |
bool is_render_loop_enabled() const; |
| 1898 |
void set_render_loop_enabled(bool p_enabled); |
| 1899 |
|
| 1900 |
virtual bool is_on_render_thread() = 0; |
| 1901 |
virtual void call_on_render_thread(const Callable &p_callable) = 0; |
| 1902 |
|
| 1903 |
String get_current_rendering_driver_name() const; |
| 1904 |
String get_current_rendering_method() const; |
| 1905 |
|
| 1906 |
#ifdef TOOLS_ENABLED |
| 1907 |
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override; |
| 1908 |
#endif |
| 1909 |
|
| 1910 |
RenderingServer(); |
| 1911 |
virtual ~RenderingServer(); |
| 1912 |
|
| 1913 |
#ifdef TOOLS_ENABLED |
| 1914 |
typedef void (*SurfaceUpgradeCallback)(); |
| 1915 |
void set_surface_upgrade_callback(SurfaceUpgradeCallback p_callback); |
| 1916 |
void set_warn_on_surface_upgrade(bool p_warn); |
| 1917 |
#endif |
| 1918 |
|
| 1919 |
#ifndef DISABLE_DEPRECATED |
| 1920 |
void fix_surface_compatibility(SurfaceData &p_surface, const String &p_path = ""); |
| 1921 |
#endif |
| 1922 |
|
| 1923 |
private: |
| 1924 |
|
| 1925 |
RID _texture_2d_layered_create(const TypedArray<Image> &p_layers, TextureLayeredType p_layered_type); |
| 1926 |
RID _texture_3d_create(Image::Format p_format, int p_width, int p_height, int p_depth, bool p_mipmaps, const TypedArray<Image> &p_data); |
| 1927 |
void _texture_3d_update(RID p_texture, const TypedArray<Image> &p_data); |
| 1928 |
TypedArray<Image> _texture_3d_get(RID p_texture) const; |
| 1929 |
TypedArray<Dictionary> _shader_get_shader_parameter_list(RID p_shader) const; |
| 1930 |
RID _mesh_create_from_surfaces(const TypedArray<Dictionary> &p_surfaces, int p_blend_shape_count); |
| 1931 |
void _mesh_add_surface(RID p_mesh, const Dictionary &p_surface); |
| 1932 |
Dictionary _mesh_get_surface(RID p_mesh, int p_idx); |
| 1933 |
TypedArray<Dictionary> _instance_geometry_get_shader_parameter_list(RID p_instance) const; |
| 1934 |
TypedArray<Dictionary> _canvas_item_get_instance_shader_parameter_list(RID p_item) const; |
| 1935 |
TypedArray<Image> _bake_render_uv2(RID p_base, const TypedArray<RID> &p_material_overrides, const Size2i &p_image_size); |
| 1936 |
void _particles_set_trail_bind_poses(RID p_particles, const TypedArray<Transform3D> &p_bind_poses); |
| 1937 |
#ifdef TOOLS_ENABLED |
| 1938 |
SurfaceUpgradeCallback surface_upgrade_callback = nullptr; |
| 1939 |
bool warn_on_surface_upgrade = true; |
| 1940 |
#endif |
| 1941 |
}; |
| 1942 |
|
| 1943 |
|
| 1944 |
VARIANT_ENUM_CAST(RenderingServer::TextureType); |
| 1945 |
VARIANT_ENUM_CAST(RenderingServer::TextureLayeredType); |
| 1946 |
VARIANT_ENUM_CAST(RenderingServer::CubeMapLayer); |
| 1947 |
VARIANT_ENUM_CAST(RenderingServer::PipelineSource); |
| 1948 |
VARIANT_ENUM_CAST(RenderingServer::ShaderMode); |
| 1949 |
VARIANT_ENUM_CAST(RenderingServer::ArrayType); |
| 1950 |
VARIANT_BITFIELD_CAST(RenderingServer::ArrayFormat); |
| 1951 |
VARIANT_ENUM_CAST(RenderingServer::ArrayCustomFormat); |
| 1952 |
VARIANT_ENUM_CAST(RenderingServer::PrimitiveType); |
| 1953 |
VARIANT_ENUM_CAST(RenderingServer::BlendShapeMode); |
| 1954 |
VARIANT_ENUM_CAST(RenderingServer::MultimeshTransformFormat); |
| 1955 |
VARIANT_ENUM_CAST(RenderingServer::MultimeshPhysicsInterpolationQuality); |
| 1956 |
VARIANT_ENUM_CAST(RenderingServer::LightType); |
| 1957 |
VARIANT_ENUM_CAST(RenderingServer::LightParam); |
| 1958 |
VARIANT_ENUM_CAST(RenderingServer::LightBakeMode); |
| 1959 |
VARIANT_ENUM_CAST(RenderingServer::LightOmniShadowMode); |
| 1960 |
VARIANT_ENUM_CAST(RenderingServer::LightDirectionalShadowMode); |
| 1961 |
VARIANT_ENUM_CAST(RenderingServer::LightDirectionalSkyMode); |
| 1962 |
VARIANT_ENUM_CAST(RenderingServer::LightProjectorFilter); |
| 1963 |
VARIANT_ENUM_CAST(RenderingServer::ReflectionProbeUpdateMode); |
| 1964 |
VARIANT_ENUM_CAST(RenderingServer::ReflectionProbeAmbientMode); |
| 1965 |
VARIANT_ENUM_CAST(RenderingServer::VoxelGIQuality); |
| 1966 |
VARIANT_ENUM_CAST(RenderingServer::DecalTexture); |
| 1967 |
VARIANT_ENUM_CAST(RenderingServer::DecalFilter); |
| 1968 |
VARIANT_ENUM_CAST(RenderingServer::ParticlesMode); |
| 1969 |
VARIANT_ENUM_CAST(RenderingServer::ParticlesTransformAlign); |
| 1970 |
VARIANT_ENUM_CAST(RenderingServer::ParticlesDrawOrder); |
| 1971 |
VARIANT_ENUM_CAST(RenderingServer::ParticlesEmitFlags); |
| 1972 |
VARIANT_ENUM_CAST(RenderingServer::ParticlesCollisionType); |
| 1973 |
VARIANT_ENUM_CAST(RenderingServer::ParticlesCollisionHeightfieldResolution); |
| 1974 |
VARIANT_ENUM_CAST(RenderingServer::FogVolumeShape); |
| 1975 |
VARIANT_ENUM_CAST(RenderingServer::ViewportScaling3DMode); |
| 1976 |
VARIANT_ENUM_CAST(RenderingServer::ViewportUpdateMode); |
| 1977 |
VARIANT_ENUM_CAST(RenderingServer::ViewportClearMode); |
| 1978 |
VARIANT_ENUM_CAST(RenderingServer::ViewportEnvironmentMode); |
| 1979 |
VARIANT_ENUM_CAST(RenderingServer::ViewportMSAA); |
| 1980 |
VARIANT_ENUM_CAST(RenderingServer::ViewportAnisotropicFiltering); |
| 1981 |
VARIANT_ENUM_CAST(RenderingServer::ViewportScreenSpaceAA); |
| 1982 |
VARIANT_ENUM_CAST(RenderingServer::ViewportRenderInfo); |
| 1983 |
VARIANT_ENUM_CAST(RenderingServer::ViewportRenderInfoType); |
| 1984 |
VARIANT_ENUM_CAST(RenderingServer::ViewportDebugDraw); |
| 1985 |
VARIANT_ENUM_CAST(RenderingServer::ViewportOcclusionCullingBuildQuality); |
| 1986 |
VARIANT_ENUM_CAST(RenderingServer::ViewportSDFOversize); |
| 1987 |
VARIANT_ENUM_CAST(RenderingServer::ViewportSDFScale); |
| 1988 |
VARIANT_ENUM_CAST(RenderingServer::ViewportVRSMode); |
| 1989 |
VARIANT_ENUM_CAST(RenderingServer::ViewportVRSUpdateMode); |
| 1990 |
VARIANT_ENUM_CAST(RenderingServer::SkyMode); |
| 1991 |
VARIANT_ENUM_CAST(RenderingServer::CompositorEffectCallbackType); |
| 1992 |
VARIANT_ENUM_CAST(RenderingServer::CompositorEffectFlags); |
| 1993 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentBG); |
| 1994 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentAmbientSource); |
| 1995 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentReflectionSource); |
| 1996 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentGlowBlendMode); |
| 1997 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentFogMode); |
| 1998 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentToneMapper); |
| 1999 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSRRoughnessQuality); |
| 2000 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSAOQuality); |
| 2001 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSILQuality); |
| 2002 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSDFGIFramesToConverge); |
| 2003 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSDFGIRayCount); |
| 2004 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSDFGIFramesToUpdateLight); |
| 2005 |
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSDFGIYScale); |
| 2006 |
VARIANT_ENUM_CAST(RenderingServer::SubSurfaceScatteringQuality); |
| 2007 |
VARIANT_ENUM_CAST(RenderingServer::DOFBlurQuality); |
| 2008 |
VARIANT_ENUM_CAST(RenderingServer::DOFBokehShape); |
| 2009 |
VARIANT_ENUM_CAST(RenderingServer::ShadowQuality); |
| 2010 |
VARIANT_ENUM_CAST(RenderingServer::InstanceType); |
| 2011 |
VARIANT_ENUM_CAST(RenderingServer::InstanceFlags); |
| 2012 |
VARIANT_ENUM_CAST(RenderingServer::ShadowCastingSetting); |
| 2013 |
VARIANT_ENUM_CAST(RenderingServer::VisibilityRangeFadeMode); |
| 2014 |
VARIANT_ENUM_CAST(RenderingServer::NinePatchAxisMode); |
| 2015 |
VARIANT_ENUM_CAST(RenderingServer::CanvasItemTextureFilter); |
| 2016 |
VARIANT_ENUM_CAST(RenderingServer::CanvasItemTextureRepeat); |
| 2017 |
VARIANT_ENUM_CAST(RenderingServer::CanvasGroupMode); |
| 2018 |
VARIANT_ENUM_CAST(RenderingServer::CanvasLightMode); |
| 2019 |
VARIANT_ENUM_CAST(RenderingServer::CanvasLightBlendMode); |
| 2020 |
VARIANT_ENUM_CAST(RenderingServer::CanvasLightShadowFilter); |
| 2021 |
VARIANT_ENUM_CAST(RenderingServer::CanvasOccluderPolygonCullMode); |
| 2022 |
VARIANT_ENUM_CAST(RenderingServer::GlobalShaderParameterType); |
| 2023 |
VARIANT_ENUM_CAST(RenderingServer::RenderingInfo); |
| 2024 |
VARIANT_ENUM_CAST(RenderingServer::SplashStretchMode); |
| 2025 |
VARIANT_ENUM_CAST(RenderingServer::CanvasTextureChannel); |
| 2026 |
VARIANT_ENUM_CAST(RenderingServer::BakeChannels); |
| 2027 |
|
| 2028 |
#ifndef DISABLE_DEPRECATED |
| 2029 |
VARIANT_ENUM_CAST(RenderingServer::Features); |
| 2030 |
#endif |
| 2031 |
|
| 2032 |
|
| 2033 |
#define RS RenderingServer |