diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-03-22 20:03:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 20:03:35 +0100 |
commit | ed9a0d0484411e631b0cc927e46dc234054d5ae5 (patch) | |
tree | e4c66055fb9e63bf80a9d6b7ec6a359e24781387 /drivers | |
parent | 7acdf74a6a87c5a2e91b13a5060ae5ba9d4438a1 (diff) | |
parent | 61a74739ca2d201e7e057d85aa99ae68f0500c33 (diff) |
Merge pull request #37179 from clayjohn/VULKAN-sky-shader
Implement Sky Shaders
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dummy/rasterizer_dummy.h | 6 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.cpp | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h index 4dc634aefa..b446828128 100644 --- a/drivers/dummy/rasterizer_dummy.h +++ b/drivers/dummy/rasterizer_dummy.h @@ -58,6 +58,7 @@ public: void sky_set_mode(RID p_sky, VS::SkyMode p_samples) {} void sky_set_texture(RID p_sky, RID p_panorama) {} void sky_set_texture(RID p_sky, RID p_cube_map, int p_radiance_size) {} + void sky_set_material(RID p_sky, RID p_material) {} /* ENVIRONMENT API */ @@ -313,6 +314,11 @@ public: void texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) {} #endif + /* SKY API */ + + RID sky_create() { return RID(); } + void sky_set_texture(RID p_sky, RID p_cube_map, int p_radiance_size) {} + /* SHADER API */ RID shader_create() { return RID(); } diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 0f5452effc..f76c7da8e1 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -1427,6 +1427,8 @@ void RasterizerStorageGLES2::shader_set_code(RID p_shader, const String &p_code) mode = VS::SHADER_CANVAS_ITEM; else if (mode_string == "particles") mode = VS::SHADER_PARTICLES; + else if (mode_string == "sky") + mode = VS::SHADER_SKY; else mode = VS::SHADER_SPATIAL; |