Commit graph

136 commits

Author SHA1 Message Date
Moritz Brückner c56a0c3a72 Fix accidental module reloading caused by name conflicts of global vars 2021-08-11 14:32:21 +02:00
Moritz Brückner ea8c13686c Implement basic addon reloading 2021-08-04 22:56:11 +02:00
Alexander Kleemann 4009d9d3fe Fix for an error with NoneType materials
Solves an error where an unallocated material slot caused a bug
2021-03-10 20:48:46 +01:00
Alexander Kleemann aec10274f4 Add option to ignore irradiance for baked environments 2021-02-20 15:30:18 +01:00
N8n5h 1c3e24a8fd Add support for shadow map atlasing
With this it is now possible to enable atlasing of shadow maps, which solves the existing limitation of 4 lights in a scene. This is done by
grouping the rendering of shadow maps, that currently are drawn into their own images for each light, into one or several big textures. This was
done because the openGL and webGL version Armory targets do not support dynamic indexing of shadowMapSamplers, meaning that the index that
access an array of shadow maps has to be know by the compiler before hand so it can be unrolled into if/else branching. By instead simply
using a big shadow map texture and moving the dynamic part to other types of array that are allowed dynamic indexing like vec4 and mat4, this
limitation was solved.

The premise was simple enough for the shader part, but for the Haxe part, managing and solving where lights shadow maps should go in a shadow map
can be tricky. So to keep track and solve this, ShadowMapAtlas and ShadowMapTile were created. These classes have the minimally required logic
to solve the basic features needed for this problem: defining some kind of abstraction to prevent overlapping of shadowmaps, finding available
space, assigning such space efficiently, locking and freeing this space, etc. This functionality it is used by drawShadowMapAtlas(), which is a
modified version of drawShadowMap().

Shadow map atlases are represented with perfectly balanced 4-ary trees, where each tree of the previous definition represents a "tile" or slice
that results from dividing a square that represents the image into 4 slices or sub-images. The root of this "tile" it's a reference to the
tile-slice, and this tile is divided in 4 slices, and the process is repeated depth-times. If depth is 1, slices are kept at just the initial
4 tiles of max size, which is the default size of the shadow map. #arm_shadowmap_atlas_lod allows controlling if code to support more depth
levels is added or not when compiling.

the tiles that populate atlases tile trees are simply a data structure that contains a reference to the light they are linked to, inner
subtiles in case LOD is enabled, coordinates to where this tile starts in the atlas that go from 0 to Shadow Map Size, and a reference to a
linked tile for LOD. This simple definition allows tiles having a theoretically small memory footprint, but in turn this simplicity might make
some functionality that might be responsibility of tiles (for example knowing if they are overlapping) a responsibility of the ones that
utilizes tiles instead. This decision may complicate maintenance so it is to be revised in future iterations of this feature.
2021-02-04 17:53:59 -03:00
Moritz Brückner d18d9e1a27 Fix copy_pass missing on deferred when only compositor was enabled 2020-11-29 17:16:43 +01:00
Moritz Brückner 3f51b35b89 Reset compositor defs before renderpath building 2020-11-28 23:13:15 +01:00
Moritz Brückner 89fa3e8314 Reimplement clouds 2020-06-28 22:45:54 +02:00
Lubos Lenco e30a8c7f46 Metal fixes 2020-05-11 09:03:13 +02:00
Lubos Lenco ede8a0f2d3 Improve metal gapi detect 2020-05-05 09:54:24 +02:00
Lubos Lenco 66e9572554 Add clear pass for metal 2020-05-04 23:08:47 +02:00
Alexander 60f72e7e0e Merge in PPM
Redone and ready to be merged with Armory
2020-03-04 17:45:19 +01:00
luboslenco ba5150054d Fix lens flare compilation 2019-09-30 11:50:13 +02:00
luboslenco 24867658f1 Deprecated cleanup 2019-08-24 11:50:27 +02:00
Alexander 000ec17e3d Chromatic aberration 2019-08-08 20:02:42 +02:00
Alexander f521828edc Lens dirt masking 2019-08-08 18:56:56 +02:00
luboslenco 060448e555 More dof changes 2019-05-31 14:11:39 +02:00
luboslenco ae0fa5da1e Check define 2019-05-26 21:03:25 +02:00
luboslenco 2da0e03d17 Micro shadowing 2019-05-21 21:53:57 +02:00
luboslenco 297a7b8281 b28 fixes 2019-05-20 14:32:48 +02:00
luboslenco d05641b4a3 Auto-exposure speed 2019-05-01 10:52:42 +02:00
luboslenco e402442754 Water refract 2019-04-29 16:21:44 +02:00
luboslenco aa5c4f7e73 Link to embedded data 2019-04-26 11:12:09 +02:00
luboslenco 01fcbea2e0 Pre-compile clouds data 2019-04-25 22:39:08 +02:00
luboslenco faae72e5e4 Auto exposure fixes 2019-04-23 12:05:50 +02:00
unknown 54bb309807 Auto exposure fixes 2019-04-22 14:11:17 +02:00
unknown 44f1e115e9 Begin histogram 2019-04-21 19:16:23 +02:00
unknown 5240249982 Use voxelao instead of voxelgi, gi will be reworked into raytracing 2019-04-06 18:52:21 +02:00
luboslenco c29e8fdbd0 Shadows cleanup 2019-03-23 10:56:30 +01:00
Lubos Lenco d1c93532b4 Fix --shaderversion for ios 2019-02-13 16:29:53 +01:00
Lubos Lenco 44c8cdb679 Fix legacy shaders flag 2019-02-10 20:37:38 +01:00
luboslenco e0e4bf303f Send operators to Krom 2019-02-10 11:47:42 +01:00
luboslenco dc08938884 Disable cone trace for zero intensity 2019-02-07 21:33:04 +01:00
luboslenco 7b7260d647 Update volumetric 2019-01-28 11:28:21 +01:00
luboslenco e17d06225c Expose voxel shadow 2019-01-27 19:12:00 +01:00
luboslenco 9ba53d172d Transluc + sss fixes 2019-01-24 12:47:51 +01:00
luboslenco 169bf4878b Clamp cascade size 2019-01-21 17:59:25 +01:00
luboslenco 735ba8eb91 HLSL voxels 2019-01-11 20:42:16 +01:00
luboslenco d64441b7d3 Update voxelgi 2019-01-10 21:54:36 +01:00
luboslenco a531b52b9f UI style 2018-12-19 13:33:17 +01:00
luboslenco a9d4e9c2ef Begin b28 era 2018-12-18 23:48:38 +01:00
luboslenco 9c9fd0881e Uniform fixes 2018-12-15 19:03:11 +01:00
luboslenco d8f78638bd Begin shadow index 2018-12-10 23:29:04 +01:00
luboslenco 6176a26e22 Improved light sampling 2018-12-10 17:25:29 +01:00
luboslenco 00d7bba7c8 Deferred modes 2018-12-10 09:46:46 +01:00
luboslenco 023668221e Update shadowmap props 2018-12-10 00:02:40 +01:00
luboslenco 835792f7fc Shader fixes 2018-12-07 13:48:40 +01:00
luboslenco 93cc102bf5 Faster 2018-12-06 15:23:08 +01:00
luboslenco 0cc0915e44 Need for speed 2018-12-05 17:47:45 +01:00
luboslenco 7075374c8f Use HLSL define 2018-11-27 21:44:56 +01:00