Does anyone have a good rule of thumb about when it’s better to use a LUT texture vs. doing analytic calculations in a fragment shader?
-
Show this thread
-
I know LUTs are popular for BRDFs and wonder if I should just do the same thing for summed area calculations in Pathfinder (for AA)…
1 reply 0 retweets 0 likesShow this thread -
Replying to @pcwalton
It largely depends on what the rest of the shader is doing. If you're heavily ALU bound and you can save many cycles using a small/coherently accessed LUT, it can be worth it. _Usually_ these days, it's better to compute than to fetch. ALU perf is improving faster than BW.
1 reply 0 retweets 1 like -
Replying to @ssylvan
Yeah, the problem here is all the branchiness in the calculation. Summed area is pretty branchy no matter how I slice it :(
2 replies 0 retweets 0 likes -
Replying to @pcwalton
Does the LUT need to be filtered? If not, can it fit in constant memory?
1 reply 0 retweets 0 likes
Filtering would probably improve appearance a bit, but I highly doubt it’s visible. Haven’t tried constant memory; might be a good idea!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.