Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: lrp with register combiner

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2003
    Location
    Ukraine, Nizhin
    Posts
    9

    lrp with register combiner

    I need to port some fragment program code into register combiners. I'm using nvparse, but not found corredponding command for RC program. Probably there is a way to substitute the lrp instruction with set of other RC instructions. How?
    And i found in distribution of nvparse file ps1.0_program.cpp. It have lrp instruction, but i doubt that i can use PS - i never see an example for it. I know that nvparse may be used for TS, VP and RC... is this PS for new nv30 hardware?
    Thanks!

  2. #2
    Junior Member Newbie
    Join Date
    Feb 2003
    Location
    Ukraine, Nizhin
    Posts
    9

    Re: lrp with register combiner

    I found lerp instruction, but it seems like i able to use ut only in final combiner stage. Is this true? If so, is there a way to subsitute this call with other commands inside general combiners stage?

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2003
    Location
    Ukraine, Nizhin
    Posts
    9

    Re: lrp with register combiner

    If someone will search the forum, i left my solutions and ideas here.

    You can use lerp in final combiners stage for rgb portion of output data. In order to achive lerp effect for alpha you may use following construction in one of general combiners stage:

    Code :
    //assume first parameter for lerp is tex0
    //second is tex1
    //lerp value stored in col0.b
     
    alpha
    {
      discard = col0.b * tex0;
      discard = unsigned_invert(col0.b) * tex1;
      spare0.a = sum();
    }
    //spare0.a contain value we was searching for

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •