Using shaders for data processing on mobile devices? Is it possible?

Hey there! Beware a big post.

I’m currently trying to develop a management game for mobile devices that supports Ogl ES2.0. The game uses a 2d grid to map a restaurant structure. The restaurant internal structure (such as rooms) and windows to an external area are decided by the user during gameplay. However, the very notion of daytime and how well lit a spot is are important factors during the gameplay - and thus I need to process light information during runtime. I’m trying to avoid light that goes through walls, since that would feel not real. Also, I do need some way to retrieve light information in each spot of the 2d grid, as well. As an added complexity, I’m trying to simulate sun light coming through the windows, as the sun moves during the day until it sets.

After some research, I managed to find some methods that can be fast enough for the game as long as my grid is small (always smaller or equal to 64x64). However, I’m currently CPU bound. I’ve read that I could somehow use color buffers, geometry shaders, compute shaders and other alternatives in an attempt to use the gpu parallelism, but I could not find a way to use these technologies, or they are not supported for Ogl ES2.0.

Is it possible to use the mobile device’s gpu for processing without using plugins in unity? If yes, are there sites that address to this? I’ve been searching for a couple of weeks, but no success so far. I did a test with radiosity with four iterations in a 64x64 grid, where each grid position maps 40 positions to receive light from. This can take from 15 to 45 seconds in a mobile device with processing power near of that available in a Samsung Galaxy S (wifi 5).

It’s possible. You just have to do it the old-fashioned way, using shaders and rendering the results to textures.

I guess I’d need render textures then. Good to know that is possible =) I was starting to give up