Public Group

# Understanding Deferred Lighting Article

This topic is 3655 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've been reading up on deferred lighting and came across the article on beyond3d http://www.beyond3d.com/content/articles/19. I understand the overall idea, but one particular detail I've been failing at and thats with lerp of a 3D texture. The author explains the idea behind interpolating 3D textures but its unclear to me as to what hes describing. For instance when he says: "Bilinear filtering gives us free linear interpolation between samples which is very nice when we are storing a discrete approximation to a function. The main problem is that we cannot control this on a per-axis basis. A common pattern is to store the discrete approximation to a 1D function along one axis of the texture, and store different functions along the other axis. In this case we want only linear not bilinear interpolation; there are 2 approaches to achieving linear interpolation from a texture." I'm unclear as to what hes describing, the bit I understand is that the lerp in 3D will take into account the multiple layers, but how does one go about storing 1D functions along a given axis? Is it something such as f( g(x),h(y) ) kind of function hes speaking of, or is it something different?

##### Share on other sites
What he's saying is that typically the layers of 3D textures will contain data that's independent of the layers. This means that bilinear filtering will be a problem, because it will "mix up" the data from multiple layers and it won't work since the data isn't related. Actually what he's describing is the same problem for 2D textures, if you had independent data in say each row of the texture. In such cases it would be nice if we could specify that we only want filtering on one axis, however the hardware doesn't allow this.

As for storing multiple functions, this is pretty simple. By "1D function", he means any function where you put in one variable and get another. Typically for deferred shading these functions will be related to materials and how lighting interacts with them.

##### Share on other sites
Thanks for the reply MJP, that explains a bit more to me, but I'm still confused as to how you store the 1D functions in a 2D texture seperatly. As far as the work I've done with 2D textures - I pretty much treat them like a 2D array with special properties. So when I index through them storing data say from some kind of a procedural routine I usually would say something like
f(x,y) = z, so its very odd\foreign to me this idea of seperating out the axis and lerping on just one of them.
So, if you were to store the textures as a combination of 2 functions, since I'm utilizing a multi-axis construct, whenever you perform any kind of interpolation on it, the resultant set would still be a combination of the second axis, even if I only wanted to lerp on the first function - I don't see a way to really seperate them out? (Hope that makes sense).

##### Share on other sites
Bump - any help out there?

1. 1
2. 2
Rutin
22
3. 3
4. 4
frob
16
5. 5

• 9
• 33
• 13
• 12
• 10
• ### Forum Statistics

• Total Topics
632577
• Total Posts
3007163

×