Restore transparent gaps inside cartoon fire
- Обновлены пороги отсечки в InjectToonFireToShaderGraph.cs: внешний порог установлен на 1.0 (соответствует оригинальному альфа-порогу). - Это восстанавливает прозрачные отверстия/пробелы внутри пламени.
This commit is contained in:
parent
a1c052c879
commit
3d1772af15
@ -207,7 +207,7 @@ public static class InjectToonFireToShaderGraph
|
||||
""m_SourceType"": 1,
|
||||
""m_FunctionName"": ""ToonFireColor"",
|
||||
""m_FunctionSource"": """",
|
||||
""m_FunctionBody"": ""float3 colInner = float3(1.0, 0.95, 0.4) * baseColor.rgb * 2.2;\nfloat3 colMid = float3(1.0, 0.55, 0.0) * baseColor.rgb * 1.8;\nfloat3 colOuter = float3(1.0, 0.15, 0.1) * baseColor.rgb * 1.4;\n\nfloat stepOuter = step(0.85, rawValue);\nfloat stepMid = step(1.0, rawValue);\nfloat stepInner = step(1.15, rawValue);\n\nfloat3 finalColor = float3(0,0,0);\nif (stepInner > 0.5)\n{\n finalColor = colInner;\n}\nelse if (stepMid > 0.5)\n{\n finalColor = colMid;\n}\nelse if (stepOuter > 0.5)\n{\n finalColor = colOuter;\n}\n\noutColor = finalColor;\noutAlpha = stepOuter * baseColor.a;""
|
||||
""m_FunctionBody"": ""float3 colInner = float3(1.0, 0.95, 0.4) * baseColor.rgb * 2.2;\nfloat3 colMid = float3(1.0, 0.55, 0.0) * baseColor.rgb * 1.8;\nfloat3 colOuter = float3(1.0, 0.15, 0.1) * baseColor.rgb * 1.4;\n\nfloat stepOuter = step(1.0, rawValue);\nfloat stepMid = step(1.12, rawValue);\nfloat stepInner = step(1.25, rawValue);\n\nfloat3 finalColor = float3(0,0,0);\nif (stepInner > 0.5)\n{\n finalColor = colInner;\n}\nelse if (stepMid > 0.5)\n{\n finalColor = colMid;\n}\nelse if (stepOuter > 0.5)\n{\n finalColor = colOuter;\n}\n\noutColor = finalColor;\noutAlpha = stepOuter * baseColor.a;""
|
||||
}");
|
||||
|
||||
// Remove previous instances of our nodes from list (if re-running script)
|
||||
|
||||
@ -585,8 +585,8 @@
|
||||
],
|
||||
"m_VertexContext": {
|
||||
"m_Position": {
|
||||
"x": -174.00003051757813,
|
||||
"y": -171.99998474121094
|
||||
"x": 146.00004577636719,
|
||||
"y": -25.000011444091797
|
||||
},
|
||||
"m_Blocks": [
|
||||
{
|
||||
@ -602,8 +602,8 @@
|
||||
},
|
||||
"m_FragmentContext": {
|
||||
"m_Position": {
|
||||
"x": -174.00003051757813,
|
||||
"y": 55.9999885559082
|
||||
"x": 146.00004577636719,
|
||||
"y": 203.00001525878906
|
||||
},
|
||||
"m_Blocks": [
|
||||
{
|
||||
@ -676,7 +676,7 @@
|
||||
"m_ObjectId": "06f798f4e4d445d0a65b4f9f8db515b7",
|
||||
"m_Title": "Texture",
|
||||
"m_Position": {
|
||||
"x": -2313.0,
|
||||
"x": -2312.999755859375,
|
||||
"y": -620.0
|
||||
}
|
||||
}
|
||||
@ -1740,8 +1740,8 @@
|
||||
"m_ObjectId": "69f637288cb54756bdd28eab6e8ffd25",
|
||||
"m_Title": "Noise",
|
||||
"m_Position": {
|
||||
"x": -2424.0,
|
||||
"y": 232.00001525878906
|
||||
"x": -2423.999755859375,
|
||||
"y": 232.0
|
||||
}
|
||||
}
|
||||
|
||||
@ -2516,6 +2516,7 @@
|
||||
"isMainTexture": false,
|
||||
"useTilingAndOffset": false,
|
||||
"useTexelSize": true,
|
||||
"isHDR": false,
|
||||
"m_Modifiable": true,
|
||||
"m_DefaultType": 0
|
||||
}
|
||||
@ -4366,5 +4367,5 @@
|
||||
"m_SourceType": 1,
|
||||
"m_FunctionName": "ToonFireColor",
|
||||
"m_FunctionSource": "",
|
||||
"m_FunctionBody": "float3 colInner = float3(1.0, 0.95, 0.4) * baseColor.rgb * 2.2;\nfloat3 colMid = float3(1.0, 0.55, 0.0) * baseColor.rgb * 1.8;\nfloat3 colOuter = float3(1.0, 0.15, 0.1) * baseColor.rgb * 1.4;\n\nfloat stepOuter = step(0.85, rawValue);\nfloat stepMid = step(1.0, rawValue);\nfloat stepInner = step(1.15, rawValue);\n\nfloat3 finalColor = float3(0,0,0);\nif (stepInner > 0.5)\n{\n finalColor = colInner;\n}\nelse if (stepMid > 0.5)\n{\n finalColor = colMid;\n}\nelse if (stepOuter > 0.5)\n{\n finalColor = colOuter;\n}\n\noutColor = finalColor;\noutAlpha = stepOuter * baseColor.a;"
|
||||
"m_FunctionBody": "float3 colInner = float3(1.0, 0.95, 0.4) * baseColor.rgb * 2.2;\nfloat3 colMid = float3(1.0, 0.55, 0.0) * baseColor.rgb * 1.8;\nfloat3 colOuter = float3(1.0, 0.15, 0.1) * baseColor.rgb * 1.4;\n\nfloat stepOuter = step(1.0, rawValue);\nfloat stepMid = step(1.12, rawValue);\nfloat stepInner = step(1.25, rawValue);\n\nfloat3 finalColor = float3(0,0,0);\nif (stepInner > 0.5)\n{\n finalColor = colInner;\n}\nelse if (stepMid > 0.5)\n{\n finalColor = colMid;\n}\nelse if (stepOuter > 0.5)\n{\n finalColor = colOuter;\n}\n\noutColor = finalColor;\noutAlpha = stepOuter * baseColor.a;"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user