OpenGL: blur only one part of the texture; can using vertex shader speed up? -


let's there 1 texture: 6000x6000

i need blur 1 part, let's center rectangle 100x100

if use vertex shader put interested area center rectangle, inputting coordinates of 4 points , corresponding texture coordinates in big texture, think fragment shader process pixels in center rectangle.

in understanding, regular gpu cannot handle 6000x6000 pixels concurrently; divide several segments. 100x100, pixels can processed simultaneously, faster.

is understanding correct?

you can "render texture", can use "vertex shader" select area want blur... , fragment shader apply blur in area.

your understanding seems correct: consider gpu spend efford processing fragments inside area determined vertex shader, if set vertex subset of target [just screen, target may texture, via framebuffers], gpu process desired area.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -