Path: blob/master/servers/rendering/environment/renderer_gi.h
10278 views
/**************************************************************************/1/* renderer_gi.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#include "servers/rendering_server.h"3334class RendererGI {35public:36virtual ~RendererGI() {}3738/* VOXEL GI API */3940virtual RID voxel_gi_allocate() = 0;41virtual void voxel_gi_free(RID p_rid) = 0;42virtual void voxel_gi_initialize(RID p_rid) = 0;4344virtual 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;4546virtual AABB voxel_gi_get_bounds(RID p_voxel_gi) const = 0;47virtual Vector3i voxel_gi_get_octree_size(RID p_voxel_gi) const = 0;48virtual Vector<uint8_t> voxel_gi_get_octree_cells(RID p_voxel_gi) const = 0;49virtual Vector<uint8_t> voxel_gi_get_data_cells(RID p_voxel_gi) const = 0;50virtual Vector<uint8_t> voxel_gi_get_distance_field(RID p_voxel_gi) const = 0;5152virtual Vector<int> voxel_gi_get_level_counts(RID p_voxel_gi) const = 0;53virtual Transform3D voxel_gi_get_to_cell_xform(RID p_voxel_gi) const = 0;5455virtual void voxel_gi_set_dynamic_range(RID p_voxel_gi, float p_range) = 0;56virtual float voxel_gi_get_dynamic_range(RID p_voxel_gi) const = 0;5758virtual void voxel_gi_set_propagation(RID p_voxel_gi, float p_range) = 0;59virtual float voxel_gi_get_propagation(RID p_voxel_gi) const = 0;6061virtual void voxel_gi_set_energy(RID p_voxel_gi, float p_energy) = 0;62virtual float voxel_gi_get_energy(RID p_voxel_gi) const = 0;6364virtual void voxel_gi_set_baked_exposure_normalization(RID p_voxel_gi, float p_baked_exposure) = 0;65virtual float voxel_gi_get_baked_exposure_normalization(RID p_voxel_gi) const = 0;6667virtual void voxel_gi_set_bias(RID p_voxel_gi, float p_bias) = 0;68virtual float voxel_gi_get_bias(RID p_voxel_gi) const = 0;6970virtual void voxel_gi_set_normal_bias(RID p_voxel_gi, float p_range) = 0;71virtual float voxel_gi_get_normal_bias(RID p_voxel_gi) const = 0;7273virtual void voxel_gi_set_interior(RID p_voxel_gi, bool p_enable) = 0;74virtual bool voxel_gi_is_interior(RID p_voxel_gi) const = 0;7576virtual void voxel_gi_set_use_two_bounces(RID p_voxel_gi, bool p_enable) = 0;77virtual bool voxel_gi_is_using_two_bounces(RID p_voxel_gi) const = 0;7879virtual uint32_t voxel_gi_get_version(RID p_probe) const = 0;8081virtual void sdfgi_reset() = 0;82};838485