Closed j-jorge closed 3 months ago
Download cpp-test apk https://github.com/axmolengine/axmol/actions/runs/9623334152/artifacts/1627192539 and run on your device check 31:Node: Label -New API/32
, does it have same issue on your device?
on my device, works fine
This one works as expected. Was there a fix between the faulty commit and this build? or is it a problem on my side?
I still have the issue on the current dev branch, so I guess the problem is in my compilation flags.
not sure, by default the github ci also build apk with AX_GLES_PROFILE=200
I can't reproduce with your code
I am closing this issue since it seems to be an issue on my side. I'll come back to it if I find something useful for Axmol. Thanks.
Any errors in console? Try checking what kind of texture is being used for that configuration (is it simple alpha mask or SDF?) and which shader. And then check if the shader matches texture type, and if the final shader in the apk is correct.
Also, does your project build and run on other platforms? Could you check if those work correctly?
There are no error in the logs and the shader seems to be correct (label_normal.frag and positionTextureColor.vert). I don't get what could be wrong. If I set a transparent outline to use label_outline.frag then the rendering is ok, yet the code from this shader, when effectType == 0, is almost exactly the code from the former.
I managed to get the correct rendering by patching line 1299 of Label.cpp, changing the last argument from true
to false
.
setFontAtlas(newAtlas, _fontConfig.distanceFieldEnabled, /* useA8Shader = */ false);
I don't know why there is no problem in CppTests though. Anyway, since the intent of commit 74612ef29662b4be72ebb50f9234b4d519fa992e is to remove deprecated pixel formats, including A8, does it make sense to keep Label::_useA8Shader
?
reproduce sample please, I use your code not cpp-tests, also cann't reproduce
Hey, I have good news :) My build directory was in a bad shape and the shaders from Axmol v2.1.0 were used, instead of the new ones. Everything works after proper clean-up and fix-up on my side. My apologies, and sorry for the noise.
Since commit 74612ef29662b4be72ebb50f9234b4d519fa992e the labels rendered without effect are incorrectly displayed.
Note that the labels are displayed correctly if I set an outline.
Regarding the problematic commit, I guess the following is also important here: I build the app with
AX_GLES_PROFILE=200
and link with GLESv2.