poor quality with 1D textures

i dont know if 1D textures are rendered this way, or if im going wrong somewhere. I initially developed a program that generates a surface from a height map. I used the usual glcolor* statement to color each vertex, and it looks awesome. now im trying to do the same thing using a 1D texture. the problem is that the quality is pretty sad. i can see the colors changing from one level to another (its not smooth). i have a couple of snapshots at the following url. can anyone tell me where i am goin wrong, or if what i m gettin is what 1D textures can do best.
www.geocities.com/mithunp4u/

thank u.

it doenst look like you enabled bilinear filter on the texture…

Originally posted by Mazy:
it doenst look like you enabled bilinear filter on the texture…

how do i enable it?

Originally posted by mithun_daa:
[b] [quote]Originally posted by Mazy:
it doenst look like you enabled bilinear filter on the texture…

how do i enable it?[/b][/QUOTE]

im sorry, but i have enable the mag & min filters, they are set to be linear filters.

the filters are per texture object and per texture target, so use GL_TEXTURE_1D in the glTexParameter* calls

Make sure your texture internal format is 32 bits.

Y.

So you weren’t satisfied with old thread on the same topic ?

Anyway, wild guess: your texgen params still aren’t right. I could hand you the right ones if you actually answered the question I posed in the other thred.

Oh well … there goes the ‘advanced’ forum …

Originally posted by zeckensack:
[b]So you weren’t satisfied with old thread on the same topic ?

Anyway, wild guess: your texgen params still aren’t right. I could hand you the right ones if you actually answered the question I posed in the other thred.

Oh well … there goes the ‘advanced’ forum …[/b]

k zeckensack, the reason i posted again is cause i fixed the problem with ur suggestion, but the quality was poor. so i updated the website and posted again to show the new changes and my new problem.

k herez how im setting my filters

currentCoeff(0) = 0#
currentCoeff(1) = 0#
currentCoeff(2) = -1 / (dblZMax - dblZMin + 95)
currentCoeff(3) = 0#
glGenTextures 1, texName
glBindTexture glTexture1D, texName
glTexParameteri glTexture1D, tpnTextureWrapS, GL_REPEAT
glTexParameteri glTexture1D, tpnTextureMagFilter, GL_LINEAR
glTexParameteri glTexture1D, tpnTextureMinFilter, GL_LINEAR
glTexImage1D glTexture1D, 0, GL_RGBA, ColorScaleWidth, 0, GL_RGBA, GL_UNSIGNED_BYTE, bytColorScale(0)
glTexImage1D glTexture1D, 0, 4, ColorScaleWidth, 0, GL_RGBA, GL_UNSIGNED_BYTE, bytColorScale(0)
glTexEnvf tetTextureEnv, tenTextureEnvMode, tepModulate
glTexGeni GL_S, GL_TEXTURE_GEN_MODE, tgmObjectLinear
glTexGenfv GL_S, tgObjectPlane, currentCoeff(0)

no the right textures are being generated, but as u can c on the link posted above, there are bands of colors which doesnt look very realistic.
could it be happening cause im using byte as the format. using a float would (i think) cause some improvements.

glTexImage1D glTexture1D, 0, GL_RGBA8, ColorScaleWidth, 0, GL_RGBA, GL_UNSIGNED_BYTE, bytColorScale(0)

just to make sure…

Originally posted by Mazy:
[b]glTexImage1D glTexture1D, 0, GL_RGBA8, ColorScaleWidth, 0, GL_RGBA, GL_UNSIGNED_BYTE, bytColorScale(0)

just to make sure…[/b]

that did itttttttttttttttt!!! thanx a looooot mazy

That’s incredible. What did i suggest ?

Why are you posting if you’re not even reading other people’s suggestions ?

Y.