mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #95126 from Chaosus/shader_cubemap_fix
Allow setting a cubemap as default parameter to shader
This commit is contained in:
commit
21bcff00e9
13 changed files with 171 additions and 26 deletions
|
@ -2953,7 +2953,7 @@ void VisualShader::_update_shader() const {
|
|||
const_cast<VisualShader *>(this)->set_code(final_code);
|
||||
for (int i = 0; i < default_tex_params.size(); i++) {
|
||||
int j = 0;
|
||||
for (List<Ref<Texture2D>>::ConstIterator itr = default_tex_params[i].params.begin(); itr != default_tex_params[i].params.end(); ++itr, ++j) {
|
||||
for (List<Ref<Texture>>::ConstIterator itr = default_tex_params[i].params.begin(); itr != default_tex_params[i].params.end(); ++itr, ++j) {
|
||||
const_cast<VisualShader *>(this)->set_default_texture_parameter(default_tex_params[i].name, *itr, j);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue