1 reply [Last post]
vipersnake
User offline. Last seen 9 years 16 weeks ago. Offline
Joined: 06/15/2012
Posts:

How would we go about making a Vertex/Fragment shader that works on an image larger than 2K? I was playing around with the framework and made some very fun new filters that I was processing on my photos but realized it was downscaling everything to 2K on the iPhone 4.

Do I need to process half the image at a time or setup a different FBO?

Novice GLSL here but I am picking it up quick and love it. It is so much fun to play with.

Brad Larson
Brad Larson's picture
User offline. Last seen 4 years 51 weeks ago. Offline
Joined: 05/14/2008
Posts:

Yes, the maximum texture size on all devices before the iPad 2 is 2048x2048. Unfortunately, the iPhone 4 is the one device that generates images larger than this in its still photos, so I detect this and scale them to fit within the texture size.

I've been planning to implement a tiling mechanism to allow for processing arbitrarily-sized images, but haven't had the time to do this. It's not going to be a simple process, and will require slicing the image at the input source size, running through these tiles, and then assembling the image at the end. There's nothing at the shader side involved here, as this is simply a matter of the maximum hardware texture size.

Syndicate content