|
226 | 226 | <input name="normal" type="vector3" interfacename="normal" /> |
227 | 227 | </oren_nayar_diffuse_bsdf> |
228 | 228 | <translucent_bsdf name="translucent_bsdf" type="BSDF"> |
229 | | - <input name="weight" type="float" value="1.0" /> |
| 229 | + <input name="weight" type="float" interfacename="subsurface" /> |
230 | 230 | <input name="color" type="color3" nodename="coat_affected_subsurface_color" /> |
231 | 231 | <input name="normal" type="vector3" interfacename="normal" /> |
232 | 232 | </translucent_bsdf> |
|
235 | 235 | <input name="in2" type="float" interfacename="subsurface_scale" /> |
236 | 236 | </multiply> |
237 | 237 | <subsurface_bsdf name="subsurface_bsdf" type="BSDF"> |
238 | | - <input name="weight" type="float" value="1.0" /> |
| 238 | + <input name="weight" type="float" interfacename="subsurface" /> |
239 | 239 | <input name="color" type="color3" nodename="coat_affected_subsurface_color" /> |
240 | 240 | <input name="radius" type="color3" nodename="subsurface_radius_scaled" /> |
241 | 241 | <input name="anisotropy" type="float" interfacename="subsurface_anisotropy" /> |
|
249 | 249 | <input name="bg" type="BSDF" nodename="subsurface_bsdf" /> |
250 | 250 | <input name="mix" type="float" nodename="subsurface_selector" /> |
251 | 251 | </mix> |
252 | | - <mix name="subsurface_mix" type="BSDF"> |
253 | | - <input name="fg" type="BSDF" nodename="selected_subsurface_bsdf" /> |
254 | | - <input name="bg" type="BSDF" nodename="diffuse_bsdf" /> |
255 | | - <input name="mix" type="float" interfacename="subsurface" /> |
256 | | - </mix> |
| 252 | + <invert name="subsurface_inv" type="float"> |
| 253 | + <input name="in" type="float" interfacename="subsurface" /> |
| 254 | + </invert> |
| 255 | + <multiply name="diffuse_bsdf_non_subsurface" type="BSDF"> |
| 256 | + <input name="in1" type="BSDF" nodename="diffuse_bsdf" /> |
| 257 | + <input name="in2" type="float" nodename="subsurface_inv" /> |
| 258 | + </multiply> |
| 259 | + <add name="subsurface_blend" type="BSDF"> |
| 260 | + <input name="in1" type="BSDF" nodename="selected_subsurface_bsdf" /> |
| 261 | + <input name="in2" type="BSDF" nodename="diffuse_bsdf_non_subsurface" /> |
| 262 | + </add> |
257 | 263 |
|
258 | 264 | <!-- Sheen Layer --> |
259 | 265 | <sheen_bsdf name="sheen_bsdf" type="BSDF"> |
|
264 | 270 | </sheen_bsdf> |
265 | 271 | <layer name="sheen_layer" type="BSDF"> |
266 | 272 | <input name="top" type="BSDF" nodename="sheen_bsdf" /> |
267 | | - <input name="base" type="BSDF" nodename="subsurface_mix" /> |
| 273 | + <input name="base" type="BSDF" nodename="subsurface_blend" /> |
268 | 274 | </layer> |
269 | 275 |
|
270 | 276 | <!-- Transmission Layer --> |
271 | 277 | <dielectric_bsdf name="transmission_bsdf" type="BSDF"> |
272 | | - <input name="weight" type="float" value="1.0" /> |
| 278 | + <input name="weight" type="float" interfacename="transmission" /> |
273 | 279 | <input name="tint" type="color3" interfacename="transmission_color" /> |
274 | 280 | <input name="ior" type="float" interfacename="specular_IOR" /> |
275 | 281 | <input name="roughness" type="vector2" nodename="transmission_roughness" /> |
|
278 | 284 | <input name="distribution" type="string" value="ggx" /> |
279 | 285 | <input name="scatter_mode" type="string" value="T" /> |
280 | 286 | </dielectric_bsdf> |
281 | | - <mix name="transmission_mix" type="BSDF"> |
282 | | - <input name="fg" type="BSDF" nodename="transmission_bsdf" /> |
283 | | - <input name="bg" type="BSDF" nodename="sheen_layer" /> |
284 | | - <input name="mix" type="float" interfacename="transmission" /> |
285 | | - </mix> |
| 287 | + <invert name="transmission_inv" type="float"> |
| 288 | + <input name="in" type="float" interfacename="transmission" /> |
| 289 | + </invert> |
| 290 | + <multiply name="sheen_layer_non_transmission" type="BSDF"> |
| 291 | + <input name="in1" type="BSDF" nodename="sheen_layer" /> |
| 292 | + <input name="in2" type="float" nodename="transmission_inv" /> |
| 293 | + </multiply> |
| 294 | + <add name="transmission_blend" type="BSDF"> |
| 295 | + <input name="in1" type="BSDF" nodename="transmission_bsdf" /> |
| 296 | + <input name="in2" type="BSDF" nodename="sheen_layer_non_transmission" /> |
| 297 | + </add> |
286 | 298 |
|
287 | 299 | <!-- Specular Layer --> |
288 | 300 | <dielectric_bsdf name="specular_bsdf" type="BSDF"> |
|
299 | 311 | </dielectric_bsdf> |
300 | 312 | <layer name="specular_layer" type="BSDF"> |
301 | 313 | <input name="top" type="BSDF" nodename="specular_bsdf" /> |
302 | | - <input name="base" type="BSDF" nodename="transmission_mix" /> |
| 314 | + <input name="base" type="BSDF" nodename="transmission_blend" /> |
303 | 315 | </layer> |
304 | 316 |
|
305 | 317 | <!-- Metal Layer --> |
|
316 | 328 | <input name="edge_color" type="color3" nodename="metal_edgecolor" /> |
317 | 329 | </artistic_ior> |
318 | 330 | <conductor_bsdf name="metal_bsdf" type="BSDF"> |
319 | | - <input name="weight" type="float" value="1.0" /> |
| 331 | + <input name="weight" type="float" interfacename="metalness" /> |
320 | 332 | <input name="ior" type="color3" nodename="artistic_ior" output="ior" /> |
321 | 333 | <input name="extinction" type="color3" nodename="artistic_ior" output="extinction" /> |
322 | 334 | <input name="roughness" type="vector2" nodename="main_roughness" /> |
|
326 | 338 | <input name="thinfilm_thickness" type="float" interfacename="thin_film_thickness" /> |
327 | 339 | <input name="thinfilm_ior" type="float" interfacename="thin_film_IOR" /> |
328 | 340 | </conductor_bsdf> |
329 | | - <mix name="metalness_mix" type="BSDF"> |
330 | | - <input name="fg" type="BSDF" nodename="metal_bsdf" /> |
331 | | - <input name="bg" type="BSDF" nodename="specular_layer" /> |
332 | | - <input name="mix" type="float" interfacename="metalness" /> |
333 | | - </mix> |
| 341 | + <invert name="metalness_inv" type="float"> |
| 342 | + <input name="in" type="float" interfacename="metalness" /> |
| 343 | + </invert> |
| 344 | + <multiply name="specular_layer_non_metal" type="BSDF"> |
| 345 | + <input name="in1" type="BSDF" nodename="specular_layer" /> |
| 346 | + <input name="in2" type="float" nodename="metalness_inv" /> |
| 347 | + </multiply> |
| 348 | + <add name="metalness_blend" type="BSDF"> |
| 349 | + <input name="in1" type="BSDF" nodename="metal_bsdf" /> |
| 350 | + <input name="in2" type="BSDF" nodename="specular_layer_non_metal" /> |
| 351 | + </add> |
334 | 352 |
|
335 | 353 | <!-- Coat Layer --> |
336 | 354 | <mix name="coat_attenuation" type="color3"> |
|
339 | 357 | <input name="mix" type="float" interfacename="coat" /> |
340 | 358 | </mix> |
341 | 359 | <multiply name="thin_film_layer_attenuated" type="BSDF"> |
342 | | - <input name="in1" type="BSDF" nodename="metalness_mix" /> |
| 360 | + <input name="in1" type="BSDF" nodename="metalness_blend" /> |
343 | 361 | <input name="in2" type="color3" nodename="coat_attenuation" /> |
344 | 362 | </multiply> |
345 | 363 | <roughness_anisotropy name="coat_roughness_vector" type="vector2"> |
|
0 commit comments