Commit graph

2594 commits

Author SHA1 Message Date
rafallus 770e3a8e51 Use Callable in Area monitor callback 2021-11-01 21:53:17 -06:00
Camille Mohr-Daurat a57de3b818
Merge pull request #37880 from nekomatata/rigid-body-damping-override
Improved RigidDynamicBody linear/angular damping override
2021-11-01 11:24:01 -07:00
Rémi Verschelde 02ae47154c
Merge pull request #54356 from Chaosus/shader_fix_matrix_autocompletion 2021-11-01 14:06:04 +01:00
Rémi Verschelde d86b680e07
Merge pull request #54480 from timothyqiu/texture-replace 2021-11-01 12:56:05 +01:00
Haoyu Qiu 10818cfc10 Fix memory leak when using CurveTexture.set_texture_mode 2021-11-01 18:57:59 +08:00
Rémi Verschelde 210e6cc167
Merge pull request #54459 from rxlecky/fix-multimesh-buffer-overflow-53603 2021-11-01 11:18:11 +01:00
SeleckyErik 6b04f08b28 Fix multimesh buffer overflow in RendererStorageRD 2021-10-31 18:48:51 +01:00
Rémi Verschelde 1aef3a42b2
Merge pull request #54448 from CakHuri/treshold-to-threshold
Repair mistyped of 'threshold' on several files.
2021-10-31 18:32:18 +01:00
Rémi Verschelde 16dc607f8a
Merge pull request #54307 from Calinou/add-opengl-renderer-squash
Add OpenGL renderer (squashed)
2021-10-31 18:30:38 +01:00
M. Huri 4052d85d05 Repaired mistyped of 'threshold' on several files. 2021-10-31 22:11:42 +07:00
Clay John 8a10bb7d0d
Use OpenGL 3.3 core profile instead of compatibility profile
- Rename OpenGL to GLES3 in the source code per community feedback.
  - The renderer is still exposed as "OpenGL 3" to the user.
- Hide renderer selection dropdown until OpenGL support is more mature.
  - The renderer can still be changed in the Project Settings or using
    the `--rendering-driver opengl` command line argument.
- Remove commented out exporter code.
- Remove some OpenGL/DisplayServer-related debugging prints.
2021-10-31 15:56:45 +01:00
Rémi Verschelde d6f972fad4
Merge pull request #54403 from briansemrau/fix-small-fogvolume
FogVolume don't dispatch compute with zero-dimension groups
2021-10-31 09:12:10 +01:00
Brian Semrau 8f75ad4df2 Don't use Texture image caches if they are rendered to 2021-10-30 13:34:39 -04:00
Rémi Verschelde 6b0b1a4c04
Merge pull request #54405 from JFonS/fix_instance_index
Fix instance index in forward clustered shader
2021-10-30 14:22:22 +02:00
Brian Semrau 346e497959 Disallow compute dispatch with zero dimensions. 2021-10-30 02:39:25 -04:00
jfons 6db13d3231 Fix instance index in forward clustered shader 2021-10-30 02:53:09 +02:00
Hugo Locurcio ce97ddbcb1
Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3
- Use lowercase driver names for the `--rendering-driver`
  command line argument.
2021-10-30 02:05:49 +02:00
lawnjelly e3491a3744
Add GLES2 2D renderer + Linux display manager
First implementation with Linux display manager.

- Add single-threaded mode for EditorResourcePreview (needed for OpenGL).

Co-authored-by: clayjohn <claynjohn@gmail.com>
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2021-10-30 02:05:48 +02:00
Yuri Roubinsky 4da0de0085 Fix error spammed to output if FogVolume is setted to scene 2021-10-29 23:24:01 +03:00
Yuri Roubinsky a6ddfecc9f Fix crash when opening a converted FogMaterial 2021-10-29 14:18:38 +03:00
clayjohn 1b2cd9f251 Addition of FogVolumes, FogShaders, FogMaterial, and overhaul of VolumetricFog
Co-authored-by: Brian Semrau <brian.semrau@gmail.com>
2021-10-28 22:02:23 -07:00
Yuri Roubinsky 04a2053f9b Removed incorrect autocompletion of matrixes in shader 2021-10-28 20:21:18 +03:00
Rémi Verschelde f7d852b532
Merge pull request #54350 from akien-mga/clang-format-dont-align-operands 2021-10-28 17:10:52 +02:00
Rémi Verschelde e2deec67b9
Merge pull request #54222 from JFonS/instance-fade 2021-10-28 16:05:55 +02:00
Rémi Verschelde 3a6be64c12
clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
Rémi Verschelde 3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
bruvzg 63f3051154 Implement TextServer strip_diacritics function. 2021-10-28 10:12:57 +03:00
Joan Fons 95bc9c40d9 Fix shadow disabling on mobile renderer 2021-10-26 15:37:22 +02:00
PouleyKetchoupp daf7dcac7a Improved RigidDynamicBody linear/angular damping override
Damping values are now non-negative.

