|
@@ -2432,7 +2432,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
|
|
|
// from surface->data.
|
|
|
|
|
|
// if USE_SKELETON_SOFTWARE is active
|
|
|
- if (!config.float_texture_supported) {
|
|
|
+ if (config.use_skeleton_software) {
|
|
|
// if this geometry is used specifically for skinning
|
|
|
if (p_format & (VS::ARRAY_FORMAT_BONES | VS::ARRAY_FORMAT_WEIGHTS))
|
|
|
surface->data = array;
|
|
@@ -3514,7 +3514,7 @@ void RasterizerStorageGLES2::skeleton_allocate(RID p_skeleton, int p_bones, bool
|
|
|
skeleton->size = p_bones;
|
|
|
skeleton->use_2d = p_2d_skeleton;
|
|
|
|
|
|
- if (config.float_texture_supported) {
|
|
|
+ if (!config.use_skeleton_software) {
|
|
|
|
|
|
glActiveTexture(GL_TEXTURE0);
|
|
|
glBindTexture(GL_TEXTURE_2D, skeleton->tex_id);
|
|
@@ -3699,7 +3699,7 @@ void RasterizerStorageGLES2::_update_skeleton_transform_buffer(const PoolVector<
|
|
|
|
|
|
void RasterizerStorageGLES2::update_dirty_skeletons() {
|
|
|
|
|
|
- if (!config.float_texture_supported)
|
|
|
+ if (config.use_skeleton_software)
|
|
|
return;
|
|
|
|
|
|
glActiveTexture(GL_TEXTURE0);
|
|
@@ -5751,9 +5751,14 @@ void RasterizerStorageGLES2::initialize() {
|
|
|
frame.current_rt = NULL;
|
|
|
frame.clear_request = false;
|
|
|
|
|
|
+ glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &config.max_vertex_texture_image_units);
|
|
|
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &config.max_texture_image_units);
|
|
|
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &config.max_texture_size);
|
|
|
|
|
|
+ // the use skeleton software path should be used if either float texture is not supported,
|
|
|
+ // OR max_vertex_texture_image_units is zero
|
|
|
+ config.use_skeleton_software = (config.float_texture_supported == false) || (config.max_vertex_texture_image_units == 0);
|
|
|
+
|
|
|
shaders.copy.init();
|
|
|
shaders.cubemap_filter.init();
|
|
|
bool ggx_hq = GLOBAL_GET("rendering/quality/reflections/high_quality_ggx");
|