Commit graph

1836 commits

Author SHA1 Message Date
clayjohn 2b8b1d7c46 added MultiMeshInstance2D node for using MultiMesh in 2D 2019-06-03 12:11:54 -07:00
Hugo Locurcio cbd31d9f0b
Fix errors when attempting to set UNIX permissions when unavailable
This makes exporting from Windows to Linux work again.

This closes #29416.
2019-06-03 14:35:33 +02:00
Rémi Verschelde c34636cbc4
Merge pull request #24943 from aqnuep/issue-18201
Mute errors on surface->index_array_len == 0 in the GLES3 renderer
2019-06-01 12:12:09 +02:00
Rémi Verschelde bac7e22cb1
Merge pull request #29236 from clayjohn/gles2-mirror
Separate culling state management from material state in GLES2
2019-05-30 15:01:50 +02:00
Rémi Verschelde 603bb98340
Merge pull request #29188 from Calinou/improve-ssao-performance-quality
Improve SSAO performance and quality
2019-05-30 14:27:25 +02:00
Rémi Verschelde c2e2bcbca9 Fix -Werror=maybe-uninitialized in GLES2 on release builds
Issue introduced in #28796.
2019-05-29 16:40:06 +02:00
qarmin 66a36ba474 Fix some unincialised variables 2019-05-28 19:12:19 +02:00
clayjohn 2b59bd7695 separate culling state management from material 2019-05-27 11:45:53 -07:00
Rémi Verschelde 9f6eb3882c
Merge pull request #29182 from clayjohn/radiance_map
Fix radiance map settings
2019-05-27 17:33:45 +02:00
Rémi Verschelde b9ee3f3d64
Merge pull request #29014 from mbrlabs/gles2_precision_fix
Use highp precision in the gles2 fragment shader if available
2019-05-27 12:18:47 +02:00
Hugo Locurcio eb0cced3c0
Improve SSAO performance and quality
This decreases the number of samples significantly, leading to a
notable performance increase with only a very slight loss in
visual quality.

This also tweaks the default SSAO settings to use 3×3 blurring,
which makes noise patterns much less visible.
2019-05-26 12:01:01 +02:00
clayjohn 4c55a909ad fix radiance map settings 2019-05-25 18:57:32 -07:00
Marcus Brummer 502dbc7c4a Use highp precision for gles2 shader uniforms if not explicitly set.
The use of different default precision values (highp in vertex; mediump
in fragment) for uniform variables caused the shader program to not link properly on some android
devices/emulators.
2019-05-25 14:26:08 +02:00
Rémi Verschelde da617b7943
Merge pull request #29132 from clayjohn/sort_depth_fix
Fix "no depth test" and render_priority sorting
2019-05-24 17:46:06 +02:00
Rémi Verschelde 01c41c782b
Merge pull request #28796 from clayjohn/GLES2-optimization
GLES2: Allow Viewports to render directly to screen
2019-05-24 17:31:44 +02:00
clayjohn 3365595254 do not compute fog when using unshaded in GLES2 2019-05-23 17:17:27 -07:00
clayjohn 2abe7deae8 fix no depth test and render_priority sorting 2019-05-23 09:21:57 -07:00
Rémi Verschelde 2b1c3878f9
Merge pull request #29031 from BastiaanOlij/alpha_shadow
Implement shadow to opacity
2019-05-23 13:37:54 +02:00
Rémi Verschelde 26e0cc7aa3
Merge pull request #29041 from hbina/add_const
add const to methods that return literals
2019-05-21 15:16:41 +02:00
Bastiaan Olij 3ea778e66e Implement shadow to opacity 2019-05-21 20:07:46 +10:00
hbina085 f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04:00
clayjohn cc2d862733 Scale environment lighting correctly in GLES3 2019-05-19 17:59:23 -07:00
Rémi Verschelde e0574e1d98 Fix typos with codespell
Using codespell 1.15.0.

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

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-05-19 13:10:35 +02:00
clayjohn 55d11330b0 fix lighting bug introduced in clear color changes 2019-05-14 15:04:54 -07:00
Rémi Verschelde aa3c5f59f2
Merge pull request #27898 from clayjohn/metallic_radiance
Added radiance when using clear color
2019-05-14 07:32:01 +02:00
clayjohn 65c211d303 Implement ability to render viewports directly to screen 2019-05-13 15:20:15 -07:00
clayjohn 5c252092e1 added radiance when using clear color and fixed brdf 2019-05-13 12:26:54 -07:00
Rémi Verschelde 86a74e2cb3
Merge pull request #27798 from clayjohn/gles2-proj-mat-bug
Fixes bug when setting projection matrix in shader GLES2
2019-05-13 17:59:40 +02:00
Rémi Verschelde e0517a12c5
Merge pull request #28518 from clayjohn/GLES2-MSAA
Added MSAA to GLES2 backend
2019-05-13 17:46:11 +02:00
Rémi Verschelde a0a5047cfd
Merge pull request #28723 from SouzaGuilherme/fix_shadows
Fix SHADOWS_DISABLED flag in GLES2
2019-05-13 17:22:57 +02:00
Daniel Rakos e34eb5c26c Fix texture resource reload bug
If a non-imported texture resource file (e.g. DDS) gets updated the editor
doesn't reload it. The cause of the problem is two-fold:

