Skip to main content
GameDev.net gamedev.net
🔒 Locked

Question about PS2 shader capabilities

Started by Cypher19 Jul 12, 2004 at 9:14 PM 17 replies 20.7k views
Original Post
Cypher19
Cypher19
I'm moderately experienced in DirectX, so of course shaders are fairly interesting for me. I also own a Gamecube, a PS2, and have played games on Xbox. One thing I've been wondering is their pixel and vertex shaders in comparison to modern PC graphics and each other. From what I can tell, Gamecube has the best shader system (i.e. Super Mario Sunshine, Rogue Squadron 3 - Rebel Strike) with Xbox following and then the PS2 (which often times seems to have barely ANY shader system to speak of). Could someone perhaps enlighten me on their individual capabilities, in either general or specific terms?
Sphet
Sphet
Without violating any contracts I've signed with the various manufacturers, here's the breakdown:

Sony PS2 - No pixel shader support. Uses custom Vector Units to transform vertices by hand-written micro-code assembly. Really slow and confusing.

Game Cube - No pixel shader, no vertex shader. Fixed, but flexible, pipeline like old Direct 3D.

XBOX - Full pixel and vertex shader. Standard PS1.1 ( or 2.0? ) support.

Cypher19
Cypher19
"Gamecube - No pixel shader"

Say what?! But then how else are games like Rogue Squadron 2/3 able to do things like warped refractions and reflections on a per-pixel basis?
Assassin
Assassin
Perhaps through a unified memory architecture that makes vertex shaders unnecessary, as they can be done with the CPU, paired with the scene rendered twice - once to a texture, then to the framebuffer via a distorted grid of vertices. That's pure conjecture though, as I have neither dealt with the GC hardware nor tried to do the same on pre-shader PC hardware.
Assassin, aka RedBeard. andyc.org
S1CA
S1CA
Quote:
Original post by Cypher19
"Gamecube - No pixel shader"

Say what?! But then how else are games like Rogue Squadron 2/3 able to do things like warped refractions and reflections on a per-pixel basis?


I'll give you a hint regarding the "warped refractions and reflections on a per-pixel basis?" on the GameCube.

You can achieve many of those effects with the fixed function Direct3D pipeline on some PC hardware going as far back as the Matrox G400!. Take a look at how EMBM style bump mapping works - it peturbs the pixels of one texture map based on the pixels of another. (It's in the D3D docs under "Bump Mapping" - it seems many people have become so preocupied with dot3 bump mapping techniques that they've forgotten about the others ;o)

Combine that EMBM with render to texture, dynamic textures which can be updated with the CPU very cheaply and lots of flexible texture combiners/blend units (TEVs) and you've got a lot of possibilities for cool effects open to you[smile].


Assassin: NGC does FFP style hardware T&L (albeit with some cool extensions) - no need for pixel sized grids though (see above).
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
Cypher19
Cypher19
Okay, thank you everyone for clearing all this up :)
Zaelsius
Zaelsius
I think the XBox graphics subsystem is very similar to a GeForce4 Ti 4400 in performance, both supporting 1.1 VS and 1.3 PS.

BTW, I have seen some fancy effects in PS2 such as (faky)depth of field or blur that would have required the use of shaders in PC. The usual unified memory architecture of consoles allows to do these effects by simply accessing the graphics memory and performing SIMD operations. E.g. the blurred background effect can be performed very fast with an MMX style optimization.

Other kind of effects that require heavier processing per pixel are not suitable for this approach(so you will never see perpixel illumination in PS2 for instance).

I don't know about GameCube...
M3d10n
M3d10n
In most Gamecube games I played, refraction effects were obviously performed at fragment level, not vertex level. Go play some Final Fantasy: Crystal Chronicles and look at the water effects. It uses an animated texture map to perform refraction and reflection, plus there is a per-pixel specular effect to reflect the sunlight. There is a mushroom forest where the floor uses per-pixel specular, so it looks gooey.

Screenies:
Water reflections
Spell with distortion FX, and specular lighting on the ground

Also, in Zelda: The Wind Waker, if you take a look at the cartoonish ocean water, you'll see the texture wave distortion effect is done at fragment level.

I don't know if that's shaders, or register combiners, but whatever it is, it does the job quite well.
OrangyTang
OrangyTang
Quote:
Original post by M3d10n
Also, in Zelda: The Wind Waker, if you take a look at the cartoonish ocean water, you'll see the texture wave distortion effect is done at fragment level.

If you mean the wake from the boat I think thats not any fancy shader effect, just a series of tris with some careful texture coord usage to get the right expanding effect.

Now the depth of field and heat haze effects, that'd be a totally different matter. :)
rKallmeyer
rKallmeyer
Anyone have an idea of how the water was done in Baulders Gate (for PS2) and Champions of Norath? I always assumed it was with vertex shaders but it appears that I was wrong.
Pipo DeClown
Pipo DeClown
Quote:
Original post by M3d10n
In most Gamecube games I played, refraction effects were obviously performed at fragment level, not vertex level. Go play some Final Fantasy: Crystal Chronicles and look at the water effects. It uses an animated texture map to perform refraction and reflection, plus there is a per-pixel specular effect to reflect the sunlight. There is a mushroom forest where the floor uses per-pixel specular, so it looks gooey.

