20 reflection_matrix_get();
32 if (view_is_below_plane) {
49 update_probes_ = !inst_.
light_probes.planar_map_.is_empty();
57 do_display_draw_ =
false;
63 if (!update_probes_ && !inst_.
light_probes.planar_map_.is_empty()) {
75 int2 extent = main_view_extent;
76 int layer_count = num_probes;
78 if (num_probes == 0) {
91 int resource_index = 0;
92 int display_index = 0;
98 PlanarResources &res = resources_[resource_index];
102 probe.set_view(main_view, resource_index);
103 probe_planar_buf_[resource_index] = probe;
105 res.view.
sync(probe.viewmat, probe.winmat);
107 world_clip_buf_.
plane = probe.reflection_clip_plane_get();
126 res.view, depth_tx_.
layer_view(resource_index), res.gbuffer_fb, res.combined_fb, extent);
128 if (do_display_draw_ && probe.viewport_display) {
139 probe_planar_buf_[resource_index].layer_id = -1;
143 do_display_draw_ = display_index > 0;
144 if (do_display_draw_) {
145 display_data_buf_.
resize(display_index);
152 if (!do_display_draw_) {
156 viewport_display_ps_.
init();
167 viewport_display_ps_.
bind_ssbo(
"display_data_buf", display_data_buf_);
bool DEG_id_type_any_exists(const Depsgraph *depsgraph, short id_type)
#define GPU_ATTACHMENT_TEXTURE_LAYER(_texture, _layer)
@ GPU_TEXTURE_USAGE_SHADER_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
void ensure(GPUAttachment depth=GPU_ATTACHMENT_NONE, GPUAttachment color1=GPU_ATTACHMENT_NONE, GPUAttachment color2=GPU_ATTACHMENT_NONE, GPUAttachment color3=GPU_ATTACHMENT_NONE, GPUAttachment color4=GPU_ATTACHMENT_NONE, GPUAttachment color5=GPU_ATTACHMENT_NONE, GPUAttachment color6=GPU_ATTACHMENT_NONE, GPUAttachment color7=GPU_ATTACHMENT_NONE, GPUAttachment color8=GPU_ATTACHMENT_NONE)
void submit(PassSimple &pass, View &view)
void resize(int64_t new_size)
T & get_or_resize(int64_t index)
bool ensure_2d_array(eGPUTextureFormat format, int2 extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
bool ensure_layer_views(bool cube_as_array=false)
GPUTexture * layer_view(int layer)
const float4x4 & winmat(int view_id=0) const
const float4x4 & viewmat(int view_id=0) const
void sync(const float4x4 &view_mat, const float4x4 &win_mat, int view_id=0)
void bind_resources(U &resources)
void state_set(DRWState state, int clip_plane_count=0)
void framebuffer_set(GPUFrameBuffer **framebuffer)
void push_constant(const char *name, const float &data)
void draw_procedural(GPUPrimType primitive, uint instance_len, uint vertex_len, uint vertex_first=-1, ResourceHandleRange handle={0}, uint custom_id=0)
void bind_ssbo(const char *name, GPUStorageBuf *buffer)
void shader_set(GPUShader *shader)
int normal_layer_count() const
int closure_layer_count() const
int header_layer_count() const
struct blender::eevee::Film::DepthState depth
SphereProbeModule sphere_probes
LightProbeModule light_probes
PlanarProbePipeline planar
DeferredPipeline deferred
void set_view(const draw::View &main_view, int2 main_view_extent)
void viewport_draw(View &view, GPUFrameBuffer *view_fb)
void render(View &view, GPUTexture *depth_layer_tx, Framebuffer &gbuffer, Framebuffer &combined_fb, int2 extent)
GPUShader * static_shader_get(eShaderType shader_type)
void DRW_viewport_request_redraw()
@ DRW_STATE_CLIP_CONTROL_UNIT_RANGE
VecBase< float, D > normalize(VecOp< float, D >) RET
MatBase< R, C > transpose(MatBase< C, R >) RET
T dot(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
CartesianBasis invert(const CartesianBasis &basis)
MatT from_scale(const VecBase< typename MatT::base_type, ScaleDim > &scale)
MatBase< float, 3, 4 > float3x4
VecBase< int32_t, 2 > int2
VecBase< float, 3 > float3
void acquire(int2 extent, int header_count, int data_count, int normal_count)
float3x4 world_to_object_transposed
void set_view(const draw::View &view, int layer_id)
SphereProbeUvArea atlas_coord