ufwhere.blogg.se

Multiple render targets opengl es 2.0
Multiple render targets opengl es 2.0










But if it wasn't for the texture-locality: would I still be enjoying a performance boost? or is a single shader rendering to two outputs basically equivalent to two render passes?

multiple render targets opengl es 2.0

The question is: will writing a single shader that does both operations be faster than running these two shaders one after the other? suggests that the answer is positive, because of accessing the same texture locations and enjoying locality. Shader2: (input image) I -> square pixels and filter rows-> I^2_rows (output image) Shader1: (input image) I -> filter rows -> I_rows (output image) f(I) = filter rows and g(I) = square and filter rows: I want a to filter the rows of image I with a 1-d filter and also filter the rows of the squared image (each pixel is squared). Following several remarks, here's an example for my use-case with some more details: My question is regarding efficiently calculating f(I),g(I): does it matter if I use 2 separate fragment shaders (and therefore 2 rendering passes), or if I use a single fragment shader with 2 outputs? Will the latter run faster? I have mostly found discussions about the "how-to" not about the performance.

multiple render targets opengl es 2.0

Then the one fragment shader calculates f(I) the second calculates g(I) and the last one calculates h(f(I),g(I)). I take an input image, calculate several transformations of it, and then output a result image. I am currently trying to "shave off" a few more milliseconds to make my application real-time. I am using glsl as a framework for GPGPU for real-time image-processing.












Multiple render targets opengl es 2.0