BSDF Shaders
This commit is contained in:
@ -219,7 +219,15 @@ def parse_material_output(node: bpy.types.Node, custom_particle_node: bpy.types.
|
||||
curshader = state.frag
|
||||
state.curshader = curshader
|
||||
|
||||
out_basecol, out_roughness, out_metallic, out_occlusion, out_specular, out_opacity, out_ior, out_emission_col = parse_shader_input(node.inputs[0])
|
||||
outs = parse_shader_input(node.inputs[0])
|
||||
out_basecol = outs[0]
|
||||
out_roughness = outs[1]
|
||||
out_metallic = outs[2]
|
||||
out_occlusion = outs[3]
|
||||
out_specular = outs[4]
|
||||
out_opacity = outs[5]
|
||||
out_ior = outs[6]
|
||||
out_emission_col = outs[7]
|
||||
if parse_surface:
|
||||
curshader.write(f'basecol = {out_basecol};')
|
||||
curshader.write(f'roughness = {out_roughness};')
|
||||
@ -227,6 +235,21 @@ def parse_material_output(node: bpy.types.Node, custom_particle_node: bpy.types.
|
||||
curshader.write(f'occlusion = {out_occlusion};')
|
||||
curshader.write(f'specular = {out_specular};')
|
||||
curshader.write(f'emissionCol = {out_emission_col};')
|
||||
curshader.write(f'subsurface = {outs[8]};')
|
||||
curshader.write(f'subsurfaceRadius = {outs[9]};')
|
||||
curshader.write(f'subsurfaceColor = {outs[10]};')
|
||||
curshader.write(f'specularTint = {outs[11]};')
|
||||
curshader.write(f'anisotropy = {outs[12]};')
|
||||
curshader.write(f'anisoRot = {outs[13]};')
|
||||
curshader.write(f'sheen = {outs[14]};')
|
||||
curshader.write(f'sheenRough = {outs[15]};')
|
||||
curshader.write(f'sheenTint = {outs[16]};')
|
||||
curshader.write(f'clearcoat = {outs[17]};')
|
||||
curshader.write(f'clearcoatRough = {outs[18]};')
|
||||
curshader.write(f'transmission = {outs[19]};')
|
||||
curshader.write(f'transmissionRough = {outs[20]};')
|
||||
curshader.write(f'thinWall = {outs[21]};')
|
||||
curshader.write(f'tangent = {outs[22]};')
|
||||
|
||||
if mat_state.emission_type == mat_state.EmissionType.SHADELESS:
|
||||
if '_EmissionShadeless' not in wrd.world_defs:
|
||||
@ -330,6 +353,10 @@ def parse_shader(node: bpy.types.Node, socket: bpy.types.NodeSocket) -> Tuple[st
|
||||
'BSDF_GLASS',
|
||||
'HOLDOUT',
|
||||
'SUBSURFACE_SCATTERING',
|
||||
'BSDF_REFRACTION',
|
||||
'BSDF_TOON',
|
||||
'BSDF_HAIR',
|
||||
'BSDF_HAIR_PRINCIPLED',
|
||||
'BSDF_TRANSLUCENT',
|
||||
'BSDF_TRANSPARENT',
|
||||
'BSDF_VELVET',
|
||||
|
||||
Reference in New Issue
Block a user