Skip to content

Stretched images have incorrect texture coordinates. #586

Closed
@nical

Description

@nical

I haven't figured out why, but it is very easy to reproduce: just add an image with its stretch_size greater than its actual size. This test case is a modified version of the sample from the webrender repo: https://gist.github.com/nical/fee1cfecd8fe0ddd6b9fb644cb360559

It creates an image positioned with a rect of size 500x500, and a stretch_size of size 500x500, but the image itself is 100x100. To make the bug easier to see the image has a 2px border. When running this test case you can see that the right and bottom edges are cutting in the borders.

Interestingly, when adding vec2(5.0, 5.0) to position_in_tile in ps_image.fs.glsl, the image looks like it is rendered properly (it's hard to tell visually if 5 is the precise number that fixes it for this stretched size, but it's definitely suspicious).

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