godot icon indicating copy to clipboard operation
godot copied to clipboard

`RGFloat` Texture with small height gives `Image height must be greater than 0.` error

Open Arecher opened this issue 10 months ago • 0 comments

Tested versions

Reproducible in 3.5.stable

System information

Windows 10 - Godot 3.5.stable

Issue description

The engine is giving an error (ERROR: Image height must be greater than 0. at: (core/image.cpp:933) ) that the RGFloat Texture I'm using has an invalid height, when in fact it has a completely valid, albeit small, height.

I've had this issue show up with the resolutions 2048x1 2048x2 2048x4. I presume that it is related to https://github.com/godotengine/godot/issues/36940, and the issues persist to up to 16 pixels in height. I have not had this issue with other Texture types.

Any Texture that gives this error will still work normally. In this case, the image used is the Godot icon.png turned into a RGFloat Texture by making it an emission mask for a Particle2D, using the solid pixels option. My hypothesis is that it's the preview image in the editor that is actually giving this error.

image

Steps to reproduce

  1. Add a Particle2D node to a scene.
  2. Add a ParticleMaterial to the node.
  3. Select the Particle2D node and click Particles in the top bar of the Engine
  4. Select Load Emission Mask
  5. Navigate to the icon.png and select it.
  6. Use solid pixels - this will give a 2048x2px Texture
  7. Open the ParticleMaterial and open the Emission Shape dropdown.
  8. An Error reading ERROR: Image height must be greater than 0. at: (core/image.cpp:933) will appear in the Console.

Minimal reproduction project (MRP)

Shouldn't be necessary, but just in case! RGFloatImageHeight.zip

Arecher avatar Apr 25 '24 15:04 Arecher