PDA

View Full Version : Demo



NitroGL
11-09-2002, 01:01 PM
I think I did a pretty good job on it.

The ARB programs are commented (well, the fragment programs are anyway, the .tfp files).
http://area3d.net/story.php?id=445
http://area3d.net/nitrogl/images/RfRrPhong.jpg

Tell me what you think.


[This message has been edited by NitroGL (edited 11-09-2002).]

davepermen
11-09-2002, 01:09 PM
it looks amazing.. i would suggest to not shift the 3 colors that much, so that they add up to white at some part..

i love floating point quality http://www.opengl.org/discussion_boards/ubb/biggrin.gif the phong specular looks for the first time perfectly sharp and round.. good job you did, congrats..

humus demo is great, too, thought http://www.opengl.org/discussion_boards/ubb/biggrin.gif

NitroGL
11-09-2002, 01:11 PM
Yeah, I kinda thought that the split was a little high too, but it's not that bad.

Humus' demo is pretty cool, but it uses blinn specular not phong (I pointed that out to him already http://www.opengl.org/discussion_boards/ubb/smile.gif)

davepermen
11-09-2002, 01:14 PM
check his demo again, it now uses both http://www.opengl.org/discussion_boards/ubb/biggrin.gif

NitroGL
11-09-2002, 01:15 PM
That was quick...

WhatEver
11-09-2002, 05:50 PM
Ah, you didn't use GL_NV_vertex_program http://www.opengl.org/discussion_boards/ubb/frown.gif. The picture looks cool though http://www.opengl.org/discussion_boards/ubb/biggrin.gif.

NitroGL
11-09-2002, 05:51 PM
I use a Radeon 9700, not an nVidia based card.

I find it's kind of funny though, the demo uses nothing but standard ARB extensions, no vender extensions.

FXO
11-09-2002, 06:11 PM
That specular is sweet!

You are using a lookup in a cubemap for the refraction, right?

A bit OT: What is the "standard" way of doing refractions, perturbed textures would look a little bad if not at very high res, wouldn't they?

NitroGL
11-09-2002, 06:44 PM
Yeah, cube map generated via CopyTexSubImage2D.

I'm not really sure what the standard way to do it is really since there are so many ways to do it. My demo is using a variation on the physical based refraction.

The source is availible for the demo if you want to take a look at how it works (shouldn't be too hard to follow).

Humus
11-09-2002, 10:36 PM
Originally posted by NitroGL:
I think I did a pretty good job on it.

The ARB programs are commented (well, the fragment programs are anyway, the .tfp files).
http://area3d.net/story.php?id=445
http://area3d.net/nitrogl/images/RfRrPhong.jpg

Tell me what you think.

Damn, you win this time. http://www.opengl.org/discussion_boards/ubb/smile.gif
Heh, but you had a head start, I'll be better prepared next round. http://www.opengl.org/discussion_boards/ubb/tongue.gif

NitroGL
11-10-2002, 12:15 AM
Originally posted by Humus:
Damn, you win this time. http://www.opengl.org/discussion_boards/ubb/smile.gif
Heh, but you had a head start, I'll be better prepared next round. http://www.opengl.org/discussion_boards/ubb/tongue.gif

Yeah, but I had a 9700 for a few months before you, so it's a little unfair to begin with. But then again, I did have to wait for the ARB_f_p extension and drivers too...

Oh well. http://www.opengl.org/discussion_boards/ubb/smile.gif

And actually, the only part of the demo that I already had done is the phong lighting, the refraction I did the same day I released the demo. But refractions are easy, I'm sure you could have figured that out. http://www.opengl.org/discussion_boards/ubb/tongue.gif

Ysaneya
11-10-2002, 04:05 AM
Looks good, but 35 fps on a Radeon 9700 seems a bit low, isn't it ? I mean, the scene is quite simple.. where's the bottleneck ? Fillrate ?

Y.

NitroGL
11-10-2002, 09:34 AM
I'm pretty sure it's fillrate, since I have to render the scene (with phong lighting) 6 times for the cube map and that's using CopyTexSubImage2D, so it isn't exactly the fastest way to do it.

If I comment out the cube map generation code, the framerate jumps up to about 90FPS.

jwatte
11-10-2002, 10:56 AM
Very nice!

Initially, I felt that that's still surprisingly slow. 20 gigabytes per second should fill more than that. You're not really slurping through > 200 megabytes of data per frame? (20 gigabytes / 90 fps)

Ah, but your fragment program is pretty long. Thus, it might still be fill rate, but fragment ops rather than bytes touched.

Each fragment goes through 40 instructions (!). At 320 MHz, you can do 8 million fragments per pixel pipe. Multiply by 8 pixel pipes, divide by 0.48, and there's your 90 fps right there!

Luckily, I believe the low end, and cards in general, will be able to scale fragment shader clock speed much faster than they'll be able to scale memory throughput, so this approach will probably be commonplace any year now :-)

I wonder if some of those other vector derivations could also be done in the vertex program and sent through texture interpolators as well. And I wonder if that would speed up the execution of this particular program... intriguing...

[This message has been edited by jwatte (edited 11-10-2002).]

V-man
11-10-2002, 10:59 AM
You just *had* to use ATI VAO didnt you?? http://www.opengl.org/discussion_boards/ubb/smile.gif

Now I have to hack it just to make it run on my NV.

V-man

NitroGL
11-10-2002, 11:44 AM
Originally posted by V-man:
You just *had* to use ATI VAO didnt you?? http://www.opengl.org/discussion_boards/ubb/smile.gif

Now I have to hack it just to make it run on my NV.

V-man

Actually, you can just comment out the VAO code, and uncomment the standard vertex array code (disable the other VAO code though).

B_old
11-10-2002, 11:49 AM
Sorry, but who is humus?
It's just because you said his demo is great.
Thanks.

V-man
11-10-2002, 06:35 PM
Originally posted by NitroGL:
Actually, you can just comment out the VAO code, and uncomment the standard vertex array code (disable the other VAO code though).

Its worst than I thought, I dont have ARB_fragment_program, only NV_fragment_program. Now I have compare and fix.

Thank you Nitro!

V-man

Humus
11-10-2002, 10:13 PM
Originally posted by B_old:
Sorry, but who is humus?
It's just because you said his demo is great.
Thanks.

That's me http://www.opengl.org/discussion_boards/ubb/smile.gif
My demo is at my website: http://humus2.campus.luth.se/~humus/

tiempo
11-11-2002, 05:32 AM
In a nutshell how can you handle refraction in this type of rendering (as opposed to something like raytracing)?
tmp

IT
11-11-2002, 06:41 PM
FYI - I'm getting 55 fps with a P4 2.53 and 9700 Pro... getting 47 fps with FSAA enabled... nothing overclocked.