summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_scene_cull.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename RenderingServer global shader uniform methods to be more explicitHugo Locurcio2022-07-281-5/+5
| | | | | The `global_shader_uniform` name is longer, but it makes it much easier to find the methods when searching in the class reference.
* Change RendererSceneRender::GeometryInstance so more code is shared among ↵Bastiaan Olij2022-07-271-48/+48
| | | | renderers
* Remove ThreadWorkPool, replace by WorkerThreadPoolJuan Linietsky2022-07-251-7/+9
| | | | | The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient. It can also be better debugged.
* Implement Vector4, Vector4i, Projectionreduz2022-07-231-13/+13
| | | | | | | | | | | | | Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
* Fix typo, call mesh_instance_free not mesh_freeBastiaan Olij2022-07-121-1/+1
|
* Merge pull request #62344 from BastiaanOlij/extract_dependenciesRémi Verschelde2022-07-061-12/+12
|\
| * Split dependency logicBastiaan Olij2022-06-281-12/+12
| | | | | | | | | | | | Split FOG Split visibility notifier Final cleanup of storage classes
* | Fix crash in Environment "Canvas" background mode.JFonS2022-06-281-1/+1
|/
* Split GI effects and fix stereoscopic rendering of GI effectsBastiaan Olij2022-06-221-1/+1
|
* Initial TAA implementationjfons2022-06-071-5/+33
| | | | | | Initial TAA support based on the implementation in Spartan Engine. Motion vectors are correctly generated for camera and mesh movement, but there is no support for other things like particles or skeleton deformations.
* Add a new HashSet templatereduz2022-05-201-6/+6
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Use range iterators for RBSet in most casesAaron Record2022-05-191-34/+34
|
* Replace most uses of Map by HashMapreduz2022-05-161-24/+24
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* opengl3 driver now works on windows including multi windowderammo2022-05-111-2/+5
| | | | | | | | | | | | | | | | | | | | | fixed and simplified gl_manager_windows swap buffers now called for all windows fixed missing pixel format setting in additional windows this makes them work in OpenGL contexts changed verbose error printing to write once this error message happens very frequently while opengl3 is not finished removed dead code no longer needed after changes fixed comments that were misinformation window messages during window creation now handled these were previously discarded messages now tunnel the required context changed failure to create opengl3 window on windows to be more fatal marked a problem with pen code conditional compilation of vulkan and opengl3 on windows fixed windows debug builds now show messages on debug console also rendering driver selection box now shows only compiled drivers marked some problematic code thanks to akien-mga for patiently rewriting my style mistakes
* Rename Basis get_axis to get_column, remove redundant methodsAaron Franke2022-05-031-8/+8
|
* Rename Basis "elements" to "rows"Aaron Franke2022-04-291-1/+1
|
* Fix "ortogonal" -> "orthogonal" typo in rasterizer codeHugo Locurcio2022-04-261-10/+10
|
* Moved particles into ParticlesStorageBastiaan Olij2022-04-171-17/+17
|
* Move light, reflection probe and lightmap into LightStorageBastiaan Olij2022-04-171-81/+81
|
* Merge canvas and decal into TextureStorage and add render targetBastiaan Olij2022-04-171-1/+1
|
* Move storage for Mesh, MeshInstance, MultiMesh and Skeleton into MeshStorageBastiaan Olij2022-04-021-24/+24
|
* Extract global variable, shader and material storageBastiaan Olij2022-03-311-24/+24
|
* Extract Decal and Decal atlas from Storage classBastiaan Olij2022-03-211-1/+1
|
* Replace DirectionalLight3D's `use_in_sky_only` with `sky_mode` enumHugo Locurcio2022-03-171-3/+3
| | | | | | | | | | 3 options are available: - Light and Sky (default) - Light Only (new) - Sky Only (equivalent to `use_in_sky_only = true`) Co-authored by: clayjohn <claynjohn@gmail.com>
* Tweak render timestamp names for explicitness and consistencyHugo Locurcio2022-03-041-14/+14
| | | | | | | - Add 2D and 3D in timestamp names when needed to avoid ambiguity. - Use present tense in all render timestamp names. - Add a space after ">" (begin) and "<" (end) symbols. - Remove redundant "End" in render timestamp names (indicated by "<").
* Add Particle Shader Userdatareduz2022-02-151-0/+9
| | | | | * Adds optional vec4 USERDATA1 .. USERDATA6 to particles, allowing to store custom data. * This data is allocated on demand, so shaders that do not use it do not cost more.
* Remove RID_Owner.get_rid_by_indexreduz2022-02-051-2/+6
| | | | | * Implementing this function efficiently is not really possible. * Replaced by an option to get all RIDs into a buffer for performance.
* 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
|\