Re: Per axis filtering would be cool.

"Stephen J Baker" <[email protected]>
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
Leath Muller wrote:
> Hi Steve...
> 
> Can you do this with fragment shaders in the meantime?

You can for NEAREST and LINEAR - just set the glTexParameter
to NEAREST and read multiple samples interpolating them in
the shader.

But you absolutely cannot do it for MIPMAP modes because
(for example) if you had a 64x64x64 texture with MIP filtering
on just the S and T directions with NEAREST on the third
axis, you'd need texture maps that were:

64x64x64, 32x32x64, 16x16x64
8x8x64, 4x4x64, 2x2x64 and 1x1x64

...and there is no way to store those right now.

You have to kinda fake the MIPmapping by reading an appropriate
number of samples and averaging them - but that's too expensive
to be usable right now - and loops without fixed limits are
still a 'no-no' so it's hard to do this right even if you have
infinite time to burn.

> Just asking here, as I haven't actually worried about
> using 3D atlases (atlii? :) at all...

The problem with using a 3D map as an atlas is that you really
need MIP in two axes and NEAREST in the third - but I have
other applications where I'd like MIP in one axis, NEAREST
in another and LINEAR in a third!

In some cases, you can get around it (at the cost of complexifying
the shader) - in other cases you cannot.

-----------------------------------------------------------------------
The second law of Frisbee throwing states: "Never precede any maneuver
by a comment more predictive than "Watch this!"...it turns out that
this also applies to writing Fragment Shaders.
-----------------------------------------------------------------------
Steve Baker                      (817)619-2657 (Vox/Vox-Mail)
L3Com/Link Simulation & Training (817)619-2466 (Fax)
Work: [email protected]           http://www.link.com
Home: [email protected]       http://www.sjbaker.org

----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

-- 
Author: Stephen J Baker
  INET: [email protected]

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.