have to be one pixel? no, but why bother with more if your sampler only uses one dimension of the texture? The rest would just be wasted space and memory and it's a one dimensional texture because when it is indexed by a shader it only has one component, the other is always zero, because (remember kids) counting digits…
Do they really *have* to be 1 Pixel high ? Doom3 has a few Textures that are basically just Ramps, for Light Falloffs etc, they are like 8 Pixels high. The Width is some Power of two as well. I guess you could feed any texture to the Graphics-Card as a "1D Texture" ( with some tex1D command in the fragment shader for…
[ QUOTE ] without trying to sound condescending, if you lerp'd between the starting pixel and end, you'd have pretty much the same results [/ QUOTE ] Lerps look about like this: Ben's functions look like this:
@Vailias : Sure making it really just 1 Pixel high might be a bit more "efficient" memory-wise, but i guess id made them higher so the artists could actually work with the textures without squinting a lot .
A 1d texture texture just has one of the dimensions as 1 pixel. You can't save it as DDS though, AFAIK. They can be quite useful when you get creative with shaders (they can act as really cheap ramps or gradients).
[ QUOTE ] [ QUOTE ] without trying to sound condescending, if you lerp'd between the starting pixel and end, you'd have pretty much the same results [/ QUOTE ] Lerps look about like this: Ben's functions look like this: [/ QUOTE ] my mistake (and a crappy lcd), apologies all round
We're using 1D bitmaps here too, for similar artist-controlled gradient effects (thermal shaders like the Predator movies, fog falloff ramps, etc.). In fact I just made a couple of these today. I usually don't need to go any more than 256 wide, so I can use 8bit TGA. Works well. FWIW, Nvidia's DXT compressor intelligently…
[ QUOTE ] I think it opens up some really awesome shader possibilities. [/ QUOTE ] qfa without trying to sound condescending, if you lerp'd between the starting pixel and end, you'd have pretty much the same results only using 3 1*2 px textures. it's always nice to see artists stepping into, (thankfully)what used to be…
EQ: Wake me up when computer graphics terminology makes sense or is intuitively consistent. rebb: Yes, a 1D texture is one pixel high. However, you can achieve the same effect with any height, it just is more expensive in terms of texture space and commands, but much simpler in terms of pipeline (1D textures are not very…