34 if (clip_planes > 0) {
41 texture_subpass_map_.clear();
49 if (pass_names[geom][shader].empty()) {
50 pass_names[geom][shader] = std::string(
get_name(geom_type)) +
55 ShaderCache::get().prepass_get(geom_type, pipeline, lighting, shader_type, clip));
56 passes_[geom][shader] = pass;
70 if (
texture->gpu.tile_mapping) {
83 sub_pass->
push_constant(
"imageTransparencyCutoff", alpha_cutoff);
87 return *texture_subpass_map_.lookup_or_add_cb(
88 TextureSubPassKey(
texture->gpu.texture, geometry_type), add_cb);
158 object_id_attachment);
172 object_id_attachment);
199 if (!shadow_pass || !shadow_pass->
is_debug()) {
340 object_id_attachment);
353 object_id_attachment);
#define GPU_ATTACHMENT_TEXTURE(_texture)
void GPU_framebuffer_clear_stencil(GPUFrameBuffer *fb, uint clear_stencil)
#define GPU_ATTACHMENT_NONE
void GPU_texture_copy(GPUTexture *dst, GPUTexture *src)
@ GPU_TEXTURE_USAGE_SHADER_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
@ GPU_TEXTURE_USAGE_FORMAT_VIEW
void submit(PassSimple &pass, View &view)
void bind_texture(const char *name, GPUTexture *texture, GPUSamplerState state=sampler_auto)
PassBase< DrawCommandBufType > & sub(const char *name)
void state_set(DRWState state, int clip_plane_count=0)
void bind_ubo(const char *name, GPUUniformBuf *buffer)
void push_constant(const char *name, const float &data)
void bind_ssbo(const char *name, GPUStorageBuf *buffer)
void shader_set(GPUShader *shader)
detail::PassBase< command::DrawMultiBuf > Sub
void setup_resolve_pass(PassSimple &pass, SceneResources &resources)
MeshPass(const char *name)
PassMain::Sub & get_subpass(eGeometryType geometry_type, const MaterialTexture *texture=nullptr)
void init_pass(SceneResources &resources, DRWState state, int clip_planes)
void init_subpasses(ePipelineType pipeline, eLightingType lighting, bool clip)
void sync(const SceneState &scene_state, SceneResources &resources)
GPUTexture * deferred_ps_stencil_tx
MeshPass gbuffer_in_front_ps_
TextureFromPool gbuffer_material_tx
Texture shadow_depth_stencil_tx
Framebuffer gbuffer_in_front_fb
TextureFromPool gbuffer_normal_tx
void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution, class ShadowPass *shadow_pass)
static ShaderCache & get()
void draw(Manager &manager, View &view, SceneResources &resources, GPUTexture &depth_stencil_tx, bool force_fail_method)
GPUTexture * extract(Manager &manager, Texture &stencil_src)
void draw(Manager &manager, View &view, SceneResources &resources)
void sync(const SceneState &scene_state, SceneResources &resources)
TextureFromPool accumulation_tx
MeshPass accumulation_in_front_ps_
void sync(const SceneState &scene_state, SceneResources &resources)
void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution)
MeshPass accumulation_ps_
Framebuffer transparent_fb
TextureFromPool reveal_tx
local_group_size(16, 16) .push_constant(Type texture
#define DRW_CLIPPING_UBO_SLOT
@ DRW_STATE_STENCIL_EQUAL
@ DRW_STATE_STENCIL_ALWAYS
@ DRW_STATE_DEPTH_LESS_EQUAL
@ DRW_STATE_STENCIL_NEQUAL
@ DRW_STATE_WRITE_STENCIL
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
detail::Pass< command::DrawMultiBuf > PassMain
static constexpr int geometry_type_len
static constexpr int shader_type_len
static const char * get_name(eGeometryType type)
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
StencilViewWorkaround stencil_view
UniformBuffer< WorldData > world_buf
StorageVectorBuffer< Material > material_buf
TextureRef depth_in_front_tx
Texture dummy_tile_array_tx
TextureFromPool object_id_tx
Texture dummy_tile_data_tx
UniformArrayBuffer< float4, 6 > clip_planes_buf
eLightingType lighting_type
Vector< float4 > clip_planes
#define WB_TILE_DATA_SLOT
#define WB_TILE_ARRAY_SLOT