beyond-all-reason / beyond-all-reason/RecoilEngine

LuaOpenGL::Text ignores color alpha when drawing outline

Open
#906 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
679
Forks
290
Avg merge
3d 2h
Merged PRs (30d)
40

Description

For very low alpha values, the result is drawing basically just the outline, which looks awkward.

alpha = 0.1:
![outlinealpha](https://github.com/beyond-all-reason/spring/assets/18132958/3c542aa9-e082-482d-892b-febc17070782)

alpha = 0.02:
![outlinealpha2](https://github.com/beyond-all-reason/spring/assets/18132958/7580f7ee-20fe-4ab2-bf95-caee72613a95)

---

I encountered this while developing https://gist.github.com/salinecitrine/7f6e21ed304eeaba9ad4a122019c0d82 . I ended up using a workaround where I draw extra black copies of the text, offset by a few pixels.

alpha = 0.1, with my workaround (indicating very approximately what I think it should look like instead):
![outlinealpha3](https://github.com/beyond-all-reason/spring/assets/18132958/09aefc49-b2a2-45ea-a453-3c8dcfbad04e)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the LuaOpenGL::Text implementation and reproduce the issue with very low alpha values such as 0.1 and 0.02. Compare the rendered text and outline against the reported screenshots; done means the outline fades consistently with the text color alpha without requiring the documented workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.