Commit Graph

2497 Commits

Author SHA1 Message Date
Turánszki János ddd276d0ac surfel gi improvements, added boost setting 2022-01-15 13:51:17 +01:00
Turánszki János 5bbf9662fe pick normal fix 2022-01-14 18:03:03 +01:00
Turánszki János 10df64cb39 surfel gi debug refactor 2022-01-13 19:52:22 +01:00
Turánszki János e2c192063c surfel gi: better way to choose debug visualizations 2022-01-12 21:36:12 +01:00
Turánszki János 4599af7faa mesh wireframe fix 2022-01-12 11:25:05 +01:00
Younes 9e8e6069c5 Use correct smoothing kernel for viscosity force calculation (#384)
* Use correct smoothing kernel for viscosity force calculation

* Following struct packing rules
2022-01-12 10:18:16 +01:00
Turánszki János f3635c243b dx12 fix 2022-01-10 14:57:43 +01:00
Turánszki János cc2ca6a433 scripting updates and new sample scripts 2022-01-09 21:29:16 +01:00
Turánszki János d259baf9e7 Commandlist refactor (#385)
* removed hard coded command list count

* commandlist has internal_state pointer now instead of an index

* BeginCommandList thread safety

* refactor

* acceleration structure builds will not allocate after warmup

* refactors, fixes

* vulkan fix

* fix
2022-01-09 16:57:42 +01:00
Turánszki János 60ab37ed19 emitter sorting precision improvement 2022-01-03 23:45:31 +01:00
Turánszki János 700944f9f9 small updates 2022-01-03 18:52:59 +01:00
Turánszki János de121b32e6 lua globals fix 2022-01-02 19:55:47 +01:00
Turánszki János d586b43a82 added configuration for emitter restitution property;
added emitter_depthcollision_test.wiscene
2021-12-30 14:28:07 +01:00
Turánszki János 563d5271da minor water ripple update 2021-12-29 23:33:23 +01:00
Turánszki János d13e05b5f3 lightshaft fix when camera is far from origin 2021-12-27 00:13:16 +01:00
Turánszki János f84591a089 motion blur shutter speed fix 2021-12-23 15:25:21 +01:00
Turánszki János 9985b76c9d vulkan: added support for dynamic uniform buffers 2021-12-22 13:31:27 +01:00
Turánszki János 6cc5388e68 loadmodel fix: code already relied on initial scene update 2021-12-22 12:47:17 +01:00
Turánszki János 4d73689877 multithreaded hierarchy update system 2021-12-22 00:44:10 +01:00
Turánszki János 0cbef79a78 added fast path for loadmodel when no transformation or parenting was requested 2021-12-21 09:24:46 +01:00
Turánszki János 7823d71f3e fixes 2021-12-19 18:19:14 +01:00
Turánszki János 0fdc67dcd0 DX12 custom root signatures (#372)
* dx12: abandoned shader reflection, added support for custom root signatures, removed dxcompiler dependency

* removed dll copies from build scripts

* update

* updates

* updates

* fix

* update

* update

* updates

* added custom root signatures to some passes

* fix

* updates

* comment fix

* allow shaders to not have root signatures, if they are part of a pipeline which has root signature for an other shader

* root signature optimizer

* batched descriptor null initializer

* shader updates

* update

* put the atmospheric sky update to async compute

* improved debug of root constant - push constant data size mismatch

* bitwise root param iteration

* added superluminal perf api

* performance api will be optional

* async updaterenderdata fixes

* fixes

* fixes

* occludee update

* raytraced reflection implementation with ray query instead of rt pipeline

* alwaysactive

* shadercompiler enable old d3dcompiler because why not, it's only loaded on demand now

* removed common sampler api

* root signature simplification

* fixes

* linear allocator fix

* push constants are now immediately set

* fixes

* version

* fix?

* improved descriptor allocator

* default sampler table reduction

* gpu sort lib push constants

* small update

* descriptor allocator safety

* shader compiler refactor

* some optimizations
2021-12-19 15:53:18 +01:00
Turánszki János c4c582d739 general improvements (#368)
* custom implementation for wi::vector

* fix

* sdl vulkan fix

* linux fix

* fix

* vector fix

* shader compiler and job system will be initialized automatically on first use

* vector improvements

* updates

* update

* network and audio will be auto initializing on first use only

* fix

* for now, use std::vector

* vector refactor minor

* backlog: access safety

* shader clearcoat fix

* gui initialization on demand

* initializer updates

* job system will be explicitly initialized
2021-12-09 18:58:27 +01:00
Amer Koleci bb2fae64b0 Add SetDepthBounds. (#371)
* RHI: Add SetDepthBounds.

* Rename SetDepthBounds as BindDepthBounds, add depth_bounds_test_enable in DepthStencilState and manage on D3D12/Vulkan side.

* ENH: Add DEPTH_BOUNDS_TEST capability and check across backends.
2021-12-07 12:25:42 +01:00
Turánszki János 67eb9dd66f raytracing: expose filtering with layer masks 2021-12-04 16:48:12 +01:00
Turánszki János 74cb74d3c9 version 0.60 (#367)
- namespace refactor (example: wiGraphics:: -> wi::graphics)
  - provided namespace compatibility macro for old user code: WICKEDENGINE_BACKWARDS_COMPATIBILITY_0_59
- resource manager will return `Resource` instead of `shared_ptr<Resource>` objects
- MAD shader optimizations
- implemented alpha to coverage with alpha tested materials when MSAA is enabled
- alpha testing fix with transparent shadow maps
- TLAS and scene buffers will be recreated less frequently when things get added/removed from the scene
2021-12-03 21:22:27 +01:00
Turánszki János 16d9a8de74 common improvements (#366)
- std container replacements for vector, unordered_map, unordered_set
  - unordered_map and unordered_set replaced with ska::flat_hash_map
  - vector replacement is still std::
- unordered_map performance test (std:: vs ska::)
- backlog improvements
- wiArchive improvements
- editor: added option to dump scene to C++ header file
- common improvements, refactors
2021-11-28 22:12:05 +01:00
Turánszki János 4777246989 common refactors (#364)
* common refactors:
- DirectXMath only included in wiMath.h instead of CommonInclude.h
- cleanups in CommonInclude.h
- lua math refactor
- generic allocator refactor

* FLT_MAX to numeric_limits

* linebreak

* comment fix

* allocator fix

* more math refactors

* removed wiContainers, renamed wiAllocators to wiAllocator, moved ThreadSafeRingBuffer to wiAllocator
2021-11-26 13:45:11 +01:00
Turánszki János 146e88f866 wiArchive improvements: (#362)
- strings will be written without terminator
- ability to open from memory mapped pointer
- ability to save into header file
- refactors, comments
2021-11-25 18:16:17 +01:00
Matteo De Carlo 08c1046214 Added Focus events on SDL editor (#363)
* Added Focus events on SDL editor

* Shaders are symlinked instead of copied in the build folder (cmake)
2021-11-25 16:50:09 +01:00
Turánszki János 57e1ed37e4 temporal effect fixes 2021-11-25 00:29:53 +01:00
Turánszki János c25e62a1dd fixes uninitialized temporal history 2021-11-24 20:55:41 +01:00
Turánszki János ce1b85923f fix for particle mesh shader 2021-11-21 20:18:01 +01:00
Turánszki János dfcdbdd40c shader refactor: removed resource and sampler binding macros 2021-11-21 20:10:19 +01:00
Turánszki János c2fe106d4e big shader refactor 2021-11-21 12:52:07 +01:00
Turánszki János 6c86f858b1 dx12: updated dxcompiler.dll error message 2021-11-20 16:37:50 +01:00
Turánszki János a5a3bb6aa7 dx12 init error improvements 2021-11-20 14:38:54 +01:00
Turánszki János 38e534fa2e dx12, vulkan: improved error messaging in initialization 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