Commit graph

229 commits

Author SHA1 Message Date
Rémi Verschelde
a342131eba
Merge pull request #27673 from qarmin/small_fixes
Small fixes, mostly duplicated code
2019-04-22 12:00:34 +02:00
Rémi Verschelde
c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
qarmin
856a8226a5 Small fixes, mostly dupicated code 2019-04-08 11:03:37 +02:00
Rémi Verschelde
b60754ab40
Merge pull request #26839 from toasteater/fix/keep-linear
Respect keep_3d_linear when transparent_bg is on.
2019-04-08 10:58:59 +02:00
Bastiaan Olij
8349d4fbd9 Add option to have viewport render into supplied texture 2019-04-06 08:24:58 +11:00
toasteater
7cbfce7a8c Respect keep_3d_linear when transparent_bg is on.
When transparent_bg is on, or the render target is too small,
Godot would skip postprocessing and disregard keep_3d_linear.

This fixes #26817.
2019-04-05 20:42:59 +08:00
marxin
e7f22ebdcd Enable warnings=extra on clang and GCC testers.
And remove 2 warnings from warnings=extra.
2019-04-02 17:14:47 +02:00
Daniel Rakos
849596c40c Fixed handling of depth texture so it's resolved and bound when needed
- Cleaned up and improved the code determining when we need to use a depth
  prepass (previously it wasn't executed in certain cases even if it was
  needed)
- Added code to prepare and bind the depth texture even when no depth prepass
  or MRTs (more precisely effect buffers) are used

Fixes #25870, #25535, and #25387.
2019-03-26 17:48:22 +01:00
Juan Linietsky
0eb61c3106 Undo #25557 (was not right anyway), fixes #26258 2019-03-11 14:58:51 -03:00
Juan Linietsky
4d875f115c Also take dof blur in consideration for using MRTs, fixes #26236 2019-03-03 16:28:07 -03:00
Juan Linietsky
34dd772054 Properly redraw if something animated is visible 2019-03-03 13:43:54 -03:00
Juan Linietsky
2f32a75d2e Skeletons can now choose between using local or world coords for processing, fixes #26468 2019-03-03 12:24:00 -03:00
marxin
7f289304af Fix #26100 by casting to integer. 2019-02-26 19:29:08 +01:00
Juan Linietsky
aef5b36bfa Ensure that no depth test is used (specially in prepass) for objects that dont test or draw depth, fixes #25201 2019-02-22 14:48:10 -03:00
Juan Linietsky
8fd2eb6234 Many fixes regarding depth buffer clearing, closes #25994, closes #25975 2019-02-21 12:31:41 -03:00
marxin
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Juan Linietsky
d6a88bbc30 Remove all references to stencil, fixes problems on iOS. 2019-02-13 07:58:52 -03:00
KaadmY
d116705538 Allow usage of depth texture when contact shadows are disabled 2019-02-01 12:46:43 -08:00
Juan Linietsky
6d4d55cd42 Do not use depth prepass if effects are disabled, fixes #25267 2019-01-25 15:58:07 -03:00
Bastiaan Olij
fe72e69c79
Revert "Fix GLES3 error 502 on iOS" 2019-01-26 01:51:41 +11:00
Juan Linietsky
677d4400de Ensure contact shadows are only used when lights use them. 2019-01-25 11:41:25 -03:00
Bastiaan Olij
da7f9e1ed1 Fix GLES3 error 502 on iOS 2019-01-26 00:52:54 +11:00
Juan Linietsky
42764ed252
Revert "Fix errors on iOS" 2019-01-24 17:15:52 -03:00
Bastiaan Olij
cab45f2f26 Fix errors on iOS 2019-01-23 13:38:19 +11:00
Juan Linietsky
46af4b0a4b Changes to GLES2 renderer to not use cube shadows if not available, fixes #25132 2019-01-22 10:05:23 -03:00
marxin
d9eb6a5b20 Fix #19633 by proper store to &ubo_data.shadow_matrix[1234].
It is not valid in C++ to store into shadow_matrix1[16] with shadow_matrix1[16 * j]
(for j > 0). Even though there's a valid space in a struct after shadow_matrix1.
Knowing that GCC performs aggressive optimizations that eventually lead
to a wrong code. Code has been changed into union where one can either
use shadow_matrix[4 * 16], or individual shadow_matrix1, shadow_matrix2, etc. GCC pragma
is not needed any longer.
2019-01-19 10:25:01 +01:00
Rémi Verschelde
50c8019dcd Fix excluding GCC pragmas from Clang
Why the heck does Clang define __GNUC__...
2019-01-19 08:17:32 +01:00
Rémi Verschelde
a9fcd574f4 Only define GCC pragmas for GCC 2019-01-19 08:00:17 +01:00
Hein-Pieter van Braam
6793908a3f Work around a GCC optimizer bug at -O3
This bug has been reported upstream, once it gets fixed we'll add some
version guards to only disable this for specific GCC versions.

