- Home /
Mobile Devices - how many times can I access the same texture on a shader?
I've been researching ways to use gpu parallelism to process data. On mobile devices, I've been told that I'd need to do this "the old way" - by reading from and writing to textures. I believe I saw somewhere that some gpu will limit the number of texture accesses you can make in a single pass of a shader.
Suppose a situation where I will need many texture accesses with coordinates calculated inside the fragment shader, on mobile devices and opengl es 2.0. Is there any limit on how many texture accesses I can make on the same texture? I've tried googling this, but failed to find this information.
Answer by Kirlim · Feb 11, 2013 at 01:26 AM
Since there have been a few more question views, I am converting my comment to an answer.
Unity 3d uses Shader Models profiles to limit shader capabilities. As far as I was able to research, mobile devices shaders are to be compiled with Shader Model 2.0 for compatibility. Accordingly to the Unity Manual (see Shader Targets):
http://docs.unity3d.com/Documentation/Components/SL-ShaderPrograms.html
So the answer is that it would be 32 texture accesses and 4 indirect accesses. It makes me wonder how it can be 32 textures accesses, since it looks like I can pass up to 8 texture coordinates... Indirect accesses are texture accessed using coordinates calculated inside the shader (please correct me if I am wrong).
Your answer
Follow this Question
Related Questions
Different Shader Display on 3gs vs. 4s 2 Answers
Render vertices in OpenGL ES with gl_PointSize 0 Answers
rendering things in order 0 Answers