SirKnight
05-20-2005, 12:18 PM
Been a while since I started a topic on here. Anyhoo...
Would it make any difference when sampling textures in a fragment program if you did them like this:
a) sample all textures
b) do all math
or mixing it around like this:
a) sample a texture or two
b) do math with needing those textures
c) sample more textures
d) do more math
e) etc...
???
Usually I sample when it's needed like in exhibit-B.
I know when doing vertex texture fetches there is a large amount of latency there so it's The Right Thing to fetch the vertex texture, do math that doesn't need the texture result, then do math that uses the texture. This is done to "cover up" the VTF latency.
Just wondering if anyone has came across a problem where this made a difference or not.
-SirKnight
Would it make any difference when sampling textures in a fragment program if you did them like this:
a) sample all textures
b) do all math
or mixing it around like this:
a) sample a texture or two
b) do math with needing those textures
c) sample more textures
d) do more math
e) etc...
???
Usually I sample when it's needed like in exhibit-B.
I know when doing vertex texture fetches there is a large amount of latency there so it's The Right Thing to fetch the vertex texture, do math that doesn't need the texture result, then do math that uses the texture. This is done to "cover up" the VTF latency.
Just wondering if anyone has came across a problem where this made a difference or not.
-SirKnight