# Ancient crosshair color feature

**URL:** <https://discourse.ioquake.org/t/ancient-crosshair-color-feature/1871>\
**Category:** ioquake3\
**Created:** [August 27, 2023, 3:46pm UTC](https://discourse.ioquake.org/t/ancient-crosshair-color-feature/1871 "2023-08-27T15:46:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LegendGuard](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.ioquake.org/legendguard/32/669_2.png) [@LegendGuard](https://discourse.ioquake.org/u/LegendGuard)\
**Post date:** [August 27, 2023, 3:46pm UTC](https://discourse.ioquake.org/t/ancient-crosshair-color-feature/1871/1 "2023-08-27T15:46:36Z")

</div>

Crosslink: [Quake3World.com • View topic - Ancient crosshair color feature of the year 2002](https://www.quake3world.com/forum/viewtopic.php?f=16&t=55019) (I do this just in case of lost info)

There have been other crosshair color features that use their way of changing colors. Doing in Hexadecimal, RGB,…  
These are in OpenArena, Devotion and others.

But there’s one that only existed at the year 2002 and the source wasn’t never shown or has been completely lost.  
This one has appeared on an old mod called Bid For Power.

I managed to dig this ancient feature and the source code is now here!

> <https://github.com/ec-/baseq3a/pull/28>
>
> I made the code from scratch. 
> It's the crosshair color feature of the year 200…2 and its true source was never shown. 
> This classic feature has appeared in an old mod called Bid For Power.
> 
> You can find a table of colors and how works interacting the cgame and UI in the code: 
> https://github.com/ec-/baseq3a/pull/28/files#diff-ef6b3d31ba308d431f88f4e4fd60e7a1899fb15d850a3f4eb74e227b7f783ec8R78
> 
> \### How it works?
> 
> In the official Quake 3 \*\*gfx.shader\*\*, the crosshair is "broken". What that does is making the crosshair unable to be interacted with the colors. So, \`cg\_crosshairHealth\` has never done nothing since this official shader has been staying there.
> 
> The modified \*\*gfx.shader\*\* is added in the repository and in pk3 package and the crosshair color can be interacted without problems.
> 
> If you've your own \*\*gfx.shader\*\* or your own shader, what you can do: You need to remove in \*\*gfx.shader\*\* the following lines that impede colorizing the crosshair:
> \<details\>
> \<summary\>Click to toggle the removed contents of gfx.shader\</summary\>
> 
> \`\`\`
> gfx/2d/crosshair
> {
> nopicmip
> {
> map gfx/2d/crosshair.tga          
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA                
> rgbGen identity
> }
> }
> 
> gfx/2d/crosshairb
> {
> nopicmip
> {
> map gfx/2d/crosshairb.tga
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> }
> 
> gfx/2d/crosshairc
> {
> nopicmip
> {
> map gfx/2d/crosshairc.tga
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> }
> 
> gfx/2d/crosshaird
> {
> nopicmip
> {
> map gfx/2d/crosshaird.tga
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> }
> 
> gfx/2d/crosshaire
> {
> nopicmip
> {
> map gfx/2d/crosshaire.tga
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> }
> 
> gfx/2d/crosshairf
> {
> nopicmip
> {
> map gfx/2d/crosshairf.tga
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> }
> 
> gfx/2d/crosshairg
> {
> nopicmip
> {
> map gfx/2d/crosshairg.tga
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> }
> 
> gfx/2d/crosshairh
> {
> nopicmip
> {
> map gfx/2d/crosshairh.tga
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> }
> 
> gfx/2d/crosshairi
> {
> nopicmip
> {
> map gfx/2d/crosshairi.tga
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> 
> }
> gfx/2d/crosshairj
> {
> nopicmip
> {
> map gfx/2d/crosshairj.tga       
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> }
> gfx/2d/crosshairk
> {
> nopicmip
> {
> map gfx/2d/crosshairk.tga       
> blendFunc GL\_SRC\_ALPHA GL\_ONE\_MINUS\_SRC\_ALPHA
> rgbGen identity
> }
> }
> \`\`\`
> \</details\>
> 
> Keep in mind, \`cg\_crosshairHealth\` must be disabled (\`0\`).
> Just set 2, 3, ..., 6, 7 or 8 the color you want to set for the crosshair.
> 
> \- 2: BLUE
> \- 3: GREEN
> \- 4: TEAL (CYAN)
> \- 5: RED
> \- 6: MAGENTA
> \- 7: YELLOW
> \- 8: WHITE
> \<br/\>
> 
> \- 1: BLACK (That's special, in UI menu won't show and only shows as white - that isn't a bug, it's a feature and works exactly this way as worked in the mods from 99s and 2000s).
> 
> \### How it is in the interactive UI and how it is in-game
> 
> \<img src="https://github.com/ec-/baseq3a/assets/49716252/30a32cf7-6d64-443e-96d9-ed77fd424521" alt="crosshairColorUI" width=550 /\>
> 
> \<img src="https://github.com/ec-/baseq3a/assets/49716252/f6da902b-96c9-4460-a5cf-0f964b8c23aa" alt="crosshairColorPalettes" /\>
> 
> \<img src="https://github.com/ec-/baseq3a/assets/49716252/3593ea95-c4fd-4a7e-a040-7a2290039228" alt="crosshairColorInGame" width=550 /\>

> <https://github.com/LegendaryGuard/baseq3a/commit/6190018a36fbe0b392f4fe32a37e2ec881bc237f>

BFP commit (that’s where I managed to get firstly):

> <https://github.com/LegendaryGuard/BFP/commit/589be4af4b01e627618b9bd07193de4be4acd278>

INSTRUCTIONS TO ADD IN YOUR MOD OR SETUP (the instructions are the same like the first link of this post, I do a backup version here just in case of lost info):

Keep in mind, the official Quake 3 gfx.shader, the crosshair is “broken”. What that does is making the crosshair unable to be interacted with the colors. So, cg\_crosshairHealth has never done nothing since this official shader has been staying there.

The modified gfx.shader is added in the repository and in pk3 package and the crosshair color can be interacted without problems.

If you’ve your own gfx.shader or your own shader, what you can do: You need to remove in gfx.shader the following lines that impede colorizing the crosshair:

```auto
gfx/2d/crosshair
{
    nopicmip
    {
        map gfx/2d/crosshair.tga          
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA                
        rgbGen identity
    }
}

gfx/2d/crosshairb
{
    nopicmip
    {
        map gfx/2d/crosshairb.tga
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }
}

gfx/2d/crosshairc
{
    nopicmip
    {
        map gfx/2d/crosshairc.tga
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }
}

gfx/2d/crosshaird
{
    nopicmip
    {
        map gfx/2d/crosshaird.tga
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }
}

gfx/2d/crosshaire
{
    nopicmip
    {
        map gfx/2d/crosshaire.tga
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }
}

gfx/2d/crosshairf
{
    nopicmip
    {
        map gfx/2d/crosshairf.tga
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }
}

gfx/2d/crosshairg
{
    nopicmip
    {
        map gfx/2d/crosshairg.tga
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }
}

gfx/2d/crosshairh
{
    nopicmip
    {
        map gfx/2d/crosshairh.tga
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }
}

gfx/2d/crosshairi
{
    nopicmip
    {
        map gfx/2d/crosshairi.tga
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }

}
gfx/2d/crosshairj
{
    nopicmip
    {
        map gfx/2d/crosshairj.tga       
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }
}
gfx/2d/crosshairk
{
    nopicmip
    {
        map gfx/2d/crosshairk.tga       
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen identity
    }
}

```

cg\_crosshairHealth must be disabled (0).  
Just set 2, 3, …, 6, 7 or 8 the color you want to set for the crosshair.

2: BLUE  
3: GREEN  
4: TEAL (CYAN)  
5: RED  
6: MAGENTA  
7: YELLOW  
8: WHITE

1: BLACK (That’s special, in UI menu won’t show and only shows as white - that isn’t a bug, it’s a feature and works exactly this way as worked in the mods from 99s and 2000s).

Screenshots about how it is in the interactive UI and how it is in-game:

![](https://user-images.githubusercontent.com/49716252/263536170-30a32cf7-6d64-443e-96d9-ed77fd424521.png)

![](https://user-images.githubusercontent.com/49716252/263538119-f6da902b-96c9-4460-a5cf-0f964b8c23aa.png)

![](https://user-images.githubusercontent.com/49716252/263536920-3593ea95-c4fd-4a7e-a040-7a2290039228.png)

---

<div class="post-metadata">

**Author:** ![Linken](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.ioquake.org/linken/32/894_2.png) [@Linken](https://discourse.ioquake.org/u/Linken)\
**Post date:** [May 12, 2026, 7:06pm UTC](https://discourse.ioquake.org/t/ancient-crosshair-color-feature/1871/2 "2026-05-12T19:06:06Z")

</div>

How do I get this to work for ioQuake?
