Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Bugs in fill_outline shader #8751

@jfirebaugh

Description

@jfirebaugh

The fragment shader does smoothstep(1.0, 0.0, dist). But smoothstep's behavior is undefined when its first argument is >= its second argument. On macOS, it appears that the result is always 0.

Changing it to smoothstep(0.0, 1.0, dist) also doesn't work -- except for a band across the middle of the screen, the result value is always 1.0.

Using the following shader modification, you can see it's calculating the distance from the a horizontal line through the center of the viewport, rather than the desired value:

    float alpha = dist / 100.0;
    gl_FragColor = vec4(alpha, alpha, alpha, 1.0);

image

cc @kkaefer @ansis

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreThe cross-platform C++ core, aka mbgl

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions