Commit graph

2852 commits

Author SHA1 Message Date
kobewi 8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Rémi Verschelde 7b4927bb5f
Merge pull request #60309 from The-O-King/oct 2022-08-22 19:29:21 +02:00
Max Hilbrunner 5e0d2b5097
Merge pull request #62046 from clayjohn/vertexless-draw
Allow creating meshes without vertex positions
2022-08-20 05:32:28 +02:00
Max Hilbrunner 47d3fd99a2
Merge pull request #64461 from bitsawer/fix_windows_list_dir
Fix Windows list dir handle leak
2022-08-20 00:58:42 +02:00
clayjohn bbbcdd725a Remove requirement to have vertex positions when creating a mesh. Meshes can now be constructed from an index buffer alone 2022-08-19 14:50:12 -06:00
Max Hilbrunner 019d6584ee
Merge pull request #64167 from clayjohn/screen-texture-hint
Add shader uniform hints for screen textures
2022-08-19 21:51:39 +02:00
Aaron Franke f91934872d
Use a const ref for the bone AABB in rendering code 2022-08-18 12:20:11 -05:00
Clay John 982ff7d925
Merge pull request #64416 from aaronfranke/aabb
Don't try to merge unused bone AABBs in the rendering server
2022-08-17 23:56:05 -06:00
bitsawer 40325006b6 Fix Windows list dir handle leak 2022-08-15 20:27:29 +03:00
Aaron Franke e0d80b37e9
Don't try to merge unused bone AABBs in the rendering server 2022-08-14 23:30:48 -05:00
Omar El Sheikh f1fda97c33 Implement Octahedral on OpenGL3 2022-08-13 10:20:14 -07:00
clayjohn 65e0b266d1 Bind uniform buffer locations for lights even when no lights present to comply with strict webGL drivers 2022-08-12 15:23:01 -06:00
Pedro J. Estébanez 8a3bc72954 Apply correct formatting to comments in the Vulkan driver 2022-08-09 22:11:20 +02:00
clayjohn 028ef2edc8 Add shader uniform hints for screen textures so users can specify custom filter and repeat modes.
At this time, it works best in the Vulkan Renderers as they support using multiple samplers with the same texture.

In GLES3 this feature really only allows you to use the screen texture without mipmaps if you want to save the cost of generating them.
2022-08-09 12:29:49 -04:00
Bastiaan Olij 4417fc6d43 For dev builds, keep track of resource names in the Vulkan driver 2022-08-09 14:47:22 +10:00
bruvzg e7464e7a30
Fix macOS and iOS defines in the rendering code. 2022-08-08 17:51:31 +03:00
Rémi Verschelde 8734ef1f7a
Merge pull request #62547 from clayjohn/ref_vec_pbr 2022-08-08 10:18:32 +02:00
Hugo Locurcio 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
Rémi Verschelde dd063d1725
Merge pull request #63992 from qarmin/check_also_GLES3
Test also GLES3 in CI
2022-08-06 20:23:48 +02:00
Rafał Mikrut 49632bf993 Check also GLES3 in CI 2022-08-06 19:12:09 +02:00
Rémi Verschelde 9e361bfaaf
Merge pull request #62787 from RandomShaper/vk_object_name
Set default resource names under pure debug in Vulkan RD
2022-08-06 00:35:09 +02:00
Clay John 8f05263bd5
Merge pull request #63951 from reduz/framebuffer-cache
Add a Framebuffer cache
2022-08-05 09:45:37 -04:00
Juan Linietsky f999f52f0a Add a Framebuffer cache
Adds a FramebufferCache singletion that operates the same way as UniformSetCache.

Allows creating framebuffers on the fly (and keep them cached if re-requested) such as:

