Commit graph

2552 commits

Author SHA1 Message Date
Rémi Verschelde
d0b446c6d5
Merge pull request #45372 from Firepal/prepass-nightmares 2022-02-11 15:19:26 +01:00
Firepal
ff55157d3f Don't use prepass threshold with alpha scissor 2022-02-11 12:01:15 +01:00
Rémi Verschelde
7a16bb2ee4
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.

(cherry picked from commit 1bdb82c64e)
2022-02-11 09:50:59 +01:00
lawnjelly
b15ad8e786 Fix for S3TC on Android and IOS devices
On some platforms, exporters are prevented from exporting S3TC textures. This causes problems if the .import file contains a reference to such a texture - the exported project will attempt to load the S3TC, fail, and probably crash.

This PR prevents this problem by faking lack of hardware support for S3TC on the affected platforms. This prevents the engine attempting to load the S3TC and avoids the problem.
2022-02-09 08:45:24 +00:00
Omar El Sheikh
bf5b2f48e6 Re-fix Disabling Half Floats on iOS
A previous change missed setting a flag that specified whether half
floats were being used on vertex positions when in the GLES2 driver

This caused errors with the vertex buffer when platforms (specifically
iOS) which do not properly support half float vertex attributes on
GLES2, try to remapt the vertex buffer to stop using half floats
(in this case that remapping never happened and caused artifacts)

Re-enable setting that flag to fix rendering issues on these platforms
2022-02-05 21:06:09 -05:00
lawnjelly
a0c6d16c90 Add editor vital redraws only option
When editor continuous redraws is switched off, the editor only redraws when a redraw_request was issued by an element in the scene. This works well in most situations, but when scenes have dynamic content they will continuously issue redraw_requests.

This can be fine on high power desktops but can be an annoyance on lower power machines.

This PR splits redraw requests into high and low priority requests, defaulting to high priority. Requests due to e.g. shaders using TIME are assigned low priority.

An extra editor setting is used to record the user preference and an extra option is added to the editor spinner menu, to allow the user to select between 3 modes:

* Continuous
* Update all changes
* Update vital changes
2022-02-02 11:26:45 +00:00
Fabio Alessandrelli
aa3ef20fcb
[Net] Simplify IP resolution code, fix caching.
First, we should not insert into cache if the hostname resolution has
failed (as it might be a temporary internet issue), second, the async
resolver should also properly insert into cache.

Took the chance to remove some duplicate code with critical section in
it at the cost of little performance when calling the blocking
resolve_hostname function.

(cherry picked from commit 49297d937c)
2022-01-31 22:54:25 +01:00
Rémi Verschelde
aa6465cd5b
Fix style error from previous merge 2022-01-22 16:23:28 +01:00
Rémi Verschelde
6c0c0c4b29
Merge pull request #54165 from Calinou/directional-shadow-runtime-change-3.x
Allow changing directional shadow size at run-time
2022-01-22 15:25:09 +01:00
Rémi Verschelde
11a3fabc92
Merge pull request #56843 from Calinou/ssr-fix-background-line
Fix visible background line in intersections in screen-space reflections (3.x)
2022-01-18 07:56:46 +01:00
Rémi Verschelde
1ee44b2366
ImageLoader: Remove references to unsupported svgz extension
I don't see any reference to gzip/svgz supported in the nanosvg library,
and the handful of test gzip compressed svgz files I tried failed loading.

