Commit graph

28637 commits

Author SHA1 Message Date
Rémi Verschelde 8c63b65b67
Merge pull request #44489 from ForestKatsch/3.2
Fix PanoramaSky artifacts on Android/GLES2
2020-12-20 19:31:17 +01:00
Forest Katsch 8825aa8b5b Fixes #43667.
The root cause of the issue is that OpenGL ES 2 does not support the `textureCubeLod` function.
There are (optional) extensions to support this, but they don't appear to be exposed with the ES2 renderer (even though the hardware needed to support LOD features are certainly available.)
The existing shim in `drivers/gles2/shaders/cubemap_filter.glsl` just creates a macro:

```
 #define textureCubeLod(img, coord, lod) textureCube(img, coord)
```

But the third parameter of `textureCube` is actually a mip bias, not an absolute mip level.
(And it doesn't seem to work regardless.)
In this specific case, the `cubemap_filter` should only sample from the first level of the "source" panorama cubemap.
In lieu of a method to force a lod level of zero, I've chosen to comment out the switchover from a 2D equirectangular panorama to the cubemap version of the same image, therefore always sampling roughness values from the 2D equirectangular panorama.
This may cause additional artifacts or issues across the seam, but at least it prevents the glaringly obvious black areas.

---

This same issue (no fragment texture LOD support) has rather large repercussions elsewhere too; it means materials with larger cubemap density (i.e. planar or distant objects) will be far rougher than expected.
Since GLES 3 appears to properly support fragment `texture*Lod` functions, switching to the GLES 3 backend would solve this problem.

---

Root cause discovered with help from @KaadmY.
2020-12-20 10:32:30 -06:00
Rémi Verschelde a4d25a115e
Merge pull request #44460 from theogen-ratkin/3.2
[3.2] Add interpolation parameter to resize_to_po2()
2020-12-19 09:36:01 +01:00
Rémi Verschelde 344a02834b
Merge pull request #43899 from madmiraal/fix-43852-3.2
[3.2] Remove any constraints connected to a Bullet body when removing it
2020-12-19 09:31:04 +01:00
Theogen Ratkin 8f6a6ac8d0 Add interpolation parameter to resize_to_po2()
Image::resize_to_po2() now takes an optional p_interpolation parameter
that it passes directly to resize() with default value INTERPOLATE_BILINEAR.

GLES2: call resize_to_po2() with interpolate argument

Call resize_to_po2() in GLES2 rasterizer storage with either
INTERPOLATE_BILINEAR or INTERPOLATE_NEAREST depending on TEXTURE_FLAG_FILTER.

This avoids filtering issues with non power of two pixel art textures.
See #44379
2020-12-18 14:02:38 -04:00
Rémi Verschelde 68013d2393
Merge pull request #44470 from pycbouh/graph-minimap-3.2
[3.2] Add a minimap to the GraphEdit
2020-12-17 23:43:00 +01:00
Yuri Sizov 816fef21f9 Add a minimap to the GraphEdit 2020-12-18 01:31:17 +03:00
Rémi Verschelde 65c1db3131
Merge pull request #44305 from RevoluPowered/fbx-update-plugin
[fbx] Implement ColorIndex for Vertex Colors to ensure they are correct and duplicate vertexes correctly for multiple color attributes.
2020-12-17 21:19:59 +01:00
dedm0zaj 96e2887945 Lightness of dynamic objects from Energy Lightmap Capture Data 2020-12-17 22:02:08 +07:00
Rémi Verschelde 3f47cdc5c6
Merge pull request #44453 from RandomShaper/fix_crash_parsing_ref_3.2
Fix crash parsing a serialized Reference (3.2)
2020-12-17 13:15:15 +01:00
Pedro J. Estébanez 4dafa5b21e Fix crash parsing a serialized Reference 2020-12-17 12:24:55 +01:00
Rémi Verschelde 80c9f2d975
Merge pull request #44373 from neikeq/3.2-mono-wasm-m2n-hook
[3.2] Mono: Make Godot provide its own WASM m2n trampolines
2020-12-17 09:58:50 +01:00
Rémi Verschelde 9710a38637
Merge pull request #44435 from Calinou/fix-max-renderable-elements-hint
Fix invalid property hint for `max_renderable_elements` project setting
2020-12-16 21:59:29 +01:00
Hugo Locurcio 680312b95a
Fix invalid property hint for max_renderable_elements project setting
This closes #36240.
2020-12-16 19:33:15 +01:00
Rémi Verschelde 6e8146281e
Merge pull request #44428 from akien-mga/3.2-revert-43948
Revert "Don't open editor window when using --export, --doctool, or --gdnative-generate-json-api"
2020-12-16 15:31:30 +01:00
Rémi Verschelde afbca1216e
Revert "Don't open editor window when using --export, --doctool, or --gdnative-generate-json-api"
This reverts commit 27393de36e.

Fixes #44403.
2020-12-16 15:02:10 +01:00
Rémi Verschelde 5d49894270
Merge pull request #44418 from skyace65/TypeHint3
[3.2] Document what can be used as a type hint
2020-12-16 14:18:05 +01:00
Rémi Verschelde 574ca8a8cd
Merge pull request #43560 from naithar/fix/ios-keyboard
[3.2] [iOS] Keyboard input changes
2020-12-16 05:43:23 +01:00
skyace65 04926adb8a [3.2] Document what can be used as a type hint 2020-12-15 22:34:25 -05:00
Sergey Minakov f1fd0440f3 GUI: use cursor in TextEdit for non selected text. 2020-12-16 05:33:10 +03:00
Sergey Minakov 8b6357cf28 iOS: fix keyboard display 2020-12-16 05:05:38 +03:00
Sergey Minakov 4c3b84b3d7 GUI: send cursor data from TextEdit 2020-12-16 05:05:38 +03:00
Rémi Verschelde c01ccab885
Merge pull request #44392 from madmiraal/fix-42285-3.2
[3.2] Remove Generic6DOFJoint precision property
2020-12-15 19:07:27 +01:00
Rémi Verschelde 6956b01cb5
Merge pull request #44371 from RevoluPowered/fix-parser-crash-mesh-geometry
[fbx] fix crash in FBX parser caused by mesh geometry
2020-12-15 13:04:08 +01:00
Marcel Admiraal 825ad65fc4 Remove Generic6DOFJoint precision property 2020-12-15 10:15:42 +00:00
Rémi Verschelde 40333a02de
Merge pull request #44385 from Calinou/doc-call-group-arg-limit
Document the argument count limit in `SceneTree.call_group()`
2020-12-15 08:47:42 +01:00
Hugo Locurcio 9c234abdc9
Document the argument count limit in SceneTree.call_group()
This limitation should be lifted in 4.0 thanks to the new method
binding system, but it's still present in 3.2.x.
2020-12-15 00:53:40 +01:00
Gordon MacPherson 18d1898309 [fbx] Fix #44371 #44376 File crash and Buffer Overflow
Fixes:
- Element collection will only contain valid elements.
- Fixes buffer overflow in the FBX document
2020-12-14 21:57:41 +00:00
Ignacio Etcheverry 1a5e985ed4 [3.2] Mono: Make Godot provide its own WASM m2n trampolines
This depends on a custom Mono patch from this commit:
godotengine/godot-mono-builds@0e312939bd
2020-12-14 19:46:41 +01:00
Gordon MacPherson 8ffad0d8bd ColorIndex supported now for vertex colors.
Other properties should index override where appropriate in future.
2020-12-14 16:51:15 +00:00
Rémi Verschelde ee903becc8
Merge pull request #44302 from akien-mga/🤦
Don't force GLES2 in Project Manager, causes issues on macOS.
2020-12-14 15:12:15 +01:00
Ignacio Etcheverry 2c89152b33 Mono: Don't use -rdynamic when compiling for WASM
`-rdynamic` was causing the emsdk linker to silently fail to
generate the output `.wasm` file (even though exit code was 0).
2020-12-13 21:46:38 +01:00
lawnjelly 2d6cb3e208 Batching - Protection against zero and small sized ninepatches
Although the minimum size of ninepatches is set to the sum of the margins in normal use (through gdscript etc) it turns out that it is possible to programmatically create ninepatches that are small than this minimum - in particular zero size is used in sliders to not draw items.

This PR deals with zero sized ninepatches by not drawing anything, and has some basic protection for ninepatches smaller than the margins. Whether these occur in the wild is not clear but is put in for completeness.
2020-12-13 10:17:50 +00:00
Rémi Verschelde fd6b3060c1
Merge pull request #44316 from madmiraal/fix-handles-baseexception-3.2
[3.2] Don't handle BaseException in build scripts
2020-12-12 12:44:17 +01:00
Marcel Admiraal e21adf2bc6 Don't handle BaseException in build scripts 2020-12-12 10:10:23 +00:00
David Hoppenbrouwers 708336531c
Fix Variant conversion to float instead of double
Closes #44303
2020-12-11 23:19:30 +01:00
Rémi Verschelde 36662f3b4d
Don't force GLES2 in Project Manager, causes issues on macOS.
This partially reverts #44041.

Also fix the bogus label about lack of GLES3 support being always shown...
It was meant to be behind a check but I had left it out while testing, and
forgot to put it back.
2020-12-11 22:32:41 +01:00
Rémi Verschelde 2a4f0bc4d9
Merge pull request #44280 from Calinou/doc-particle-amount-reset
Document that changing the particle amount resets emission
2020-12-11 15:54:26 +01:00
Hugo Locurcio f2b04e8865
Document that changing the particle amount resets emission
See #16352.
2020-12-11 15:38:55 +01:00
Rémi Verschelde 00d9ffe012
Merge pull request #44293 from lawnjelly/normal_compression
Fix bug in normal map decompression
2020-12-11 13:38:00 +01:00
lawnjelly e13040b373 Fix bug in normal map decompression
Not clamping the range here leads to dithering artifacts.
2020-12-11 10:34:53 +00:00
Rémi Verschelde b5e8b48bb7
Merge pull request #43921 from RevoluPowered/fbx-update-plugin
[FBX] general purpose fixes 🎄
2020-12-10 20:56:03 +01:00
Gordon MacPherson de61cfe7c5 [fbx] bugfixes skinning, materials and debugging info, merry xmas 🎄
Better materials:
- default values will no longer trigger things like emission,
clear coat being enabled etc incorrectly, mostly importers misunderstand
this value, a value of 1 is not actually enabled emission, it must have a
non zero setting other than emission value for the emission flags to
actually be enabled correctly in our engine #42386
- lambert materials are warned against significantly,
do not use Lambert in Godot, use a PBR material like Ai Standard Surface
 (it's like going from low quality to high definition in terms of output
 in scenes and on assets)
- roughness values are calculated correctly in this version

Fixes for normal's array - some normal's from some files were dropped and
generated, this is now fixed.
- FBX indexing for items with (-1) index, for normal data is supported,
this is super helpful at increasing our range of compatibility of
FBX meshes.

Fix bone rest data **no longer requiring go to bind pose in Maya and various applications**
- Partial fix for #43688

Validation tools added for validating large projects

Provide package name, vendor and FBX vendor in the log.

Implemented metadata properties so we can read extra document
info required for bug reporting

**FBX 2011 (version 7200)** is unsupported now,
you must re-export your file in Maya or Max to upgrade the file format.

Fixes skin bind poses being generated based on node xforms in the scene
Fixes duplicate bones being added to skin and prevents add_bones from
registering skeleton bones it now registers skin bind poses,
but this should really be documented in the engine correctly right now
 it doesn't tell you this is the case.
2020-12-10 19:30:17 +00:00
Rémi Verschelde 8bd5fa9556
HTML5: Code style cleanup for export code
(cherry picked from commit 8020515717)
2020-12-10 17:57:13 +01:00
Rémi Verschelde 31cd9e560c
Mono: Fix GodotTools build after invalid cherry-pick
I wrongly resolved the cherry-pick conflict in c5acdfb5f5.
2020-12-10 17:54:37 +01:00
Rémi Verschelde 5357e6a974
Merge pull request #44268 from akien-mga/3.2-cherrypicks
Cherry-picks for the 3.2 branch (future 3.2.4) - 13th batch
2020-12-10 14:49:08 +01:00
Rémi Verschelde 0c7a9bd283
doc: Sync classref with current source
And fix broken doctool after #43948.
2020-12-10 14:22:31 +01:00
Rémi Verschelde 3e20a98503
i18n: Sync translations with Weblate 2020-12-10 14:12:35 +01:00
Michael Alexsander 4fe554933c
Allow to circle back in 'PopupMenu' even if the first/last item is non-selectable
(cherry picked from commit bb39088201)
2020-12-10 14:02:06 +01:00
Rémi Verschelde c509ba9ff7
FileSystemDock: List conflicting files on move
Fixes #24167.

(cherry picked from commit 7dc41ff310)
2020-12-10 13:14:30 +01:00