ATOM-14676 Depth Based Layer Blending
Added new "Displacment" blend source option that blends between layers based on which displaced height is higher. For now it simply picks the higher of the three. In subsequent commits I'll improve on the blending to allow for some transition. Recactored GetLayerDepthValues(), GetBlendWeights(), and GetBlendWeightsFromLayerDepthValues() to optimize parallax searches so that the displacment maps are sampled once and used for both parallax and the calculating the blend weights. Renamed several layer blending types and variables to be more clear.
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"general": {
|
||||
"debugDrawMode": "BlendMaskValues"
|
||||
"debugDrawMode": "BlendWeights"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"general": {
|
||||
"debugDrawMode": "DepthMaps"
|
||||
"debugDrawMode": "DisplacementMaps"
|
||||
}
|
||||
}
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"description": "",
|
||||
"materialType": "Materials/Types/StandardMultilayerPBR.materialtype",
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"blend": {
|
||||
"blendSource": "Displacement"
|
||||
},
|
||||
"layer1_baseColor": {
|
||||
"textureMap": "TestData/Textures/cc0/Rock030_2K_Color.jpg"
|
||||
},
|
||||
"layer1_normal": {
|
||||
"textureMap": "TestData/Textures/cc0/Rock030_2K_Normal.jpg"
|
||||
},
|
||||
"layer1_occlusion": {
|
||||
"diffuseTextureMap": "TestData/Textures/cc0/Rocks002_1K_AmbientOcclusion.jpg"
|
||||
},
|
||||
"layer1_parallax": {
|
||||
"enable": true,
|
||||
"factor": 0.10000000149011612,
|
||||
"textureMap": "TestData/Textures/cc0/Rock030_2K_Displacement.jpg"
|
||||
},
|
||||
"layer1_roughness": {
|
||||
"textureMap": "TestData/Textures/cc0/Rock030_2K_Roughness.jpg"
|
||||
},
|
||||
"layer2_baseColor": {
|
||||
"textureMap": "TestData/Textures/cc0/Ground033_1K_Color.jpg"
|
||||
},
|
||||
"layer2_normal": {
|
||||
"textureMap": "TestData/Textures/cc0/Ground033_1K_Normal.jpg"
|
||||
},
|
||||
"layer2_occlusion": {
|
||||
"diffuseTextureMap": "TestData/Textures/cc0/Ground033_1K_AmbientOcclusion.jpg"
|
||||
},
|
||||
"layer2_parallax": {
|
||||
"enable": true,
|
||||
"factor": 0.014999999664723874,
|
||||
"offset": -0.024000000208616258,
|
||||
"textureMap": "TestData/Textures/cc0/Ground033_1K_Displacement.jpg"
|
||||
},
|
||||
"layer2_roughness": {
|
||||
"textureMap": "TestData/Textures/cc0/Ground033_1K_Roughness.jpg"
|
||||
},
|
||||
"layer3_baseColor": {
|
||||
"textureMap": "TestData/Textures/cc0/Rocks002_1K_Color.jpg"
|
||||
},
|
||||
"layer3_normal": {
|
||||
"textureMap": "TestData/Textures/cc0/Rocks002_1K_Normal.jpg"
|
||||
},
|
||||
"layer3_parallax": {
|
||||
"enable": true,
|
||||
"factor": 0.027000000700354577,
|
||||
"offset": -0.02199999988079071,
|
||||
"textureMap": "TestData/Textures/cc0/Rocks002_1K_Displacement.jpg"
|
||||
},
|
||||
"layer3_roughness": {
|
||||
"textureMap": "TestData/Textures/cc0/Rocks002_1K_Roughness.jpg"
|
||||
},
|
||||
"layer3_uv": {
|
||||
"scale": 1.600000023841858
|
||||
},
|
||||
"parallax": {
|
||||
"algorithm": "Relief",
|
||||
"enable": true,
|
||||
"pdo": true,
|
||||
"quality": "Low"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f9ec269d03a9552c0ecf24778912fa6190c412b006433db8b7c40e1c0c83e6f7
|
||||
size 516915
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b53c4aca020d5833618a5b73b6578c8693dd14e603eb32681e2c7ecc90f59047
|
||||
size 1020622
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:46ea8a9406ce6df21ce3a6045aac5b1421ce119919ff050951277dd76464ee2c
|
||||
size 258716
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ac1ad9bea240374bfc6aaaacc42e24eadfbf93c7185617fc1c52e610cb45cb69
|
||||
size 1292910
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8fce266a7445a4d4b5bb3fbf7cb3330e0580b058aeaf2ef7f265a01641dbbdc4
|
||||
size 637326
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ca54f762bcddc10ab2d609f10864328cb5a567c43efb8c9bcfe9cb2955db9577
|
||||
size 433887
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5b5f5ff297aef6470045d087cf0c3341f7782e36a750965a052d49d03dd37426
|
||||
size 1595449
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c8753448320e0916a70036ef77a06bce746bfa45c14e62b2fbda0987a13bfbb3
|
||||
size 277114
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5ea23ea8d85d1fffa119e481e6ac85ad3a3096470a5e12f252d37e1b293e5e37
|
||||
size 2119669
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:caa6e94f904135461da4d200fc6c21c86dc99cc7d413ea740e678f7758b2b156
|
||||
size 555680
|
||||
Reference in New Issue
Block a user