Can we please get a shader node example for LW2018 LWSDK?

jwiede

Electron wrangler
Title's pretty self-explanatory. While lwsurfaceshader.h APIs, etc. is included in LW2018 SDK, and bears similarity to lwshader.h APIs, etc. from prior SDK, it would still be quite useful to have a proper example of using the new lwsurfaceshader.h approach to implement a simple example (and ideally, a not-so-simple example, f.e. SSS, as well).
 
Last edited:
Title's pretty self-explanatory. While lwsurfaceshader.h APIs, etc. is included in LW2018 SDK, and bears similarity to lwshader.h APIs, etc. from prior SDK, it would still be quite useful to have a proper example of using the new lwsurfaceshader.h approach to implement a simple example (and ideally, a not-so-simple example, f.e. SSS, as well).

What you have in lwsurfaceshader.h is for making "Shading Model", that you set in Surface Editor top most tabbed menu.. and then drop-down of them..

Renderer asks for Material that user set in Node Editor, ATM built-in Principled BSDF or Standard are filling LWBSDF (created by LWBSDFFuncs by LW),
then Photoreal Shading Model (or yours handler) is called with LWBSDF that has been returned.
You analyze supplied LWBSDF using LWBSDFFuncs, and output something.

(and ideally, a not-so-simple example, f.e. SSS, as well).

SSS node you should make using lwnodes.h

If you have Material output, LWBSDF is already passed to your node.

In Evaluate():

LWBSDF bsdf = Output_GetValue( value );
( *m_BSDFFuncs->resetBSDF )( bsdf ); // just example
// create LWBXDF and attach them to LWBSDF
 
Thanks, I really appreciate the info! I have a few questions, but easier to give context, etc. in email -- probably won't get back to that project for a couple weeks, unfortunately, work's busy.

Still, actual samples would be nice too.
 
Last edited:
Back
Top