I’m new to shader writing and I’d like to write my own osl fur shader. I know this page will be a start, https://docs.blender.org/manual/en/latest/render/shader_nodes/osl.html, but I also know how to implement the parameters shown in this paper. https://sites.cs.ucsb.edu/~lingqi/publications/paper_fur2.pdf
ATM it’s not possible to write closures in OSL.
Closures are the Bidirectional Distribution Functions, and they require access to the Outgoing rays)
Since Outgoing rays are only present in the engine’s internals, Closures must be written in the engine’s source code.
What about implementing the parameters from the paper?
As I said, you must implement the scattering function in the source code. The parameters are part of the function, just like the current Hair Closure has Color, Offset, RoughnessU, RoughnessV, and Tangent.
Without the function, the parameters a meaningless (just values in some dimension Rn).
What you can do in OSL is create new functions to produce values that you can plug into the parameters of the existing Closures in the engine.
I also want my shader to be a RenderMan shader. What about that?
RenderMan is another beast. It has its own API that allows you to write extensions (which includes BSDFs), that you can plug into the engine. Cycles doesn’t have that option (althought the source code is open).
I don’t use RenderMan, so I’m not the best person to help… But even in RenderMan, you cannot use OSL for creating BSDFs.