Skip to content

Commit

Permalink
Add base level and fix include of old terrain settings.
Browse files Browse the repository at this point in the history
Fix DDGI compile issue
  • Loading branch information
Duttenheim committed Jan 20, 2025
1 parent 716a2d9 commit 30e427a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion code/addons/graphicsfeature/graphicsfeatureunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include "nflatbuffer/nebula_flat.h"
#include "nflatbuffer/flatbufferinterface.h"
#include "flat/application/levelsettings.h"
#include "flat/options/levelsettings.h"
#include "components/camera.h"
#include "components/decal.h"
#include "components/lighting.h"
Expand Down
2 changes: 1 addition & 1 deletion code/render/gi/ddgicontext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ DDGIContext::SetupVolume(const Graphics::GraphicsEntityId id, const VolumeSetup&
volume.numProbesX = setup.numProbesX;
volume.numProbesY = setup.numProbesY;
volume.numProbesZ = setup.numProbesZ;
volume.numRaysPerProbe = Math::min(setup.numRaysPerProbe, Raytracetest::DDGI_NUM_FIXED_RAYS);
volume.numRaysPerProbe = Math::min(setup.numRaysPerProbe, ProbeUpdate::DDGI_NUM_FIXED_RAYS);
volume.options = setup.options;

//volume.options.flags.lowPrecisionTextures = true;
Expand Down
7 changes: 3 additions & 4 deletions tests/testtbui/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "nflatbuffer/nebula_flat.h"
#include "nflatbuffer/flatbufferinterface.h"
#include "flat/graphicsfeature/terrainschema.h"
#include "flat/options/levelsettings.h"

ImplementNebulaApplication();

Expand Down Expand Up @@ -47,9 +47,8 @@ class NebulaDemoApplication : public App::GameApplication
this->gameServer->AttachGameFeature(this->editorFeatureUnit);
#endif

Flat::FlatbufferInterface::LoadSchema("data:flatbuffer/graphicsfeature/terrainschema.bfbs"_uri);
IO::URI tablePath = "proj:work/data/tables/terrain.json"_uri;
CompileFlatbuffer(GraphicsFeature::TerrainSetup, tablePath, "data:tables/graphicsfeature");
IO::URI tablePath = "proj:work/data/tables/base_level.json"_uri;
CompileFlatbuffer(App::LevelSettings, tablePath, "tbl:app");
}
/// cleanup game features
void CleanupGameFeatures()
Expand Down
19 changes: 19 additions & 0 deletions tests/work/data/tables/base_level.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"terrain_setup": {
"config": {
"use": false
}
},
"vegetation_setup": {

},
"sun_settings": {

},
"cluster_settings": {

},
"histogram_settings": {

}
}

0 comments on commit 30e427a

Please sign in to comment.