Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I have noticed that some games quote the requirement for "pixel shader 3.0 or better".

What is a pixel shader and is it some software requirements or hardware requirements?

share|improve this question
add comment

3 Answers 3

up vote 74 down vote accepted

Simple answer

Pixel shaders are tiny programs that can do operations on a single pixel on the screen, as opposed to geometry shaders and vertex shaders which work on the geometrical primitives (triangles) that make up everything you see on the screen. The most common use for pixel shaders is 'shading', approximation to real world lighting. Commonly used shading model is Phong.

Pixel shaders are executed on your video card, so your video card needs to support them. Each new version provides more capabilities, so an older video card will not run newer shaders. A new version of the pixel shader specification (e.g. Pixel Shader 3.0) is usually released for each new version of DirectX (more accurately, Direct3D).

Software Requirements

You need to have the correct version of Direct3D (or OpenGL) installed in order to use the shaders. For example, Pixel Shader 4.0 requires at least Direct3D 10. Normally you don't have to worry about this, every game that uses Direct3D will install the correct version for you when you install the game. The only exceptions are Direct3D 10 and later, which will not run on Windows XP or earlier. You will need at least Windows Vista in order to play a game that uses Direct3D 10 or 11.

Wikipedia provides a nice list of Pixel Shader versions, the version of Direct3D you need, and the types of graphics cards that work with them.


Technical answer

The 'standard' stages of a 3D rendering pipeline are as follows (somewhat simplified):

  • Transformation (Moving, rotating and scaling all the objects in the scene)
  • Lighting
  • Projection ('Squashing' the 3D world into a 2D plane)
  • Clipping (Removing anything outside the field of view)
  • Rasterising (Converting the vector graphics (triangles, etc) into raster graphics (pixels))
  • Texturing
  • Display

Pixel Shaders are used as an alternative to the standard texturing phase. During rasterisation, each triangle is converted into pixels. These pixels do not have their final colour yet, but the do have a bunch of parameters associated with them. These include base colour, texture coordinates, lighting information, etc. The Pixel Shader is a small program that takes these parameters and uses them to calculate the final colour as it is displayed on the screen. The Pixel Shader has access to all texture data, and can use them to do interesting things such as blending two textures (to create a 'dirty' look), using a texture as a bump map (to simulate a relief), or to simulate reflections.

Hardware

On the hardware side, Pixel Shaders are executed on 'Shader Units', small processors on your GPU. Each Shader Unit is basically a very simple CPU, but a modern video card may contain thousands of these things (an AMD Radeon HD6990 contains over 3000). Older GPUs had different Shader Units for different tasks: Pixel Shaders were executed on different parts of the system than Vertex Shaders. Modern GPUs have so called 'unified shader units' which can perform all of these operations.

share|improve this answer
8  
Wow, nice answer :-) –  Ivo Flipse May 16 '11 at 9:33
3  
I love reading stuff like this - my master's degree was in graphics, machine vision, virtual environments, image processing and a few other topics. I miss those days! :) –  Alex May 16 '11 at 11:06
1  
@Third: Thanks for your detailed answer. It is really amazing, like a detailed blog post!! –  Sisir May 16 '11 at 17:24
1  
Excellent answer. I used to follow the gaming scene until about last year. Answers like these help update my knowledge. –  Dark Star1 May 16 '11 at 22:22
1  
+1 I registered just to upvote you. P.S.: The "Technical answer" was actually easier to understand. :P –  muntoo May 17 '11 at 0:40
show 3 more comments

They are both a hardware and software requirement.

Pixel shaders (and shaders in general) are part of your video card (or GPU) hardware. However, you also need a version of DirectX/OpenGL recent enough to support that video card's capabilities, or your game can't really use them.

Shaders are part of the rendering process that contribute massively to your game looking totally awesome and they do it with very little resources. They rock, so every game developer is going to be using them. If new games are beginning to warn you that you need new shader versions, your system's becoming obsolete.

Need to upgrade?

Wikipedia has a list which covers the maximum shader version supported by various video card series. Make sure your DirectX/OpenGL are up to date, update them if not, then go buy yourself a new video card.

Pixel Shader 3.0 was released in 2004, so considering how old it is, video cards that don't support it probably aren't even sold anymore.

share|improve this answer
add comment

Basically, you start off with the base pixel which has some color.

Then you give the pixel shader details about where the pixel is (lighting, z-level etc) and it computes the modified color.

Think about a bright red pixel in the sun. When it's in the shade, or in the background, that pixel will be a darker color. That's pretty much it.

Note that it only works on one pixel at a time.

share|improve this answer
    
@echko: so its kinda technology which helps the rendering the graphics and helps isolate the foreground and background? –  Sisir May 16 '11 at 6:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.