When setting a custom mouse cursor to a (programatically created) ImageTexture with a non-power-of-two size, the cursor image appears garbled in the browser with HTML5 export.
I couldn't take a screenshot of the situation, because none of my screenshot software managed to capture the custom cursor in the browser (recording a normal cursor instead).
Non-HTML5 build works fine, and so does the original 43x43 texture when directly used as custom cursor. I've tried this in both Google Chrome and Firefox.
Steps to reproduce
Create a new project.
Add a non-power-of-two image to the project named cursor.png.
Create a scene and attach a script.
Add the following code to the script.
func _ready():
var tex: Texture = preload("res://cursor.png") # size: 43x43
var img: Image = tex.get_data()
var itex := ImageTexture.new()
itex.create_from_image(img)
Input.set_custom_mouse_cursor(itex)
Godot version
3.4.1.stable
System information
Ubuntu 20.04, GLES2, RTX 2070 Super, Chrome/Firefox
Issue description
When setting a custom mouse cursor to a (programatically created) ImageTexture with a non-power-of-two size, the cursor image appears garbled in the browser with HTML5 export.
I couldn't take a screenshot of the situation, because none of my screenshot software managed to capture the custom cursor in the browser (recording a normal cursor instead).
Non-HTML5 build works fine, and so does the original 43x43 texture when directly used as custom cursor. I've tried this in both Google Chrome and Firefox.
Steps to reproduce
cursor.png
.Minimal reproduction project
TestCustomCursor.zip