Hello. I have a problem with updating uniform sampler2D shader in godot. What im doing, Im drawing Image pixels, in print() section I see that image been updated, but visual doesnt update. What could be the problem? My function for updating sampler2D:
mask_texture.set_pixel(x, y, Color.BLACK)
print("UPDATE: ", mask_texture.get_data()) # this print changes of image
material.set_shader_parameter("mask_tex", mask_texture) # but it doesnt update
I’ve encountered a similar predicament where set_shader_parameter fails to throw an error for incorrect parameter types, costing me an entire afternoon to track down the issue`(>﹏<)′
Check your shader code. As a debugging step, try commenting out other parts of the shader and focus solely on observing whether the Mask is functioning correctly.