Archived
1
Fork 0

Disable IBL on Windows

There isn't enough features on the Vulkan backend to prevent it from crashing :V
This commit is contained in:
redstrate 2021-02-05 20:21:25 -05:00
parent 73fa35b674
commit f5f107b0b4
2 changed files with 12 additions and 4 deletions

View file

@ -27,6 +27,14 @@ constexpr bool default_enable_normal_mapping = false;
constexpr bool default_enable_point_shadows = false;
constexpr ShadowFilter default_shadow_filter = ShadowFilter::PCF;
constexpr int default_shadow_resolution = 1024;
#endif
#if defined(PLATFORM_WINDOWS)
constexpr bool default_enable_ibl = false;
constexpr bool default_enable_normal_mapping = true;
constexpr bool default_enable_point_shadows = true;
constexpr ShadowFilter default_shadow_filter = ShadowFilter::PCSS;
constexpr int default_shadow_resolution = 2048;
#else
constexpr bool default_enable_ibl = true;
constexpr bool default_enable_normal_mapping = true;

View file

@ -763,10 +763,9 @@ bool material_readable(const file::Path path) {
}
void cacheAssetFilesystem() {
#ifndef PLATFORM_WINDOWS
asset_files.clear();
auto data_directory = "../../../data";
auto data_directory = "data";
for(auto& p : std::filesystem::recursive_directory_iterator(data_directory)) {
if(p.path().extension() == ".model" && mesh_readable(p.path())) {
asset_files[std::filesystem::relative(p, data_directory)] = AssetType::Mesh;
@ -778,7 +777,6 @@ void cacheAssetFilesystem() {
}
filesystem_cached = true;
#endif
}
void CommonEditor::drawAssets() {
@ -989,6 +987,8 @@ GFXTexture* CommonEditor::generate_common_preview(Scene& scene, const Vector3 ca
GFXCommandBuffer* command_buffer = gfx->acquire_command_buffer();
renderer->shadow_pass->render(command_buffer, scene);
if(render_options.enable_ibl)
renderer->scene_capture->render(command_buffer, &scene);
GFXRenderPassBeginInfo begin_info = {};