diff options
author | Lukas Stockner <lukasstockner97> | 2022-09-16 16:04:47 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-09-16 16:10:09 +0300 |
commit | 44aaa9893ba876d23c7b9e93c2ed83c55f96afd9 (patch) | |
tree | ad363a58c8a17efd5b916602a264d0fe2894e41c /source/blender/gpu/GPU_material.h | |
parent | 2eb19eeb19a77103d1f410004955cf17ca14abba (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/gpu/GPU_material.h')
-rw-r--r-- | source/blender/gpu/GPU_material.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index 023221543ec..922988bf95a 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -162,6 +162,12 @@ GPUNodeLink *GPU_image_tiled(GPUMaterial *mat, struct ImageUser *iuser, eGPUSamplerState sampler_state); GPUNodeLink *GPU_image_tiled_mapping(GPUMaterial *mat, struct Image *ima, struct ImageUser *iuser); +GPUNodeLink *GPU_image_sky(GPUMaterial *mat, + int width, + int height, + const float *pixels, + float *layer, + eGPUSamplerState sampler_state); GPUNodeLink *GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *row); /** @@ -297,6 +303,7 @@ typedef struct GPUMaterialTexture { struct ImageUser iuser; bool iuser_available; struct GPUTexture **colorband; + struct GPUTexture **sky; char sampler_name[32]; /* Name of sampler in GLSL. */ char tiled_mapping_name[32]; /* Name of tile mapping sampler in GLSL. */ int users; |