mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
glgsg: fix wrong shadow buffer host when rendering scene to buffer
Fixes #890
This commit is contained in:
parent
c81bfb09b7
commit
cefc92a775
@ -8303,6 +8303,10 @@ make_shadow_buffer(LightLensNode *light, Texture *tex, GraphicsOutput *host) {
|
|||||||
flags |= GraphicsPipe::BF_size_square;
|
flags |= GraphicsPipe::BF_size_square;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (host != nullptr) {
|
||||||
|
host = host->get_host();
|
||||||
|
}
|
||||||
|
|
||||||
CLP(GraphicsBuffer) *sbuffer = new CLP(GraphicsBuffer)(get_engine(), get_pipe(), light->get_name(), fbp, props, flags, this, host);
|
CLP(GraphicsBuffer) *sbuffer = new CLP(GraphicsBuffer)(get_engine(), get_pipe(), light->get_name(), fbp, props, flags, this, host);
|
||||||
sbuffer->add_render_texture(tex, GraphicsOutput::RTM_bind_or_copy, GraphicsOutput::RTP_depth);
|
sbuffer->add_render_texture(tex, GraphicsOutput::RTM_bind_or_copy, GraphicsOutput::RTP_depth);
|
||||||
get_engine()->add_window(sbuffer, light->get_shadow_buffer_sort());
|
get_engine()->add_window(sbuffer, light->get_shadow_buffer_sort());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user