Showing results for 
Search instead for 
Did you mean: 

Kernels/Convolution Shaders (Blur, Bloom, Edge detection, etc.) on the Quest

Level 2
So i'm working on converting my rift apps to the quest, and it's been challenging to say the least. I'm working through a lot of performance optimizations but one in particular brings me here to seek wisdom:

mobile gpus render tiles one at a time, which makes convolution operations - like gaussian blur, edge detection, bloom, etc. - very bad. This is because when you sample neighboring pixels, those samples are sometimes outside of the current tile.

i'm wondering if anyone has found ways to efficiently perform blurs, blooms, and other kernel convolution operations on mobile?

some of my apps depend on grab pass blurs.

I'm working in Unity 2018.3.x at the moment.


Level 6
The only improvement I can think of is performing such effects on down-scaled render targets. There's some talk about this in the following thread:

In the end, for mobile, multiple full screen passes are still gonna be expensive, so I think this would only get you so far.

A few other optimizations tips for mobile:
- Re-evaluate your design decisions. You just can't do the same quality effects with less capable hardware. Porting existing design from PC to mobile is more difficult than designing from mobile from the ground up.
- Fake / precompute / prebake all the things. Trade off flexibility for performance. For example for bloom: A full screen bloom effect works on your whole scene out of the box. That's convenient, but more expensive (which doesn't really matter on PC, but does on mobile. For mobile, if you know beforehand which objects have the biggest effect (for example the sun), you might be able to just fade in a billboard texture to fake that bloom effect. Or you could write a special vfx shader for that one object. Same for other effects.
- In general: Ask a different question: Don't ask, "how can I get full screen effects working on mobile?". Instead ask: "How can I get the vision for my design across with the available resources?"