On PowerVR SGX 544 MP with OpenGL ES2 I need to selectively tap into 4 different 2D texture samplers. Am I better off branching using if statements or fetch all 4 texels and select them using steps and/or mixes?
IIRC, Series5 will prefetch all independent taps within branches (both paths) if the conditional cannot be evaluated before fragment shader calculation. This may also apply to conditionals where a uniform value dictates the path, e.g. a uniform bool.
Depending on where your application’s bottlenecks are, dependant texture fetches in the branches should be faster than independent as there will be fewer texel fetches and sampling operations. If you have access to our NDA deliverables, you should be able to confirm this with our Series5XT disassembly compiler (only Series6 onwards disassemblers are public).
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.