View Full Version : texture shader texcoord length

03-30-2002, 03:19 AM
in the textureshaders3 we can now calculate

tex1.clr = dot_product(tex1.coord,tex0.color) wich is GL_NV_DOTPRODUCT_PASSTROUGH or however called http://www.opengl.org/discussion_boards/ubb/wink.gif

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?

03-30-2002, 12:32 PM

No obvious way that I can think of...


03-30-2002, 12:33 PM
hm okay.. too bad but okay http://www.opengl.org/discussion_boards/ubb/wink.gif
thanks for makin my thoughts sure..

03-31-2002, 09:40 AM
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).

03-31-2002, 10:36 AM
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.. http://www.opengl.org/discussion_boards/ubb/smile.gif