Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukasstockner97>2022-09-16 16:04:47 +0300
committerJeroen Bakker <jeroen@blender.org>2022-09-16 16:10:09 +0300
commit44aaa9893ba876d23c7b9e93c2ed83c55f96afd9 (patch)
treead363a58c8a17efd5b916602a264d0fe2894e41c /source/blender/draw
parent2eb19eeb19a77103d1f410004955cf17ca14abba (diff)
Eevee: Add support for Nishita sky texture
Sun Disc is currently not supported because it'll need special handling - on the one hand, I'm not sure if Eevee would handle a 1e6 coming out of a background shader without issues, and on the other hand it won't actually cast sharp shadows anyways. I guess we'd want to internally add a sun to the lamps if Sun Disc is enabled, but getting that right is tricky since the user could e.g. swap RGB channels in the node tree and the lamp wouldn't match that. Anyways, that can be handled later, the sky itself is already a start. Reviewed By: fclem Differential Revision: https://developer.blender.org/D13522
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_manager_data.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index c75049508f9..820242720c8 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -1631,6 +1631,10 @@ void DRW_shgroup_add_material_resources(DRWShadingGroup *grp, struct GPUMaterial
/* Color Ramp */
DRW_shgroup_uniform_texture(grp, tex->sampler_name, *tex->colorband);
}
+ else if (tex->sky) {
+ /* Sky */
+ DRW_shgroup_uniform_texture_ex(grp, tex->sampler_name, *tex->sky, tex->sampler_state);
+ }
}
GPUUniformBuf *ubo = GPU_material_uniform_buffer_get(material);