2930 Commits

Author SHA1 Message Date
Turánszki János 38e534fa2e dx12, vulkan: improved error messaging in initialization v0.59.3 2021-11-20 11:36:55 +01:00
Turánszki János 917d3e690a font and image renderer refactors 2021-11-20 10:29:28 +01:00
Turánszki János 4972763039 RenderPath2D: HDR output scaling 2021-11-19 19:55:13 +01:00
James Webb 4f82ed8fbd wiGraphics refactors (#359)
* Mark concrete graphics device classes as final - they should not be inherited from further.

* Apply consistent snake_cast naming (which has been used in more recent additions) across wiGraphics structs

* Make 'CommandList' type safe so that calling graphics device functions is less error-prone.

* Decouple wiProfiler from wiRenderer by passing the device instance to functions instead of using wiRenderer::GetDevice().

* Bump minor version for graphics refactors.

* Decouple wiHelper screenshot/saveTexture* functions from wiRenderer by providing the graphics device as a parameter.

* Convert wiGraphics.h enums to use enum class (except a couple of raytracing flag enums which seem best left)

* hdr fix

* Documentation updates for enum class.

* Revert "Decouple wiHelper screenshot/saveTexture* functions from wiRenderer by providing the graphics device as a parameter."

This reverts commit fd70249554.

* Revert "Decouple wiProfiler from wiRenderer by passing the device instance to functions instead of using wiRenderer::GetDevice()."

This reverts commit 69b5326cfc.

* Fix debug build

* Fix gcc build (hopefully). Move bitmask operator defs to end of file outside of wiGraphics namespace.

* Remove 'to_underlying' and replace with casts

* graphics device access decoupled from wiRenderer, now should be accessed from wiGraphics::GetDevice()

* minor refactors, comments

* dx12 assert fix

* fixes

* commandlist refactor

* commandlist initial value

* commandlist refactor

* graphicsdevice comments, GetActivePipelineCount() function

* has changed to has_flag

* just rename a thing

Co-authored-by: Turánszki János <turanszkij@users.noreply.github.com>
2021-11-17 20:27:10 +01:00
Turánszki János 66ba7106ef hdr fix 2021-11-15 18:33:17 +01:00
James Webb 7b4526e93a Graphics device tweaks (#356)
* Don't redefine NOMINMAX if already defined

* Don't redefine WIN32_LEAN_AND_MEAN or NOMINMAX if already defined

* Explicitly use LoadLibraryExW so that compilation still succeeds on projects not defining UNICODE.
2021-11-12 13:16:33 +01:00
Matteo De Carlo f728b1beef Created cmake files to import the project from other locations (#355)
Creating a projects from any location on your computer should be possible now (with cmake)
2021-11-11 19:18:09 +01:00
Matteo De Carlo af97739b61 HiDPI support on SDL2 (#351)
linux: works only with wayland backend, can be used with SDL_VIDEODRIVER=wayland enviroment variable set.
It's possible that it works also on other platforms when using the SDL backend.
2021-11-11 15:38:05 +01:00
Turánszki János a05c0e3544 vulkan fix 2021-11-10 18:47:29 +01:00
Turánszki János 4d0b94af02 vulkan: fix swapchain minImageCount 2021-11-10 18:13:28 +01:00
Turánszki János ddb22482b8 shader fixes, and added new format conversions for texture saving 2021-11-10 14:16:26 +01:00
Turánszki János d3c11eddf6 HDR display support (#341)
* dx12: initial HDR support

* make dx12 more feature level compatible

* vulkan, dx12 hdr updates

* remove trash

* remove postprocess_LDR, tests

* fixes

* added custom display output mapping for hdr10

* renderpath2d srgb->linear mapping for compose blending

* hdr updates

* improvements

* documentation update

* documentation fixes

* vulkan: outdated swapchain handling

* minor fix

* vulkan: hdr workaround with color space change with same format

* improved vulkan swapchain destructor

* updated features.txt
2021-11-09 19:02:01 +01:00
Matteo De Carlo e70ede130d Fixed crash on wayland exit (#352)
The engine would crash on exit because SDL handles the deletion of the swapchain on his own, making the engine delete the swapchain twice, which would result in a crash on wayland.
This fix checks if the Video Subsystem is not running any more, if not it will assume there is no need to destroy the swap chains any more.
2021-11-09 17:59:08 +01:00
Matteo De Carlo 1cf8585d37 Resizable windows on SDL2 (linux) (#350)
Fixes #349
2021-11-08 21:38:03 +01:00
Matteo De Carlo b5c0171034 Fixed warning and Tests lua script (#348)
Fixes #173
Fixes lua script missing in Tests build folder
2021-11-08 11:49:44 +01:00
Turánszki János b74835a138 updated readme 2021-11-07 01:03:50 +01:00
Matteo De Carlo 34985b7177 Add imgui sdl2 adapter (#342)
* Add imgui sdl2 adapter

* Added keyboard input to IMGUI example

Co-authored-by: Amer Koleci <amerkoleci@gmail.com>
2021-11-06 21:33:31 +01:00
Matteo De Carlo 28be2ddd7f Fixed wiRandom initialization order (#344)
On some compilers, wiRandom would initialize later than other modules that depend on it for initialization, resuling in undefined behaviour (infinite loop in my case).

Co-authored-by: Amer Koleci <amerkoleci@gmail.com>
2021-11-06 19:59:44 +01:00
Matteo De Carlo 82c38509b8 Fixed missing fonts in Tests project (#345)
The Test project was missing some resources
2021-11-06 18:54:57 +01:00
Matteo De Carlo 75d9d4934a Added thread names and affinity on linux (#343) 2021-11-06 15:26:47 +01:00
Turánszki János bd34c51d8b updated credits 2021-11-05 15:37:09 +01:00
Turánszki János 26a9c39a9d updated credits 2021-11-05 15:36:12 +01:00
Matteo De Carlo d38aa343e1 Added runtime shader compiler on linux (#339)
* Added runtime shader compiler on linux

* dxcapi path fix

* linux: shaderdump generation on github CI

* linux: worker thread shutdown fix

* thread safety in worker shutdown

* cmake fix?

Co-authored-by: Turánszki János <turanszkij@users.noreply.github.com>
2021-11-05 12:17:41 +01:00
Matteo De Carlo 571ac00bc0 Added compilation framework for IMGUI example on linux (#340) 2021-11-05 09:30:24 +01:00
Amer Koleci f275f4690b Examples: Initial ImGui 1.85 integration example. (#338)
* Examples: Initial ImGui 1.85 integration example.

* Attempt to load and compile shaders.

* ImGUI integration done with some workarounds.

* ImGUI integration: Cleanup example.

* refactor tests->example_imgui

Co-authored-by: Turánszki János <turanszkij@users.noreply.github.com>
2021-11-04 10:09:20 +01:00
Turánszki János e018935689 linux: added missing stringconvert functions 2021-11-03 17:40:23 +01:00
Megumumpkin 33abffa936 Linux Network Implementation (#337)
* Linux Network Implementation

* Linux Network - Faster IP Address Conversion
2021-11-03 11:20:30 +01:00
Turánszki János a7043c1a14 dx12, vulkan minor refactor 2021-10-21 16:19:35 +02:00
Turánszki János b0f9f6123b vulkan: add missing structure type 2021-10-21 09:51:48 +02:00
Turánszki János e427e733b2 vulkan: depth clip extension is no longer required 2021-10-21 00:06:27 +02:00
Turánszki János d043565a16 vulkan: extension fixes 2021-10-20 19:24:44 +02:00
Turánszki János caa981786c vulkan: fix CPU performance issue with UPLOAD type buffer 2021-10-15 17:36:01 +02:00
Turánszki János a74950dde1 dx12, vulkan fixes 2021-10-13 00:19:11 +02:00
Turánszki János 52ebc197f6 dx12, vulkan: viewport and scissor count fixes 2021-10-12 16:42:54 +02:00
Turánszki János 9a970cde4a fixes for AMD GPU #331 2021-10-12 15:44:20 +02:00
Amer Koleci b1631ae717 D3D12 improvements (#335)
* ThirdParty: Update DirectX headers and D3D12MA.

* D3D12: Replace feature detection with new CD3DX12FeatureSupport.

* D3D12: Handle tearing in correct way, can be used when vertical sync is disabled, non fullscreen and tearing is supported.
2021-10-12 11:56:49 +02:00
Turánszki János be8a947d7c vulkan: pipeline cache object will be recreated on shader reload 2021-10-11 17:27:44 +02:00
Amer Koleci 8b4cb875c7 Vulkan Pipeline Cache (#332)
* Vulkan: Implement pipeline cache support, verifies and loads cache validation.

* wiHelper: Add GetTempDirectoryPath and use it in vulkan cache lookup.
2021-10-11 16:43:04 +02:00
Turánszki János 93704a3f72 raytraced reflections: emissive fix for anyhit shader 2021-10-11 12:58:30 +02:00
Turánszki János ad47786fc9 path tracing: better handling of alpha test 2021-10-11 12:07:28 +02:00
Turánszki János e3611fba20 font renderer: use premultiplied alpha blending 2021-10-10 19:10:45 +02:00
Turánszki János d53604792f raytraced reflections, shadow, ao: always using stochastic alphatest in anyhit 2021-10-10 18:27:28 +02:00
Turánszki János 08a7c73047 gui update: slider value input field always fits text 2021-10-10 17:09:59 +02:00
Turánszki János d1cf3d7a11 raytracing: fix backface lighting on non-procedural geometry 2021-10-09 13:26:04 +02:00
Amer Koleci 12cd0f6ac1 Add: wiMath::GetNextPowerOfTwo with uint64_t (#330)
FIX: Vulkan and D3D12 backends to use uint64_t size and offet during BindIndexBuffer.
2021-10-08 14:33:05 +02:00
Turánszki János 4fbc2435de Emitter raytracing (#329)
* emitter rewrite to support raytracing, still has some problems

* added emitters to compute BVH

* sorting only for culled rasterized particles; fixes;

* emitter mesh shader update

* emitter tracing improvements

* particle traces will use simplified lighting model

* don't update particle gpu data when scene update requests are stopped

* path tracing unlit material support

* path tracing unlit material fix

* path tracing: unlit refactor
2021-10-07 17:00:17 +02:00
Turánszki János a211e7dcee vulkan: upload buffer fix 2021-10-06 14:21:45 +02:00
Turánszki János d8ad89257a Bindless RenderPath (#328)
* remove all resource bindings from renderpath, they will be descriptor indices attached to camera CB data

* fix

* big refactor: bindings removal

* minor update renderpath3d

* version bump

* fix

* big refactor: shader weather params

* refactor

* this update will increase minor version number as interface changes were made

* dx12, vulkan fix: dirty pso state was not handled correctly

* moved lot of things to camera CB, refactors

* cameracb padding fix
2021-10-05 13:23:40 +02:00
Turánszki János fcc3c3b3b0 fix: avoid reading from upload buffer memory 2021-10-03 00:22:23 +02:00
Turánszki János b55bbde7bf shader material fixes 2021-10-02 21:00:35 +02:00