Commit graph

3409 commits

Author SHA1 Message Date
tong a1fce84f59 Use f string to format console messages 2021-02-20 09:36:42 +01:00
tong 0abb43f249 Revert terminal color change 2021-02-19 17:25:42 +01:00
tong d93de12252 Print human readable time 2021-02-19 17:04:18 +01:00
tong 325f7471c0 Fix printing build flags 2021-02-19 17:01:09 +01:00
tong b7c4a8bb3f Improve console build messages 2021-02-19 16:57:12 +01:00
tong d4ee144577 Improve console warning 2021-02-19 16:53:01 +01:00
tong 8bc831d7e2 Show scene name in missing camera warning 2021-02-19 16:50:29 +01:00
Lubos Lenco 84663bc981
Merge pull request #2106 from SunDaw/optimize-sendevent-nodes
Remove array allocation from SendEventNode
2021-02-16 15:48:57 +01:00
Lubos Lenco 6beb9efb88
Merge pull request #2108 from knowledgenude/master
Improved FSM
2021-02-15 08:11:48 +01:00
Lubos Lenco 02e9ff7c5c
Merge pull request #2109 from N8n5h/light-fix-2
Make sure compiled.inc is always first when parsing shaders for clusters
2021-02-15 08:10:29 +01:00
N8n5h 3ef380978e Make sure compiled.inc is always first when parsing shaders for clusters 2021-02-14 20:21:51 -03:00
knowledgenude 0ee35adc81 Improved FSM 2021-02-14 19:21:26 -03:00
Lubos Lenco 49a599dc66
Merge pull request #2102 from N8n5h/light-fix-2
Add support for shadow map atlasing
2021-02-14 16:32:59 +01:00
Lubos Lenco 6d8012b45c
Merge pull request #2107 from SunDaw/optimize-physics
Reuse contacts array instead of creating new
2021-02-14 09:44:53 +01:00
Lubos Lenco 726e2fec6d
Merge pull request #2105 from MoritzBrueckner/custom-mat-operator
Add button to create a new custom material
2021-02-13 17:30:54 +01:00
SunDaw 6cbe539098 Reuse contacts array instead of creating new
Remove unused import from PhysicsWorld
2021-02-13 17:23:16 +01:00
SunDaw a2e4850b12 Remove array allocation from SendEventNode
Remove entires member variable from SendEvent nodes
2021-02-13 16:56:21 +01:00
Moritz Brückner b4d5afd561 Remove unused fragment shader input 2021-02-12 20:54:02 +01:00
Moritz Brückner b70a60078b Fix and improve comments 2021-02-12 20:24:42 +01:00
Moritz Brückner 52e4aaa21c Add button to create a new custom material 2021-02-12 20:12:55 +01:00
Moritz Brückner 3260e627ce Fix custom material export when scene is exported in arm format
See af247f1876 for reference
2021-02-12 00:31:19 +01:00
N8n5h c64b47548e Added support for direct3d-like texture coords uv for shadow atlases
See http://thedev-log.blogspot.com/2012/07/texture-coordinates-tutorial-opengl-and.html,
the "opengl coordinates" where inverted for proper support of direct3d texture coordinate system.
2021-02-10 21:03:10 -03: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
Lubos Lenco f0d7effb7c
Merge pull request #2101 from MoritzBrueckner/fix-skinning-normals
Fix normals export of skinned materials
2021-02-03 18:28:53 +01:00
Moritz Brückner afe133381c Fix normals export of skinned materials 2021-02-03 18:23:22 +01:00
luboslenco 6ffa58fb6b Bump version 2021-02-01 10:00:43 +01:00
Lubos Lenco 129d59ab54
Merge pull request #2096 from kevinresol/patch-4
[PickLocation] Actually return null when input invalid
2021-01-30 11:37:39 +01:00
Kevin Leung 4ee1131f6e
[PickLocation] Actually return null when input invalid 2021-01-29 20:54:34 +08:00
Lubos Lenco 4273aff1fb
Merge pull request #2094 from knowledgenude/master
Update inputmap and added finite state machine
2021-01-26 18:27:49 +01:00
Lubos Lenco 74b99411df
Merge pull request #2095 from tong/sdk-path-normalize
Normalize sdk path
2021-01-26 18:27:39 +01:00
tong 725520081a Normalize sdk path 2021-01-26 16:38:49 +01:00
knowledgenude 6ef1195816 Update inputmap and add FSM 2021-01-25 20:19:24 -03:00
Lubos Lenco 888fb5c376
Merge pull request #2092 from tong/print-human-build-time
Print rounded build time to console
2021-01-24 18:56:47 +01:00
tong 8619006757 Print rounded build time to console 2021-01-24 18:36:58 +01:00
Lubos Lenco f2e2a3d7dd
Merge pull request #2091 from MoritzBrueckner/fix-reroutes
Fix Reroute nodes
2021-01-17 09:15:59 +01:00
Moritz Brückner 41657adb64 Cleanup 2021-01-17 00:23:19 +01:00
Moritz Brückner fb8a056394 Fix reroute socket indices 2021-01-17 00:23:02 +01:00
Lubos Lenco 0a5c209dd9
Merge pull request #2087 from knowledgenude/master
Update input mapper
2021-01-13 12:58:32 +01:00
knowledgenude 081fcb2870 update-inputmap 2021-01-11 18:14:21 -03:00
Lubos Lenco 70041fe2a5
Merge pull request #2085 from MoritzBrueckner/fix-bundled-edit
Fix editing bundled traits if the project was never compiled
2021-01-09 12:46:46 +01:00
Moritz Brückner e742ca76c0 Fix editing bundled traits if the project was never compiled 2021-01-08 22:40:14 +01:00
Lubos Lenco b7dc297d04
Merge pull request #2080 from knowledgenude/master
Fix mouse wheel key verification
2021-01-05 13:11:54 +01:00
knowledgenude ae057508ca
Fix mouse wheel key verification 2021-01-04 12:09:30 -03:00
Lubos Lenco bc36bf571e
Merge pull request #2079 from knowledgenude/master
Added input mapper
2021-01-04 15:41:22 +01:00
knowledgenude 24f62623ad add-inputmapper 2021-01-04 11:28:59 -03:00
luboslenco 27521265df Bump version 2021-01-03 12:11:59 +01:00
Lubos Lenco 97582968bd
Merge pull request #2076 from MoritzBrueckner/instancing
Show warnings for invalid instancing configurations + cleanup
2021-01-01 12:56:52 +01:00
Lubos Lenco c2bf021770
Merge pull request #2075 from MoritzBrueckner/world-warning
Show warning when scene is missing a world and rp background is set to world
2020-12-31 16:29:50 +01:00
Moritz Brückner 11591c79a4 Cleanup 2020-12-30 01:06:54 +01:00
Moritz Brückner 96dfc06295 Show warnings for invalid instancing configurations 2020-12-30 00:43:46 +01:00