Commit graph

264 commits

Author SHA1 Message Date
clayjohn
3631a3cc9e Fix recently introduced crash in viewport size 2020-01-23 08:11:01 -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
clayjohn
041fa57a88 Add multimesh format max for proper error checking 2020-01-16 13:31:17 -08:00
clayjohn
f1d0c391c7 fix light related crashes 2020-01-15 21:40:05 -08:00
clayjohn
179193775b Fix light and multimesh crashes 2020-01-12 17:45:06 -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
PouleyKetchoupp
299b85c46f Disable shadow map sampling when shadows are not used in GLES3
Fixes #20742
2019-11-29 06:21:17 +01:00
Rémi Verschelde
3be6e76f22
Merge pull request #33668 from clayjohn/Fix_environment_mapping_issues
Fix issues with environment mapping
2019-11-20 08:45:53 +01:00
clayjohn
cd40154890 Fix issues with environment mapping 2019-11-19 22:30:48 -08:00
clayjohn
1253a33423 Improve glBufferSubData usage where safe 2019-11-11 16:38:41 -08:00
clayjohn
071bf81750 only render depth with alpha prepass on prepass 2019-10-11 22:34:10 -07: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
Juan Linietsky
d81ddaf33e Added skin support and simplified APIs to override bone position. 2019-09-18 19:46:32 -03:00
clayjohn
e65d2184b9 throw error when user tries to use Canvas background without sample buffer 2019-09-15 21:07:07 -07: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
RaphaelHunter
5ff4b13271 DOF can effect transparent objects now, close #28240 2019-08-12 15:49:02 +08: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
clayjohn
1a981ef268 add project setting for max lights and reflections in gles3 2019-07-28 17:54:25 -07: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
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
qarmin
6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +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
Bojidar Marinov
f7dad789e9
Fix various memory leaks and errors 2019-07-02 17:23:54 +03:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02: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
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
Rémi Verschelde
6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
qarmin
8245db869f Small fixes to unrechable code, possibly overflows, using NULL pointers 2019-06-03 21:52:50 +02:00
clayjohn
2abe7deae8 fix no depth test and render_priority sorting 2019-05-23 09:21:57 -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
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