```C++
RID fb = FramebufferCache::get_singleton()->get_cache(texture1,texture2);
```
2022-08-05 13:37:29 +02:00
Fabio Alessandrelli 59eea34851 [Net] IP uses print_verbose when getaddrinfo fails.
Avoid spamming errors when network is disconnected.
Returned address will be invalid, so it can be checked by the user via
`ret.is_valid_ip_address`.
2022-08-05 10:49:56 +02:00
Hugo Locurcio db22b7ded0
Rename shader parameter uniform setter/getter methods for consistency
`shader_uniform` is now consistenly used across both per-shader
and per-instance shader uniform methods. This makes methods easier
to find in the class reference when looking for them.
2022-08-04 23:17:06 +02:00
Rémi Verschelde 8a9700c8a7 Force disable S3TC support on Android/iOS since we don't handle it
Fixes #63909 for now.
This could be improved in the future if we want to properly support S3TC on mobile.
2022-08-04 18:27:56 +02:00
Hugo Locurcio d2271eb300
Improve error message when the requested V-Sync mode cannot be used 2022-08-04 00:15:09 +02:00
Rémi Verschelde 9daffa12be
Merge pull request #49058 from madmiraal/add-override-fileaccess
Add override keywords to FileAccess and DirAccess derived classes
2022-08-02 20:03:24 +02:00
Marcel Admiraal c06025fa13 Add override keywords to DirAccess derived classes 2022-08-02 16:39:44 +01:00
Marcel Admiraal cafb19e608 Add override keywords to FileAccess derived classes 2022-08-02 16:35:15 +01:00
Patrick Exner fe5901310e Add spatial built-ins (camera-pos, object-pos, camera-eye etc.) 2022-08-02 17:30:41 +02:00
Rémi Verschelde 8cce479c01
Merge pull request #51672 from Calinou/shader-add-hint-transparent-texture
Add `hint_transparent` to use a transparent black placeholder texture
2022-08-02 07:15:59 +02:00
Hugo Locurcio 813f6a5d57
Add hint_transparent to use a transparent black placeholder texture
This can be used in shaders to avoid the need to supply a transparent
placeholder texture manually.
2022-08-01 23:38:06 +02:00
clayjohn 4b80cb4aa3 Fix various bugs in GLES3 renderer that stopped it from running on web 2022-08-01 16:45:32 -04:00
Yuri Rubinsky 9ec6de1767
Merge pull request #63766 from Chaosus/fix_shader_instance_uniform 2022-08-01 15:04:54 +03:00
Yuri Rubinsky 81c44718ca Fix passing values to the instance uniforms in the shader 2022-08-01 13:45:29 +03:00
Rémi Verschelde d29e95687e
Merge pull request #63761 from BastiaanOlij/gles3_scene_singleton_init 2022-08-01 11:35:19 +02:00
Bastiaan Olij 367507e7da Initialise singleton in RendererSceneGLES3 2022-08-01 18:42:42 +10:00
Rémi Verschelde 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
clayjohn 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
Rémi Verschelde 15a02c49be
Merge pull request #61647 from KoBeWi/SaverResource 2022-07-29 22:30:51 +02:00
kobewi c3606cb5f3 Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02:00
LinuxUserGD 6e6569aa78 fix 'Comparison result is always the same' warnings 2022-07-29 19:45:22 +02:00
Rémi Verschelde 2bf8c4a6d0
Merge pull request #63527 from BastiaanOlij/rework_environment
Restructure environment in render implementation
2022-07-29 08:05:40 +02:00
Bastiaan Olij f579125eeb Restructure environment in render implementation 2022-07-29 12:24:32 +10:00
Rémi Verschelde 8e0f328a80
Merge pull request #59840 from Calinou/renderingserver-global-uniform-rename 2022-07-28 20:34:17 +02:00
Hugo Locurcio 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
Hugo Locurcio e24029edc3
Allow changing mipmap LOD bias when FSR 1.0 scaling is not used
Mipmap LOD bias can be useful to improve the appearance of distant
textures without increasing anisotropic filtering (or in situations
where anisotropic filtering is not effective).

`fsr_mipmap_bias` was renamed to `texture_mipmap_bias` accordingly.
The property hint now allows for greater precision as well.
2022-07-28 17:51:13 +02:00
Rémi Verschelde 82811367cb
Merge pull request #63571 from RandomShaper/conservative_validate_vrs 2022-07-28 15:34:47 +02:00
Pedro J. Estébanez 5f71b55380 Improve handling of the format of the VRS image
- Validate format conservatively. (This is to have VRS images created regardless whether VRS attachments are supported, which avoids errors in places where the code assumes such images were created on low-spec GPUs.)
- Create a non-layered default VRS image, which is what Vulkan (and D3D12, by the way) expect.
2022-07-28 12:24:03 +02:00