+1 vote

I am curious how much processing power consume back-buffer copy of screen. I am considering Gaussian blur. There are two approaches:

  1. One pass filter: For each pixel make a weighted average (2D gaussian kernel) of n x n pixels surrounding the pixel. It costs O(n^2).
  2. Two passes filter: For each pixel make a horizontal weighted average (1D gaussian kernel) of 1 x n pixels. Then read the screen again (using back-buffer copy nodes) and make a vertical weighted average (1D gaussian kernel) of n x 1 pixels. It costs O(n). But I am not sure how efficient is to make back-buffer copy.

What approach is more efficient in Godot?

in Engine by (675 points)
edited by

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.