Jump to content
  • Advertisement
  • entries
    422
  • comments
    1540
  • views
    490094

Part 7: Learning the Programmable Pipeline

Sign in to follow this  
jollyjeffers

90 views

I've tidied up the source code for the cubic patch shader I mentioned in my previous journal entry.

I also managed to create an optimized version of the shader that knocked 6 instructions off and gave me around 500,000 more vertices per second [wow]

64 Instruction Listing and Optimized 58 Instruction Listing. Complete HLSL Code.

You can download all of the files here (751kb)

I think I'm gonna implement some lighting for the surface next. I've messed with a 3-point-per-vertex sample which works but it's slow. Given it's a mathematical surface there should be a mathematical normal, if I can bend my head around that I can probably write some clean(er) code [grin]

Comments appreciated - especially performance related if you have a GeForce 6800/7800 [wink]
Sign in to follow this  


2 Comments


Recommended Comments

Quote:
Very nice Jack.

Thanks!

Quote:
I've only got a 5200 but I'm getting 400 fps.

That aint bad at all [smile] If you do the following you can get quite a good guage of the vertex throughput of your hardware:

1. Switch to fullscreen mode, any resolution
2. Hit PAGE-UP until LOD is 8 and it's saying there are 65536 vertices
3. Scroll up (or down?) with the mouse wheel until the geometry disappears off the screen (reduces/eliminates fill-rate).

If you then watch the 3rd (might be 4th) line of text - "Performance : ___ MVerts/Sec" you can get a reasonable benchmark.

For reference mine is usually between 10.25 and 10.40 @ 158fps [grin]

Jack

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!