This fixes #19633
2019-01-18 16:31:37 +01:00
Rémi Verschelde
d8f0087dc8
Merge pull request #24568 from Shinryuuji/fix-wrong-texture-array-target
Fix wrong default target for sampler2DArray
2019-01-04 16:14:29 +01:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Shinryuuji
7bfddbec3a Fix wrong default target for sampler2DArray 2018-12-23 15:25:46 +01:00
Bastiaan Olij
f3dd3c0830 Adding option to re-orient our sky 2018-12-15 19:41:34 +11:00
Juan Linietsky
af8d941c55 Added luminance capping to avoid glitches on small dots. closes #17996 2018-11-28 01:22:20 -03:00
Juan Linietsky
f150c5b4a0 Clean up code to make intention clear, fixes #20361 2018-11-21 22:32:05 -03:00
Juan Linietsky
a78b42c058 Don't post process on tiny render targets, fixes #19628 2018-11-19 22:05:55 -03:00
Juan Linietsky
d5ad1ca1ae Fix crash on canvas with BG_MODE_KEEP, closes #19590 2018-11-19 21:41:18 -03:00
Juan Linietsky
e77afb8507 Ensure environment radiance is not used on refprobe interiors, fixes #17868 2018-11-16 11:46:21 -03:00
Juan Linietsky
bb9127a78b Removed unnecesary normal multiplication (only culling was really needed), fixes #17776 2018-11-16 10:52:31 -03:00
Juan Linietsky
40e4f5bef4 Proxies were being mishandled, leading to the now fixed #17651 2018-11-16 09:33:33 -03:00
Juan Linietsky
55f5f4757e
Merge pull request #23248 from dlasalle/fog
Add parameters for fog end depth and use alpha as density.
2018-11-14 10:24:55 -03:00
Dominique LaSalle
6eae6247e4 Add parameter for fog max depth and use alpha as density. 2018-11-13 17:19:11 -08:00
Leon Krause
92e7c8daf0 Use BufferSubData instead of MapBufferRange in HTML5 platform
WebGL does not support MapBufferRange or UnmapBuffer.
Also used in non-ES platforms where an extra-copy is avoided.
2018-10-29 21:01:39 +01:00
Rémi Verschelde
1169196f04
Merge pull request #22779 from Superwaitsum/LimitSettings
Limit several project settings
2018-10-25 11:38:06 +02:00
Superwaitsum
e5041ad0f5 Add some limits on the Editor Settings 2018-10-24 19:46:33 -05:00
Dualtagh Murray
b902a2f2a7 Fixing warnings generated by MSVC
Fixes #22684.
2018-10-19 11:45:24 +02:00
Juan Linietsky
e0871b0f52 Baker fixes 2018-10-07 11:18:44 -03:00
Rémi Verschelde
3e9740ac93 Fix more "may be used initialized" warnings from GCC 7
Fixes the following GCC 7 warnings:
```
core/cowdata.h:269:47: warning: 'alloc_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/error_macros.h:163:26: warning: 'nearest_point' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:1579:5: warning: 'colormap_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:1582:12: warning: 'size_height' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:1590:23: warning: 'size_width' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:1599:29: warning: 'pixel_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/math/face3.cpp:207:15: warning: 'tri_max' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/math/face3.cpp:209:15: warning: 'tri_min' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/gles3/rasterizer_scene_gles3.cpp:665:22: warning: 'best_used_frame' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/gles3/rasterizer_storage_gles3.cpp:865:27: warning: 'blit_target' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/gles3/rasterizer_storage_gles3.cpp:980:29: warning: 'blit_target' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/gles3/shader_gles3.h:122:9: warning: '<anonymous>.ShaderGLES3::Version::frag_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/gles3/shader_gles3.h:122:9: warning: '<anonymous>.ShaderGLES3::Version::id' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/gles3/shader_gles3.h:122:9: warning: '<anonymous>.ShaderGLES3::Version::vert_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/plugins/script_editor_plugin.cpp:1980:31: warning: 'se' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/scene_tree_dock.cpp:840:30: warning: 'new_node' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/spatial_editor_gizmos.cpp:4259:9: warning: 'a1' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/spatial_editor_gizmos.cpp:4259:9: warning: 'lll' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/spatial_editor_gizmos.cpp:4259:9: warning: 'lul' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/spatial_editor_gizmos.cpp:4260:9: warning: 'a2' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/spatial_editor_gizmos.cpp:4261:9: warning: 'a3' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/spatial_editor_gizmos.cpp:4265:3: warning: 'enable_lin' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/spatial_editor_gizmos.cpp:4294:3: warning: 'enable_ang' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/spatial_editor_gizmos.cpp:4311:34: warning: 'll' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/spatial_editor_gizmos.cpp:4311:34: warning: 'ul' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/3d/voxel_light_baker.cpp:1655:47: warning: 'cone_dirs' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/3d/voxel_light_baker.cpp:1656:73: warning: 'cone_weights' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/gui/texture_progress.cpp:181:6: warning: 'cp' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/gui/texture_progress.cpp:181:6: warning: 'cq' may be used uninitialized in this function [-Wmaybe-uninitialized]
servers/physics/shape_sw.cpp:1056:19: warning: 'support_max' may be used uninitialized in this function [-Wmaybe-uninitialized]
```
2018-10-04 18:54:20 +02:00
Rémi Verschelde
8c9c1d6882
Merge pull request #21436 from CptPotato/tonemap-fixes
tonemapping fixes
2018-10-02 15:42:15 +02:00
Rémi Verschelde
9258d7b5d0 Fix warnings about uninitialized vars [-Wsometimes-uninitialized]
Fixes the following Clang 7 warnings:
```
drivers/gles3/rasterizer_scene_gles3.cpp:1260:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
drivers/gles3/rasterizer_scene_gles3.cpp:1280:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
drivers/gles3/rasterizer_scene_gles3.cpp:1281:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
drivers/gles3/rasterizer_scene_gles3.cpp:1282:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
drivers/gles3/rasterizer_scene_gles3.cpp:1286:5: warning: variable 'target' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
editor/editor_properties_array_dict.cpp:982:15: warning: variable 'change_index' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
editor/editor_properties.cpp:2655:6: warning: variable 'lt' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
editor/settings_config_dialog.cpp:367:11: warning: variable 'current_search_box' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
```
2018-10-01 17:33:08 +02:00