|
@@ -3101,7 +3101,7 @@ make_shadow_buffer(const NodePath &light_np, GraphicsOutputBase *host) {
|
|
|
if (display_cat.is_debug()) {
|
|
if (display_cat.is_debug()) {
|
|
|
display_cat.debug()
|
|
display_cat.debug()
|
|
|
<< "Constructing shadow buffer for light '" << light->get_name()
|
|
<< "Constructing shadow buffer for light '" << light->get_name()
|
|
|
- << "', size=" << light->_sb_xsize << "x" << light->_sb_ysize
|
|
|
|
|
|
|
+ << "', size=" << light->_sb_size[0] << "x" << light->_sb_size[1]
|
|
|
<< ", sort=" << light->_sb_sort << "\n";
|
|
<< ", sort=" << light->_sb_sort << "\n";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -3109,7 +3109,7 @@ make_shadow_buffer(const NodePath &light_np, GraphicsOutputBase *host) {
|
|
|
FrameBufferProperties fbp;
|
|
FrameBufferProperties fbp;
|
|
|
fbp.set_depth_bits(shadow_depth_bits);
|
|
fbp.set_depth_bits(shadow_depth_bits);
|
|
|
|
|
|
|
|
- WindowProperties props = WindowProperties::size(light->_sb_xsize, light->_sb_ysize);
|
|
|
|
|
|
|
+ WindowProperties props = WindowProperties::size(light->_sb_size[0], light->_sb_size[1]);
|
|
|
int flags = GraphicsPipe::BF_refuse_window;
|
|
int flags = GraphicsPipe::BF_refuse_window;
|
|
|
if (is_point) {
|
|
if (is_point) {
|
|
|
flags |= GraphicsPipe::BF_size_square;
|
|
flags |= GraphicsPipe::BF_size_square;
|
|
@@ -3124,13 +3124,13 @@ make_shadow_buffer(const NodePath &light_np, GraphicsOutputBase *host) {
|
|
|
// error
|
|
// error
|
|
|
PT(Texture) tex = new Texture(light->get_name());
|
|
PT(Texture) tex = new Texture(light->get_name());
|
|
|
if (is_point) {
|
|
if (is_point) {
|
|
|
- if (light->_sb_xsize != light->_sb_ysize) {
|
|
|
|
|
|
|
+ if (light->_sb_size[0] != light->_sb_size[1]) {
|
|
|
display_cat.error()
|
|
display_cat.error()
|
|
|
<< "PointLight shadow buffers must have an equal width and height!\n";
|
|
<< "PointLight shadow buffers must have an equal width and height!\n";
|
|
|
}
|
|
}
|
|
|
- tex->setup_cube_map(light->_sb_xsize, Texture::T_unsigned_byte, Texture::F_depth_component);
|
|
|
|
|
|
|
+ tex->setup_cube_map(light->_sb_size[0], Texture::T_unsigned_byte, Texture::F_depth_component);
|
|
|
} else {
|
|
} else {
|
|
|
- tex->setup_2d_texture(light->_sb_xsize, light->_sb_ysize, Texture::T_unsigned_byte, Texture::F_depth_component);
|
|
|
|
|
|
|
+ tex->setup_2d_texture(light->_sb_size[0], light->_sb_size[1], Texture::T_unsigned_byte, Texture::F_depth_component);
|
|
|
}
|
|
}
|
|
|
tex->make_ram_image();
|
|
tex->make_ram_image();
|
|
|
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);
|