Skip to content
Snippets Groups Projects
Unverified Commit 6a18e4e5 authored by Danny Lin's avatar Danny Lin Committed by Simão Gomes Viana
Browse files

blur: Calculate vertices in vertex shader instead of using VBO


Using a VBO for a simple full-screen triangle is unnecessarily
complicated, and because blur rendering is memory-bound, every little
bit of memory bandwidth counts. This removes the VBO in favor of
calculating the UV and clip space coordinates for a full-screen triangle
in the vertex shader, which only takes a few ALU instructions in a
shader that is only run 3 times per rendering step.

When tested with 2 layers of another 6-pass blur implementation, this
saves ~50 µs of rendering time on an Adreno 640 GPU at 1440x3040
resolution.

Change-Id: I6a3c6d691baa54412f4e04891129f101be6cdb60
Signed-off-by: default avatarMohammad Hasan Keramat J <ikeramat@protonmail.com>
Signed-off-by: default avatarSimão Gomes Viana <devel@superboring.dev>
parent dc8a1d9c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment