Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vecdraw treats blackness as if it was transparency #2463

Closed
Dunbaratu opened this issue Mar 19, 2019 · 0 comments
Closed

vecdraw treats blackness as if it was transparency #2463

Dunbaratu opened this issue Mar 19, 2019 · 0 comments
Labels
bug Weird outcome is probably not what the mod programmer expected.

Comments

@Dunbaratu
Copy link
Member

Dunbaratu commented Mar 19, 2019

When I was just testing HSV colors I found a bug I thought was in HSV but is actually in vecdraw itself and also manifests with RGB colors in vecdraw too.

Try this:

set testcolor to rgb(0,0,0). // this is *supposed* to mean opaque black.

set vd to vecdraw(v(0,0,0), v(0,5,0), testcolor, "test", 1, true).

And you get a vector that is transparent rather than *black" like it should be.
If you fiddle with the brightness of the color, you find that it's actually altering the alpha value, not the darkness. For example, if you try a grey color like rgb(0.5,0.5,0.5) then what you really get is white but semi-transparent, rather than grey.

@Dunbaratu Dunbaratu added the bug Weird outcome is probably not what the mod programmer expected. label Mar 19, 2019
Dunbaratu added a commit to Dunbaratu/KOS-1 that referenced this issue Mar 20, 2019
Fixes KSP-KOS#2463

The Shader chosen from KSP's pre-made shaders was one
that was additive-only and would never darken colors.
That's all that was wrong.
erendrake added a commit that referenced this issue Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Weird outcome is probably not what the mod programmer expected.
Projects
None yet
Development

No branches or pull requests

1 participant