Screenies:
Water reflections
Spell with distortion FX, and specular lighting on the ground

Also, in Zelda: The Wind Waker, if you take a look at the cartoonish ocean water, you'll see the texture wave distortion effect is done at fragment level.

I don't know if that's shaders, or register combiners, but whatever it is, it does the job quite well.


Couldn't this be done with RenderToTexture + deforming?
outRider
outRider
Quote:
Original post by OrangyTang
Now the depth of field and heat haze effects, that'd be a totally different matter. :)


I recall a game on the PS1, Front Mission Alternative, that had excellent DOF. It was fantastic, it didn't rely on mipmap manipulation as far as I recall (not that the PS1 had hardware support for mipmaps anyway), but really great to see on such hardware. I still can't imagine how they could have pulled it off. Maybe the PS1 provides fast VRAM access to the CPU...?
Anthony Serrano
Anthony Serrano
Remember that a lot of PC-based 3d graphics terminology doesn't apply to the consoles, which don't need higher-level abstractions because the hardware is fixed. For example, render-to-texture has no real meaning on the consoles, which do not enforce an arbitrary distinction between the frame buffer and texture memory; they're both VRAM, and all rendering is, in a sense, render-to-texture.

A lot of visual effects on the consoles are done by rendering the scene, copying a portion into a small buffer, and using that as a texture for something else.
Examples: Metal Gear Solid (underwater distortion), Legend of Zelda:Wind Waker (invisible treasure chest effect), practically any Squaresoft game... (Spell effects, Depth-of-field, etc.)

The motion blur effect in Metal Gear Solid is done by blending the previous frame over the current one.

Another effect console developers love is using textures to simulate per-pixel lighting. For example, the specular highlights in Final Fantasy XI (PS2 version), where the highlight itself is a separate texture that is superimposed over the base texture via additive blending.

If there is one thing console developers are good at, it's making the hardware look like is has capabilities that it really doesn't.

As far as shaders goes, the PS2 has only a very basic fixed-function pixel pipeline, and vector units that function as vertex shaders but are far more powerful and versatile.
Drakonite
Drakonite
Most of the fancy effects like vertex/pixel shaders on the PS2 are done using the two Vertex Units. While the Vertex Units run your microcode and thus could techincally be used for just about anything, the combination of memory immediately available to the VUs, the opcodes (i.e. muls that act on 4 values at once), and how they are connected to the rest of the hardware they are used almost exclusively for things such as transform, lighting, and various shading effects.
Shoot Pixels Not People
FReY
FReY
Additionally, the PS2 'Vector Units' (but mainly only VU1) can actually be used to generate additional geometry (procedurally if you need) and to perform clipping.

The PS2 Graphic's synthesizer (GS) is actually quite fast and so you can do interesting things with GS ram (eg. copying colour channels around, performing full screen blurs and blends) which allow some of those 'pixel shader' type effects. You can even do Dot3 bumpmapping using some clever GS tricks.
do unto others... and then run like hell.
M3d10n
M3d10n
Quote:
Original post by Pipo DeClown
Quote:
Original post by M3d10n
In most Gamecube games I played, refraction effects were obviously performed at fragment level, not vertex level. Go play some Final Fantasy: Crystal Chronicles and look at the water effects. It uses an animated texture map to perform refraction and reflection, plus there is a per-pixel specular effect to reflect the sunlight. There is a mushroom forest where the floor uses per-pixel specular, so it looks gooey.

Screenies:
Water reflections
Spell with distortion FX, and specular lighting on the ground

Also, in Zelda: The Wind Waker, if you take a look at the cartoonish ocean water, you'll see the texture wave distortion effect is done at fragment level.

I don't know if that's shaders, or register combiners, but whatever it is, it does the job quite well.


Couldn't this be done with RenderToTexture + deforming?


If you play the game, and get to cross the "Miasma stream", you'll see a huge force field sphere around the player that clearly uses na animated texture to distort the framebuffer behind it. If that's fixed pipeline, then the Gamecube's GPU has some darn good REGCOMs. Also the GC is brought to it's knees in one part where two of these huge refraction-mapped surfaces overlap each other. The game also uses low-res depth shadows.

And for Wind Waker, I was talking about the ocean water itself, not the cheap boat trails. If you stare at it closely, you'll see the texture waves with an accuracy that would not be possible with per-vertex UV shifting (unless the water mesh were obscenely tesselated).

If you ever get to play it, there's an even better part: in the Raven Forest there are areas with a purple gooey liquid instead of water. It's a plasma/cell effect - the animation is entirely procedural - with globs of different colors spawning moving and merging with each other, and the texture looks unique across the whole surface (it doesn't tile), so I guess it's using a 1D texture with dynamic UVs for each fragment. Also, this texture looks oddly pixelated when looked upon close, what might be due to the shader limitations (I think they wanted to use this effect on the ocean water, but it got too slow).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.