Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/osl/osl_services.cpp
| Show First 20 Lines • Show All 1,142 Lines • ▼ Show 20 Lines | bool OSLRenderServices::trace(TraceOpt &options, OSL::ShaderGlobals *sg, | ||||
| ray.dD.dy = TO_FLOAT3(dRdy); | ray.dD.dy = TO_FLOAT3(dRdy); | ||||
| /* allocate trace data */ | /* allocate trace data */ | ||||
| OSLTraceData *tracedata = (OSLTraceData*)sg->tracedata; | OSLTraceData *tracedata = (OSLTraceData*)sg->tracedata; | ||||
| tracedata->ray = ray; | tracedata->ray = ray; | ||||
| tracedata->setup = false; | tracedata->setup = false; | ||||
| tracedata->init = true; | tracedata->init = true; | ||||
| tracedata->sd.osl_globals = sd->osl_globals; | tracedata->sd.osl_globals = sd->osl_globals; | ||||
| tracedata->sd.max_closure = 0; | |||||
| /* raytrace */ | /* raytrace */ | ||||
| return scene_intersect(sd->osl_globals, &ray, PATH_RAY_ALL_VISIBILITY, &tracedata->isect, NULL, 0.0f, 0.0f); | return scene_intersect(sd->osl_globals, &ray, PATH_RAY_ALL_VISIBILITY, &tracedata->isect, NULL, 0.0f, 0.0f); | ||||
| } | } | ||||
| bool OSLRenderServices::getmessage(OSL::ShaderGlobals *sg, ustring source, ustring name, | bool OSLRenderServices::getmessage(OSL::ShaderGlobals *sg, ustring source, ustring name, | ||||
| TypeDesc type, void *val, bool derivatives) | TypeDesc type, void *val, bool derivatives) | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||