Commit graph

1581 commits

Author SHA1 Message Date
Juan Linietsky 1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
Rémi Verschelde 94721f5ab8 Revert "Renamed plane's d to distance"
This reverts commit ec7b481170.

This was wrong, `d` is not a distance but the `d` constant in the
parametric equation `ax + by + cz = d` describing the plane.
2020-05-10 16:47:11 +02:00
Rémi Verschelde 69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Rémi Verschelde 03b13e0c69 Style: Add missing copyright headers 2020-05-10 13:12:16 +02:00
Marcus Elg ec7b481170 Renamed plane's d to distance 2020-05-10 12:12:51 +02:00
Rémi Verschelde ff5dfcdf68 Revert "register RenderingDevice as gdscript singleton"
This reverts commit 1058a57666.

RenderingDevice is meant to be instantiated in scripts, not a singleton.
This actually doesn't work properly right now, but reduz will fix it.
2020-05-09 22:18:32 +02:00
Hugo Locurcio 3a11baaeac
Turn the anisotropic filtering setting into an enum
Since it only accepts power-of-two values, exposing it as an enum
makes more sense. This also allows for adding property hints to indicate
the performance cost of each value.

This also improves property hints for MSAA and FXAA.
2020-05-08 12:07:35 +02:00
Rémi Verschelde bef52957d0
Merge pull request #38226 from Calinou/increase-camera3d-fov
Increase the default Camera3D field of view to 75
2020-05-07 21:16:21 +02:00
Rémi Verschelde 5940ca650e
Merge pull request #38406 from clayjohn/VULKAN-sun-diameter
Calculate sun diameter even when not using shadows
2020-05-03 18:14:36 +02:00
Philip Whitfield 1058a57666 register RenderingDevice as gdscript singleton 2020-05-03 12:01:38 +02:00
clayjohn 34ee273e20 Calculate sun diameter even when not using shadows 2020-05-01 22:22:35 -07:00
Hugo Locurcio ccc4f3899c
Increase the default Camera3D field of view to 75
A vertical FOV of 75 degrees is roughly equivalent to a 91 degree
horizontal FOV on a 4:3 display (~107.51 degrees on 16:9),
which is close to the typical default FOV used in PC games.

Note that this doesn't apply to the in-editor camera which keeps its
FOV to 70. This is because it doesn't display in fullscreen;
its viewport only displays in the center of the editor (roughly).
This means the viewport won't cover the viewer's eyes as much. Therefore,
the editor camera FOV should be slightly lower to account for this.

Since this changes the default value, this may break existing projects
slightly.

For the record, this was already done in
https://github.com/godotengine/godot-demo-projects/pull/260
for the official demo projects.
2020-05-01 14:03:27 +02:00
Rémi Verschelde b4a5bbaea2
Merge pull request #38337 from RandomShaper/time_rollback
Improve shader time roll over
2020-04-30 16:25:20 +02:00
Pedro J. Estébanez f7706659b5 Improve shader time roll over
- Resurrect it for GL ES 2
- Add it to the Vulkan rasterizer
- Expose the setting from the `RenderingServer`, since it does not belong in any specific rasterizer
2020-04-30 11:42:11 +02:00
Kiri Jolly 459cab99f4 Fixed unbounded dual-paraboloid shadow map culling.
Dual paraboloid shadowmaps were ending up with infinitely large volumes of area behind the hemisphere un-culled.

This change just adds a back plane to the convex shape used for the culling volume.
2020-04-29 19:24:43 -07:00
Rémi Verschelde 58435b0c91
Merge pull request #20371 from aaronfranke/vector-lerp
[Core] [Mono] [GDNative] Rename "linear_interpolate" methods to "lerp"
2020-04-29 15:50:00 +02:00
Rémi Verschelde 1d45a269f8
Merge pull request #38302 from qarmin/format_set
RasterizerStorageRD: Don't override format value
2020-04-29 14:16:52 +02:00
Aaron Franke 540156b387
[Core] Rename linear_interpolate to lerp 2020-04-29 04:02:49 -04:00
Rémi Verschelde 0bf6a86db4
Merge pull request #37795 from Chaosus/shader_fix_const_order2
Fix shader constant sorting
2020-04-29 09:41:34 +02:00
qarmin ad6bcea49d Don't override format value 2020-04-28 18:51:17 +02:00
qarmin 0e9942a671 Fix copy paste array index bug 2020-04-28 18:26:57 +02:00
Rémi Verschelde fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
bruvzg 2bb119c088
Fix "redefinition of 'ssr' with a different type" shader compile error. 2020-04-23 13:56:04 +03:00
Ignacio Roldán Etcheverry 5d29f42afa
Merge pull request #38116 from neikeq/index_buffer_create-defval
Fix missing DEFVAL for RenderingDevice.index_buffer_create
2020-04-22 17:30:23 +02:00
Ignacio Etcheverry c5a721f58d Fix missing DEFVAL for RenderingDevice.index_buffer_create 2020-04-22 16:52:04 +02:00
muiroc 66ab577eb8 Register the DisplayServer Singleton 2020-04-21 22:04:12 +02:00
Juan Linietsky f8ef38efed Add proper type to most public API uses of Array 2020-04-21 12:16:45 -03:00
Juan Linietsky ae09b55a19 Exposed RenderingDevice to script API
Also added an easier way to load native GLSL shaders.

