Graphical glitches - solved?

I was about to start a topic on a glitch showing scrambled Labeltext that I encountered by re-using textlabel but all of a sudden it’s gone!
There must be something altered in CGE latest updates because I did not change anything in my code but now the labeltext is showing correct.
Before this it changed color to black of the first part of a text when re-using textprocedure and border color.
This only happened using graphics card; on PC without graphics card it showed fine but then there was another glitch: a borderline showing above certain scenes.
So intentially or not: this was apparently a bug and was resolved in CGE latest update(s).

I’m happy that something solved itself :slight_smile: Though it is weird.

I wasn’t aware that you still have any problem with labels, I didn’t have an easy example to reproduce the problem, and I wasn’t doing any changes around text rendering lately.

I do not understand what does this mean :slight_smile: Without a graphics card you will not see anything.

I guess you mean that one PC had integrated GPU on the motherboard (like Intel) and another PC had external, better GPU (like AMD or NVidia). In this case you generally should mention what was the model of each GPU.

Preferably show the log, like this:

OpenGL information (detected by view3dscene):

--------
Version:
  Version string: 4.6.0 NVIDIA 460.91.03
  Version parsed: major: 4, minor: 6, release exists: True, release: 0, vendor-specific information: "NVIDIA 460.91.03"
  Vendor-specific version parsed: major: 460, minor: 91, release: 3
  Vendor: NVIDIA Corporation
  Vendor type: Nvidia

  Renderer: GeForce GTX 660/PCIe/SSE2
  Fglrx (ATI on Linux): False
  Mesa: False

....

(all CGE applications show this in the log, see Logging | Manual | Castle Game Engine ).

That’s because I found this bug lately but decided to keep it for now in my “problem backlog” because I was already focusing on the “playing part of a XML file” topic. :slight_smile:

Ok.

This is my external card GPU information and since (?) there are no problems with the labels anymore:

And this is the PC with integrated GPU:

It did not show the label glitches from the start so that’s okay, but there is a glitch that does not appear on the external GPU but it appears on the integrated GPU.
It shows a small line that is part of the close-up scene. I think it is the upper line (Max Y?) of the scene.
The close-up transform/scene consists of 120 images. The line flashes on and off while animating the images of the scene, so the only thing I can think of is that there is something wrong with the transparancy of the coordinates of the maxY of certain images in the scene, but the transparancy color is black and here it shows brown. But it’s not a solid color along the line either.
This glitch does not appear on my external GPU so there is something different in rendering on the integrated GPU. Maybe you got a clue?

One possibility is that there’s something adjacent to this frame in the atlas image. The “glitch line” is right above the NPC portrait, suggesting it gets rendered with it.

First, hide all the other scenes and UIs, make sure that this scene is the culprit.

Then investigate the atlas of your sprite sheet. What tool do you use to generate sprite sheets? (From other threads, I understand it is not our built-in sprite sheet editor?) Increase the padding between atlas frames when generating the atlas.

If this doesn’t help, submit a simple testcase to reproduce the problem (not the complete project; only a cut-down data and design to reproduce the glitch).

I use Texturepacker.
You got me thinking about the padding and I tried some options. I also tried CGE sprite editor and there I also noticed the border glitches. Eventually this option in Texturepacker solved the problem: :slight_smile:

afbeelding_2021-11-15_085815

I also found out the brown lines above the portrait were the first lines of the bottom lines of the sprite.

Now I edited 1 portrait with the ‘extrude’, then I ran the program and all other character portraits (that I had not changed) showed up without the glitches. So now I am confused again. Because I did not change their atlas.
The only thing I changed in code was the scale of the Transform (where the portraits url are loaded into).

I replaced the new scaling with the old one. The upper glitch line showed up again on the sprites (except the one that I had ‘extruded’).

CloseUpScene.Scale := Vector3(1.5, 1.5,1.5); // shows a horizontal glitch above the sprite. The horizontal line is part of the bottomlines of the sprite.

CloseUpScene.Scale := Vector3(1.20, 1.20, 1.20); // no glitches, everything shows up fine.

So it looks as if there are rendering problems with certain scaling. On my PC (see first View3DScene OpenGL information) everything shows up fine, but not on all PC.
For the scaling test I tried another (third) PC (without external graphics card) and the upper glitches are there: