Commit graph

1285 commits

Author SHA1 Message Date
Rafał Mikrut
9ddb3265e1 Fix some crashes, overflows and using variables without values 2019-11-01 16:16:31 +01:00
Yuri Roubinsky
1b003f3d64 Prevents shader crash on GLES2 if unsupported built-in has been used 2019-10-31 09:21:44 +03:00
Yuri Roubinsky
76eb486413 Added check if field name in the shader is equal to builtin 2019-10-29 15:37:19 +03:00
RaphaelHunter
c4cea10402 fix occluders positions error under canvas_layer, close #32880 2019-10-29 14:51:58 +08:00
Yuri Roubinsky
ef6161532d Fix shader crash if non-boolean expression inserted into "if" 2019-10-28 08:35:33 +03:00
Hugo Locurcio
701581d1d3
Improve error messages related to shader_type
The list of allowed shader types is now displayed if any
`shader_type`-related error is emitted.

This makes it easier to remember which shader types are allowed
when creating a new shader.
2019-10-26 17:43:14 +02:00
Rémi Verschelde
5cdecb8227
Merge pull request #32845 from madmiraal/rigidbody-mode-change
Activate Body(2D)SW when switching to rigid or character mode.
2019-10-25 23:36:17 +02:00
Rafał Mikrut
d468e28874 Fix leak in Physics2DServerSW 2019-10-24 20:12:46 +02:00
Erik
8b0546d93b Implement game camera override
Implemented uniform API in Viewport class to override 2D and/or
3D camera.

Added buttons in 2D and 3D editor viewport toolbars that override
the running game camera transform with the editor viewport camera
transform. Implemented via remote debugger protocol and camera
override API.

Removed LiveEditFuncs function pointers from ScriptDebugger class.
Since the debugger got access to the SceneTree instance (if one
exists), there is no need to store the function pointers. The live
edit functions in SceneTree are used directly instead. Also removed
the static version of live edit functions in SceneTree for the same
reason. This reduced the SceneTree -> Debugger coupling too since
the function pointers don't need to be set from SceneTree anymore.

Moved script_debugger_remote.h/cpp from 'core/' to 'scene/debugger/'.
This is because the remote debugger is now using SceneTree directly
and 'core/' classes should not depend on 'scene/' classes.
2019-10-23 02:51:32 +01:00
Marcel Admiraal
13798746e7 Activate Body(2D)SW when switching to rigid or character mode. 2019-10-15 07:41:13 +02:00
Rémi Verschelde
d0628180ae
Merge pull request #32799 from clayjohn/free_pools
Properly free sky and lightmap caches in multithreaded server
2019-10-13 19:44:04 +02:00
clayjohn
62fb462165 Properly free sky and lightmap caches in multithreaded server 2019-10-13 09:31:00 -07:00
Rémi Verschelde
5d63cf1610
Merge pull request #32767 from madmiraal/body2d-can_sleep-default
Fix mismatch between RigidBody2D and Body2DSW can_sleep defaults.
2019-10-12 14:06:46 +02:00
Marcel Admiraal
42a9ae7a82 Fix mismatch between RigidBody(2D) and Body(2D)SW can_sleep defaults.
- Set Body2DSW can_sleep default to true.

