godot/servers/rendering/renderer_rd/environment/gi.cpp

/**************************************************************************/
/*  gi.cpp                                                                */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "gi.h"

#include "core/config/project_settings.h"
#include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
#include "servers/rendering/renderer_rd/renderer_scene_render_rd.h"
#include "servers/rendering/renderer_rd/storage_rd/material_storage.h"
#include "servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.h"
#include "servers/rendering/renderer_rd/storage_rd/texture_storage.h"
#include "servers/rendering/rendering_server_default.h"

usingnamespaceRendererRD;

const Vector3i GI::SDFGI::Cascade::DIRTY_ALL =;

GI *GI::singleton =;

////////////////////////////////////////////////////////////////////////////////
// VOXEL GI STORAGE

RID GI::voxel_gi_allocate() {}

void GI::voxel_gi_free(RID p_voxel_gi) {}

void GI::voxel_gi_initialize(RID p_voxel_gi) {}

void GI::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) {}

AABB GI::voxel_gi_get_bounds(RID p_voxel_gi) const {}

Vector3i GI::voxel_gi_get_octree_size(RID p_voxel_gi) const {}

Vector<uint8_t> GI::voxel_gi_get_octree_cells(RID p_voxel_gi) const {}

Vector<uint8_t> GI::voxel_gi_get_data_cells(RID p_voxel_gi) const {}

Vector<uint8_t> GI::voxel_gi_get_distance_field(RID p_voxel_gi) const {}

Vector<int> GI::voxel_gi_get_level_counts(RID p_voxel_gi) const {}

Transform3D GI::voxel_gi_get_to_cell_xform(RID p_voxel_gi) const {}

void GI::voxel_gi_set_dynamic_range(RID p_voxel_gi, float p_range) {}

float GI::voxel_gi_get_dynamic_range(RID p_voxel_gi) const {}

void GI::voxel_gi_set_propagation(RID p_voxel_gi, float p_range) {}

float GI::voxel_gi_get_propagation(RID p_voxel_gi) const {}

void GI::voxel_gi_set_energy(RID p_voxel_gi, float p_energy) {}

float GI::voxel_gi_get_energy(RID p_voxel_gi) const {}

void GI::voxel_gi_set_baked_exposure_normalization(RID p_voxel_gi, float p_baked_exposure) {}

float GI::voxel_gi_get_baked_exposure_normalization(RID p_voxel_gi) const {}

void GI::voxel_gi_set_bias(RID p_voxel_gi, float p_bias) {}

float GI::voxel_gi_get_bias(RID p_voxel_gi) const {}

void GI::voxel_gi_set_normal_bias(RID p_voxel_gi, float p_normal_bias) {}

float GI::voxel_gi_get_normal_bias(RID p_voxel_gi) const {}

void GI::voxel_gi_set_interior(RID p_voxel_gi, bool p_enable) {}

void GI::voxel_gi_set_use_two_bounces(RID p_voxel_gi, bool p_enable) {}

bool GI::voxel_gi_is_using_two_bounces(RID p_voxel_gi) const {}

bool GI::voxel_gi_is_interior(RID p_voxel_gi) const {}

uint32_t GI::voxel_gi_get_version(RID p_voxel_gi) const {}

uint32_t GI::voxel_gi_get_data_version(RID p_voxel_gi) {}

RID GI::voxel_gi_get_octree_buffer(RID p_voxel_gi) const {}

RID GI::voxel_gi_get_data_buffer(RID p_voxel_gi) const {}

RID GI::voxel_gi_get_sdf_texture(RID p_voxel_gi) {}

Dependency *GI::voxel_gi_get_dependency(RID p_voxel_gi) const {}

void GI::sdfgi_reset() {}

////////////////////////////////////////////////////////////////////////////////
// SDFGI

static RID create_clear_texture(const RD::TextureFormat &p_format, const String &p_name) {}

void GI::SDFGI::create(RID p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size, GI *p_gi) {}

void GI::SDFGI::free_data() {}

GI::SDFGI::~SDFGI() {}

void GI::SDFGI::update(RID p_env, const Vector3 &p_world_position) {}

void GI::SDFGI::update_light() {}

void GI::SDFGI::update_probes(RID p_env, SkyRD::Sky *p_sky) {}

void GI::SDFGI::store_probes() {}

int GI::SDFGI::get_pending_region_data(int p_region, Vector3i &r_local_offset, Vector3i &r_local_size, AABB &r_bounds) const {}

void GI::SDFGI::update_cascades() {}

void GI::SDFGI::debug_draw(uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, int p_width, int p_height, RID p_render_target, RID p_texture, const Vector<RID> &p_texture_views) {}

void GI::SDFGI::debug_probes(RID p_framebuffer, const uint32_t p_view_count, const Projection *p_camera_with_transforms) {}

void GI::SDFGI::pre_process_gi(const Transform3D &p_transform, RenderDataRD *p_render_data) {}

void GI::SDFGI::render_region(Ref<RenderSceneBuffersRD> p_render_buffers, int p_region, const PagedArray<RenderGeometryInstance *> &p_instances, float p_exposure_normalization) {}

void GI::SDFGI::render_static_lights(RenderDataRD *p_render_data, Ref<RenderSceneBuffersRD> p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const PagedArray<RID> *p_positional_light_cull_result) {}

////////////////////////////////////////////////////////////////////////////////
// VoxelGIInstance

void GI::VoxelGIInstance::update(bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects) {}

void GI::VoxelGIInstance::free_resources() {}

void GI::VoxelGIInstance::debug(RD::DrawListID p_draw_list, RID p_framebuffer, const Projection &p_camera_with_transform, bool p_lighting, bool p_emission, float p_alpha) {}

////////////////////////////////////////////////////////////////////////////////
// GI

GI::GI() {}

GI::~GI() {}

void GI::init(SkyRD *p_sky) {}

void GI::free() {}

Ref<GI::SDFGI> GI::create_sdfgi(RID p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size) {}

void GI::setup_voxel_gi_instances(RenderDataRD *p_render_data, Ref<RenderSceneBuffersRD> p_render_buffers, const Transform3D &p_transform, const PagedArray<RID> &p_voxel_gi_instances, uint32_t &r_voxel_gi_instances_used) {}

RID GI::RenderBuffersGI::get_voxel_gi_buffer() {}

void GI::RenderBuffersGI::free_data() {}

void GI::process_gi(Ref<RenderSceneBuffersRD> p_render_buffers, const RID *p_normal_roughness_slices, RID p_voxel_gi_buffer, RID p_environment, uint32_t p_view_count, const Projection *p_projections, const Vector3 *p_eye_offsets, const Transform3D &p_cam_transform, const PagedArray<RID> &p_voxel_gi_instances) {}

RID GI::voxel_gi_instance_create(RID p_base) {}

void GI::voxel_gi_instance_free(RID p_rid) {}

void GI::voxel_gi_instance_set_transform_to_data(RID p_probe, const Transform3D &p_xform) {}

bool GI::voxel_gi_needs_update(RID p_probe) const {}

void GI::voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects) {}

void GI::debug_voxel_gi(RID p_voxel_gi, RD::DrawListID p_draw_list, RID p_framebuffer, const Projection &p_camera_with_transform, bool p_lighting, bool p_emission, float p_alpha) {}