Commit Graph

73 Commits

Author SHA1 Message Date
Turánszki János b944465263 Font renderer updates (#483)
* font renderer updates, text debug drawer;
editor: name visualizer;
github CI: vulkan sdk not required;

* cmake: vulkan sdk not required

* refactors

* lua binding for DrawDebugText()

* comment

* transparency sorting for debug texts;
font alphablend fix;

* softer debug text
2022-07-05 15:20:23 +02:00
Turánszki János 9177077b7a Shadow atlas (#467)
shadow atlas will contain directional, spot, point light shadows all in one texture;
shadow count will not be limited, they will be tigthly packed within the atlas instead;
shadow resolution will be dynamic per light;
shadow texture arrays will no longer be used;
2022-06-21 18:34:04 +02:00
Turánszki János f7d28b1127 GUI scrollbar updates (#447) 2022-05-19 22:42:49 +02:00
Turánszki János 54491ad536 Visbuffer Optimizations (#438)
Splitting visibility buffer shaders to reduce register usage:
resolve (async)
binning (async)
velocity (async)
surface sampling (async)
sky (async)
lighting (gfx)

Successfully improved GPU utilization in lighting shader.
Binning is faster, because binning tiles and not pixels
Because tiles are binned, lighting tiles are using coherent tile info for whole thread group
Surface, sky and decal rendering also runs now in async compute.
Velocity is separate pass, improves GPU utilization in resolve, and only runs as optional.
Surface shader occupancy is still bad, and wind computation is still bad per pixel, but now it is only done in surface shader.
Surface shader can now write out proper top layer of clearcoated material, this improves screen space and raytraced reflections.
MSAA not implemented yet for visibility compute shading
Tessellation is still only half way supported in visibility compute shading (tessellation data not available in memory for pixel interpolation, but depth is written in prepass, this causes mismatch)
2022-05-15 15:50:42 +02:00
Turánszki János d50370865a Visibility Buffer shading in CS (#431)
* shading on the visibility buffer in compute

* very slow computation of wind barycentrics

* update

* implementation of ddx ddy for decals in compute

* SURFACE_LOAD_QUAD_DERIVATIVES

* visibility resolve also use quad derivatives

* wind stuff

* material binning base

* rtao fix

* fix

* permutations

* binning optimizations, refactors

* parallax occlusion mapping CS

* change

* anisotropy CS

* lightmap in CS

* refactor

* clearcoat and sheen cs

* updates

* better permutation handling

* offline shader compiler permutations support

* refactor

* fix for uv scaling derivatives

* visibility compute shading as optional setting
2022-05-08 14:20:43 +02:00
Turánszki János a4580ea2b0 DDGI (#386)
* start ddgi implementation

* update

* updates

* update

* ray data packing

* removed comment

* update

* features.txt

* ddgi disabled by default

* added comments

* comments

* offlineshadercompiler

* updates
2022-01-19 13:19:14 +01:00
Turánszki János e55423d26a surfel gi boost fix 2022-01-15 15:25:38 +01:00
Turánszki János ddd276d0ac surfel gi improvements, added boost setting 2022-01-15 13:51:17 +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 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 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 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
Turánszki János 100e6b6c97 Basis Universal (#313)
* added basis-universal library and KHR_texture_basisu gltf support

* fix

* added basisu license

* added basis transcode;
added basis encode;
added ktx2 encode;
resource manager file types query;

* added BC decompressor

* added lightmap compression BC6;
added DirectXTex BC libs;

* version bump

* removed directxtex, using simpler lightmap compression instead

* fix

* added ktx2 conv button; normal maps fix;

* don't rely on zero-initialization of graphics resources

* don't always enable vrs classification
2021-09-19 17:07:12 +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
Turanszki Janos 1ee087f4b8 double sided property gltf compliance 2021-05-27 19:35:59 +02:00
Turánszki János 662470520e Raytraced shadow updates (#263)
* rtshadow and rtao refactors

* vulkan update

* blue noise for rtshadow, rtao

* path trace fix

* rt shadow multi spp

* path trace fix

* fidelity-fx raytraced shadows denoiser

* fixes

* raytracing light sampling improvement

* blue noise packed into texture

* vulkan fix

* blue noise refactor

* rtao svgf denoiser

* denoiser fixes

* fix

* blue noise update

* precompute blue noise phase

* rtao forces 1spp

* denoise 4 lights

* fixes

* unshadowed light fix
2021-05-18 13:11:55 +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 4049947a50 raytraced shadows updates
raytraced shadows separated from object shaders
2021-01-16 16:10:55 +01:00
Turanszki Janos f8e64ae3b5 dx11, dx12, vulkan updates: common samplers, auto samplers, auto root constantbuffers (dx12) 2021-01-15 01:10:07 +01:00
Turanszki Janos 960734e87a physics updates #206 #207
physics debug draw
editor physics updates
2020-12-28 17:21:47 +01:00
Turanszki Janos 0895e4b433 improved specular glossiness workflow; big shader refactor; updated tinygltf version; 2020-12-20 01:29:40 +01:00
Turanszki Janos 8f1690087b small editor update 2020-12-13 18:26:07 +01:00
Turanszki Janos 8b60c1bf4a raytracing updates:
-improved descriptor layouts
-rt reflection vulkan fix
-rt reflection specular fix
-rt shadows sample count adjustment
2020-12-13 16:31:56 +01:00
Turanszki Janos b047e87240 occlusion culling update 2020-12-09 00:50:54 +01:00
Turanszki Janos 1bad51256f added disable albedo debug view;
downsample4x fix;
voxelizer terrain shader fix;
renderpath refactor;
postprocess fix;
2020-12-07 22:22:25 +01:00
Turánszki János 5efe28fdf9 0.51.0 (#200)
* large renderer state refactor;
added subsurface scattering energy conservation;
added emitted particle subsurface scattering;
removed area lights;
optimizations;

* added layerMask support in shaders

* fixed incorrect shadow priority for directional light;
fix point light shadow disconnect;

* fix incorrect shadow assignment
2020-12-07 01:32:44 +01:00
Turanszki Janos 8118fd57cb shadow priority refactor 2020-12-06 02:11:37 +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
Matteo De Carlo 3cd9e77889 WIP: Initial linux support using SDL (#136)
* Initial linux support using SDL

* fixed link error and gitignore

* fix in working directory initialization (windows side)

* Added README_Linux and fixed a few compilation issues in ubuntu

* Rename main to main_Windows in Tests

* Better default renderering backend selector

* Added backlog terminal output on linux

* added asserts on all missing vulkan function call results

* added portable file dialogs

also small tests update and cleanup

* Added Editor compile target

* linux ci

* linux ci

* cmake update

* cmake update?

* cmake

* Editor_Windows fix

* build test

* make

* build tools?

* update

* ubuntu 20.04

* fix?

* cmake

* build

* build?

* package linux build

* updates, bump version

* backslash to forward slash, eof newlines, add portable-file-dialogs license

* xcopy needs backslash duh; update readme;

* copy fix

* updated readme

* readme update

* updated readme

* updated readme

* fix incorrect file encoding linux

* paint tool fix

* linux: add missing shaders

* packaging update

Co-authored-by: Turánszki János <turanszkij@users.noreply.github.com>
Co-authored-by: Turanszki Janos <turanszkij@gmail.com>
2020-10-05 00:03:22 +02:00
Turanszki Janos d3b18bc504 gui updates, editor window refactors 2020-10-04 14:24:22 +02:00
Turanszki Janos 34522e0b5a updated buffer subresource management; other fixes; 2020-09-28 00:33:51 +02:00
Turanszki Janos d3f9a2a1b9 rtao denoiser improvements 2020-09-25 00:24:05 +02:00
Turanszki Janos 256fda93fc variable rate shading tier2 #152 2020-08-30 20:20:24 +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
Turánszki János 8ed65ef031 Raytracing API - Vulkan (#130)
* vulkan acceleration structure implementation

* vulkan: optimized resource binding

* dx12 optimizations

* vulkan shadercompiler update

* dx12 raytracing resource binding update

* dx12 descriptor refactor

* dx12 and vulkan updates

* VK_KHR_raytracing

* vulkan acceleration structure fix

* vk acceleration structure fix

* dx12 acceleration structure build fix

* vulkan shader shifts refactor

* vulkan raytracing fixes

* uwp: cannot use dxcompiler.dll for shader reflection

* updated version

* refactors, shader compiler updates

* updated shader build tools

* updated shader compilers

* raytraced shadows

* revert shader model

* try fix shader validate error

* ray traced shadow refactors
2020-06-28 13:34:59 +01:00
Turánszki János 4a11d6a202 Dpi awareness (#109)
* dpi awareness test

* dpi scaling updates

* dpi scaling updates

* missing mouse inputs fix (I hope finally)

* finishing up the dpi branch...
2020-05-05 00:04:38 +01:00
Turanszki Janos 7c8b88b435 editor: MSAA switch fix 2020-04-25 15:29:46 +01:00
Turanszki Janos 7bdcfc14c6 minor updates 2020-04-25 12:41:35 +01:00
turanszkij 57d0cea6e5 updated editor 2020-04-13 22:19:29 +01:00
turanszkij 1516b5cd78 ssr updates #80 2020-03-13 18:36:07 +00:00
Turanszki Janos c9c03b2d48 removed some macro use 2020-03-07 19:25:30 +00:00
turanszkij d95dfa7ef2 stability improvements, fixes 2020-03-07 16:18:23 +00:00
turanszkij 2e0f39935d gui updates 2020-02-18 19:17:06 +00:00
turanszkij 8ee2f97c4a voxel gi update 2019-12-23 13:39:34 +01:00
turanszkij 4c87f6c218 fixed #45 and some other things 2019-11-03 17:11:54 +00:00
turanszkij a5da17dc86 minor updates, fixes 2019-10-23 19:15:52 +01:00
turanszkij 6d8112db37 3D sounds can be placed in scene now; updated editor; added sound3D sample model; 2019-10-06 13:30:29 +01:00
turanszkij 95d5bec746 editor: ray bounce count slider now applies to path tracer 2019-06-04 23:39:28 +01:00
turanszkij 061c780ad9 refactor-part1:
removed rendertarget helpers;
non-static textures in render paths;
wiGraphicsTypes namespace renamed to wiGraphics;
2019-03-08 21:46:28 +00:00