- Set Body2D can_sleep default to true.
2019-10-12 12:11:11 +02:00
Saracen
dabaa11b3c Fix to make sure the capture buffers are deallocated at shutdown. Silences warnings. 2019-10-11 23:40:43 +01:00
Yuri Roubinsky
ada4bcbe30 Fix invalid autocompletion pasting of shader param name 2019-10-08 18:33:22 +03:00
Rémi Verschelde
45577e4233
Merge pull request #32571 from DavidSichma/rect_flip
Correctly flip texture src region
2019-10-08 16:15:45 +02:00
Yuri Roubinsky
76324bec8d Prevent shader crash if name of variable overrides function name 2019-10-06 20:35:41 +03:00
Yuri Roubinsky
d9087e1b44 Prevent shader crash if function call been used on constant 2019-10-06 18:20:05 +03:00
Yuri Roubinsky
5a5a062d61 Fix few redefinition name errors for variable/param/function in shaders 2019-10-06 17:27:28 +03:00
David Sichma
f73e1fae37 Correctly flip texture src region 2019-10-05 16:51:06 +02:00
Yuri Roubinsky
1472fca951 Removed unnecessary shader error log messages 2019-10-02 12:37:22 +03:00
Rémi Verschelde
dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Rémi Verschelde
4f294b958f doc: Sync classref with current source
Fix a few missing bindings or unspecified argument names and default values.
2019-09-24 11:52:06 +02:00
Rémi Verschelde
159470df08
Merge pull request #32275 from godotengine/skin_support
Added skin support and simplified APIs to override bone position + glTF 2.0 import fixes
2019-09-23 15:02:15 +02:00
qarmin
50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
Rémi Verschelde
fdc2463a1b
Merge pull request #32150 from luzpaz/typos
Fix misc. source comment typos
2019-09-20 17:09:05 +02:00
luz.paz
91ecd7b6a6 Fix misc. source comment typos
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-19 14:36:52 -04:00
Rémi Verschelde
28265fb526
Merge pull request #31202 from azagaya/light-data
Create shadow_vec for altering shadow computation
2019-09-19 20:03:04 +02:00
Juan Linietsky
d81ddaf33e Added skin support and simplified APIs to override bone position. 2019-09-18 19:46:32 -03:00
Chaosus
1333ea2a2d Implement shader array support for varyings 2019-09-14 18:23:25 +03:00
azagaya
b835868067 Create shadow_vec for altering shadow computation
In 2.1 and 3.0, light_vec could be modified for altering shadow_computations.
But it broke shadows when rotating light. shadow_vec would do the same, but without breaking
shadows in rotated lights if not used.

Add inverse light transformation to shadow vec, so it's not affected when rotating lights;

Added usage define for shadow vec.

For shadow vec working properly when rotating a light, it's needed to multiply it by light_matrix normalized. Added usage define in order to don't do that if shadow_vec not used.
2019-09-06 13:55:49 -03:00
Yuri Roubinsky
96ea1e6fb0
Merge pull request #31600 from Chaosus/shader_func_return_fix
Fix shader crash when users miss the return statement
2019-08-28 16:39:33 +03:00
Yuri Roubinski
38601dd3e9 Fix shader crash when users miss the return statement 2019-08-28 11:32:33 +03:00
follower
8499033354
Typo fix: "differt" -> "different" 2019-08-28 19:12:54 +12:00
Rémi Verschelde
f2777c04c3
Merge pull request #31596 from Chaosus/shader_switch
Implements switch flow control operator in shaders
2019-08-24 14:47:44 +02:00
Andrii Doroshenko (Xrayez)
718f09ad20 Fix uninitialized inertia value in Body2DSW 2019-08-23 20:13:57 +03:00
Yuri Roubinski
4dda253ee0 Implements switch to shaders 2019-08-23 14:43:09 +03:00
RaphaelHunter
74713fe970 Fix custom inertia in physics2d, closes#30838 2019-08-22 20:30:03 +08:00
Rémi Verschelde
6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Yuri Roubinski
a525e3c5ce Implemented do/while loops for shaders 2019-08-13 18:39:55 +03:00
Yuri Roubinski
24417f1975 Force user to initialize local shader constants 2019-08-13 12:31:25 +03:00
IAmActuallyCthulhu
82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Saracen
d8ba9f1824 Fix recording bus regression. 2019-08-12 08:10:56 +01:00
Cameron Reikes
9f7a166c35 Show that identifier found in function names 2019-08-09 21:15:33 -07:00
Michael Alexsander Silva Dias
5ca7460421 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "main" and "servers" directories 2019-08-09 11:27:39 -03:00
Rémi Verschelde
7b514d920d
Merge pull request #31099 from Chaosus/shader_local_const
Implemented local shader constants
2019-08-07 15:14:35 +02:00
Rémi Verschelde
ba541bceca
Merge pull request #31077 from qarmin/coverity_bugs
Change some code proposed by Coverity and Cppcheck
2019-08-07 13:49:33 +02:00
Rémi Verschelde
af935af38d
Merge pull request #30468 from SaracenOne/expose_audio_capture
Exposes capture methods to AudioServer + documentation
2019-08-07 13:27:25 +02:00
qarmin
e0b5b21863 Add some code changes/fixes proposed by Coverity and Clang Tidy 2019-08-07 12:54:30 +02:00
Yuri Roubinski
b24b3497d6 Implemented local shader constants 2019-08-05 10:35:53 +03:00
Rémi Verschelde
507e41e698
Merge pull request #30999 from nekomatata/fix-regression-godot-physics
Fixed regression in Godot Physics
2019-07-31 19:47:33 +02:00
PouleyKetchoupp
53ac260d19 Reverted fix that makes sense for collision_solver_2d_sat but not for the 3d version
(original commit: aab8da25ad)

