#low@irc.freenode.net logs for 23 Aug 2005 (GMT)

Archive Today Yesterday Tomorrow
LoW homepage

[01:11:07] --> Coren_ has joined #low
[01:11:08] --- ChanServ gives channel operator status to Coren_
[03:03:08] <Coren_> Gak. If I specify OPTION ARB_position_invariant is vertex.position no longer working?
[04:48:45] <servus> Coren_: Do you know what that option is for? :)
[04:49:25] <servus> But, if you specify OPTION ARB_position_invariant in a vertex shader, you can use vertex.position in calculations, and it will already have the final value in it.
[04:55:40] <servus> All that OPTION ARB_position_invariant does is paste DP4 result.position.x, state.matrix.mvp.row[0], vertex.position; DP4 result.position.y, state.matrix.mvp.row[1], vertex.position; DP4 result.position.z, state.matrix.mvp.row[2], vertex.position; DP4 result.position.w, state.matrix.mvp.row[3], vertex.position; to the top of your program. Note that it will put the final transformed vertex in result.position, but vertex.position w
[04:55:40] <servus> ill still contain the vertex position in __word__ space!!
[04:55:47] <servus> world space*, that is.
[04:56:08] <servus> Note that result.position is read-write, though, if you wanted that value :)
[06:04:58] <servus> I am doing specular highlights by transforming my eye-to-vertex vector to tangent space in the vertex program, then doing a standard vector reflection algorithm in the fragment program with incident of light-to-fragment, and dotting the result against the eye-to-fragment vector. Do you have a more succint solution?
[06:31:38] <servus> ARGH I'm an IDIOT!
[08:52:13] --> Khelz has joined #low
[21:25:04] <-- Khelz has left IRC ()
[21:35:05] <Coren_> Arg; world space. Feh. That explains my problems. I'm better off doing the transform myself then.
[23:09:50] <Coren_> It turns out that interpolating the eye position is nowhere near as accurate as calculating it per fragment. Not even close.
[23:13:04] <Coren_> Hm. When you think about it it's perfectly reasonable: it's not linear.
[23:13:33] * Coren_ shuffle things around.
[23:13:45] <Coren_> Maybe if I interpolate position instead of direction...