Also cleaning a couple missing includes in platform export code.
2022-01-17 10:52:32 +01:00
Hugo Locurcio
a80187f5bc
Fix visible background line in intersections in screen-space reflections
Adjusting the step grading by one resolves the issue without affecting
performance or introducing adverse artifacts.
2022-01-16 18:00:13 +01:00
Rémi Verschelde
22166639ed
Merge pull request #56366 from Calinou/async-shaders-use-in-editor
Use asynchronous shader compilation and cache in the editor if requested
2022-01-16 10:34:07 +01:00
Rémi Verschelde
31c7f13ea4
Merge pull request #56802 from jnlopar/oren_nayer_vert_lighting_bug
Fixes broken scene shader compile due to undefined 'diffuse_color' variable with Oren Nayar + Vertex Lighting
2022-01-15 09:19:43 +01:00
Jason Neufeld
36c3b87883 Fixes shader compile due to undefined 'diffuse_color' variable with Oren Nayer + Vertex Lighting 2022-01-14 13:09:30 -08:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Rémi Verschelde
8a192cd0ab
Merge pull request #55987 from bruvzg/wt🤎3 2022-01-10 16:43:56 +01:00
Rémi Verschelde
b197de6f5f
Fix typos with codespell
Using codespell 2.1.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2022-01-07 00:14:54 +01:00
bruvzg
6f81a8ee2c
Fix multiple missing UTF-8 decoding.
(cherry picked from commit c69e0d16bc)
2022-01-06 21:44:40 +01:00
Rémi Verschelde
25369acff9
Merge pull request #51708 from Calinou/viewport-add-32bpc-color-depth 2022-01-04 14:30:24 +01:00
Rémi Verschelde
cc6e0e7fb3
Merge pull request #56161 from The-O-King/blend_shapes_octahedral 2022-01-04 14:09:49 +01:00
Brian Semrau
2c60c29340 Fix GPU particles transform feedback for WebGL 2 2022-01-03 00:20:42 -05:00
Hugo Locurcio
ae918c3041
Use asynchronous shader compilation and cache in the editor if requested
This provides more consistent behavior between the editor and running
project.
2021-12-31 02:20:29 +01:00
Omar El Sheikh
50ed674ec2 Fix Blend Shapes when Octahedral Compression is Used
Blend shapes did not take into account octahedral compressed vertex
attribute layouts and this resulted in incorrect lighting on the
resulting blended mesh

Now make the blend_shapes shader octahedral compression aware!
2021-12-22 10:00:12 -05:00
Bastiaan Olij
5fbc24f3e0 Fix issue with external textures being freed by Godot 2021-12-22 11:46:37 +11:00
Haoyu Qiu
e40bb68c05
Add / to the unix shortcut drive list
Also made `get_current_drive()` to pick the longest match on Unix.

(cherry picked from commit 67f04b381b)
2021-12-21 12:11:14 +01:00
Lucas Ângelo
9f68b4fea3
Trunc shader function fixed
the 'trunc' function was comparing integers with floats using the '>' operator, which is not supported in Android. This issue is now gone.
2021-12-18 17:50:58 -03:00
bruvzg
59085d5051
[Windows] Improve console handling and execute.
Always build with the GUI subsystem.
Redirect stdout and stderr output to the parent process console.
Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with non-blocking calls).
Add `open_console` argument to the `execute` to open a new console window (for both blocking and non-blocking calls).
Remove `interface/editor/hide_console_window` editor setting.
Remove `Toggle System Console` menu option.
Remove `set_console_visible` and `is_console_visible` functions.
2021-12-18 10:13:27 +02:00
Haoyu Qiu
e614a0e9fc Fix incompatible addition in auto exposure shader 2021-12-16 16:06:31 +08:00
Hugo Locurcio
21bc241a34
Only print OpenGL 2D batching status when in verbose mode
Since the new asynchronous shader compilation message prints to a
separate line (as it can be quite long), this frees up space in the
editor Output panel.
2021-12-10 22:53:52 +01:00
lawnjelly
7134ef90bb Fix leaking environment RIDs in GLES2
This PR adds the code necessary to correctly free environments in GLES2, which was previously missing causing them to leak.
2021-12-07 18:42:10 +00:00
Rémi Verschelde
ee1877e63e
Revert "Fix particles emitting at old location" 2021-12-07 10:52:39 +01:00
Rémi Verschelde
71d8ccbe9e
Merge pull request #55676 from RandomShaper/fix_layered_lightmap_3.x
[3.x] Fix atlassed lightmaps not visible on GL ES 3
2021-12-06 21:44:27 +01:00
Pedro J. Estébanez
c026c86255 Fix atlassed lightmaps not visible on GL ES 3 2021-12-06 19:06:59 +01:00
lawnjelly
6f4c0b95fc Fix incorrect RID cleanup in Rasterizers
Proper cleanup for GLES3 RIDs (preventing leak reports), and added missing destructor for RasterizerSceneGLES2.
2021-12-06 16:05:27 +00:00
lawnjelly
3d981b8265 Add option to use handles to RID
Adds an option to compile an alternative implementation for RIDs, which allows checks for erroneous usage patterns as well as providing leak tests.
2021-12-06 14:43:34 +00:00
Hugo Locurcio
4d4e972041
Only print message for get_modified_time() failure when in verbose mode
This error message was often displayed for no good reason when PCK
files were loaded in the editor.

