texture shader texcoord length

in the textureshaders3 we can now calculate

tex1.clr = dot_product(tex1.coord,tex0.color) wich is GL_NV_DOTPRODUCT_PASSTROUGH or however called

or we can do

tex1.clr = tex1.data[dot_product(tex1.coord,tex0.color)] wich is GL_NV_DOTPRODUCT_TEXTURE_1D or however called…

so far so good. but there is no way of calculating fast

tex0.clr = tex0.data[dot_product(tex0.coord,tex0.coord)], sort of GL_NV_SQUARED_LENGTH_1D in yet… need 2 texturestages one with passtrough and the second with GL_NV_DOTPRODUCT_TEXTURE_1D then, right?

Dave,

No obvious way that I can think of…

Cass

hm okay… too bad but okay
thanks for makin my thoughts sure…

If tex0 is a 1D texture, you can easily just put the squared-input-mapping in the texture data (and making it a little wider to compensate for the loss of precision).

i want to look up the the texcoords i put in… the texcoords are 3d, a vector, and i want to dot the vec with itself to use this as 1d-texture coordinate…

but this does not work except i use 2 texturestages for this…

its faster to use a 3d-texture and look the result there in up than using a 1d-texture… great architectural design…