MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenShadingLanguage / sample

Method sample

src/testrender/shading.cpp:108–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 return 1.0f;
107 }
108 virtual float sample(const OSL::ShaderGlobals& sg, float rx, float ry, float rz, OSL::Dual2<OSL::Vec3>& wi, float& pdf) const {
109 Vec3 out_dir;
110 Sampling::sample_cosine_hemisphere(N, rx, ry, out_dir, pdf);
111 wi = out_dir; // FIXME: leave derivs 0?
112 return 1;
113 }
114};
115
116struct OrenNayar : public BSDF, OrenNayarParams {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected