mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Allow using rgb32 and rgb16 for render to texture when alpha-bits is 0
This commit is contained in:
parent
cabe17abdb
commit
9567247c9a
@ -673,13 +673,22 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot,
|
|||||||
if (_fb_properties.get_float_color()) {
|
if (_fb_properties.get_float_color()) {
|
||||||
tex->set_component_type(Texture::T_float);
|
tex->set_component_type(Texture::T_float);
|
||||||
}
|
}
|
||||||
if (_fb_properties.get_color_bits() > 16 * 3) {
|
if (_fb_properties.get_alpha_bits() == 0) {
|
||||||
tex->set_format(Texture::F_rgba32);
|
if (_fb_properties.get_color_bits() > 16 * 3) {
|
||||||
tex->set_component_type(Texture::T_float);
|
tex->set_format(Texture::F_rgb32);
|
||||||
} else if (_fb_properties.get_color_bits() > 8 * 3) {
|
} else if (_fb_properties.get_color_bits() > 8 * 3) {
|
||||||
tex->set_format(Texture::F_rgba16);
|
tex->set_format(Texture::F_rgb16);
|
||||||
|
} else {
|
||||||
|
tex->set_format(Texture::F_rgb);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
tex->set_format(Texture::F_rgba);
|
if (_fb_properties.get_color_bits() > 16 * 3) {
|
||||||
|
tex->set_format(Texture::F_rgba32);
|
||||||
|
} else if (_fb_properties.get_color_bits() > 8 * 3) {
|
||||||
|
tex->set_format(Texture::F_rgba16);
|
||||||
|
} else {
|
||||||
|
tex->set_format(Texture::F_rgba);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user