Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
PainElemental

Pixel Shaders

Recommended Posts

Ok, if JC wants to use pixel shaders he has to calc the color value for each pixel. It isn't only the color value of the corresponding texel, it's also the light intensitiy for this pixel. That includes phong shading, diffuse shading and so on. But if JC doesn't use the register combiners in general(as Zaldron said) he has to implement all this in software. Now, I'm pretty sure that this is impossible to be made in real-time for every pixel. So it has to be calc'd only every 8th or 16th pixel(like the lightmaps) and then to be interpolated over the surface. But even for every 16th pixel many calcs have to be done(interpolating the normal over the surface, calcing of dot products and so on). Do you think it's possible in real-time without hardcore optimizing(i.e. assembler)?

Share this post


Link to post

Register combiners are a Nvidia specific feature. Does ATI & 3dfx plan to give the same support?
If they do, there´s no need to CPU-ize the ilumination. Every card inferior to GeForce could play the game, but without the new lightning (i doubt they will be lightmaps as plan B, so i guess vertex lightning).
The interpolation idea is a good one, if you add a lightning quality slider, most of the GeForce owners (1&2) could play at fast framerates.

Share this post


Link to post

About the CPU intensity.
Let´s made the calcs, help me on these.

First. The lightning is texel or pixel related?? Does it cover every single point of light in the screen, or it is linked to the amount of texture pixels in screen?

What a light should do :

1. Cast a ray, until polygon collision with proper normal
2. Check the distance, and define "light intensity on surface" by the equation 1/r^2 * light_multiply
3. Check the bumpmap and shade the pixel
4. Keep the track on the ray, until next polygon
5. If normal´s inverted on new polygon, light intensity over point is 0 (if polygon isn´t translucid)
6. On collision with proper aligned normal, add to the actual point_light_intensity the shadow produced by measuring the new distance.

This points are repeated because of the amount of lights. I don´t know really, but this looks like a madness for a CPU if you´re trying to archieve smooth shadowing. Besides, this system brings jagged shadows. Adding antialiasing methods would decay even more the performance.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×