summaryrefslogtreecommitdiffstats
path: root/servers/visual/rasterizer_rd/rasterizer_effects_rd.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual/rasterizer_rd/rasterizer_effects_rd.h')
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_effects_rd.h53
1 files changed, 16 insertions, 37 deletions
diff --git a/servers/visual/rasterizer_rd/rasterizer_effects_rd.h b/servers/visual/rasterizer_rd/rasterizer_effects_rd.h
index fbf6b39ecb..562a7b674b 100644
--- a/servers/visual/rasterizer_rd/rasterizer_effects_rd.h
+++ b/servers/visual/rasterizer_rd/rasterizer_effects_rd.h
@@ -32,7 +32,7 @@
#define RASTERIZER_EFFECTS_RD_H
#include "core/math/camera_matrix.h"
-#include "render_pipeline_vertex_format_cache_rd.h"
+#include "servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h"
#include "servers/visual/rasterizer_rd/shaders/blur.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/bokeh_dof.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/copy.glsl.gen.h"
@@ -41,7 +41,6 @@
#include "servers/visual/rasterizer_rd/shaders/cubemap_roughness.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/luminance_reduce.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/roughness_limiter.glsl.gen.h"
-#include "servers/visual/rasterizer_rd/shaders/sky.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/ssao.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/ssao_blur.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/ssao_minify.glsl.gen.h"
@@ -116,12 +115,6 @@ class RasterizerEffectsRD {
} blur;
- enum CubemapRoughnessSource {
- CUBEMAP_ROUGHNESS_SOURCE_PANORAMA,
- CUBEMAP_ROUGHNESS_SOURCE_CUBEMAP,
- CUBEMAP_ROUGHNESS_SOURCE_MAX
- };
-
struct CubemapRoughnessPushConstant {
uint32_t face_id;
uint32_t sample_count;
@@ -136,26 +129,9 @@ class RasterizerEffectsRD {
CubemapRoughnessPushConstant push_constant;
CubemapRoughnessShaderRD shader;
RID shader_version;
- RID pipelines[CUBEMAP_ROUGHNESS_SOURCE_MAX];
+ RID pipeline;
} roughness;
- struct SkyPushConstant {
- float orientation[12];
- float proj[4];
- float multiplier;
- float alpha;
- float depth;
- float pad;
- };
-
- struct Sky {
-
- SkyPushConstant push_constant;
- SkyShaderRD shader;
- RID shader_version;
- RenderPipelineVertexFormatCacheRD pipeline;
- } sky;
-
enum TonemapMode {
TONEMAP_MODE_NORMAL,
TONEMAP_MODE_BICUBIC_GLOW_FILTER,
@@ -359,12 +335,6 @@ class RasterizerEffectsRD {
} roughness_limiter;
- enum CubemapDownsamplerSource {
- CUBEMAP_DOWNSAMPLER_SOURCE_PANORAMA,
- CUBEMAP_DOWNSAMPLER_SOURCE_CUBEMAP,
- CUBEMAP_DOWNSAMPLER_SOURCE_MAX
- };
-
struct CubemapDownsamplerPushConstant {
uint32_t face_size;
float pad[3];
@@ -375,7 +345,7 @@ class RasterizerEffectsRD {
CubemapDownsamplerPushConstant push_constant;
CubemapDownsamplerShaderRD shader;
RID shader_version;
- RID pipelines[CUBEMAP_DOWNSAMPLER_SOURCE_MAX];
+ RID pipeline;
} cubemap_downsampler;
@@ -399,6 +369,15 @@ class RasterizerEffectsRD {
} filter;
+ struct SkyPushConstant {
+ float orientation[12];
+ float proj[4];
+ float position[3];
+ float multiplier;
+ float time;
+ float pad[3];
+ };
+
RID default_sampler;
RID default_mipmap_sampler;
RID index_buffer;
@@ -421,8 +400,7 @@ public:
void gaussian_blur(RID p_source_rd_texture, RID p_framebuffer_half, RID p_rd_texture_half, RID p_dest_framebuffer, const Vector2 &p_pixel_size, const Rect2 &p_region);
void gaussian_glow(RID p_source_rd_texture, RID p_framebuffer_half, RID p_rd_texture_half, RID p_dest_framebuffer, const Vector2 &p_pixel_size, float p_strength = 1.0, bool p_first_pass = false, float p_luminance_cap = 16.0, float p_exposure = 1.0, float p_bloom = 0.0, float p_hdr_bleed_treshold = 1.0, float p_hdr_bleed_scale = 1.0, RID p_auto_exposure = RID(), float p_auto_exposure_grey = 1.0);
- void cubemap_roughness(RID p_source_rd_texture, bool p_source_is_panorama, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness, float p_size);
- void render_panorama(RD::DrawListID p_list, RenderingDevice::FramebufferFormatID p_fb_format, RID p_panorama, const CameraMatrix &p_camera, const Basis &p_orientation, float p_alpha, float p_multipler);
+ void cubemap_roughness(RID p_source_rd_texture, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness, float p_size);
void make_mipmap(RID p_source_rd_texture, RID p_framebuffer_half, const Vector2 &p_pixel_size);
void copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2 &p_rect, float p_z_near, float p_z_far, float p_bias, bool p_dp_flip);
void luminance_reduction(RID p_source_texture, const Size2i p_source_size, const Vector<RID> p_reduce, RID p_prev_luminance, float p_min_luminance, float p_max_luminance, float p_adjust, bool p_set = false);
@@ -468,11 +446,12 @@ public:
void generate_ssao(RID p_depth_buffer, RID p_normal_buffer, const Size2i &p_depth_buffer_size, RID p_depth_mipmaps_texture, const Vector<RID> &depth_mipmaps, RID p_ao1, bool p_half_size, RID p_ao2, RID p_upscale_buffer, float p_intensity, float p_radius, float p_bias, const CameraMatrix &p_projection, VS::EnvironmentSSAOQuality p_quality, VS::EnvironmentSSAOBlur p_blur, float p_edge_sharpness);
void roughness_limit(RID p_source_normal, RID p_roughness, const Size2i &p_size, float p_curve);
- void cubemap_downsample(RID p_source_cubemap, bool p_source_is_panorama, RID p_dest_cubemap, const Size2i &p_size);
+ void cubemap_downsample(RID p_source_cubemap, RID p_dest_cubemap, const Size2i &p_size);
void cubemap_filter(RID p_source_cubemap, Vector<RID> p_dest_cubemap, bool p_use_array);
+ void render_sky(RD::DrawListID p_list, float p_time, RID p_fb, RID p_samplers, RID p_lights, RenderPipelineVertexFormatCacheRD *p_pipeline, RID p_uniform_set, RID p_texture_set, const CameraMatrix &p_camera, const Basis &p_orientation, float p_multiplier, const Vector3 &p_position);
RasterizerEffectsRD();
~RasterizerEffectsRD();
};
-#endif // EFFECTS_RD_H
+#endif // !RASTERIZER_EFFECTS_RD_H