Jump to content

Variance Antialiasing in Gather vex function


Pazuzu

Recommended Posts

Hi!

 

Sorry for the double post but in SESI forums there is not response from anyone :( 

Has someone an example of how I can get variance antialiasing when import a variable with gather?, for example ray:length. 
 

I've tried do that this way, and it does not work with variance antialiasing but standard sampling from gather :

//compute transmission vector 
$Nf = frontface(N,I); 
fresnel(normalize(I),$Nf,1/$ior,kr,$kt,R,$Tr); 

//temp variables 
float raylength; 
vector surfacecolor; 

//gather loop 
gather(P,$Tr,"samples",$attSamples, 
             "bias",$bias, 
             "maxdist",$maxDistance, 
             "angle",radians(60), 
             "samplebase",1, 
             "variancevar","ray:length", 
             "ray:length",raylength) 
              
{ 
      raylength += 0; 
} 
else 
{ 
      raylength = $densityAttenuation; 
} 


raylength /= max($attSamples,1); 
raylength = fit(raylength,0,$densityAttenuation,1,0); 
$katt = pow(raylength,$attExponent);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...