Extras:

Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload.

Note:

The precommit hooks are broken because they don't seem to support enums from one class being used in another.
Feel free to fix this after merging this PR.
2020-04-20 21:21:58 -03:00
Rémi Verschelde 2905367fed
Merge pull request #37970 from SkyLucilfer/ServerTypo
Correct typo mistake of profiler_add_frame_data argument in physics 3d server
2020-04-20 23:49:36 +02:00
Rémi Verschelde 9cf48b3e99
Merge pull request #38039 from akien-mga/docdata-skip-unexposed
DocData: Skip unexposed classes
2020-04-20 15:21:49 +02:00
Rémi Verschelde 0ef8bcac4d DocData: Skip unexposed classes
Properly expose classes that we actually want accessible.
2020-04-20 12:51:10 +02:00
Rémi Verschelde b7b46093d8 doc: Sync classref with current source
Add missing enum bindings.
2020-04-20 11:48:00 +02:00
Rémi Verschelde 088c2a0870
Merge pull request #37947 from clayjohn/DOCS-rendering-update
Update many docs with recent rendering changes
2020-04-20 11:16:12 +02:00
Juan Linietsky 49d0c6a5c9 Ability to create local RenderingDevice instances. 2020-04-18 21:47:17 -03:00
SkyJJ 0991cdc975 Correct typo mistake of profiler_add_frame_data argument in physics 3d server 2020-04-17 21:56:25 +02:00
clayjohn b50d954cb0 Update many docs with recent rendering changes 2020-04-17 09:47:59 -07:00
Rémi Verschelde 17304f1aae
Merge pull request #37949 from reduz/implement-global-shader-uniforms
Implement global and per instance shader uniforms.
2020-04-17 18:36:06 +02:00
Rémi Verschelde cfda0e3770
Merge pull request #37953 from clayjohn/VULKAN-sky-sun-size
Add light size to Sky Shaders
2020-04-17 18:35:45 +02:00
clayjohn 7cd2ff309c Add light size to Sky Shaders 2020-04-17 09:32:24 -07:00
Juan Linietsky 0e1c66d9fc Implement global and per instance shader uniforms.
Adds two keywords to shader language for uniforms:
-'global'
-'instance'

This allows them to reference values outside the material.
2020-04-17 12:35:41 -03:00
clayjohn 0ff929a926 Use sky properly for ambient and reflections 2020-04-16 23:45:30 -07:00
Rémi Verschelde 4f2c1feab5
Merge pull request #37869 from madmiraal/fix-36533
Assign zero to range when ConvexPolygonShape2D is empty.
2020-04-16 11:39:18 +02:00
clayjohn 61d86190e0 Fix texture check in decal setup 2020-04-15 12:06:02 -07:00
Juan Linietsky 6f293ed795 Add support for projectors in spot and omni lights. 2020-04-14 17:05:45 -03:00
Rémi Verschelde 5e5103f460
Merge pull request #37861 from reduz/implement-decals
Implement decals
2020-04-14 17:13:20 +02:00
Juan Linietsky 5944eb6e7f Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
2020-04-14 11:13:34 -03:00
Marcel Admiraal 88d307df14 Assign zero to range when ConvexPolygonShape2D is empty. 2020-04-14 12:53:32 +01:00
Rémi Verschelde e0eb9a8ae4
Merge pull request #37826 from nekomatata/direct-body-state-sleep
Fix set_sleep_state in Bullet body direct state
2020-04-14 12:53:20 +02:00
PouleyKetchoupp 30b184cb06 Fix set_sleep_state in Bullet body direct state
It was inverted, it should set the body to be active when sleep is disabled.
2020-04-14 11:39:34 +02:00