mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Reduce the number of samplers used by the scene shaders
The hard limit for Apple devices is 16 samplers per stage. So we need to ensure we use less than that
This commit is contained in:
parent
f8a2a91936
commit
a5399ab5af
8 changed files with 53 additions and 62 deletions
|
|
@ -2972,7 +2972,13 @@ void RenderForwardClustered::_update_render_base_uniform_set() {
|
|||
uniforms.push_back(u);
|
||||
}
|
||||
|
||||
uniforms.append_array(RendererRD::MaterialStorage::get_singleton()->samplers_rd_get_default().get_uniforms(14));
|
||||
{
|
||||
RD::Uniform u;
|
||||
u.binding = 14;
|
||||
u.uniform_type = RD::UNIFORM_TYPE_SAMPLER;
|
||||
u.append_id(RendererRD::MaterialStorage::get_singleton()->sampler_rd_get_default(RS::CanvasItemTextureFilter::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, RS::CanvasItemTextureRepeat::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED));
|
||||
uniforms.push_back(u);
|
||||
}
|
||||
|
||||
render_base_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, scene_shader.default_shader_rd, SCENE_UNIFORM_SET);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue