Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: assembler problem... and...

  1. #1
    Intern Contributor
    Join Date
    Apr 2003
    Turin, Italy

    assembler problem... and...

    well well well, back online eh?

    i was starting to miss u

    now let's get back to businnes, shall we?

    I am tring to write a v/f program capable of adjusting exposure values into a scene. So i have a "luminance" cubemap which must be processed. My idea is to pass to the v prog the exposure value, compute the result, pass all the stuff to the fp and then modulate the lit color with eventual textures.
    Cutting with the details i need to say to the vp:


    1/gamma is 0.4545, so in my vp i say:

    PARAM exposure = program.local[0];

    #some temp vars...
    TEMP m_exp,t_exp,temp_inColor;
    ADD t_exp, exposure.xxxx, 2.47393;
    #this should be a single float replicated 4 times into m_exp, and the value should be 2^t_exp.x;
    EXP m_exp, t_exp.x;
    this is the pixel_color*=2^(exposure+2,47);
    MUL temp_inColor, inColor, m_exp.xxxx;

    #now these should be the gamma corrected rgb values
    POW outColor.x, temp_inColor.x, 0.4545;
    POW outColor.y, temp_inColor.y, 0.4545;
    POW outColor.z, temp_inColor.z, 0.4545;

    so why the program returns an error into the POWs? where am i wrong? I am just sayng that he has to change just one component a time, exponating the right comp everytime...

    anyone can help?

    thx all the Gunslinger

  2. #2
    Intern Contributor
    Join Date
    Apr 2003
    Turin, Italy

    Re: assembler problem... and...

    hi i kinda solved the POW problem, i had to remove the constant from the line, putting the very same value into a PARAM:

    PARAM one_over_gamma = {0.4545,0,0,0};

    why I can't use a numeric value into a POW?
    now i have a final product to do, and guess what? i am stuck... i have declared a second PARAM:

    PARAM middle_gray = {0.18,0,0,0};
    MUL outColor, outColor, middle_gray.x;

    it should make something like:

    but surprize... it just returns an error...

Posting Permissions

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