View Full Version : Vertex color effected by texture filtering?
05-13-2004, 06:54 AM
I am curious, I am looking to get a "banded, cell shading" effect by rendering an object w/ a texture (billinear filtered) and a series of greyscale vertex color values. Will the textures filtering destroy the banding effect? If so, or even if not so, is there a way to declare the filtering for the colors of the vertices (to get the desired banding effect). Please note: I will be turning off the lighting, as well as the blending for this.
05-13-2004, 09:12 AM
I think glTexParameteri(GL_TEXTURE_2D, GL_MAG_FILTER, GL_NEAREST) is what you want. See the red book page 359.
05-13-2004, 09:52 AM
Ok, maybe I asked my question incorrectly. I am trying to figure out how to make it so when I declare the vertex colors of my object, that it dosnt have a nice EVEN blend from one vertex to the next, but a jagged "banding" look to it. And when this is done, if applying a texture that is billinear filtered, over the top of it, will remove the jagged banding.
05-13-2004, 10:23 AM
you could look at the nehe tutorial on cell shading. It uses 1d texture instead of vertex colors that may accomplish the effect you want
05-14-2004, 02:04 AM
If you are going to compute the vertex colors for yourself there's no problem here, the basic operation ( texture color * interpolated vertex color ) doesn't change.
If you want to disable interpolation across vertices, use glShadingModel( GL_FLAT ) - cant remember the correct syntax.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.