Commit Graph

60 Commits

Author SHA1 Message Date
Turánszki János 1450b4b059 Raytracing LOD support (#547)
* raytracing LOD support

* software raytracing LOD

* update LOD before TLAS write

* version bump
2022-08-31 11:28:42 +02:00
Turánszki János daa0f21681 combined mesh vertex buffers into one resource and refactors 2022-03-01 15:10:19 +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 dfcdbdd40c shader refactor: removed resource and sampler binding macros 2021-11-21 20:10:19 +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 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 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
Turanszki Janos e90672cf2f added system initialization timings; profiler fix; 2021-09-16 00:50:07 +02:00
Amer Koleci d0051dcb5f RHI improvements (#299)
* GPUBufferDesc.ByteWidth is uint64_t, we don't support D3D11 anymore.
AllocateGPU, UpdateBuffer uses uint64_t.
Rename SubresourceData members with better name.
PipelineStateDesc support custom patch control points, default to 3.

* CreateBuffer accepts const void* instead of const SubresourceData.
Cleanup and improve documentation about buffer creations.

* Rename StructureByteStride to Stride.

* GPUBufferDesc rename ByteWidth to Size.

* CreateBuffer: Under D3D12 - USAGE_READBACK use D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE flag and honor BIND_SHADER_RESOURCE.
2021-09-06 16:32:25 +02:00
Turánszki János f3687dbf4e DX11 removal, Surfel GI
version 0.57.0:
- DX11 removed, DX12 is default now on Windows
- graphics interfaces improved:
	- Bindless descriptor support is now assumed
	- GPU Buffers with USAGE_UPLOAD and USAGE_READBACK will be persistently mapped after creation
	- Removed Map/Unmap
	- added BindDynamicConstantBuffer helper function
	- improved AllocateGPU helper function
	- GPU Queries resolving can be done directly into GPUBuffer
	- UpdateBuffer now doesn't synchronize internally, this allows batching updates
	- removed support for bindless constant buffers (uniform buffers)
	- BindConstantBuffer will accept offset
	- RESOURCE_STATES refactor, they can be combined now in the barriers
	- many other refactors
- gbuffer normals removed, implemented visibility buffer
- bindless decals, bindless lightmaps, bindless hair particles, bindless software path tracing
- hair particles path tracing support
- path tracing eye adaption supported
- Surfel GI (experimental)
2021-09-05 18:59:03 +02:00
Turánszki János f1ced24f05 Multi swapchain support (#257)
* multi swapchain draft

* uwp fix

* swapchain resize handling

* swapchain buffercount

* vsync toggle

* tests fix

* update

* everything removed from graphicsdevice regarding global screen params, engine refactor

* added GetSwapChainTexture() function to graphics device; screenshot() now requires swapChain

* linux fix: vulkan device needs window handle for instance creation

* refactor

* removed unused includes

* shader refactor and lensflare fix

* swapchain clearcolor and other refactors

* vulkan: no vector allocation in submit

* tests fix

* refactors

* lens flare canvas size fix

* gui refactor for canvas support

* refactors

* removed global canvas state

* msaa fix

* fixes

* refactor to minimize interface changes

* gui changes

* checkbox fix

* gui fixes

* fixes

* input system will accept window handle

* editor fixes

* refactor and removed resolution related system events

* small editor update

* refactor: renderpath inherits from canvas

* fixed tests duh

* image refactor

* image fix

* removed every using namespace std

* pushconstant fix

* editor: object picking only when necessary

* removed include

* dx12: copy fence waiting performed on CPU

* dx12 copyallocator update

* vulkan: copy allocator with timeline semaphores

* missing include

* dx12 copy allocator update

* refactor

* editor update

* vulkan copy allocator fix

* dx12 update

* vulkan, dx12 fixes

* version bump

* vsync event helper

* documentation update

* updated vulkan, dx12, dxc
2021-04-22 11:36:22 +02:00
Turánszki János fc2cbfcc1c path tracing hardware acceleration #175 (#253)
* path tracing hardware acceleration #175

* hlsl5 fix

* fixes

* random seed fix

* ci fix

* fixes

* re enable spirv validation in linux

* path trace updates

* pathtrace fix

* raytracing fixes

* path tracing normal map limit
2021-03-28 19:48:34 +02:00
Turánszki János 933080a2e4 Unified Shader Compiler (#250) 2021-03-21 18:54:04 +01:00
Turanszki Janos 783c824139 resource manager upgrade: embedded resources support 2021-03-01 00:37:55 +01:00
Turanszki Janos 074f89094c dx12, vulkan: improved gpu barrier batching 2021-02-06 01:37:10 +01:00
Turanszki Janos 3be76495b4 big material texture slot refactor 2021-02-02 22:07:47 +01:00
Turánszki János 180ddc3586 0.49 (#160)
* renderer updates: material shadertype, customshaders

* custom shader updates

* hologram fix

* editor windows refactor

* major gui update:
- gui no longer lifetime manager
- window no longer needs gui to construct
- removed gui constructors/destructors
- rewritten every editor window

* renderer update

* gui hasfocus fix

* editor fix

* renderpath upgrades: hybrid forward-deferred

* fix

* water ripple refactor

* cmake fix

* cmake fix

* renderer fix

* volumetric light fix

* customshader stencilref

* cmake fix

* rtdeferred fix

* editor update

* raytraced shadows denoise

* anisotropic shader

* sss stencil greater

* added cartoon shader

* using precomputed tangents

* added unlit object shader

* importer update

* editor update

* editor fix

* vulkan envmap rendering fix

* terrain shader simplification (normal texture mapping instead of triplanar)

* added subsurface profiles, reduced gbuffer

* denoise disocclusion fallback

* editor fix

* more sorting priority for blend than instancing

* hairparticle culling

* particle updates; font update instancing instead of index buffer; vulkan/dx12 fixes;

* shader fixes

* hairparticle trianglestrip and no cross section

* editor fix

* cam wnd update

* terrain shader fix
2020-10-17 13:17:07 +02:00
Turánszki János c6f3611439 Event system (#133)
* event system

* more refactor

* fixes

* fixes

* fixes, documentation update
2020-07-04 13:22:11 +01:00
Turanszki Janos c369032663 added support for clang compiler 2020-06-13 01:23:17 +01:00
turanszkij a92d5e7665 bvh fix 2020-04-15 19:10:45 +01:00
turanszkij ed0b3fed07 resurrected mesh wind; added wind paint tool; 2020-04-11 12:35:53 +01:00
Turánszki János f6a0cecbc9 Device upgrade (#91)
* safety commit

* all seems working

* fixes, refactors

* minor updates
2020-03-05 01:05:23 +00:00
Turanszki Janos 2edc017a0c shader refactor #58 2020-02-02 02:16:20 +00:00
Turanszki Janos fa267b0e7d large refactor 2019-12-12 22:15:16 +00:00
Turanszki Janos be79d4c097 removed platform defines from CommonInclude #54 2019-11-23 16:38:08 +00:00
Turanszki Janos df963528da cleanup lot of winapi types usage, changed HRESULT return types to bool 2019-11-23 02:23:06 +00:00
Amer Koleci 3d6134b402 Use standard types where possible instead of WIN32 types. 2019-11-22 15:24:48 +01:00
Turanszki Janos 20e56802cc graphics API texture refactor 2019-11-21 22:29:25 +00:00
turanszkij f8362e9b2a gpu barrier refactor 2019-10-31 18:01:50 +01:00
Turanszki Janos b210a59a17 small refactor 2019-09-03 21:02:18 +01:00
Turanszki Janos fadbd69433 optimization 2019-08-21 23:01:57 +01:00
turanszkij e164d73061 refactors; revived ssr roughness blur; 2019-08-18 18:07:48 +01:00
turanszkij f19f251524 mega-refactor: cleaned up formats, removed matrix transposes, reversed order of matrix mul in shaders, removed many small headers... 2019-08-15 00:26:29 +01:00
turanszkij 6612ebf4d1 refactors, fixes 2019-08-07 19:25:40 +01:00
turanszkij 3048008280 raytrace refactors 2019-08-06 21:27:21 +01:00
turanszkij 7aa3e3ad6f refactors, fixes, everything seems to work now with multithreaded renderer 2019-07-02 19:04:00 +01:00
turanszkij 97f3d7032e resurrected multithreaded rendering 2019-06-30 01:45:49 +01:00
turanszkij a37e484c0d rearranged bvh primitive memory layout; packed bvh flag buffer as bitfield; 2019-06-01 17:37:56 +01:00
turanszkij 4abf3a0667 better bvh memory layout 2019-06-01 03:03:27 +01:00
turanszkij d5d5689b57 separated bvh primitive and primitivedata; 2019-06-01 01:44:09 +01:00
turanszkij 8d129b0bc4 raytracing fixes; bvh optimization; 2019-06-01 01:38:19 +01:00
turanszkij 7638bb40c6 bvh and raytracing fixes + refactor 2019-05-30 23:43:45 +01:00
turanszkij 8ca7ea7943 raytrace bvh sorting fix 2019-05-28 19:03:59 +01:00
turanszkij 24ae537bbf updated path tracing: normal maps; uvset fix; 2019-05-20 22:10:55 +01:00
turanszkij e840f61942 shader refactors 2019-05-14 21:30:56 +01:00
turanszkij 8433c4466d occlusion updates and shader refactors 2019-04-05 23:44:03 +01:00
turanszkij 45e344cbfa added feature: multiple uv sets; gltf updates; editor updates; 2019-03-16 18:19:49 +00:00
turanszkij 197d1175c8 added vertex colors feature; fixed tessellation; removed stereogram effect because no longer needed; some refactor; debug bonelines fix; 2019-03-12 19:20:23 +00:00
turanszkij 39eb173635 constness refactor in renderpath, gui and others 2019-03-09 19:09:33 +00:00