~eliasnaur/gio

1

Gaussian Blur Op

Details
Message ID
<CABF4rJk6DDh5mJT=m71cikivpButBaq6V1MRO-3tFsS7Z2KAVQ@mail.gmail.com>
DKIM signature
pass
Download raw message
> If I wanted to implement Gaussian blur into Gio I would need to do it at the gio/internal/ops level correct? Or is it already implemented?

This is an existing question I have asked in the gioui Slack channel.
Chris Waldon was very informative as he pointed out that it requires a
new kind of operations describing it and that it would require
multiple implementations (OGL, Vulkan, and Compute Shader).

I was wondering what is the plan for this. I assume it's pretty low on
the priority list, but I do fancy fun filters like this. That and it's
a very strong design trend. Back to the original question - if I did
want to take a stab at this, where is a good place to start?

Regards,
Details
Message ID
<CAMAFT9WHdgop7PFQxTj92w3ZjXB_M2mPupXzzikGgDF6ti+yJg@mail.gmail.com>
In-Reply-To
<CABF4rJk6DDh5mJT=m71cikivpButBaq6V1MRO-3tFsS7Z2KAVQ@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
On Wed, 27 Apr 2022 at 05:56, Thomas Mathews <thomas.c.mathews@gmail.com> wrote:
>
> > If I wanted to implement Gaussian blur into Gio I would need to do it at the gio/internal/ops level correct? Or is it already implemented?
>
> This is an existing question I have asked in the gioui Slack channel.
> Chris Waldon was very informative as he pointed out that it requires a
> new kind of operations describing it and that it would require
> multiple implementations (OGL, Vulkan, and Compute Shader).
>

We have two renderers, the default renderer based on an ancient
version of https://github.com/servo/pathfinder and the new compute
renderer based on https://github.com/linebender/piet-gpu.

It's true we have multiple backends (OpenGL ES, Vulkan, Metal), but
that is less of an issue because they're abstracted into the
gpu/internal/driver interface.

> I was wondering what is the plan for this. I assume it's pretty low on
> the priority list, but I do fancy fun filters like this. That and it's
> a very strong design trend. Back to the original question - if I did
> want to take a stab at this, where is a good place to start?
>

My goal is to make the new compute renderer default and eventually
deprecate and remove the old one. However, I've so far failed to make
it run on a sufficiently broad variety of devices, and there is the
snag that WebGL doesn't support compute at all. I'm still hopeful that
porting recent updates from piet-gpu to Gio will make it run broadly
enough to become the default, but the WebGL problem won't be solved
before WebGPU is out.

New rendering features must be implemented in both renderers to work
everywhere, but given the above I'd recommend working with upstream
piet-gpu to implement it there first.

Elias
Reply to thread Export thread (mbox)