Skip to content

VM_CL_R_PolygonEnd draws white polygons with wrong alpha #296

@k9ur

Description

@k9ur

When using VM_CL_R_PolygonEnd to draw a polygon with no texture and only white ('1 1 1') vertices, the result can have the wrong alpha (and maybe wrong color too, hard to tell).

This issue doesn't occur when using VM_drawfill.

E.g. when passing alpha 1, the polygon can be drawn with <1 alpha, and from testing (used DRAWFLAG_NORMAL, on map afterslime in Xonotic git build) the alpha was strangely dependent on the view origin and direction. In this case, removing fog happened to fix the issue, so that's likely related.

Setting hascolor = true; (or otherwise doing materialflags |= MATERIALFLAG_VERTEXCOLOR;) seems to fix it in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions