Commit Graph

325 Commits

Author SHA1 Message Date
385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
bcc3643989 Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
f1fda97c33 Implement Octahedral on OpenGL3 2022-08-13 10:20:14 -07:00
8734ef1f7a Merge pull request #62547 from clayjohn/ref_vec_pbr 2022-08-08 10:18:32 +02:00
baaa7503c7 Add a shadow opacity property to Light3D
This can be used to make shadows translucent for a specific light.

The light distance fade system also uses this to smoothly fade the shadow
when the light fade transition distance is greater than 0.
2022-08-07 11:06:32 +02:00
4b80cb4aa3 Fix various bugs in GLES3 renderer that stopped it from running on web 2022-08-01 16:45:32 -04:00
677f565ce8 Merge pull request #63587 from clayjohn/specular-occlusion
Treat specular less than 0.02 as occlusion
2022-08-01 07:54:57 +02:00
0c65ed38a6 Treat specular less than 0.02 as occlusion
This is a very common hack used in almost all PBR renderers to allow removing specular contribution in dielectric materials
2022-07-31 15:45:21 -07:00
4b42379c8f Rename RenderingServer global shader uniform methods to be more explicit
The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
2022-07-28 18:46:59 +02:00
d7a1acd229 Merge pull request #62364 from clayjohn/GLES3-sky-optimization 2022-07-27 12:39:58 +02:00
6bbfd160b0 SCons: Properly track codegen script dependency for generated GLSL headers 2022-07-02 16:01:48 +02:00
93c82ab4b9 Evaluate specular reflections using specular dominant direction instead of assuming mirror reflections 2022-06-29 23:36:18 -07:00
88830509d1 Precompute on the CPU as much as possible for the Cubemap filter shader 2022-06-22 16:46:27 -07:00
5f52936350 Implement MultiMesh in 3D and flesh out MultiMesh functions 2022-06-14 21:23:20 -07:00
fb860265e0 Implement 2D Meshes and MultiMeshes in GLES3 backend 2022-05-25 15:46:24 -07:00
3e20c1347d Add clipping, backbuffer, and CanvasGroups to 2D GLES3 renderer
As well as significant consequent cleanup in the RenderTarget, Texture, and Canvas renderer code
2022-05-24 11:00:34 -07:00
39f1be760f Fix sky updating when DirectionalLight mode changed and shader compatibility for certain drivers 2022-05-19 17:44:38 -07:00
5322b171de Fix tonemapper shader to correctly apply alpha channel 2022-05-18 06:43:07 +03:00
9b61c855ef Add basic lighting to GLES3 renderer.
This includes all three light types and IBL, but does not include shadows or any form of GI
2022-05-16 15:07:09 -07:00
52aeaf5d16 Fix computation of screen_uv 2022-05-16 00:00:01 -04:00
652adcd5bf Basic 3D rendering 2022-05-12 10:37:27 -07:00
2bf8831dd6 SceneShader compiling 2022-05-11 21:00:21 -07:00
3bb8e6a9fe SkyShaders working 2022-05-11 21:00:21 -07:00
b831fb0a54 Rename Transform2D "elements" to "columns" 2022-04-29 08:02:39 -05:00
f394388aa2 Merge pull request #60503 from clayjohn/OPENGL-3D 2022-04-28 19:56:16 +02:00
2f2064fe3d Overhaul GLES3: Add basis for 3D renderer, overhaul materials and textures 2022-04-26 11:48:39 -07:00
be611c1c05 Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
0d9aecd967 Rename several transform built-ins in shaders 2022-03-18 12:10:55 +03:00
fe49244611 Use Filament specular models and parametrization 2022-02-22 19:39:41 -08:00
99064d57db New OpenGL batching canvas renderer 2022-01-11 22:26:18 -08:00
98ac002c34 WIP New GLES3 Shader Compiler
Uses versions and specializations (more similar to RenderingDevice version)
2022-01-11 22:25:01 -08:00
a124f1effe Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 01:03:58 -05:00
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
386968ea97 Remove obsolete GLES3 backend
Due to the port to Vulkan and complete redesign of the rendering backend,
the `drivers/gles3` code is no longer usable in this state and is not
planned to be ported to the new architecture.

The GLES2 backend is kept (while still disabled and non-working) as it
will eventually be ported to serve as the low-end renderer for Godot 4.0.

Some GLES3 features might be selectively ported to the updated GLES2
backend if there's a need for them, and extensions we can use for that.

So long, OpenGL driver bugs!
2020-02-13 10:36:44 +01:00
4faaf6089a Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
90a224c6eb Merge pull request #35310 from akien-mga/gles3-irradiance-small-optimization
GLES3: Slight optimization to irradiance compute
2020-01-19 18:55:51 +01:00
dc4db4ab45 GLES3: Slight optimization to irradiance compute
All the calculations leading up to `mipLevel` are only relevant for
Panorama mode. Similarly, the `source_resolution` uniform is only
needed for that mode.
2020-01-19 11:03:11 +01:00
0979411cad reduce complexity of irradiance map generation 2020-01-18 16:51:52 -08:00
796d35d8b3 Fix generation of irradiance map 2020-01-12 14:45:31 -08:00
2d6586ec78 Merge pull request #34551 from MadEqua/fix-light-with-skeleton
Fix 2D lighting when using skeleton.
2020-01-03 08:32:29 +01:00
bb6f04c9f5 Fix wrong return type
`ERROR: _display_error_with_code: CanvasShaderGLES3: Fragment Program Compilation Failed:
0:166(2): error: `return' with wrong type int, in function `map_ninepatch_axis' returning float`  caused by #34704
2020-01-01 19:14:51 +07:00
e4907e50fe GLES3: Fix false positive in ninepatch axis stretch code
See #34704.
2020-01-01 11:49:58 +01:00
c9fe11dec1 Use correct omni light attenuation
fixes godotengine/godot#34683
2019-12-29 17:22:34 +01:00
f26c9d650b Fix 2D lighting when using skeleton. 2019-12-23 00:00:18 +00:00
e21872f4b9 Merge pull request #34527 from MadEqua/fix-gles3-light-cutoff
Fix GLES3 light cutoff.
2019-12-21 23:40:15 +01:00
d47374385c Fix GLES3 light cutoff. 2019-12-21 20:52:54 +00:00
d7f9d71be2 Fix contact shadow when light is outside of viewport. 2019-12-21 16:55:41 +00:00
676f647c74 Add a default POINT_SIZE 2019-12-10 23:08:20 -08:00
65e6efaa3b Merge pull request #33836 from clayjohn/blinn-fix
Fix Specular Blinn function
2019-12-03 07:50:37 +01:00
299b85c46f Disable shadow map sampling when shadows are not used in GLES3
Fixes #20742
2019-11-29 06:21:17 +01:00