First, sorry for my bad English.
I'm developing a HW IP which supports OpenGL ES 2.0, including one vertex shader processor and one fragment shader processor.
I met a problem while implementing the fragment shader processor's texture access.
As you know, the derivatives of the texture coordinates are required (du/dx, dv/dx, dv/dy, dv/dy).
My question is about how I can compute those derivatives.
I think the du/dx and dv/dx means the differences between one fragment's texture coordinate and the right fragment's texture coordinate. For du/dy and dv/dy, in the same way except Y direction.
On every fragment's calculation, because of the if~else clauses,
it is not guaranteed that the coordinates are calculated in the same way,
and the requried number of texture reads can be different from fragment to fragment.
What I want to knows are,
1. Is it correct what I think about the derivatives?
2. How can I compute the derivatives with SINGLE fragment shader processor?
ARM Mali200 has also single fragment shader processor, so I think there is a way to calculate them.
3. Is there any other way to compute the LOD without the derivatives?
Thank you, in advance.