Valentin Zagura
100d05cbec
GLES3 Fixes for ninepatch margins when patch size is smaller than the patch texture resolution
...
Scaled ninepatch margins in screen space to be relative of the ninepatch size when the patch size is smaller than the patch texture resolution.
2019-10-07 13:19:27 +01:00
Fabio Alessandrelli
ad9a5ee6f1
Disable file descriptor sharing with subprocs.
...
On Unix systems, file descriptors are usually shared among child
processes.
This means, that if we spawn a subprocess (or we fork) like we do in
the editor any open file descriptor will leak to the new process.
This PR sets the close-on-exec flag when opening a file, which causes
the file descriptor to not be shared with the child process.
2019-10-07 11:57:44 +02:00
Fabio Alessandrelli
9c91b2051a
Disable socket descriptor sharing with subprocs.
...
On Unix systems, sockets are like file descriptors, and file descriptors
are usually shared among child processes.
This means, that if we spawn a subprocess (or we fork) like we do in the
editor, open file descriptors will leak to the new process.
This causes issue with sockets as they might remain open and bound
(listening) when the original process closes.
2019-10-07 11:53:01 +02:00
Rémi Verschelde
234289de2b
Merge pull request #32613 from clayjohn/GLES2-canvas-bg-mode
...
Add canvas background mode to GLES2
2019-10-07 08:57:44 +02:00
clayjohn
77939c6e2e
add canvas background mode to GLES2
2019-10-06 23:26:11 -07:00
clayjohn
cea1f13176
fix current issues with post-processing
2019-10-06 12:07:31 -07:00
Rémi Verschelde
0deccd4a65
Merge pull request #32510 from clayjohn/GLES2-fix-black-editor-and-crash
...
Remove glViewport call as it wasnt needed and caused crash GLES2
2019-10-03 08:16:19 +02:00
Rémi Verschelde
ce336e7e72
Merge pull request #32505 from clayjohn/GLES2-fix-probe-crash
...
Fix reflection probe crash in GLES2 with post-processing
2019-10-03 07:55:08 +02:00
clayjohn
a152816c52
remove glViewport call as it wasnt needed and caused crash
2019-10-02 20:21:41 -07:00
clayjohn
07fd9719bf
Fix reflection probe crash in GLES2 with post-processing
2019-10-02 14:35:10 -07:00
Rémi Verschelde
642a258d54
Merge pull request #32492 from akien-mga/fix-ip-uwp
...
IP: Fix build error on UWP
2019-10-02 21:03:59 +02:00
Rémi Verschelde
3f32ac11cc
IP: Fix build error on UWP
...
Fixes this error:
```
drivers\unix\ip_unix.cpp(155): error C2593: 'operator =' is ambiguous
.\core/ustring.h(177): note: could be 'void String::operator =(const CharType *)'
.\core/ustring.h(176): note: or 'void String::operator =(const char *)'
drivers\unix\ip_unix.cpp(155): note: while trying to match the argument list '(String, int)'
```
2019-10-02 13:38:02 +02:00
Yuri Roubinsky
1472fca951
Removed unnecessary shader error log messages
2019-10-02 12:37:22 +03:00
clayjohn
afaa68628a
updated defaults and documentation for GLES2 glow
2019-10-01 07:55:04 -07:00
Kanabenki
add91724e6
Fix casting to uint64_t when returning unix system time
2019-10-01 11:44:26 +02:00
Jairo
fe068b61ad
Optional Unix Socket disable for devices that do not support it
2019-09-30 21:15:50 -03:00
clayjohn
82f63633d1
Implement DOF blur, Glow, and BCS in GLES2
2019-09-30 08:04:31 -07:00
Ruslan Mullayanov
b4c927b514
Added an exit code to the blocking mode of OS::execute
...
Updated documentation accordingly.
Fixes #31881 .
2019-09-26 08:12:07 +02: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
823c3def72
Fix copyright headers and style issues
2019-09-24 11:52:06 +02:00
Rémi Verschelde
f1146c261d
Merge pull request #31751 from clayjohn/GLES3-Viewport-crash-canvas
...
Throw error when canvas background is used without sample buffer
2019-09-23 15:35:31 +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
Rémi Verschelde
393a0152ea
Merge pull request #32055 from qarmin/some_code_fixes
...
Changed some code found by Clang Tidy and Coverity
2019-09-23 10:00:31 +02:00
Rémi Verschelde
7174677fc8
Merge pull request #32259 from NeoSpark314/fix_stereo_cubemap_gles2
...
fix gles2 broken panorama sky on oculus quest
2019-09-22 21:18:06 +02:00
Holger Dammertz
94b0240767
fix gles2 broken panorama sky on oculus quest
...
This fixes an issue that was fixed for gles3 in #31419 but not applied
to gles2. The fix consists of using a constant scale for cube_normal of -1.0
instead of -1000000. It results in broken panorama rendering on the
oculus quest (see https://github.com/GodotVR/godot_oculus_mobile/issues/29 )
2019-09-22 18:53:38 +02:00
qarmin
50be65bf43
Changed some code found by Clang Tidy and Coverity
2019-09-22 18:45:08 +02:00
lawnjelly
f5365aa0e1
Fix GLES2 skinning where VERTEX_TEXTURE not supported
...
Although the backup USE_SKELETON_SOFTWARE skinning path is currently used when float texture is not supported, the default skinning path still fails when float texture is supported but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0, i.e. the device cannot read from texture during vertex shader. This PR adds the logic to activate the SKELETON_SOFTWARE path if either of these cases occur, preventing crashes on devices which have this combination of features.
2019-09-22 15:38:20 +01:00
Rémi Verschelde
e23cb2c715
Merge pull request #32004 from raphael10241024/fix_shader_uniform
...
Fix gles3 shader uniform vec3 error
2019-09-19 20:09:04 +02: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
Valentin Zagura
6ee84f53a9
GLES2 Fixes for ninepatch margins when patch size is smaller than the patch texture resolution..
...
Scaled ninepatch margins in screen space to be relative of the ninepatch size when the patch size is smaller than the patch texture resolution.
2019-09-17 09:51:54 +01:00
clayjohn
e65d2184b9
throw error when user tries to use Canvas background without sample buffer
2019-09-15 21:07:07 -07: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
RaphaelHunter
b8bb5e90ea
fix gles3 shader uniform vec3 error, close #30930
2019-09-06 14:06:20 +08:00
Rémi Verschelde
2beea262be
Merge pull request #31571 from NeoSpark314/tonemapping_none_option
...
Don't clamp color to [0, 1] in Linear tonemapping
2019-09-02 18:41:53 +02:00
Andrii Doroshenko (Xrayez)
cd99157e2e
Provide error messages when PNG save fails
2019-09-01 14:16:17 +03:00
Holger Dammertz
aa3ef8893b
Removed clamping of the Linear tonemapping when KEEP_3D_LINEAR
...
Changed the behaviour of the Linear tonemapping operator to not clamp to [0, 1] range
in the case when KEEP_3D_LINEAR is defined. This allows to render values > 1.0 in
floating point texture targets (via Viewport) for further processing or saving high
dynamic range data into files. This only works when no color conversion is active.
2019-08-29 18:14:19 +02:00
Rémi Verschelde
ebbf63a87c
Merge pull request #31746 from clayjohn/skip-vertex-transform-gles2
...
Fix skip_vertex_transform bug in GLES2 CPUParticles
2019-08-29 08:37:12 +02:00
clayjohn
97f66900bb
Fix skip_vertex_transform bug in GLES2 CPUParticles
2019-08-28 11:57:33 -07:00
Rémi Verschelde
816ddd7817
Merge pull request #31556 from Chaosus/gles2_inverse
...
Implemented inverse shader function to GLES2
2019-08-26 13:52:03 +02:00
Yuri Roubinski
982becfa39
Fix hint range step for integer in shaders
2019-08-25 15:11:04 +03:00
Yuri Roubinski
4dda253ee0
Implements switch to shaders
2019-08-23 14:43:09 +03:00
Yuri Roubinski
4dcee2035a
Implemented inverse shader function to GLES2
2019-08-22 08:22:49 +03:00
Rémi Verschelde
e797ae4704
FileAccessWindows: Add errno include for MinGW
...
Apparently MSVC is happy with ENOENT without it, but MinGW seems to
require it.
Follow-up to #31499 .
2019-08-21 10:52:57 +02:00
Rémi Verschelde
7b37321ae3
Merge pull request #31499 from nekomatata/fix-new-project-metadata
...
Setting project metadata doesn't fail when project_metadata.cfg doesn't exist
2019-08-21 08:54:32 +02:00
PouleyKetchoupp
b49226e085
Support for file not found in ConfigFile::Load and handle a few specific cases
...
EditorSettings::set_project_metadata: creates project_metadata.cfg if it doesn't exist
EditorPlugin::get_config: removed (not used)
Fixes #31444
2019-08-21 08:32:55 +02:00
Rémi Verschelde
f21371d7f4
Merge pull request #31419 from NeoSpark314/fix_oculusquest_panorama
...
changed the constant scale of cube_normal to -1.0 instead of -1000000…
2019-08-20 13:39:26 +02:00
Rémi Verschelde
cce148b024
Merge pull request #31473 from Chaosus/shader_bug
...
Fix ternary operator shader compiler expression
2019-08-19 10:15:22 +02:00
Yuri Roubinski
9abf5578ee
Fix ternary operator shader compiler expression
2019-08-19 08:40:54 +03:00
clayjohn
99de3906ba
check if skeleton texture is already allocated before reallocating
2019-08-18 22:02:57 -07:00
Holger Dammertz
8fb80788df
changed the constant scale of cube_normal to -1.0 instead of -1000000.0; this fixes a rendering issue on oculus quest and does not change the computation as the vector is normalized afterwards.
...
Adapted the comment above the code to reflect the change made as it already mentioned that z could be set to 1.
2019-08-17 14:01:55 +02:00
Rémi Verschelde
d3153c28f0
Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'
...
The last remaining ERR_EXPLAIN call is in FreeType code and makes sense as is
(conditionally defines the error message).
There are a few ERR_EXPLAINC calls for C-strings where String is not included
which can stay as is to avoid adding additional _MSGC macros just for that.
Part of #31244 .
2019-08-17 13:31:22 +02:00
Braden Bodily
71d71d55b5
Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
...
Condensed some if and ERR statements. Added dots to end of error messages
Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?),
core/os/memory.cpp,
drivers/png/png_driver_common.cpp,
drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-08-17 12:33:15 +02:00
Rémi Verschelde
afecc0bc22
Merge pull request #31309 from raphael10241024/fix_dof
...
DOF can effect transparent objects now,
2019-08-16 23:20:22 +02: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
IAmActuallyCthulhu
82b9557803
Remove redundant author doc comments
2019-08-12 04:26:38 -05:00
RaphaelHunter
5ff4b13271
DOF can effect transparent objects now, close #28240
2019-08-12 15:49:02 +08:00
Rémi Verschelde
0e823cffbc
Merge pull request #31270 from nekomatata/fix-vertex-color-init-gles3
...
Fixed vertex color initialization with default value in GLES3
2019-08-12 09:28:40 +02:00
Rémi Verschelde
ef91119502
Merge pull request #31271 from raphael10241024/gles2_shader
...
Fix GLES2 canvas shader uniform error
2019-08-12 08:32:06 +02:00
PouleyKetchoupp
e852b3a271
Fixed vertex color initialization with default value in gles3
...
Fixes #30275 , #31250
2019-08-11 17:51:47 +02:00
clayjohn
049dd309fe
check for unsigned_short support for gles2 depth buffer allocation
2019-08-10 09:56:42 -07:00
RaphaelHunter
48f28c68bc
fix gles2 canvas shader uniform error,close #31201
2019-08-10 21:52:51 +08:00
Rémi Verschelde
d2a67c9c1f
Merge pull request #30714 from Calinou/invert-default-fog-height
...
Invert and adjust the default fog height values
2019-08-08 17:20:32 +02:00
Hugo Locurcio
d1a35b5a97
Invert and adjust the default fog height values
...
This makes height fog appear at the bottom of the scene
(instead of the top), which is generally the expected result.
This also tweaks the fog height setting hint to be more flexible.
This closes #30709 .
2019-08-07 18:21:44 +02: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
Rémi Verschelde
7464074cb8
Merge pull request #30987 from clayjohn/GLES2-light-negative
...
Implement negative for OmniLights and SpotLights in GLES2
2019-08-05 19:21:13 +02:00
Yuri Roubinski
b24b3497d6
Implemented local shader constants
2019-08-05 10:35:53 +03:00
Rémi Verschelde
d9bba94d60
Merge pull request #31053 from aaronfranke/vector2i-cleanup
...
Some minor Vector2i usage cleanup
2019-08-05 08:08:57 +02:00
Yuri Roubinski
393f142495
Fix GLES2 rendering
2019-08-03 21:21:29 +03:00
Aaron Franke
1a06496f45
Some Vector2i usage cleanup
...
Replace casting Vector2 -> Vector2i -> Vector2 with a simple call to .floor(), and some minor fixes.
2019-08-03 01:11:05 -07:00
Chaosus
8b4c538ab2
Expose several GLES3 built-ins to GLES2
2019-07-31 19:00:10 +03:00
clayjohn
96c3004855
allow omnilights and spotlights to use negative in GLES2
2019-07-30 23:44:22 -07:00
Rémi Verschelde
51b2d86685
Merge pull request #30977 from clayjohn/GLES3-screen-uv
...
Properly pass SCREEN_PIXEL_SIZE to canvas light shader
2019-07-31 07:45:41 +02:00
clayjohn
518f0fb190
properly pass SCREEN_PIEXEL_SIZE to canvas light shader
2019-07-30 13:45:11 -07:00
Rémi Verschelde
73d2a99761
Merge pull request #30911 from hadrien-psydk/optimize_dir_access_unix_get_next_lnk
...
Optimize DirAccessUnix::get_next() for some file systems (with link support)
2019-07-30 00:12:30 +02:00
Rémi Verschelde
b697121d75
Merge pull request #30895 from clayjohn/gles2-shader-funcs
...
Added round function to gles2
2019-07-29 22:43:26 +02:00
clayjohn
3f25dde6b4
added round function to gles2
2019-07-29 11:17:08 -07:00
Rémi Verschelde
639127de09
Merge pull request #30898 from clayjohn/max-lights-reflections
...
Add project setting for max lights and reflections in GLES3
2019-07-29 16:01:53 +02:00
Hadrien
e02c5ef48a
Optimize DirAccessUnix::get_next() for some file systems
...
On some file systems, like ext4 on Linux, readdir() gives enough
information to determine the entry type in order to avoid doing
a stat() system call.
Use this information and call stat() only if necessary: for file
systems that do not support this feature and for links.
2019-07-29 15:02:26 +02:00
clayjohn
1a981ef268
add project setting for max lights and reflections in gles3
2019-07-28 17:54:25 -07:00
RaphaelHunter
47df933c27
update algorithm about paking float to vec4 to fix shadow shift and change rgba_shdow options
2019-07-28 11:43:01 +08:00
Rémi Verschelde
0381ff35aa
Merge pull request #30764 from clayjohn/contact-shadow
...
Fix contact shadows appearing when shading casting is off
2019-07-23 07:02:38 +02:00
clayjohn
b1839e5e85
fix contact shadows appearing when shading casting is off
2019-07-22 15:03:51 -07:00
Rémi Verschelde
b62b8ccf94
Merge pull request #30732 from Calinou/default-disable-high-quality-vct
...
Disable high-quality voxel cone tracing by default
2019-07-22 23:18:06 +02:00
Rémi Verschelde
6b19da583d
Merge pull request #30745 from clayjohn/gles2-shadow-transparency
...
Fix GLES2 shadow transparency bug
2019-07-22 13:23:36 +02:00
clayjohn
150487e728
fix gles2 shadow transparency bug
2019-07-21 23:52:19 -07:00
Hugo Locurcio
b1e382178c
Disable high-quality voxel cone tracing by default
...
This makes GIProbe significantly faster out of the box, at the cost
of worse-looking GIProbe reflections.
This closes #30727 .
2019-07-21 17:39:03 +02:00
Geequlim
ee9f46423b
Revert "Optimize DirAccessUnix::get_next() for some file systems"
2019-07-21 11:48:53 +08: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
Hadrien
1898a559a9
Optimize DirAccessUnix::get_next() for some file systems
...
On some file systems, like ext4 on Linux, readdir() gives enough
information to determine the entry type in order to avoid doing
a stat() system call.
Use this information and call stat() only if necessary.
2019-07-17 20:34:37 +02:00
Rémi Verschelde
1d13567345
Merge pull request #30570 from SonerSound/gles2_inconsistent_fix
...
Fix inconsistent lighting in GLES2
2019-07-17 09:56:44 +02:00
Bojidar Marinov
65bb76ab35
Fix CurveTexture being listed as saveable to .png
...
Fixes #27880
2019-07-16 21:19:53 +03:00
Chaosus
9379cbc774
Added local array initializer
2019-07-16 07:13:37 +03:00