Commit Graph

36 Commits

Author SHA1 Message Date
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
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
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
Robin Arys 0e31465a59 Fix shaders that use TIME do not force editor to continuously update 2021-10-18 22:53:20 +02:00
mennomax b4eeeb315a
Swap args of Plane(point, normal) constructor
Now (normal, point)
2021-10-15 20:49:42 -05:00
Brian Semrau e9f1b0a0b2 Remove incorrect fog height density remapping 2021-10-14 16:09:45 -04:00
Hugo Locurcio 265bae824f
Remove unimplemented `Environment.ambient_light_occlusion_color` property
This property was intended to provide a way to have SSAO or VoxelGI
ambient occlusion with a color other than black. However, it was
dropped during the Vulkan renderer development due to the performance
overhead it caused when the feature wasn't used.
2021-10-07 17:47:52 +02:00
Hugo Locurcio ba65730cbf
Rename RID's `getornull()` to `get_or_null()` 2021-09-29 23:58:02 +02:00
Rémi Verschelde ec23d1348a
Merge pull request #52409 from GiantBlargg/position-depth-pre-pass 2021-09-17 14:21:29 +02:00
Rémi Verschelde 8ecc571158
Merge pull request #49063 from Calinou/remove-16x-msaa
Remove 16× MSAA support due to driver bugs and low performance
2021-09-13 17:34:04 +02:00
Daniel Doran 3138b94058 Fix depth pass for shaders that set POSITION 2021-09-05 01:05:42 -06:00
Hugo Locurcio 7192852da3
Remove 16× MSAA support due to driver bugs and low performance
In the `master` branch, 16× MSAA caused the entire system to freeze
on NVIDIA GPUs. This is likely caused by graphics drivers not actually
implementing 16× MSAA, but combining 8× MSAA with 2× SSAA instead.

On top of that, modern shader complexity makes 16× MSAA very difficult
to use while keeping a good framerate. 8× MSAA is hard enough to use
as it is.
2021-08-25 07:56:27 +02:00
Yuri Roubinsky b6af457d25 Fix incorrect checking of uniform set to prevent error spam (2) 2021-08-19 09:11:01 +03:00
reduz 6027cd0a1d Fixes to mobile renderer
* Make sure shaders are named, to aid in debug in case of failure
* SceneRenderRD was being wrongly initialized (virtual functions being called when derivative class not initialized).
* Fixed some bugs resulting on the above being corrected.
2021-08-17 13:52:06 -03:00
Bastiaan Olij 4002650cb9 Fix read from screen and depth texture 2021-08-15 13:14:19 +10:00
Rémi Verschelde da339f8ffc
Merge pull request #51309 from Chaosus/fix_uniform_error_spam
Fix incorrect checking of uniform set to prevent error spam
2021-08-06 17:15:03 +02:00
Bastiaan Olij b920bf05a4 Use subpasses to do 3D rendering and resolve in mobile renderer 2021-08-06 23:43:26 +10:00
Yuri Roubinsky ac4406cfbe Fix incorrect checking of uniform set to prevent error spam 2021-08-06 12:20:12 +03:00
reduz 9293bc3935 Implement more rendering options as specialization constants
* Shadow quality settings now specialization constant.
* Decal and light projector filters can be set.
* Changing those settings forces re-creation of the pipelines.

These changes should help improve performance related to shadow mapping, and allows improving performance by sacrificing decal and light projector quality.
2021-07-19 21:51:29 -03:00
reduz ad9f606ed8 Use specialization constants in clustered renderer
* 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.
2021-07-12 20:33:52 -03:00
reduz 7f6027927a Fix Subsurface Scattering
* Works again
* Transmittance also works again
* Removed the curve patamter, exp() function is good enough.
2021-07-05 17:17:45 -03:00
Daniel Doran 82bb8f1531 Fix transparency sorting 2021-07-05 03:19:42 -06:00
reduz fe17a6c907 Fix render debug modes.
* Ovedraw debug works again
* Lighting debug works again
2021-07-03 14:50:36 -03:00
reduz 6c55d2aad2 Fix Render Info
* 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.
2021-07-03 10:15:04 -03:00
reduz d55ebc3a5d Fix non uniform scaling in 3D objects
* Flag was there, but not implemented.
* Fixed issue with base flags not being initialized.
2021-06-29 11:45:59 -03:00
Bastiaan Olij 15c1a76361 Add stereoscopic rendering through multiview 2021-06-13 22:52:20 +10:00
reduz 32625145c8 Rename GI Classes
* 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.
2021-06-05 09:28:56 -03:00
Aaron Franke de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
Bastiaan Olij 308b26762b Split RenderDataRD struct from RenderState struct to simplify passing our render data around the renderer. 2021-05-10 21:52:15 +10:00
jfons 6995b0429c Assorted fixes to UV unwrapping and GPU lightmapper
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.
2021-05-03 18:10:34 +02:00
Bastiaan Olij 58ff0dac1a Create mobile renderer 2021-05-03 21:54:11 +10:00
reduz 90056460ad Implement Particle Trails
-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)
2021-04-30 17:38:02 -03:00
Rémi Verschelde 8247667a3e
Core: Drop custom `copymem`/`zeromem` defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
2021-04-27 16:26:27 +02:00
Bastiaan Olij ebf10fe736 Fix reflection probe 2021-04-21 23:42:29 +10:00
Bastiaan Olij 71c5d73b5e Remove low_end option from renderer, being replaced by separate implementation 2021-04-09 22:04:56 +10:00
Bastiaan Olij dad40fa2df Move clustered renderer functionality 2021-04-05 23:11:38 +10:00
Renamed from servers/rendering/renderer_rd/renderer_scene_render_forward_clustered.cpp (Browse further)