Skip to content

Shader Optimization #1

@Enie

Description

@Enie

Currently the shader runs two 2D loops. First to find the closest edge pixel, then again to blur the image, if frost is used.

Even though frost is not a 2D loop anymore using fast box blur, it might be worth testing if we can improve the shader by combining both.

Also test worthy: we currently check all pixels for closest edge. Instead of looping from x in -radius...radius we could loop x in 0...radius, then testing -x and +x. If we find a pixel at distance X, we know that there cannot be a closer edge at X+1 and we can continue early. The question is if that will increase the shader or will it just cause that one shader pipeline to wait for the others to finish.

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