1D textures ? don''t you think you''ll lose 1 dimension ?
Instead I was thinking of 4D textures (in fact, 2D textures plus Q coordinate) but I''m having problems imagining what it could do since todays graphics card don''t interpolate correctly (errors like perspective non-correction, ugly!).
mapping a rectangular map on a triangle
One (ugly) solution I''m thinking of is simply pre-processing the texture.
You have to stretch the texture to fit into a triangle.
That is, for each line of the texture you have to stretch it so that the first line is stretched to 1 texel, and the last line is not stretched at all, and the other lines are stretched relatively to their height (that is, the lowest lines become really small and the last lines have almost their original size).
I don''t know if I''m clear enough. I can write a little scheme if you need.
You have to stretch the texture to fit into a triangle.
That is, for each line of the texture you have to stretch it so that the first line is stretched to 1 texel, and the last line is not stretched at all, and the other lines are stretched relatively to their height (that is, the lowest lines become really small and the last lines have almost their original size).
I don''t know if I''m clear enough. I can write a little scheme if you need.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement