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.
Regards,
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;
rayinfo("shadowdepth",shadowdepth);
return shadowdepth;
#else//AQSIS
#ifndef PRMAN
//PrMan does not compile pragma.:-(
#pragma message("Does PIXIE & AQSIS support isshadowray()?")
#endif
return 0;
#endif
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
Regards,
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;
rayinfo("shadowdepth",shadowdepth);
return shadowdepth;
#else//AQSIS
#ifndef PRMAN
//PrMan does not compile pragma.:-(
#pragma message("Does PIXIE & AQSIS support isshadowray()?")
#endif
return 0;
#endif
}