whats 'w' in uvw?

Blitz3D Forums/Blitz3D Programming/whats 'w' in uvw?

bytecode77(Posted 2007) [#1]
just for knowledge: what is the w param in UVW texture coordinates, and why is writepixel(fast) not working with alpha even in 32 bit modus?


jfk EO-11110(Posted 2007) [#2]
Writepixelfast not working with alpha? I think it's working. You have to handle it, of course. Not sure if you ca ReadPixel the alpha channel correctly. Writing works.
a=127
r=$44
g=$55
b=$66

argb=(a shl 24) or (r shl 16) or (g shl 8) or b
writepixelfast x,y,argb

when reading a pixel you should mask the slpha channel if it's not an alpha texture:
rgb=readpixelfast(x,y) and $ffffff
otherwise there may be random values in the alpha channel.

Not sure if you can read the alpha channel, maybe like this:

argb=readpixelfast(x,y)
a=(argb shr 24)


And the second thing, the W would be a 3rd dimension to define the vertex location. Imagine you could use the xyz right as UVW. These requires of course a 3D texture or material. Not supported by Blitz and by most other realtime rendering things AFAIK.


bytecode77(Posted 2007) [#3]
ok, thx.
just wanted to know :P