RE: [Algorithms] Terrain performance comparisons
Brought to you by:
vexxed72
|
From: Tom F. <to...@mu...> - 2003-07-30 15:33:12
|
As Peter-Pike Sloan pointed out, naive mipmapping without renormalisation is actually almost precisely what you want for diffuse normal maps. Consider the two versions: Calculate then mipmap - "proper": result = lerp ( dot(tex0,L), dot(tex1,L) ) Mipmap then calculate: result = dot ( lerp (tex0,tex1), L ) So if you multiply it all out, modulo some clamping of negative values, you get the same result! Of course with specular calculations it's complete rubbish :-) Tom Forsyth - Muckyfoot bloke and Microsoft MVP. This email is the product of your deranged imagination, and does not in any way imply existence of the author. > -----Original Message----- > From: Thatcher Ulrich [mailto:tu...@tu...] > Sent: 30 July 2003 15:01 > To: gda...@li... > Subject: Re: [Algorithms] Terrain performance comparisons > > > On Jul 30, 2003 at 01:59 -0500, Jonathan Blow wrote: > > > > That is not at all why I think shader LOD is important. > > > > The phenomenon I am worried about is that if you don't merge > > shaders, then there is an artificial limiter on how much you can LOD > > your geometry, because you can't merge triangles that use different > > shaders. So what you end up with is, past a certain distance, a lot > > of small batches of triangles that just won't reduce any further. > > Your LOD is prevented from operating. And it's really slow to > > submit all those batches to the hardware, due to all the context > > switching. > > There's yet another (related) point I would like to make about shader > LOD: for decent fill-rate (and antialiasing), it's essential to have a > way to scale your texture accesses & shader computations with pixel > size. For example, mip-mapping is a form of shader LOD. But > mip-mapping basically is good for diffuse lighting on a flat surface, > it doesn't work quite right for normal maps etc. > > I think to be compelling, the next frontier of geometric LOD has to > confront the shader LOD issue and unify it with geometric LOD. In my > own LOD stuff in the past, I've handled this by using pre-baked > mip-mapped textures (w/ surface normals based on the hi-res geometry), > and unique texture mapping, which works for diffuse shading with > static lights and static geometry, but obviously that's pretty > limited. > > -- > Thatcher Ulrich > http://tulrich.com |