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

Archive Today Yesterday Tomorrow
LoW homepage


[00:09:50] <servus> Hmm, looks like doing that vector normalization in the vertex program costs be substantial accuracy.
[00:09:59] <servus> That, or I'm miscalculating...
[00:10:22] <servus> I don't see why it should be the least bit different, though.
[00:10:30] <Coren_> No, it has to. You really have to normalize per-fragment otherwise you get uglinesss, especially if the eye is near the center of the polygon
[00:11:33] <servus> But why?
[00:11:34] <Coren_> Think about it, if you interpolate between 0,sqrt(2),stqr(2) and 0,-sqrt(2),sqrt(2) you get the midpoint at 0,0,sqrt(2) instead of 0,0,1
[00:12:10] <servus> Either way, you have bilinear interpolation of your source tuples going on. Why does it matter
[00:12:22] <servus> Hm
[00:12:32] <Coren_> The vector still points right, but it gets evilly denormalized.
[00:13:05] <servus> But a bilinear interpolation between unit vectors should always be a unit vector... shouldn't it?
[00:13:06] <Coren_> s.sqrt(2).sqrt(2)/2.
[00:13:23] <servus> I think I came to the reason when I first wrote this vprogram :)
[00:13:43] <Coren_> No, if you interpolate you will loose the unit.
[00:14:38] <Coren_> But that's not so bad, normalizing the vector per fragment is just 3 instructions
[00:14:43] <servus> Urgh. Well, that's why I did it the way I showed, the first time :)
[00:14:59] <servus> Want to see the difference between VPU normalizing and FPU?
[00:15:01] <servus> It is drastic :)
[00:15:17] <Coren_> Oh, I've seen it. Done *that* mistake before. :-)
[00:16:03] <servus> I mean, it's the "right" result, but the precision I lose is phenomenal.
[00:16:38] <Coren_> Actually, it's not even right if any coordinate cross an axis.
[00:17:43] <servus> Murphy says all geometry is in a worst-case scenario.
[00:18:03] <Coren_> He also says all matrices are degenerate. :-)
[00:18:07] <servus> http://sammatthews.com/images/The%20Abyss/Abyss11.jpg :-)
[00:18:17] <servus> All matrices ARE degenerate, thoug
[00:18:24] * servus grumblse
[00:18:55] <Coren_> Heh. Yup. It shows. :-)
[00:18:58] <servus> Blue is refraction, red is reflection
[00:19:20] <servus> That is __unacceptable__. I noticed the sort of stuff you see on the left hand in No One Lives Forever's water :)
[00:19:39] <servus> However, I think I've thought of a _mindblowing_ hack.
[00:19:59] * Coren_ watches servus's mind blow apart.
[00:20:22] <servus> Consider this, graphically: The blue sphere you see on the scene is refraction, and the red is refraction, right? As far as the screen-space goes, the blue sphere is always exactly the same size.
[00:20:51] <servus> So, instead of doing _any_ eye-to-fragment calculations at all... I just map the reflection/refraction ratio against a prebuilt map :)
[00:21:00] * Coren_ ponders.
[00:21:17] <servus> I think it'd look exactly the same, without me doing the slightest bit of arithmetic!
[00:21:25] <Coren_> I only think that's right if you're looking parrallel to the water surface.
[00:21:48] <servus> Hmm.
[00:21:54] <servus> Perpendicular, actually..
[00:21:59] <Coren_> Err, yes.
[00:22:12] <servus> If I am looking straight down into the water, then zoom close to it, or zoom out, the map never changes an inkling.
[00:22:13] <Coren_> In other words, it would break if you had sloping water. Do you?
[00:22:23] <servus> I do if I look horizontally :)
[00:22:47] <Coren_> You could just hack your map around if all the water lied on the same plane.
[00:22:57] <servus> So theoretically I could get the same effect by doing a world-to-tangent-space transformation on the fresnel map I just mentioned... and I'm right back where I started, performance-wise.
[00:23:14] <servus> HL2 _requires_ all water to be one plane, did you know that? :)
[00:23:22] <servus> Gives you insight into their hacks.
[00:23:32] <Coren_> No, I didn't. :-)
[00:23:33] <servus> Their water all has to be horizontal, too...
[00:23:54] <servus> However, they support things like glass doors that ripple light coming through it, et cetera; I support the same.
[00:24:14] * Coren_ reads up on vertex programs.
[00:24:33] <Coren_> Funny that; I did plenty of fragment programs but never did a vertex program before. :-)
[00:25:01] <servus> You just draw every frame to a buffer, then redraw the entire scene on a quad with the texture that you just rendered to, and you can perturb texture coordinates on a per-fragment basis to your heart's content
[00:25:09] <servus> ARBvp and ARBfp are so similar... It's nice.
[00:25:20] <Coren_> Yeah, that much I already figured.
[00:26:25] <servus> The clever combination of VP and FP has a real... satisfying quality about it, though.
[00:26:56] <servus> You can do all the heavy specular transformations in VP, then do fun (really, fun!) stuff in FP like making specular highlights based on the texture's alpha channel, or something :)
[00:27:20] <Coren_> My specular highlights are already based on the texture's alpha channel. :-)
[00:27:21] <servus> Veins of gold in a rough-hewn wall shining brightly, when a light is cast, but the rest of it remaining matte and diffuse? Delicious!
[00:27:41] <Coren_> Look at my screenshot and examine the gold braid on the carpet closely. :-)
[00:28:19] <Coren_> It is, of course, much more noticable if you move around.
[00:28:22] <servus> Looking for it again...
[00:28:39] <servus> Right. Same with mine -- all of my torch lights follow a tiny orbit in all axes.
[00:29:28] <Coren_> And on that screenshot, the red marble thingy is the same material on both sides of the carpet.
[00:29:46] <servus> It's all so dark, I can't really tell
[00:29:59] <Coren_> Lemme make a new one with more lighting.
[00:30:01] <servus> OK
[00:30:06] <servus> Can you turn off your decals?
[00:31:01] <Coren_> You mean the texture map? Sure.
[00:32:03] <servus> http://sammatthews.com/images/The%20Abyss/Abyss12.jpg
[00:32:16] <servus> The grout is matte.
[00:33:36] <Coren_> (converting from xwd)
[00:33:46] <servus> xwd?
[00:34:02] <Coren_> X window dump. Never got around to having a screenshot facility in my code. :-)
[00:34:06] <servus> Oh
[00:34:11] <servus> I use Gimp in Linux :)
[00:34:28] <servus> I need to get NVidia back on my Linux server.
[00:34:57] <servus> When the heck is OpenGL 2.0 coming out!? All I really want (need) is render-to-texture........ Urgh!
[00:35:23] <Coren_> Technically, it *is* out. the NV linux driver is 2.0. :-)
[00:35:43] <Coren_> http://aleph.uberbox.org/~marc/sd2.png
[00:35:58] <Coren_> OpenGL renderer string: GeForce FX 5200/AGP/SSE2
[00:35:58] <Coren_> OpenGL version string: 2.0.0 NVIDIA 76.67
[00:36:16] <Coren_> NVidia rocks. :-)
[00:36:28] <servus> Hmmm....
[00:36:44] <servus> Will we ever, ever, ever, ever, ever get new Windows headers?
[00:37:26] <servus> The bricks above the light don't look to be getting bumped correctly.
[00:37:34] <Coren_> Not if you count on Microsoft. They have announced that OpenGL is officially "deprecated" for them. Longwait only supports GL 1.3 as a wrapper over Dirape3D.
[00:37:42] <servus> Hmm I think it's just your normal map
[00:37:58] <Coren_> It's my normal map. I suck at doing normal maps.
[00:37:58] <servus> I've heard conflicting views on that D3D-GL thing.
[00:38:14] <servus> Well in that case, your bricks have no bottoms :)
[00:38:57] <Coren_> Still looks pretty okay, hm?
[00:39:31] <Coren_> The normal map for the wood is okay.
[00:39:37] <servus> I'm just reminded of when I thought I had bumpmaps working, but my matrix was forked, and it only lit up things below the light :)
[00:41:19] <servus> Looks good, though
[00:42:04] <servus> I keep glTexEnvf( GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 2 ); on, to really make my bumps "jump out" (because I like it, but it's probably why you thought I had specular on everything)
[00:51:44] <Coren_> I like my bumps subtle. :-)
[00:55:27] <servus> Bet the girls do, too.
[03:32:07] <-- Coren_ has left IRC (Read error: 110 (Connection timed out))
[07:17:05] --> Khelz has joined #low
[19:25:10] <-- Khelz has left IRC ()
[21:30:02] --> Coren_ has joined #low
[21:30:03] --- ChanServ gives channel operator status to Coren_
[23:08:36] <-- Coren_ has left IRC (Remote closed the connection)