🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Shaders!

Published November 12, 2005
Advertisement
Alright...I hope I'm not getting in over my head here :-)

As I'm implementing multiplayer into my game, I'm going to also be overhauling the graphics engine as well. Right now the game doesn't use ANY pixel/vertex shaders, it's all done completly using the fixed function pipeline *embarrassed*. With the power of today's graphics cards this is absolutly not acceptable.

My main reason for doing this will be to shift my current software skinning onto the graphics card. Last time I profiled the game, I was spending about 25%+ of the CPU cycles animating/transforming the character/vehicle models...again, this is not acceptable. As I'm now adding multiplayer to the game, I'll be needing those CPU cycles :-)

I'm not going to require users to have the latest PS 3.0 graphics card. In fact since I've designed the whole engine up to this point to use the fixed function pipeline, I'm not going to have any requirements, I can always fall back to this implementation.

I'm really making this switch out of necessity, though there will be all kinds of benifits...just wait 'till you see the cityscapes I'm going to come up with. Reflections on the sides of the buildings/cars will now be a reality. I'm going to add some pretty badass water into the game as well.

I'm working on the game fulltime, and I'm going to charge money for the game...so it's the least I can do for my customers. Also I hope that by doing this I'll make the game a little more competitive.

I'm going to be targeting Vertex Shader 2.0, and Pixel Shader 2.0. If these shader models are not supported I'll fallback to VS1.1 & PS1.3. If those aren't supported....I'll use the fixed function pipeline to replace each one's functionality. That's how it looks right now, I'm still doing some basic tests to see exactly what I'm in for. Though it looks like I'll need to write a few different versions of each shader for different hardware.

Here's a screenshot of a slightly confused gangsta' :-) This is actually using a 256x256 texture for the character, I'll be replacing them with 512x512 versions soon.


Alright...back to work...wish me luck ;-)

- Dan

[EDIT QUICK UPDATE]
Alright...I did up a test app. and I'm displaying 900 animated models, with a 512x512 texture, and 1100 tris each. I'm getting about 60 FPS at 1280x1024 I can't believe it....where have vertex shaders been all my life!?!?! They're all using the same animation & texture...but still...jeeezus, I should make a Total War game or something lol. Throw some Romans into the game for shits and giggles.

Previous Entry Multiplayer update....
Next Entry Arggggg
0 likes 9 comments

Comments

Sir Sapo
Consider your luck... wished?
November 13, 2005 12:31 AM
dgreen02
Ah...just as I posted an update to my update :-D Look at all those black dudes!
November 13, 2005 12:34 AM
ildave1
wholy hell man, that second picture nearly put me in a trance! Thats a lotta black folks in pink.
November 13, 2005 12:41 AM
Sir Sapo
Wow, that was one quick change , tell me you didn't write your shader in 3 hours[wink]
November 13, 2005 03:19 AM
superpig
If I stare at it long enough, will they all turn around and be John Malkovitch? [grin]

I'm curious about your choice of pixel shader 1.3. The only difference between PS1.2 and PS1.3 is the "texm3x2depth" instruction - something that isn't really that frequently used - though the differences between PS1.1 and PS1.2 is a little greater (cmp, dp4, texdp3, texdp3tex, texm3x3, texreg2rgb). Is there a specific effect that won't fit in PS1.1?
November 13, 2005 05:41 AM
dgreen02
Here's how the shader support of my local test computers breaks down:
- PS 2.0 & VS 2.0 (Radeon x700)
- PS 1.3 & VS 1.1 (Geforce 440MX)
- PS 0.0 & VS 1.1 (Radeon Mobility 7500 <-- beast of a chipset!)
- PS 0.0 & VS 0.0 (is that even possible!?!? It's a Radeon 9250 with 256 MB of RAM, I think it's being read wrong from the card...ATI's site says PS 1.4 and VS 1.1....I gotta look into this).

That's the only reason I said 1.3. Not because of the instruction differences, but because of what I could guarantee support for through my testing. Though you're right I should probably drop it down to PS1.1 & VS1.1 as the fallback.

Good call on the Malkovich [grin]

- Dan
November 13, 2005 09:50 AM
dgreen02
I coudn't resist...I made a video of this madness...check it out...a bunch of gangstas marching to "Kung Fu Fighting"

http://www.radioactive-software.com/gangwar/Funky.avi

No I'm not stoned ;-)
November 13, 2005 01:17 PM
ildave1
Now THATS a formation!

Quick, Convert them to bots and send them to Iraq! They'll never know what hit em`!
November 13, 2005 04:17 PM
Rob Loach
Reminds me of some stuff done with Massive.
November 17, 2005 11:17 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement