Commit Graph

40 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
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 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
Clay John 036b7a0985
Merge pull request #51873 from Chaosus/fix_uniform_error_spam
Fix incorrect checking of uniform set to prevent error spam (2)
2021-08-31 11:28:48 -07:00
Bastiaan Olij 64626cc435 Optionally scale 3D render content 2021-08-26 20:48:40 +10: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
Bastiaan Olij d22163c657 Scale color output in the mobile renderer to provide HDR support 2021-08-23 15:30:36 +10: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
Juan Linietsky d5a30431b9
Merge pull request #51635 from reduz/further-mobile-optimizations
More optimizations on the mobile renderer.
2021-08-16 14:50:52 -03:00
Bastiaan Olij 4002650cb9 Fix read from screen and depth texture 2021-08-15 13:14:19 +10:00
reduz cfac8972e1 More optimizations on the mobile renderer.
* Specialization constants used to disable anything not needed to draw
* Added softshadow and projector support on mobile.

This new approach ensures mobile shaders are smaller and more efficient, but relies on more pipeline versions compiled on demand.
As a result, random stalls can ocur like in Godot 3.x. These will be solved by using background compilation and fallbacks eventually (but needs to be tested first).
2021-08-13 14:30:59 -03:00
reduz ca117910da Fixes and optimizations to mobile renderer
* Only apply final actions to attachments used in the last pass.
* Fixes to draw list final action (was using continue instead of read/drop).
* Profiling regions inside draw lists now properly throw errors.
* Ability to enable gpu profile printing from project settings. (used to debug).
2021-08-10 23:17:28 -03: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
Bastiaan Olij c76426527b Porting cubemap compute shaders to raster for the mobile renderer 2021-08-01 21:22:38 +10:00
luz paz 5cf3bed0c8 Fix various typos
Follow-up typos 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`
2021-07-25 07:18:25 -04:00
Rémi Verschelde 2a8a59eac0
Merge pull request #50644 from BastiaanOlij/mobile_compute_to_fragment 2021-07-25 11:58:11 +02:00
Bastiaan Olij 1f69582835 Use fragment shader instead of compute shader for effects for mobile renderer 2021-07-25 13:58:21 +10: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 76e25438c9 Fixes to forward mobile
* use valid format for framebuffer: VK_FORMAT_A2B10G10R10_UNORM_PACK32
* Unfortunately cant be used for compute.
* Mobile will need to do refprobe, sky, mipmapblurring using raster.
2021-07-15 21:05:58 -03:00
Juan Linietsky 3f12765a7e
Merge pull request #49678 from BastiaanOlij/mobile_renderer_select_color_format
Use 32bit instead of 64bit 3D render buffer on mobile renderer
2021-07-15 10:16:39 -03:00
Bastiaan Olij 8a29208fc4 Use 32bit instead of 64bit 3D render buffer on mobile 2021-07-13 10:26:28 +10: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
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
Bastiaan Olij cc45ed448b Remove repeat from forward mobile renderer 2021-05-04 11:37:58 +10:00
Bastiaan Olij 58ff0dac1a Create mobile renderer 2021-05-03 21:54:11 +10:00