Fixes #30886
2019-07-31 17:36:09 +02:00
IAmActuallyCthulhu
4e617d2ca2
Correct typo and format of comments 2019-07-30 16:43:07 -05:00
santouits
472cda9047 Remove physics thread getting the gl context 2019-07-27 22:08:10 +03:00
Michael Alexsander Silva Dias
12ae7a4c02 Update some dead links in the codebase 2019-07-23 21:06:12 -03:00
Rémi Verschelde
4c943cca2c
Merge pull request #30716 from qarmin/fixed_static_analiser_code
Fix some code found by Coverity Scan and PVS Studio
2019-07-23 15:08:44 +02:00
qarmin
aab8da25ad Fix some code found by Coverity Scan and PVS Studio 2019-07-23 09:14:31 +02:00
Rémi Verschelde
fec28da0ad
Merge pull request #30349 from qarmin/fix_arvr_crash_at_exit
Fix ARVRServer crash at exit
2019-07-20 12:41:56 +02:00
Rémi Verschelde
d15cf7b672
Merge pull request #30576 from qarmin/lgtm_coverage
Changed some code reported by LGTM and Coverity
2019-07-20 12:00:13 +02:00
qarmin
6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
Rémi Verschelde
df62bfdd49
Merge pull request #30548 from Calinou/tweak-audio-cutoff-property-hints
Tweak audio cutoff property hints to allow reasonable values only
2019-07-16 08:54:25 +02:00
Chaosus
cfcc9ee9c1 Allows to use non-constants in the local shader array initializer 2019-07-16 08:04:49 +03:00
Chaosus
9379cbc774 Added local array initializer 2019-07-16 07:13:37 +03:00
Saracen
47c558b98a Expose audio callbacks as signals. 2019-07-16 04:10:26 +01:00
Saracen
c81ec6f26d Exposes capture methods to AudioServer, variable renames for consistency,
added documentation.
2019-07-15 15:12:29 +01:00
Chaosus
c37379456f Implemented local shader arrays 2019-07-15 15:57:39 +03:00
Chaosus
e7f5640632 Added missed "textureProjLod" shader built-in overload for 3D textures 2019-07-15 09:59:11 +03:00
Hugo Locurcio
9387114ce1
Tweak audio cutoff property hints to allow reasonable values only
This also makes all cutoff property hints consistent.

