Results 1 to 1 of 1

Thread: Catch FG rays in volume shader

  1. #1
    Join Date
    Feb 2010

    Question Catch FG rays in volume shader

    HI all,
    I am writing a simple volume shader which receives density and color as input textures, so it should only performs basic raymarch and lighting. I have implemented all stuff what i was needed except the global illumination contriution. I won't deal with photons at all, so only acceptable GI is final gathering. Here I dont understand how to catch these rays and mix with the result. So, basically I only need 4 options - 2bool inputs cast\receive FG, and 2 color inputs - cast\receive FG color. At now, my shader somehow casts FG ( however I dont know exactly why, because I have no indirect illum related calls in my code ) but I cant handle this. Can anyone help with understanding this process and where start to dig please?
    My code looks like :
    if ( state->type == miRAY_LIGHT )
    return true;
    if ( state->type == miRAY_SHADOW )
    // calc occlusion value and return true;
    // else here goes main volume calculation based with direct lighting
    \* end of code *\

    I saw some thread on this forum in regard that FG doesnt work with the volumes, but I can see opposite situation in softimage where we have a volume shader which receives and cast FG as excpected.

    I am writing mostly by the "Writing mental ray® Shaders: A Perceptual Introduction" book.
    many thanks,
    Last edited by GBOT; April 25th, 2013 at 21:45.

Tags for this Thread

Posting Permissions

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