Yuri Roubinsky
0d9aecd967
Rename several transform built-ins in shaders
2022-03-18 12:10:55 +03:00
Rémi Verschelde
cfd21adf64
Merge pull request #49092 from BastiaanOlij/multiview_clustered
...
Add multiview support to the clustered forward renderer
2022-03-16 00:17:57 +01:00
snowapril
b6f72f2b4a
Fix D_GGX code which can cause divide-by-zero val
...
When given roughness is lower than 0.01, d value in original code will
be zero. This can make last return value as NAN because of
divide-by-zero. This is well addressed in issue #56373 .
Modified code is referenced on D_GGX function of google/filament
(https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L54-L79 )
Signed-off-by: snowapril <sinjihng@gmail.com>
2022-03-14 13:25:05 +09:00
Rémi Verschelde
7ed8d52fb2
Merge pull request #58819 from vreon/fix-eyedir-z
...
Fix flipped EYEDIR.z in sky shaders
2022-03-13 00:55:32 +01:00
Jesse Dubay
d437355f55
Sky renderer: Only flip Z when calculating panorama_coords
2022-03-08 19:51:43 -08:00
Rémi Verschelde
1561737055
Merge pull request #49447 from Calinou/remove-shadow-color-property
...
Remove unused `shadow_color` property from Light3D
2022-03-08 07:48:05 +01:00
Jesse Dubay
80345f7d4e
Fix flipped EYEDIR.z in sky shaders
2022-03-05 17:49:32 -08:00
Priyansh Rathi
8c37cfa5bb
use the computed value ambient_accum for ambient_light in scene_forward_mobile.glsl
2022-03-05 14:24:40 +05:30
Hugo Locurcio
aea104deb7
Remove unused `shadow_color` property from Light3D
...
This shadow color property was no longer effective since the shaders
were optimized to improve occupancy.
2022-03-04 23:12:18 +01:00
Bastiaan Olij
e4b7a69bb6
Add multiview/stereoscopic rendering support to the clustered forward renderer
2022-03-03 20:06:14 +11:00
Rémi Verschelde
0036a41a10
Revert "Fix particle trail glitch"
2022-03-01 20:16:10 +01:00
floppyhammer
1675c5375e
Fix particle trail glitch
2022-02-26 13:53:06 +08:00
Darryl Ryan
3ce5cceef9
Filament specular fix. Clamp dot product between normal and view vectors. Fixes #58459 .
2022-02-23 18:16:52 +00:00
Bastiaan Olij
a78a9fee71
Implementing OpenXR driver
2022-02-23 12:02:24 +01:00
clayjohn
fe49244611
Use Filament specular models and parametrization
2022-02-22 19:39:41 -08:00
floppyhammer
0d5472dd1a
Fix GPUParticles2D emission offset in global coords
2022-02-22 17:50:01 +08:00
clayjohn
2da35d2b94
Fix shader compilation error with anisotropy
2022-02-21 22:58:33 -08:00
Rémi Verschelde
e1b8a86b2b
Merge pull request #58177 from clayjohn/VULKAN-prefiltered-radiance
2022-02-17 17:53:42 +01:00
clayjohn
48728a79b6
Use prefiltered radiance
2022-02-16 21:37:18 -08:00
Rémi Verschelde
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
...
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
reduz
4f73d3beb4
Add Particle Shader Userdata
...
* 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.
2022-02-15 19:20:31 +01:00
Rémi Verschelde
18d6b75ba8
RendererRD: Remove binding specifier for push constants
...
This is unsupported and glslang made it raise an error in 11.7.0:
https://github.com/KhronosGroup/glslang/pull/2810
Co-authored-by: Clay John <claynjohn@gmail.com>
2022-02-11 18:42:32 +01:00
Bartłomiej Dusak
38423565e4
remove normal_to_panorama from spotlight projector
2022-02-09 23:47:44 +01:00
Rémi Verschelde
a6abeb6b20
Merge pull request #57682 from clayjohn/VULKAN-canvas-blur
2022-02-07 10:16:50 +01:00
Rémi Verschelde
3ae38edc8e
Merge pull request #56844 from Calinou/ssr-fix-background-line-master
...
Fix visible background line in intersections in screen-space reflections
2022-02-06 23:22:15 +01:00
clayjohn
60d8df3fee
Optimize and fix backbuffer gaussian blur
2022-02-05 15:03:39 -08:00
Rémi Verschelde
58324f4df8
Merge pull request #54574 from Ansraer/glow_map
2022-01-26 13:39:51 +01:00
Rémi Verschelde
7e3b92f81f
Merge pull request #55360 from Calinou/rename-bake-mode-properties
2022-01-20 17:35:32 +01:00
Ansraer
90652b1755
add support for glow maps
2022-01-20 16:47:25 +01:00
Hugo Locurcio
d6c7d4ab5d
Fix visible background line in intersections in screen-space reflections
...
Adjusting the step grading by one resolves the issue without affecting
performance or introducing adverse artifacts.
2022-01-16 18:08:07 +01:00
luz paz
858bcd5058
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,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`
2022-01-13 23:20:01 -05:00
Rémi Verschelde
e976cd0b29
Merge pull request #56208 from williamd67/GPULightmapper-sky-upside-down
2022-01-05 10:51:19 +01:00
Yuri Roubinsky
5123ffe4a7
Fix `world_vertex_coords` render mode usage in the shaders
2022-01-04 17:06:12 +03:00
Rémi Verschelde
7f66c16c03
Merge pull request #51206 from clayjohn/Vulkan-ASSGI
2022-01-04 10:00:17 +01:00
Rémi Verschelde
34de6d16aa
Merge pull request #54409 from clayjohn/VULKAN-glow-flicker
2022-01-04 09:59:07 +01:00
Rémi Verschelde
370f0a162d
Merge pull request #55424 from Calinou/voxelgi-remove-unused-struct-fields
...
Remove unused struct fields in VoxelGIData
2022-01-04 09:50:00 +01:00
Rémi Verschelde
a97889abe4
Merge pull request #55422 from Calinou/gi-shader-remove-unused-define
...
Remove unused code in GI shaders
2022-01-04 09:49:42 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
...
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
William Deurwaarder
246fbd5442
GPULightmapper: cube to panorama copy function flip y based on flag
...
Cube to panorama copy function unconditionally flipped y, while other copy functions flipped y base on FLAG_FLIP_Y. Condition is added.
2021-12-24 00:47:42 +01:00
Hugo Locurcio
e962900f23
Rename and reorder bake mode properties for consistency
...
The order now goes from least to most computationally expensive:
- Disabled
- Static
- Dynamic
2021-12-14 12:01:12 +01:00
Hendrik Brucker
1da732af35
Fix volumetric fog in combination with spotlights
2021-12-08 22:17:09 +01:00
Hugo Locurcio
36106dba3b
Remove unused struct fields in VoxelGIData
...
This reduces the struct size from 112 bytes to 96 bytes.
2021-11-28 23:09:51 +01:00
Hugo Locurcio
0beacf2ce8
Remove unused code in GI shaders
2021-11-28 22:58:54 +01:00
bruvzg
b7e6e50dd2
[macOS / iOS] Use non atomic operation to store facing bits on MoltenVK.
2021-11-25 12:43:45 +02:00
Rémi Verschelde
547c270777
Merge pull request #51679 from Je06jm/fsr
...
AMD FidelityFX Super Resolution
2021-11-24 22:34:48 +01:00
bruvzg
5e0a034524
[macOS / iOS] Use storage buffers instead of unsupported images for the volumetric fog on MoltenVK.
2021-11-24 09:16:16 +02:00
Je06jm
20deb0917d
Implemented AMD's FSR as a computer shader for upscaling 3D scenes
2021-11-23 14:16:03 -07:00
jfons
4c4b6620a0
Fix Depth-Prepass transparency mode
...
Add mising bits of implementation and ensure depth-prepass objects are
only rendered in the transparency pass.
2021-11-18 12:49:46 +01:00
Rémi Verschelde
c30aa372ca
Merge pull request #55029 from clayjohn/VULKAN-SRGB
...
Add SHADER_IS_SRGB define to Vulkan renderer
2021-11-17 08:46:23 +01:00
clayjohn
358820c4b7
Fix SRGB conversions in Vulkan Renderer
2021-11-16 20:56:13 -08:00
Yuri Roubinsky
df3b42411d
Fix broken light_compute in mobile renderer
2021-11-13 17:24:31 +03:00
Yuri Roubinsky
a45ae7b1c7
Fix shader crashing when using `ALBEDO` or `ALPHA` in light function
2021-11-11 11:59:30 +03:00
clayjohn
0eff109a21
Added SSIL post processing effect
2021-11-06 12:43:19 -07:00
clayjohn
4d1d2b3900
Weight glow samples to reduce fireflies
2021-10-29 21:41:57 -07:00
jfons
6db13d3231
Fix instance index in forward clustered shader
2021-10-30 02:53:09 +02:00
clayjohn
1b2cd9f251
Addition of FogVolumes, FogShaders, FogMaterial, and overhaul of VolumetricFog
...
Co-authored-by: Brian Semrau <brian.semrau@gmail.com>
2021-10-28 22:02:23 -07:00
Rémi Verschelde
f7d852b532
Merge pull request #54350 from akien-mga/clang-format-dont-align-operands
2021-10-28 17:10:52 +02:00
Rémi Verschelde
e2deec67b9
Merge pull request #54222 from JFonS/instance-fade
2021-10-28 16:05:55 +02:00
Rémi Verschelde
3a6be64c12
clang-format: Various fixes to comments alignment from `clang-format` 13
...
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
...
Sets `AlignOperands` to `DontAlign`.
`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Joan Fons
95bc9c40d9
Fix shadow disabling on mobile renderer
2021-10-26 15:37:22 +02:00
jfons
c46d1ea2b2
Fix shadow disabling settings
...
Fixes the SHADOW_CASTING_SETTING_OFF setting in
GeometryInstance3D and the "shadows_disabled" render
mode in spatial materials, which were not working
before.
2021-10-25 16:11:32 +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
Hugo Locurcio
e87ec8ec17
Add Soft Very Low shadow quality mode for 3D
...
This can be used to improve 3D shadow rendering quality at little
performance cost. Unlike the existing Hard setting which is limited
to variable shadow blur only, it works with both fixed blur and
variable blur.
2021-10-21 18:34:26 +02:00
Rémi Verschelde
85a8939fa2
Merge pull request #53790 from briansemrau/remove-distant-shadowy-void
2021-10-19 15:17:09 +02:00
Brian Semrau
e9f1b0a0b2
Remove incorrect fog height density remapping
2021-10-14 16:09:45 -04:00
Brian Semrau
4fefd7cddd
Fix several issues with directional shadows
...
- Internally disable blend splits in orthogonal directional shadow mode
- Fix soft shadows ignoring fade and blend_splits
- Fix soft shadow edge stability
2021-10-14 11:44:32 -04:00
Brian Semrau
a62e240260
Fix the height fog effect
2021-10-14 04:08:39 -04:00
Yuri Roubinsky
db2ee03fff
Fix shader crash on using METALLIC and ROUGHNESS built-ins in light func
2021-10-11 13:35:53 +03: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
Manuel Dun
485eac3d3f
radial fog fix
2021-09-29 15:49:59 -04:00
Rémi Verschelde
078bdef7e9
Merge pull request #51939 from clayjohn/VULKAN-horizon-so-fix
...
Compute horizon SO threshold before transformation
2021-09-13 11:44:42 +02:00
Endri Lauson
065d13eddc
Replace ACES tonemapper with a high quality one
2021-09-07 19:46:02 -03:00
Bastiaan Olij
fbac863bfb
Add source rectangle to blit
2021-08-29 14:57:16 +10:00
K. S. Ernest (iFire) Lee
90a35dac48
Merge pull request #51908 from bruvzg/msdf_fonts2
...
Make FontData importable resource. Add multi-channel SDF font rendering.
2021-08-27 08:51:37 -07:00
Juan Linietsky
712bcf564f
Merge pull request #52092 from Calinou/voxelgi-remove-anisotropic-leftovers
...
Remove leftovers of anisotropy in the VoxelGI shader code
2021-08-27 12:22:57 -03:00
bruvzg
4c3f7d1290
Makes FontData importable resource.
...
Adds multi-channel SDF font texture generation and rendering support.
Adds per-font oversampling support.
Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading.
Adds BMFont binary format and outline support.
2021-08-27 15:43:18 +03:00
Bastiaan Olij
6e87d62873
Merge pull request #50883 from BastiaanOlij/mobile_hdr
...
Scale color output in the mobile renderer to provide HDR support
2021-08-26 11:23:22 +10:00
Hugo Locurcio
6a6c0890c2
Remove leftovers of anisotropy in the VoxelGI shader code
...
Anisotropy support was removed when VoxelGI was reworked as it was
too demanding on the GPU.
2021-08-25 10:23:28 +02:00
Max Hilbrunner
583b6a594a
Merge pull request #51971 from aaronfranke/https
...
Replace HTTP URLs with HTTPS for sites with HTTPS versions
2021-08-23 15:58:54 +02:00
Bastiaan Olij
d22163c657
Scale color output in the mobile renderer to provide HDR support
2021-08-23 15:30:36 +10:00
Bastiaan Olij
2d446771d6
Merge pull request #51980 from BastiaanOlij/fix_multiview_tonemap
...
Fix multiview defines in tonemap shader
2021-08-23 12:02:18 +10:00
Aaron Franke
ae1702bee5
Replace HTTP links with HTTPS for sites with HTTPS versions
2021-08-22 20:13:11 -05:00
Duarte David
7e94c583e0
Fixed non-uniform scaling of normals
2021-08-22 19:28:18 +01:00
Bastiaan Olij
74a647bddd
Fix multiview defines in tonemap shader
2021-08-22 21:30:58 +10:00
clayjohn
bccc4cd735
Compute horizon so threshold before transformation
2021-08-20 19:27:52 -07:00
jfons
55e7832d7b
Improvements to SpotLight3D and OmniLight3D's shadows
...
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.
2021-08-19 13:46:51 +02:00
reduz
700f9d916d
More fixes to mobile renderer
...
* Specify all precision qualifiers
* Makes renderer work on Adreno Vulkan
2021-08-18 12:20:19 -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
Rémi Verschelde
4e1d91f4d3
Merge pull request #50998 from BastiaanOlij/single_bokeh_dof_raster
...
Rewrote raster DOF shader to using BOKEH
2021-08-14 14:44:23 +02: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
Rémi Verschelde
e499758a77
Merge pull request #51025 from reduz/fix-directional-shadow-bias
...
Fix directional shadow bias
2021-08-13 16:45:49 +02:00
Bastiaan Olij
07fd559478
Implemented raster versions of bokeh shaders to replace broken gaussian implementation
2021-08-13 10:20:14 +10:00
Rémi Verschelde
62047e4e48
Merge pull request #51486 from reduz/fixes-to-mobile-renderer
...
Fixes and optimizations to mobile renderer
2021-08-11 15:19:11 +02:00
clayjohn
a7c3e0dcd6
Use f0 instead of albedo in blinn and phong
2021-08-10 21:54:24 -07: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
afb40920fe
Merge pull request #51411 from clayjohn/VULKAN-blinn-phong
...
[4.0] Make Blinn and Phong specular modes take albedo into account
2021-08-10 21:11:48 +02:00
Rémi Verschelde
51b4df72a7
Merge pull request #51436 from Calinou/tonemap-clamp-negative-colors
...
Clamp negative colors regardless of the tonemapper to avoid artifacts
2021-08-10 09:56:11 +02:00
Rémi Verschelde
56f17d925f
Merge pull request #51417 from clayjohn/Vulkan-horizon-so
...
Add horizon specular occlusion
2021-08-10 09:56:02 +02:00
clayjohn
fa962ff27d
Make Blinn and Phong specular modes PBR
2021-08-09 20:09:00 -07:00