Results 1 to 2 of 2

Thread: lens shader - strange behaviour

  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Default lens shader - strange behaviour

    hi,

    i am writing a simple lens shader for having a "global ambient occlusion". it should multiply an ambient occlusion over the existing image, therefor a lens shader.
    and now i am getting strange results.
    the shader is for use in softimage and it has a color input for the "xsi ambient occlusion texture shader"
    when i render, the dark areas become blue! even if the "dark color" value is black and i dont know why, because its a simple multiply operation...
    her my code:

    Code:
    miColor *InColor = mi_eval_color(&params->InColor);
    
    result->r = result->g = result->b = 0.0;
    	
    mi_trace_eye(result, state, &state->org, &state->dir);
    
    result->r *= InColor->r;
    result->g *= InColor->g;
    result->b *= InColor->b;
    
    return( miTRUE );
    any ides
    Last edited by nospitters; April 18th, 2013 at 16:48.

  2. #2
    Join Date
    Jul 2012
    Posts
    6

    Default

    something is wrong with my gui.
    the channels seems to be offset, green is red, blue is green and alpha is blue. very strange...

Posting Permissions

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