Demo

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).]

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 the phong specular looks for the first time perfectly sharp and round… good job you did, congrats…

humus demo is great, too, thought

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 )

check his demo again, it now uses both

That was quick…

Ah, you didn’t use GL_NV_vertex_program . The picture looks cool though .

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.

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?

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).

Originally posted by NitroGL:
[b]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.[/b]

Damn, you win this time.
Heh, but you had a head start, I’ll be better prepared next round.

Originally posted by Humus:
Damn, you win this time.
Heh, but you had a head start, I’ll be better prepared next round.

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.

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.

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.

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.

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 :slight_smile:

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).]

You just had to use ATI VAO didnt you??

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

V-man

Originally posted by V-man:
[b]You just had to use ATI VAO didnt you??

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

V-man[/b]

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

Sorry, but who is humus?
It’s just because you said his demo is great.
Thanks.

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

Originally posted by B_old:
Sorry, but who is humus?
It’s just because you said his demo is great.
Thanks.

That’s me
My demo is at my website: http://humus2.campus.luth.se/~humus/

In a nutshell how can you handle refraction in this type of rendering (as opposed to something like raytracing)?
tmp