Skip to content

Shaders don't seem to apply to drawn text #260

Open

Description

@3ter

When I'm drawing text in a window to which a fragment shader is set (e.g. like in the wavy shader example) it looks rather garbled
image
It looks like down there the whole atlas is drawn (abc...) although only fmt.Fprintln(basicTxt, "Hello, text!") was added to the basicTxt drawn.

And the black boxes could be the shader not knowing the output color.

I thought that both the image and the text was drawn to the canvas and therefore it should be treated as an entity and subject to the shader. This doesn't seem to be the case. Any help appreciated.

Activity

  1. coreyog commented on Mar 9, 2022

    @coreyog

    This may be related to the bug I opened: #305

    I think the examples were written with only the examples in mind. The shader code assumes everything has a texture because only one texture is being drawn. Looking at the standard shader that pixel uses if you don't specify one shows how to mix color and texture values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions