Du Jie - 2005-09-14

Hi, I have a portable shader that as following, and I am wondering if the PIXIE can support isshadowray().

I've downloaded the Pixie 1.4.6 source and find that there is a data member (CShadingContext::inShadow) and is set to TRUE when traceTransmission() is being called, but inShadow is not exposed in any API.

As a workaround, I have tried to use "string raylabel()" and test if the it returns "transmission", but I  find traceReflection() also set the ray label as "transmission".
so I am not sure if it is a correct solution.


Du Jie

//Returns 1.0 if the shader is being run to evalute the opacity/visibility of an object.
float isShadowRay(){
#if defined(DELIGHT)||defined(BMRT)||defined(AIR)
    return isshadowray();
#elif defined(PRMAN)
    uniform float shadowdepth;
    return shadowdepth;
#ifndef PRMAN
//PrMan does not compile pragma.:-(
#pragma message("Does  PIXIE & AQSIS support isshadowray()?")
    return 0;