Results 1 to 2 of 2

Thread: Basic Register Combiner Questions

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Basic Register Combiner Questions

    Recently, I dove into nVidia's programmable aspects and after a bit of mind-wracking, finally got the basic gist of register combiners to come up with a very simple (but pride inducing) bump mapping routine when I should have been working this morning:

    !!RC1.0
    {
    rgb
    {
    spare0=-expand(tex1).expand(const0);
    }
    }
    out.rgb=spare0*tex0;
    out.a=tex0.a;

    I set const0 to be a vector indicating the incedent light prior to rendering; texture 0 is the texture map and texture 1 is the normal map. It's not perfect (the dot product is not clamped to [0,1], and it's not very efficient when you need to do a lot of non-coplanar faces) but it was a good sign to me that I was just starting to get a hang on this new tool.

    Anyway, looking around the web, I grabbed a bunch of papers and presentations from nVidia, and I've been scouring opengl.org for information, but some stuff I just cannot find answers for. For example, what exactly does the discard register do? It seems to me to be a sort of stack, because I've seen combiners with code like this:

    discard=something;
    discard=somethingelse;
    somethingnew=sum();

    ...and I assume the sum value takes into account the two previous assignments. Am I missing documentation somewhere? Additionally, as far as breaking combiners into stages; where does the line get drawn? How much can one stage do?

    I'm looking forward to getting a hang on register combiners and moving into vertex programs later on; they seem to be documented more frequently and thoroughly.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Re: Basic Register Combiner Questions

    Screw it, I figured it out in the mean time. It only took me about seven trips through John Spitzer's texture blending presentation to get the point of it. Very informative, that.

Similar Threads

  1. Register Combiner With FP ?
    By Antorian in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-15-2004, 06:09 AM
  2. Register combiner question
    By Oystein in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 11-18-2003, 03:52 AM
  3. lrp with register combiner
    By Umora in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-03-2003, 08:42 AM
  4. register combiner registers
    By davepermen in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 03-20-2001, 03:07 AM
  5. register combiner
    By nikopol0 in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 09-06-2000, 05:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean