How to i use C + + to realize these functions

32 views
Skip to first unread message

feilong xu

unread,
Apr 21, 2020, 2:38:12 AM4/21/20
to OSL Developers
https://github.com/Autodesk/standard-surface/blob/master/reference/standard_surface.osl#L11

The above is an OSL implementation of a standard material. I want to use C + + to implement this material, but in the process of implementation, I found that some functions are built-in, and I can't find a specific implementation. How can I find the implementation of these functions
funtions list:
void fresnel(Vector I, Vector n, float eta, float &kr, float &kt)
{
//TODO:To be realized
//Implementation can be found
}

color sheen(normal N, float roughness)
{
//TODO:To be realized
//Implementation can not be found
return color();
}
color oren_nayar(Vector input_nornal, float roughness)
{
//TODO:To be realized
//Implementation can not be found,just BUILTIN
return color();
}
color bssrdf(Vector, color, float)
{
//TODO:To be realized
//Implementation can not be found
return color();
}
color translucent(Vector, float)
{
//TODO:To be realized
//Implementation can not be found,just BUILTIN
return color();
}
color microfacet(string, normal, Vector, float, float, float, int)
{
//TODO:To be realized
//Implementation can not be found,just BUILTIN
return color();
}
color emission()
{
//TODO:To be realized
//Implementation can not be found,just BUILTIN
return color();
}
color metal(string distribution, normal N, Vector U,
color n, color k, float xalpha, float yalpha)
{
//TODO:To be realized
//Implementation can not be found,just BUILTIN
return color();
}

Larry Gritz

unread,
Apr 22, 2020, 12:45:01 PM4/22/20
to OSL Developers List
Those are built into the renderer, not into the OSL library.
So maybe this is a question you should be asking Autodesk, or somebody who maintains the GitHub project you are referring to?


--
You received this message because you are subscribed to the Google Groups "OSL Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osl-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osl-dev/6ad79281-81e9-467e-80b9-157f00904eb1%40googlegroups.com.

--
Larry Gritz




Reply all
Reply to author
Forward
0 new messages