Since file modification dates are secondary metadata, it's not
very important if it can't be retrieved successfully anyway.

(cherry picked from commit 5acb8a253e)
2021-12-02 17:28:57 +01:00
Fabio Alessandrelli
bbfe054175 [HTML5] Use compatibility function for glGetBufferSubData.
The "webgl/webgl2.h" include provides that function, but it's not
available in emscripten versions < 2.0.17 .

Since we need to support emscripten 1.39.9 (mono builds), this commit
adds a JS function in library_godot_display.js as a compatibility layer
for it, and implement glGetBufferSubData by funneling the call to that
function (so we don't have name collisions JS-side with recent emcc).

All those hacks are now moved to the platform directory instead of being
ifdefs inside the drivers implementations.
2021-11-26 15:58:04 +01:00
Hugo Locurcio
d7d35e4f73
Add const qualifier support for function arguments in shaders
This prevents the function argument from being reassigned within
the function.

Example:

    void test(const int t) {}
2021-11-19 21:20:23 +01:00
kobewi
a58736f129
Fix data directory of unnamed projects
(cherry picked from commit f6d16d55c6)
2021-11-18 13:47:52 +01:00
Rémi Verschelde
caf39c9e7d
Merge pull request #54160 from Calinou/shadow-filter-use-early-bailing 2021-11-16 14:11:38 +01:00
Rémi Verschelde
4103b0b7d8
Merge pull request #50823 from fbcosentino/3d-material-overlay 2021-11-16 08:21:18 +01:00
Fernando Cosentino
cc8846bef6 Added material_overlay property to MeshInstance
Applying overlay materials into multi-surface meshes currently
requires adding a next pass material to all the surfaces, which
might be cumbersome when the material is to be applied to a range
of different geometries. This also makes it not trivial to use
AnimationPlayer to control the material in case of visual effects.
The material_override property is not an option as it works
replacing the active material for the surfaces, not adding a new pass.

This commit adds the material_overlay property to GeometryInstance
(and therefore MeshInstance), having the same reach as
material_override (that is, all surfaces) but adding a new material
pass on top of the active materials, instead of replacing them.

Implemented in rasterizer of both GLES2 and GLES3.
2021-11-15 23:50:34 +00:00
Rémi Verschelde
908bd5bc41
Merge pull request #54733 from robfram/particles-emit-old-location 2021-11-15 23:16:32 +01:00
Nathan Franke
8cff76ffc7
Use application name for pulseaudio device
(cherry picked from commit 72d8aac3a1)
2021-11-15 17:22:47 +01:00
Hugo Locurcio
9853108a4f
Print the number of PulseAudio input channels when in verbose mode
This is useful information to have for troubleshooting, and it's
said to sidestep a possible race condition issue that breaks
microphone recording on Linux.

(cherry picked from commit de912a8bd9)
2021-11-15 16:10:00 +01:00
Ibrahn Sahir
509f3c75a2
AudioDriverPulseAudio: move Vector Cow access outside tight loop.
Replaced some in-loop uses of Vector.write with an out of loop ptrw,
to avoid a lot of superfluous reads on the CowData ref count.

(cherry picked from commit 47496a55bc)
2021-11-15 16:09:59 +01:00
Fabio Alessandrelli
340ecb93be [HTML5] Call glGetBufferSubData directly from C++.
Remove leftover EM_ASM causing problems with gdnative builds.
2021-11-14 15:54:05 +01:00
robfram
91b7c80d28 Fix particles emitting at old location 2021-11-09 17:18:14 +01:00
Rémi Verschelde
1f8497d281
Merge pull request #53411 from RandomShaper/ubershaders_3.x 2021-11-09 13:12:44 +01:00