15
$\begingroup$

I know in the not so long ago (5-10 years?) that it was popular / efficient to bake data out into textures and then read the data from the textures, often using the built in texture interpolation to get linear interpolation of the baked out data.

Now that computing time is cheaper compared to texture lookup time, this practice has definitely lessened if not all together disappeared.

My question is, are baked out textures still used for anything? Does anyone have any usage cases for them in modern architecture? Does it seem likely they will ever make a come back? (say, if memory technology or basic GPU architecture changes)

$\endgroup$
1
  • $\begingroup$ That completely depends on the use case. Imagine your calculations take an hour to run. Wouldn't it be nice to just pregenerate a lookup texture with the results and use it on your GPU at runtime? Some more simple things might be faster to do with ALU instructions nowadays (certain color transforms for example), but anything that requires heavy computation is always going to be faster using lookup textures. $\endgroup$
    – Tara
    Commented Jul 26, 2019 at 8:47

1 Answer 1

16
$\begingroup$

Yes, lookup textures are still used. For example, pre-integrated BRDFs (for ambient lighting, say), or arbitrarily complicated curves baked down to a 1D texture, or a 3D lookup texture for color grading, or a noise texture instead of a PRNG in the shader.

ALU is generally cheaper than a texture sample, true, but you still have a limited amount of ALU per frame. GPUs are good at latency hiding and small lookup textures are likely to be in the cache. If your function is complicated enough, it may still be worth using a lookup texture.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.