SLI Zone
NVIDIA.com Developer Home

Last Updated: 07 / 17 / 2002

Developer Newsletter: Issue #4

In this month's issue:


NVIDIA Cg Toolkit 1.0.1 Released

We've released Version 1.0.1 of the NVIDIA Cg Toolkit, which includes some fixes and improvements. Following is the list of changes:

  • Fixed Visual Studio .NET compatibility issues for Direct3D runtime
  • Fixed a bug when output was written using add followed by multiply
  • Fixed a bug with OpenGL runtime that corrected which attribute parameter was set
  • Fixed some Direct3D demos
  • Added Depth Sprites demo
  • Disabled some demos when running on GeForce 256 class hardware
  • Documentation typos fixed

The complete download along with piece-by-piece downloads are available here.


Cg Shader Workshops at SIGGRAPH 2002

NVIDIA will be hosting intimate classes throughout SIGGRAPH 2002, right in the convention center, for those interested in getting their fingers dirty with the latest innovation in graphics programming. The classes are free, but all spots held for preregistration are full. However, there will be space during most sessions for a limited number of additional attendees. Please stop by the workshops during SIGGRAPH for on-site registration and session availability.


Softimage XSI SDK Symposium at SIGGRAPH 2002

Intrigued by what you have heard about XSI? Curious to see what a next-generation ActiveX-based SDK looks like? Come see for yourself at the SIGGRAPH 2002 XSI SDK Symposium. This event will introduce the XSI SDK, explain how to integrate it into your pipeline, and illustrate how to author real-time shaders in the XSI environment. The presentations will be geared towards newcomers to XSI and will involve real-world production solutions.

Special guest speaker John Spitzer, Director of Developer Technology at NVIDIA, will be talking about Cg together with XSI.

Event Date and Time: Monday, July 22, 2002 at 3:30 PM Central Time Event Location: Ballroom M, Marriott River Center Hotel, 101 Bowie Street, San Antonio, TX


NVIDIA-U Registration Extended

It's not too late to register for NVIDIA-U! For your convenience, this event is being held in San Antonio, just before SIGGRAPH. This is NVIDIA's second NVIDIA-U workshop for university educators and researchers, and it will focus on our next generation GPUs and associated real-time rendering technologies. Since we'll be discussing unannounced products, participants must sign a non-disclosure agreement. Though the agenda is necessarily sketchy, we promise to deliver the goods on various cutting edge graphics research topics such as shadows, transparency, high dynamic range rendering and many others. To help offset participant expenses, this event will be held in San Antonio, Texas, immediately prior to SIGGRAPH, and all meals will be covered.


NVMeshMender Tutorial

Sent in to us by Arnaud Floesser, this tutorial explains how to use NVMeshMender, including sample code. In case you missed it in the last issue, NVMeshMender is a tool that helps condition meshes for per-pixel lighting. The following is a list of NVMeshMender's features:

  • Generates tangent space for bump mapping & per-pixel lighting
  • Generates smooth tangent space information
  • Fixes common tangent space problems via vertex duplication, including mirroring & excessive stretching
  • Optional cylindrical texture coordinate generation
  • Optional texgen texture matrix
  • Optional normal calculation, weighted by face size, or equal weighting

The NVMeshMender tutorial is available here.

NVMeshMender itself is available here.


Coding Tip

The alpha blending capabilities of Direct3D and OpenGL provide you with the ability to perform additional multiplications that could save you from having to add a second pass to achieve certain effects. This can be particularly useful with older hardware such as GeForce 256, which does not support pixel shaders. For example, for per-pixel lighting, it would be impossible to do something as simple as

((L dot N) + Ambient) * DiffuseTexture

in Direct3D. So just adding a scalar ambient term to your lighting calculations would seem to cost you an extra pass. However, you can do it in one pass, using the following technique:

  • Use the first color combiner to calculate (L dot N)
  • Use the second color combiner to set DiffuseTexture
  • Use the second alpha combiner to take the result of the previous stage, (L dot N), and add a constant (Ambient)

Now the output to the alpha blending stage of the pipeline is:

  • SourceColor: an RGB color coming from the DiffuseTexture
  • SourceAlpha: an alpha value equal to (L dot N) + Ambient

Next you can configure the blending parameters to perform the final multiplication. By setting the source blend factor to SRCALPHA and the destination blend factor to ZERO, the blend operation will calculate SourceColor*SourceAlpha + DestinationColor*0, which gives us:

SourceColor * SourceAlpha

Which, in our case is:

((L dot N) + Ambient) * DiffuseTexture

and what we wanted in the first place.




NVISION 08