Commit graph

127 commits

Author SHA1 Message Date
clayjohn
68915ce20d Add support for 3D textures to GLES2 2020-01-31 10:01:05 -08:00
Rémi Verschelde
37897dba80
Merge pull request #35406 from lawnjelly/ortho-shadow
Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
2020-01-22 22:02:09 +01:00
lawnjelly
eaf8e5ce52 Change CameraMatrix::get_viewport_size to get_viewport_half_extents
Fixes #26637.
Fixes #19900.

The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2.

Code which called this function has also been modified accordingly.

This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width.

It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22 18:22:00 +00:00
Rémi Verschelde
4faaf6089a Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
Rémi Verschelde
3af0400a32
Merge pull request #35176 from clayjohn/csg-crash
Fix light related crashes
2020-01-16 08:03:56 +01:00
clayjohn
f1d0c391c7 fix light related crashes 2020-01-15 21:40:05 -08:00
clayjohn
a345088433 Add background mode keep to GLES2 2020-01-15 15:59:00 -08:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
clayjohn
2a694a44cb fix shadow color in GLES2 by making sRGB 2019-12-15 10:27:31 -08:00
PouleyKetchoupp
f5e81b894a Removed duplicated conditional in GLES2 2019-11-29 06:32:55 +01:00
Rémi Verschelde
6536105af2
Merge pull request #33527 from clayjohn/GLES2-bufferdata_optimization
Improve glBufferSubData usage where safe
2019-11-19 09:36:30 +01:00
clayjohn
14b06fc207 Fix negative light flickering 2019-11-17 22:18:54 -08:00
clayjohn
1253a33423 Improve glBufferSubData usage where safe 2019-11-11 16:38:41 -08:00
Bastiaan Olij
add5eaca43 Make MSAA work with external texture 2019-11-08 23:27:48 +11:00
clayjohn
6ec7686a0c Fix shadow mapping with RGBA textures on html 2019-10-26 10:17:22 -07: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
clayjohn
07fd9719bf Fix reflection probe crash in GLES2 with post-processing 2019-10-02 14:35:10 -07:00
clayjohn
82f63633d1 Implement DOF blur, Glow, and BCS in GLES2 2019-09-30 08:04:31 -07: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
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
Juan Linietsky
d81ddaf33e Added skin support and simplified APIs to override bone position. 2019-09-18 19:46:32 -03: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
clayjohn
96c3004855 allow omnilights and spotlights to use negative in GLES2 2019-07-30 23:44:22 -07:00
clayjohn
150487e728 fix gles2 shadow transparency bug 2019-07-21 23:52:19 -07: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
SonerSound
545bf86d39 Fix inconsistent lighting in GLES2
Issue was possibily being caused by duplicating a light even when that
light was not in the render_light_instances array.
2019-07-14 19:12:26 +01:00
Bastiaan Olij
4ebedb5f11 Made constants fully upper case in camera server 2019-06-19 22:24:54 +10:00
BastiaanOlij
02ea99129e Adding a new Camera Server implementation to Godot.
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server.
Other parts of Godot can interact with this to obtain images from the camera as textures.
This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
2019-06-15 21:30:32 +10:00
Rémi Verschelde
971b5160c6
Merge pull request #29306 from qarmin/small_code_fixes
Small fixes to unrechable code, possibly overflows, using NULL pointers
2019-06-12 12:49:21 +02:00
clayjohn
9af94d650f use def ANDROID_ENABLED so android features are not included in javascript builds 2019-06-04 23:12:20 -07:00
qarmin
8245db869f Small fixes to unrechable code, possibly overflows, using NULL pointers 2019-06-03 21:52:50 +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
c2e2bcbca9 Fix -Werror=maybe-uninitialized in GLES2 on release builds
Issue introduced in #28796.
2019-05-29 16:40:06 +02:00
clayjohn
2b59bd7695 separate culling state management from material 2019-05-27 11:45:53 -07: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
2abe7deae8 fix no depth test and render_priority sorting 2019-05-23 09:21:57 -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
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
e0517a12c5
Merge pull request #28518 from clayjohn/GLES2-MSAA
Added MSAA to GLES2 backend
2019-05-13 17:46:11 +02:00
clayjohn
a3d5aec68d added MSAA to GLES backend 2019-05-02 14:24:20 -07:00
clayjohn
7ae3809f4b Fixed GLES2 transparency order 2019-04-29 12:22:41 -07: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
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