summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_scene_cull.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added material_overlay property to MeshInstance3DFernando Cosentino2022-01-051-0/+25
| | | | | | | | | | | | | | | Applying overlay materials into multi-surface meshes currently requires adding a next pass material to all the surfaces, which might be cumbersome when the material is to be applied to a range of different geometries. This also makes it not trivial to use AnimationPlayer to control the material in case of visual effects. The material_override property is not an option as it works replacing the active material for the surfaces, not adding a new pass. This commit adds the material_overlay property to GeometryInstance3D (and therefore MeshInstance3D), having the same reach as material_override (that is, all surfaces) but adding a new material pass on top of the active materials, instead of replacing them.
* Merge pull request #56305 from Calinou/rename-lod-thresholdRémi Verschelde2022-01-041-9/+9
|\
| * Rename Lod Threshold to Mesh Lod ThresholdHugo Locurcio2021-12-291-9/+9
| | | | | | | | | | This makes it more obvious that the setting only affects mesh LOD, not manual (H)LOD achieved using visibility ranges.
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Rename `remove()` to `remove_at()` when removing by indexLightning_A2021-11-231-1/+1
|
* Fix transparency state initializationjfons2021-11-121-0/+3
|
* Add GLES2 2D renderer + Linux display managerlawnjelly2021-10-301-0/+4
| | | | | | | | | 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>
* Addition of FogVolumes, FogShaders, FogMaterial, and overhaul of VolumetricFogclayjohn2021-10-281-3/+47
| | | | Co-authored-by: Brian Semrau <brian.semrau@gmail.com>
* Merge pull request #54222 from JFonS/instance-fadeRémi Verschelde2021-10-281-70/+139
|\
| * Implement distance fade and transparencyJFonS2021-10-251-14/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix state inconsistencies in visibility dependencies.jfons2021-10-251-57/+43
| |
* | Fix shadow disabling settingsjfons2021-10-251-2/+2
|/ | | | | | | Fixes the SHADOW_CASTING_SETTING_OFF setting in GeometryInstance3D and the "shadows_disabled" render mode in spatial materials, which were not working before.
* Merge pull request #53790 from briansemrau/remove-distant-shadowy-voidRémi Verschelde2021-10-191-1/+1
|\
| * Fix several issues with directional shadowsBrian Semrau2021-10-141-1/+1
| | | | | | | | | | | | - Internally disable blend splits in orthogonal directional shadow mode - Fix soft shadows ignoring fade and blend_splits - Fix soft shadow edge stability
* | Swap args of Plane(point, normal) constructormennomax2021-10-151-1/+1
|/ | | | Now (normal, point)
* Use range iterators for `Map`Lightning_A2021-09-301-5/+5
|
* Rename RID's `getornull()` to `get_or_null()`Hugo Locurcio2021-09-291-53/+53
|
* Add Get Center Method for Rect2/Rect2i and AABB.Anilforextra2021-09-211-3/+3
|
* Improvements to SpotLight3D and OmniLight3D's shadowsjfons2021-08-191-8/+3
| | | | | | | | | | | | | | | | | OmniLight3D: * Fixed lack of precision in cube map mode by scaling the projection's znear. * Fixed aliasing issues by making the paraboloids use two square regions instead of two half squares. * Fixed shadowmap atlas bleeding by adding padding. * Fixed sihadow blur's inconsistent radius and unclamped sampling. SpotLight3D: * Fixed lack of precision by scaling the projection's znear. * Fixed normal biasing. Both: * Tweaked biasing to make sure it works out of the box in most situations.
* Merge pull request #51025 from reduz/fix-directional-shadow-biasRémi Verschelde2021-08-131-71/+4
|\ | | | | Fix directional shadow bias
| * Fix directional shadow biasreduz2021-07-291-71/+4
| | | | | | | | | | | | | | | | | | * Simplified code a lot, bias based on normalized cascade size. * Lets scale cascades, max distance, etc. without creating acne. * Fixed normal biasing in directional shadows. I removed normal biasing in both omni and spot shadows, since the technique can't be easily implemented there. Will need to be replaced by something else.
* | Some work on double supportAaron Franke2021-08-091-2/+2
|/
* Merge pull request #50809 from akien-mga/iterators-const-referencesRémi Verschelde2021-07-251-3/+3
|\
| * Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-3/+3
| |
* | Fix various typos with codespellluz paz2021-07-251-1/+1
|/ | | | Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-19/+17
|
* Use specialization constants in clustered rendererreduz2021-07-121-1/+54
| | | | | | | * Keep track of when projector, softshadow or directional sofshadow were enabled. * Enable them via specializaton constant where it makes sense. * Re-implements soft shadows. * Re-implements light projectors.
* Fix Command Queue Crashreduz2021-07-071-0/+2
| | | | | * No longer allow sending an object (texture) to the server as material parameter * Keep a parameter cache locally in ShaderMaterial
* Fix Render Inforeduz2021-07-031-5/+4
| | | | | | | | * Fixed and redone the process to obtain render information from a viewport * Some stats, such as material changes are too difficult to guess on Vulkan, were removed. * Separated visible and shadow stats, which causes confusion. * Texture, buffer and general video memory can be queried now. * Fixed the performance metrics too.
* Remove leftovers from the DirectionalLight3D Optimized shadow depth rangeHugo Locurcio2021-07-021-18/+7
| | | | | | The Optimized shadow depth range was removed in late 2020 in favor of the Stable shadow depth range, but it still had a (broken) property that allowed to enable it.
* Clean up RenderingServer and its bindingsreduz2021-07-011-9/+0
| | | | | | * Rewrote bindings for RenderingServer. * They are now all up to date. * Several unused methods and deprecated features were cleaned up.
* Deprecate ImmediateGeometryreduz2021-06-301-31/+1
| | | | | | | | | * Removed entirely from RenderingServer. * Replaced by ImmediateMesh resource. * ImmediateMesh replaces ImmediateGeometry, but could use more optimization in the future. * Sprite3D and AnimatedSprite3D work again, ported from Godot 3.x (though a lot of work was needed to adapt them to Godot 4). * RootMotionView works again. * Polygon3D editor works again.
* Improve RID_Owner memory usagereduz2021-06-291-12/+6
| | | | | | * Ability to allocate empty objects in RID_Owner, so RID_PtrOwner is not needed in most cases. * Improves cache usage, as objects are now allocated together * Should improve performance in 2D rendering
* Fix crash in visibility range system.jfons2021-06-191-2/+3
|
* Fix "Ignore Occlusion Culling" flag.jfons2021-06-181-1/+1
|
* Refactor VisibilityNotifier3Dreduz2021-06-161-0/+45
| | | | | | | * This is the 3D counterpart to #49632 * Implemented a bit different as 3D works using instancing After merged, both 2D and 3D classes will most likely be renamed in a separate PR to DisplayNotifier2D/3D.
* Implement visibility range and dependencies.jfons2021-06-141-169/+474
| | | | | | | | | | | | | | | | | | | | | This commit adds the following properties to GeometryInstance3D: `visibility_range_begin`, `visibility_range_begin_margin`, `visibility_range_end`, `visibility_range_end_margin`. Together they define a range in which the GeometryInstance3D will be visible from the camera, taking hysteresis into account for state changes. A begin or end value of 0 will be ignored, so the visibility range can be open-ended in both directions. This commit also adds the `visibility_parent` property to 'Node3D'. Which defines the visibility parents of the node and its subtree (until another parent is defined). Visual instances with a visibility parent will only be visible when the parent, and all of its ancestors recursively, are hidden because they are closer to the camera than their respective `visibility_range_begin` thresholds. Combining visibility ranges and visibility parents users can set-up a quick HLOD system that shows high detail meshes when close (i.e buildings, trees) and merged low detail meshes for far away groups (i.e. cities, woods).
* Add stereoscopic rendering through multiviewBastiaan Olij2021-06-131-141/+93
|
* Rename GI Classesreduz2021-06-051-92/+92
| | | | | | | * GIProbe is now VoxelGI * BakedLightmap is now LightmapGI As godot adds more ways to provide GI (as an example, SDFGI in 4.0), the different techniques (which have different pros/cons) need to be properly named to avoid confusion.
* Rename Transform to Transform3D in coreAaron Franke2021-06-031-22/+22
|
* Assorted fixes to UV unwrapping and GPU lightmapperjfons2021-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | Various fixes to UV2 unwrapping and the GPU lightmapper. Listed here for context in case of git blame/bisect: * Fix UV2 unwrapping on import, also cleaned up the unwrap cache code. * Fix saving of RGBA images in EXR format. * Fixes to the GPU lightmapper: - Added padding between atlas elements, avoids bleeding. - Remove old SDF generation code. - Fix baked attenuation for Omni/Spot lights. - Fix baking of material properties onto UV2 (wireframe was wrongly used before). - Disable statically baked lights for objects that have a lightmap texture to avoid applying the same light twice. - Fix lightmap pairing in RendererSceneCull. - Fix UV2 array generated from `RenderingServer::mesh_surface_get_arrays()`. - Port autoexposure fix for OIDN from 3.x. - Save debug textures as EXR when using floating point format.
* Create mobile rendererBastiaan Olij2021-05-031-10/+11
|
* Implement Particle Trailsreduz2021-04-301-1/+4
| | | | | | | | | -Enable the trails and set the length in seconds -Provide a mesh with a skeleton and a skin -Or, alternatively use one of the built-in TubeTrailMesh/RibbonTrailMesh -Works deterministically -Fixed particle collisions (were broken) -Not working in 2D yet (that will happen next)
* Implement occlusion cullingjfons2021-04-231-11/+98
| | | | | | | | | Added an occlusion culling system with support for static occluder meshes. It can be enabled via `Project Settings > Rendering > Occlusion Culling > Use Occlusion Culling`. Occluders are defined via the new `Occluder3D` resource and instanced using the new `OccluderInstance3D` node. The occluders can also be automatically baked from a scene using the built-in editor plugin.
* Fix reflection probeBastiaan Olij2021-04-211-1/+8
|
* Rename get_surface_material to get_surface_override_materialclayjohn2021-04-141-1/+1
|
* Reorganize Project Settingsreduz2021-02-181-2/+2
| | | | | | | -Advanced Settings toggle also hides advanced properties when disabled -Simplified Advanced Bar (errors were just plain redundant) -Reorganized rendering quality settings. -Reorganized miscelaneous settings for clean up.
* Make Servers truly Thread Safereduz2021-02-101-14/+17
| | | | | | | | | -Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread). -RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault. -Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory). -3D physics server changed to be made multithread friendly. -Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads. -Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
* Rewrote how barriers work for faster renderingreduz2021-02-041-87/+121
| | | | | | | | | | | -Added more finegrained control in RenderingDevice API -Optimized barriers (use less ones for thee same) -General optimizations -Shadows render all together unbarriered -GI can render together with shadows. -SDFGI can render together with depth-preoass. -General fixes -Added GPU detection
* Fix zero scaling and material mappings being mapped to wrong fieldsGordon MacPherson2021-01-261-1/+2
| | | | | | | | - fixes scale values of 0.0013 (det == 0.00004) not rendering, they should render even at small values, but not at zero like the editor grid plugin supplies zero exactly. - fixes node_3d_editor_plugin visibility bug when scale is zero - fix culling with small scaling values - which are still valid to be rendered like 0.00004 note: grid is still not fixed, it has det == 0 issues but this fixes one of them.