Register Combiners + bump mapping

I am currently working on rewriting part of my code to take advantage of some of the Advanced features of the Geforce2 GTS. The extension that exposes alot of the functionality is GL_REGISTER_COMBINERS_NV. So here are my questions:

  1. I know that the original Geforce could only process one combiner stage at a time (that is, if I use two general combiner stages instead of one, the fill rate is cut in half). Is this still true for the Geforce2, or does it process two (more???) at a time?

  2. The register combiners extension effectively replaces texture application and fog application. Can anyone tell me how I use the final combiner stage to apply fog?

  3. Per-Pixel Bumpmapping. I understand that a normal map is required to do this, but can anyone give me a brief overview as to how to calculate this normal map, and, does the number of light sources change how bumpmapping is done?

  4. On a similar note to above, does anyone know how to use register combiners to render self-shadowing objects?

  5. It would be really nice to be able to have 4 active textures (instead of 2). Does anyone know if the hardware/ICD supports this for the Geforce2?

Thanks in advance.


Just give me SMP.

Originally posted by thewizard75:
1. I know that the original Geforce could only process one combiner stage at a time (that is, if I use two general combiner stages instead of one, the fill rate is cut in half). Is this still true for the Geforce2, or does it process two (more???) at a time?

Is this slow-down true for the original GeForce, in case of 2 register-combiners in use?

Kosta

Yes, it is true for the original Geforce (NV10). In the issues section of NVidia’s OpenGL Spec (download from www.nvidia.com/developer ) has for one of its issues:

“There will be a performance impact when two combiner stages are enabled versus just one stage. Should we mention that somewhere?”

Yes, the original Geforce does have that slow-down.

I am not sure about the Geforce2 because that document strictly talked about NV10, not about the NV15…

[This message has been edited by thewizard75 (edited 06-28-2000).]

  1. I know that the original Geforce could only process one combiner stage at a time (that is, if I use two general combiner stages instead of one, the fill rate is cut in half). Is this still true for the Geforce2, or does it process two (more???) at a time?

From NVIDIA web site:
" With the NVIDIA Shading Rasterizer (NSR) in GeForce2 GTS,… "
" The NSR can perform up to seven operations at one time across all four pipes of the GeForce2 GTS. "

As I heard, GeForce2 has the same register combiner functionality as GeForce 256. But they don’t call GeForce 256 “NSR”.
So, I guess, it’s their name for 2 general combiner stages at a time…(???)

btw :
" While performance is hard to characterize completely and can change from implementation to implementation, the GeForce and Quadro GPUs can run at full pixel rate when a single general combiner is active, but the peak pixel rate drops in half when two general combiners are active. However, the GeForce and Quadro GPUs similarly run at half rate when two linear-mipmap-linear textures are enabled. This means that two general combiners are “free” when two linear-mipmap-linear textures are active because the two enabled textures already cause the GPU to run at half rate. "

  1. The register combiners extension effectively replaces texture application and fog application. Can anyone tell me how I use the final combiner stage to apply fog?

The Final Combiner has 6 inputs (A…F) and 2 stages (not counting input mappings) for RGB part of final color.

  1. Optional stage, it’s result can be used as an input for 2nd stage.
    TEMP_RGB = EF, // can be used for multitexturing (T0T1)
    or
    TEMP = Spare0 + SecondaryColor // to apply specular part (you have to put your textured fragment’s color into Spare0 for it)

  2. Blending stage - where fog is usually happens.
    RGB_OUT = A*B + (1-A)*C + D
    //TEMP is available to B, C and D inputs.

To apply fog you need:
// A = fog factor
// B = fragment’s color
// C = fog color
// D = 0

glFinalCombinerInputNV( GL_VARIABLE_A_NV, GL_FOG, GL_UNSIGNED_IDENTITY_NV, GL_ALPHA );
glFinalCombinerInputNV( GL_VARIABLE_C_NV, GL_FOG, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
glFinalCombinerInputNV( GL_VARIABLE_D_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB );

// And, for example,
// to add specular highlight to Spare0
// B = Spare0 + SecondaryColor
glFinalCombinerInputNV( GL_VARIABLE_B_NV, GL_SPARE0_PLUS_SECONDARY_COLOR_NV, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
// Alpha_OUT = fragment’s alpha
glFinalCombinerInputNV( GL_VARIABLE_G_NV, GL_SPARE0_NV, GL_UNSIGNED_IDENTITY_NV, GL_ALPHA );

For more details:
GeForce 256 Register Combiners
GeForce 256 and RIVA TNT Combiners

  1. Per-Pixel Bumpmapping. I understand that a normal map is required to do this, but can anyone give me a brief overview as to how to calculate this normal map, and, does the number of light sources change how bumpmapping is done?
  1. On a similar note to above, does anyone know how to use register combiners to render self-shadowing objects?

This whitepaper contains all answers:
A Practical and Robust Bump-mapping Technique for Today’s GPUs

  1. It would be really nice to be able to have 4 active textures (instead of 2). Does anyone know if the hardware/ICD supports this for the Geforce2?

As far as I know, it has 2 texture units per pixel pipeline.

[This message has been edited by Serge K (edited 06-28-2000).]

That information you provided as well as the documentation has been very helpful.

Thanks!

Wizard


Just give me SMP.