Merge pull request #42538 from clayjohn/GLES2-light-texture
Use separate texture unit for light_texture
This commit is contained in:
commit
2882284795
2 changed files with 3 additions and 3 deletions
|
@ -2604,7 +2604,7 @@ void RasterizerCanvasGLES2::_canvas_render_item(Item *p_ci, RenderItemState &r_r
|
|||
_set_uniforms();
|
||||
state.canvas_shader.use_material((void *)material_ptr);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 4);
|
||||
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 6);
|
||||
RasterizerStorageGLES2::Texture *t = storage->texture_owner.getornull(light->texture);
|
||||
if (!t) {
|
||||
glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex);
|
||||
|
@ -3000,7 +3000,7 @@ void RasterizerCanvasGLES2::render_joined_item(const BItemJoined &p_bij, RenderI
|
|||
_set_uniforms();
|
||||
state.canvas_shader.use_material((void *)material_ptr);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 4);
|
||||
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 6);
|
||||
RasterizerStorageGLES2::Texture *t = storage->texture_owner.getornull(light->texture);
|
||||
if (!t) {
|
||||
glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex);
|
||||
|
|
|
@ -333,7 +333,7 @@ uniform highp float light_height;
|
|||
uniform highp float light_outside_alpha;
|
||||
uniform highp float shadow_distance_mult;
|
||||
|
||||
uniform lowp sampler2D light_texture; // texunit:-4
|
||||
uniform lowp sampler2D light_texture; // texunit:-6
|
||||
varying vec4 light_uv_interp;
|
||||
varying vec2 transformed_light_uv;
|
||||
|
||||
|
|
Loading…
Reference in a new issue