Add new properties linear_damp_mode and angular_damp_mode to set the way
RigidDynamicBody and PhysicalBone (2D & 3D) use damping values.
It can now be Combine (default) to add to the default/areas, or Replace
to override the value completely (current behavior).
2021-10-25 18:22:12 -07:00
reduz d03b7fbe09 Refactored Node3D rotation modes
* Made the Basis euler orders indexed via enum.
* Node3D has a new rotation_order property to choose Euler rotation order.
* Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis

Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations.
The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
2021-10-25 14:34:00 -03:00
jfons c46d1ea2b2 Fix shadow disabling settings
Fixes the SHADOW_CASTING_SETTING_OFF setting in
GeometryInstance3D and the "shadows_disabled" render
mode in spatial materials, which were not working
before.
2021-10-25 16:11:32 +02:00
JFonS c571e4a7f4 Implement distance fade and transparency
The built-in ALPHA in spatial shaders comes pre-set with a per-instance
transparency value. Multiply by it if you want to keep it.

The transparency value of any given GeometryInstance3D is affected by:
   - Its new "transparency" property.
   - Its own visiblity range when the new "visibility_range_fade_mode"
     property is set to "Self".
   - Its parent visibility range when the parent's fade mode is
     set to "Dependencies".

The "Self" mode will fade-out the instance when reaching the visibility
range limits, while the "Dependencies" mode will fade-in its
dependencies.

Per-instance transparency is only implemented in the forward clustered
renderer, support for mobile should be added in the future.

Co-authored-by: reduz <reduzio@gmail.com>
2021-10-25 11:39:34 +02:00
jfons 88d9914519 Fix state inconsistencies in visibility dependencies. 2021-10-25 11:37:53 +02:00
Rémi Verschelde b2ab5cb504
Merge pull request #54045 from ConteZero/primary_clipboard_linux_fix_warning 2021-10-23 19:13:34 +02:00
ConteZero 8c48b4a7e0 Fix primary clipboard warning 2021-10-23 15:50:01 +02:00
Camille Mohr-Daurat d47481f190
Merge pull request #54124 from Uxeron/CenterOfMassRotationFix
Fix physics body rotating incorrectly around it's center of mass
2021-10-22 12:58:18 -07:00
Rémi Verschelde f7e6ebcdb1
Merge pull request #54131 from nekomatata/fix-2d-body-center-of-mass-auto 2021-10-22 21:34:35 +02:00
Uxeron 2275e26476 Fix physics body rotating incorrectly around it's center of mass 2021-10-22 21:23:54 +03:00
PouleyKetchoupp 0a04602835 Fix RigidDynamicBody2D auto center of mass calculation
Should be changing the local center of mass, which is then transformed
into `center_of_mass`.
It was causing the center of mass to be always in (0,0) by default with
multiple shapes.
2021-10-22 11:08:53 -07:00
Rémi Verschelde 3bebbcacdb
Merge pull request #53992 from Calinou/hard-shadow-mapping-allow-dithering 2021-10-22 19:34:09 +02:00
Rémi Verschelde 9f7218eb69
Merge pull request #54088 from madmiraal/remove-unimplemented-methods 2021-10-22 12:59:32 +02:00
Rémi Verschelde fe3d62f2dc
Merge pull request #54110 from nekomatata/fix-rigid-body-update-collision-layer 2021-10-22 12:06:30 +02:00
PouleyKetchoupp d804c34285 Fix RigidDynamicBody collision update after changing collision layer/mask
Changing the collision layer of a sleeping body was not triggering area
updates correctly.

Bodies need to be active for collision to be checked against already
overlapping bodies and areas.

Neighbors need to be activated too in order to handle the case where a
static body is modified (it can't be activated directly but paired
bodies need to check their collision again).

In 3D, moved the call to wakeup() from the physics server to
GodotBody3D::_shapes_changed to make it consistent with 2D and also
handle the case where shapes are modified (_shapes_changed is called in
both this case and collision layer changes).
2021-10-21 17:36:58 -07:00
Yuri Roubinsky bbcf8ac672
Merge pull request #54082 from Chaosus/fix_shader_crash 2021-10-21 21:19:24 +03:00
Marcel Admiraal 87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
Rémi Verschelde 836f86688f
Merge pull request #54053 from nekomatata/fix-soft-body-disable-mode
Fix SoftDynamicBody3D crash when setting disable mode
2021-10-21 19:33:01 +02:00
Yuri Roubinsky 57fd362fe1 Prevent shader crash when passing constant expression to textureGather 2021-10-21 19:46:05 +03:00
Hugo Locurcio e87ec8ec17
Add Soft Very Low shadow quality mode for 3D
This can be used to improve 3D shadow rendering quality at little
performance cost. Unlike the existing Hard setting which is limited
to variable shadow blur only, it works with both fixed blur and
variable blur.
2021-10-21 18:34:26 +02:00
Yuri Roubinsky cacfb22365
Merge pull request #54063 from Chaosus/shader_fix_spatial_samplers 2021-10-21 19:12:43 +03:00
PouleyKetchoupp e6f7235ffb Fix SoftDynamicBody3D crash when setting disable mode
Proper logic for changing physics state when disabled and disabled mode
is changed (it was unnecessarily making calls to re-initialize physics).

Extra error handling in soft body implementations to avoid crashes with
invalid mesh.
2021-10-21 08:56:12 -07:00