Applied a fix from @jeremyong-az to get ThinObject transmission working.
Also added a new test material for ThinObject transmission. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
@@ -50,8 +50,13 @@ float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightI
|
||||
// Thin object mode, using thin-film assumption proposed by Jimenez J. et al, 2010, "Real-Time Realistic Skin Translucency"
|
||||
// http://www.iryoku.com/translucency/downloads/Real-Time-Realistic-Skin-Translucency.pdf
|
||||
|
||||
result = shadowRatio ? float3(0.0, 0.0, 0.0) : TransmissionKernel(surface.transmission.thickness * transmissionParams.w, rcp(transmissionParams.xyz)) *
|
||||
saturate(dot(-surface.normal, dirToLight)) * lightIntensity * shadowRatio;
|
||||
float litRatio = 1.0 - shadowRatio;
|
||||
if (litRatio)
|
||||
{
|
||||
result = TransmissionKernel(surface.transmission.thickness * transmissionParams.w, rcp(transmissionParams.xyz)) *
|
||||
saturate(dot(-surface.normal, dirToLight)) * lightIntensity * litRatio;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"description": "",
|
||||
"parentMaterial": "",
|
||||
"materialType": "Materials/Types/EnhancedPBR.materialtype",
|
||||
"materialTypeVersion": 4,
|
||||
"properties": {
|
||||
"baseColor": {
|
||||
"color": [
|
||||
0.027664607390761375,
|
||||
0.1926604062318802,
|
||||
0.013916227966547012,
|
||||
1.0
|
||||
]
|
||||
},
|
||||
"general": {
|
||||
"doubleSided": true
|
||||
},
|
||||
"subsurfaceScattering": {
|
||||
"thickness": 0.20000000298023224,
|
||||
"transmissionMode": "ThinObject",
|
||||
"transmissionTint": [
|
||||
0.009140154346823692,
|
||||
0.19806210696697235,
|
||||
0.01095597818493843,
|
||||
1.0
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user