This closes #29588.
2019-07-12 22:44:17 +02:00
hbina085
26c0609656 Make the default return value on crash explicit
Noticed that the error condition will return a NULL instead of something more explicit like "false".
Should make the code more readable at a glance.
2019-07-11 23:06:58 -04:00
Chaosus
a2b2da2454 Removed invalid mix shader overloads 2019-07-11 17:16:26 +03:00
Rémi Verschelde
34d7484039
Merge pull request #30455 from qarmin/const_reference
Pass by reference to const
2019-07-10 15:43:15 +02:00
qarmin
01cc7a996b Use reference to constant in functions 2019-07-10 11:54:12 +02:00
Chaosus
4083d0c784 Fix "not" shader function return type 2019-07-09 15:55:00 +03:00
Rémi Verschelde
af80182016
Merge pull request #30407 from qarmin/small_fixess
Fixes minor issues found by static analyzer
2019-07-08 08:16:50 +02:00
qarmin
9a77d748c0 Fixes minor issues found by static analyzer 2019-07-07 23:08:51 +02:00
Ibrahn Sahir
4e4697b1c4 Added release function to PoolVector::Access.
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
2019-07-06 12:04:27 +01:00
geequlim
253cd73f1d Fix code completion for shader editor 2019-07-06 12:03:17 +08:00
qarmin
a4ae7131c3 Fix ARVRServer crash at exit 2019-07-05 21:14:43 +02:00
Rémi Verschelde
916c5c1e4b
Merge pull request #30318 from bojidar-bg/28501-ysort-modulate
Ensure that nested YSort preserves intermediate modulate values
2019-07-05 09:41:11 +02:00
Bojidar Marinov
c3495ef652
Ensure that nested YSort preserves intermediate modulate values
Fixes #28501
2019-07-04 17:57:47 +03:00
Bojidar Marinov
f7dad789e9
Fix various memory leaks and errors 2019-07-02 17:23:54 +03:00
Rémi Verschelde
d40dbd6d11
Merge pull request #29951 from raphael10241024/add_physics_2d_optimize
add 2d physic optimization similar to 3d physics
2019-07-01 17:08:05 +02:00
Rémi Verschelde
6b30f284a0
Merge pull request #29980 from Dentrax/directed-by-qarmin
Fix some editor crashes
2019-07-01 14:59:29 +02:00
Rémi Verschelde
380bf04566
Merge pull request #29413 from YeldhamDev/global_rate_scale
Add 'global_rate_scale' to the AudioServer
2019-07-01 13:53:04 +02:00
Furkan Türkal
7d8d337b2c fix some crashes 2019-07-01 14:28:29 +03:00
Rémi Verschelde
538c8eec15
Merge pull request #30117 from santouits/mt-pools
Free server id pools directly on closing
2019-06-27 15:15:15 +02:00
santouits
7aa4622222 Free server id pools directly.
When closing the game, we flush the command queue but after we are pushing the freeing calls of the id pool to the
command queue and they are never being run. Now we free them directly.
2019-06-27 03:25:36 +03:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
yakun.zhang
434fd71d2a add 2d physic optimization simlilar to 3d physics 2019-06-21 19:33:01 +08:00
Rémi Verschelde
5c66771e3e
Merge pull request #29283 from qarmin/fix_some_always_same_values
Remove always true/false values
2019-06-20 21:10:10 +02:00
qarmin
072e40368e Fix always true/false values 2019-06-20 16:59:48 +02:00
Rémi Verschelde
cf76b713cb
Merge pull request #24487 from Meirinha/master
Added UV and UV2 to shader function light() built-in, fixes issue #24120
2019-06-20 12:46:54 +02:00
Rémi Verschelde
5a29be31b3
Merge pull request #27188 from samH-FIT/MacroUpdate
Made use of semicolons after GDCLASS more consistent, added semicolons where I found them missing.
2019-06-19 22:59:49 +02:00
Rémi Verschelde
922a4f5413
Merge pull request #29901 from BastiaanOlij/fix_cameraserver_const
Made constants fully upper case in camera server
2019-06-19 20:20:47 +02:00
Michael Alexsander Silva Dias
1c2ba35074 Add 'global_rate_scale' to the AudioServer
Closes #28953.
2019-06-19 11:36:46 -03:00
JohnJLight
38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Rémi Verschelde
30cbe28677
Merge pull request #27310 from KoBeWi/angular_dank
Make angular_damp of new Area nodes match the global default
2019-06-19 15:00:44 +02:00
Bastiaan Olij
4ebedb5f11 Made constants fully upper case in camera server 2019-06-19 22:24:54 +10:00