First, the code of ImageTexture assumes that textures are always imported
from an image, but that's not the case for e.g. DDS. This change thus adds
code to issue a resource reload in case an image reload is not possible
(which is the case for non-imported texture resources).

Second, the code is filled with bogus calls to Image::get_image_data_size()
to determine the mipmap offset when that should be done using
Image::get_image_mipmap_offset(). Previous code literally passed the integer
mip level value to Image::get_image_data_size() where that actually expects
a boolean. Thus this part of the change might actually solve some other
issues as well.

To be pedantic, the texture_get_data() funciton of the rasterizer drivers is
still quite a mess, as it only ever returns the whole mipchain when
GLES_OVER_GL is set (practically only on desktop builds) but this change does
not attempt to resolve that.
2019-05-08 17:22:40 +02:00
Guilherme Souza b363125568 Fix SHADOWS_DISABLED flag in GLES2
Signed-off-by: Guilherme Souza <gdsdsilva@inf.ufpel.edu.br>
2019-05-07 12:42:28 -03:00
clayjohn a3d5aec68d added MSAA to GLES backend 2019-05-02 14:24:20 -07:00
marxin cdf54d6c5f Ignore a warning in _get_socket_error (-Wlogical-op).
drivers/unix/net_socket_posix.cpp: In member function 'NetSocketPosix::NetError NetSocketPosix::_get_socket_error()':
drivers/unix/net_socket_posix.cpp:197:22: warning: logical 'or' of equal expressions [-Wlogical-op]
  197 |  if (errno == EAGAIN || errno == EWOULDBLOCK)
      |                      ^

and:

modules/mono/utils/string_utils.cpp: In function 'int {anonymous}::sfind(const String&, int)':
modules/mono/utils/string_utils.cpp:68:48: error: logical 'or' of collectively exhaustive tests is always true [-Werror=logical-op]
      found = src[read_pos] == 's' || (c >= '0' || c <= '4');
                                       ~~~~~~~~~^~~~~~~~~~~
2019-05-02 11:11:52 +02:00
Rémi Verschelde dd2cd06165
Merge pull request #25670 from aqnuep/bake_mode_affect_gi_prove
Disable GI probe capturing lights with bake mode disabled
2019-04-30 18:33:34 +02:00
Rémi Verschelde a7f00f3bac
Merge pull request #28530 from akien-mga/scons-prepend-cpppath
SCons: Always use env.Prepend for CPPPATH
2019-04-30 18:23:38 +02:00
clayjohn e37d723695 fixes bug when setting projection matrix 2019-04-30 08:36:38 -07:00
Rémi Verschelde a5c619dc8d
Merge pull request #28520 from clayjohn/GLES2-alpha-draw-order
Fixed GLES2 transparency order
2019-04-30 17:20:05 +02:00
Rémi Verschelde d52b70fb5e SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to
ensure that paths to bundled thirdparty files will have precedence over
system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30 13:12:06 +02:00
clayjohn 7ae3809f4b Fixed GLES2 transparency order 2019-04-29 12:22:41 -07:00
Rémi Verschelde a3617f6ca8
Merge pull request #28431 from SouzaGuilherme/master
Adds flag AMBIENT_LIGHT_DISABLED to GLES2
2019-04-29 16:55:36 +02:00
Guilherme Souza 61a844aa61 Adds flag AMBIENT_LIGHT_DISABLED to GLES2
Signed-off-by: Guilherme Souza <gdsdsilva@inf.ufpel.edu.br>
2019-04-25 20:25:05 -03:00
Rémi Verschelde c2a669a9f0 SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGS
Many contributors (me included) did not fully understand what CCFLAGS,
CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them
in the way they are intended to be.

As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html

- CCFLAGS: General options that are passed to the C and C++ compilers.
- CFLAGS: General options that are passed to the C compiler (C only;
  not C++).
- CXXFLAGS: General options that are passed to the C++ compiler. By
  default, this includes the value of $CCFLAGS, so that setting
  $CCFLAGS affects both C and C++ compilation.
- CPPFLAGS: User-specified C preprocessor options. These will be
  included in any command that uses the C preprocessor, including not
  just compilation of C and C++ source files [...], but also [...]
  Fortran [...] and [...] assembly language source file[s].

TL;DR: Compiler options go to CCFLAGS, unless they must be restricted
to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to
CPPFLAGS.
2019-04-24 16:57:58 +02:00
Daniel Rakos de33ef2d1b Disable GI probe capturing lights with bake mode disabled
The bake mode property of lights previously didn't affect GI probes.
This change makes the GI probe ignore lights that have their bake mode
set to disabled.
2019-04-23 11:36:36 +02:00
Juan Linietsky cd4449e7ab Add FileAccess::set_unix_permissions for Unix platforms 2019-04-07 15:45:30 -03:00
Juan Linietsky 65f3a953de Remove SIGCHILD handle in OS_Unix, interferes with pclose() 2019-04-07 15:45:00 -03:00
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
Juan Linietsky 04847ef5f9 Added ability for multiple images to be imported as an atlas
This adds support for groups in the import system, which point to a single file.
Add property hint for saving files in file field
2019-04-19 15:56:34 -03:00
Rémi Verschelde dab8f8c953
Merge pull request #27967 from clayjohn/fix-mip-bug
Fixed bug in computing mip maps from screen texture
2019-04-15 13:05:50 +02:00
clayjohn 670c1b10b2 fixed bug in mip map sigma 2019-04-12 17:48:38 -07:00