Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions servers/rendering/renderer_rd/environment/gi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3488,6 +3488,9 @@ void GI::init(SkyRD *p_sky) {

/* SDGFI */

const String oct_size_str = itos(SDFGI::LIGHTPROBE_OCT_SIZE);
const String sh_size_str = itos(SDFGI::SH_SIZE);

{
Vector<String> preprocess_modes;
preprocess_modes.push_back("\n#define MODE_SCROLL\n");
Expand All @@ -3508,8 +3511,7 @@ void GI::init(SkyRD *p_sky) {
}

{
//calculate tables
String defines = "\n#define OCT_SIZE " + itos(SDFGI::LIGHTPROBE_OCT_SIZE) + "\n";
String defines = "\n#define OCT_SIZE " + oct_size_str + "\n";

Vector<String> direct_light_modes;
direct_light_modes.push_back("\n#define MODE_PROCESS_STATIC\n");
Expand All @@ -3522,9 +3524,8 @@ void GI::init(SkyRD *p_sky) {
}

{
//calculate tables
String defines = "\n#define OCT_SIZE " + itos(SDFGI::LIGHTPROBE_OCT_SIZE) + "\n";
defines += "\n#define SH_SIZE " + itos(SDFGI::SH_SIZE) + "\n";
String defines = "\n#define OCT_SIZE " + oct_size_str + "\n";
defines += "\n#define SH_SIZE " + sh_size_str + "\n";
if (p_sky->sky_use_octmap_array) {
defines += "\n#define USE_OCTMAP_ARRAY\n";
}
Expand Down Expand Up @@ -3569,8 +3570,7 @@ void GI::init(SkyRD *p_sky) {

//GK
{
//calculate tables
String defines = "\n#define SDFGI_OCT_SIZE " + itos(SDFGI::LIGHTPROBE_OCT_SIZE) + "\n";
String defines = "\n#define SDFGI_OCT_SIZE " + oct_size_str + "\n";

Vector<ShaderRD::VariantDefine> variants;
for (uint32_t vrs = 0; vrs < 2; vrs++) {
Expand Down