add : sam groud textures & sam character animation

This commit is contained in:
Ferlat Thibaud
2026-06-17 12:45:50 +02:00
parent de466efa05
commit 7290cbcae5
24 changed files with 2098 additions and 2593 deletions
@@ -0,0 +1,46 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M_ray_Omnissiah Variant 1
m_Shader: {fileID: -6465566751694194690, guid: 41e1af50dce5647448137abb3f85e49b, type: 3}
m_Parent: {fileID: 2100000, guid: 2f0a42f4b97d23e4599d257dabb0f97d, type: 2}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _Size: 1.32
m_Colors:
- _Color: {r: 7.8704915, g: 0, b: 0.24367483, a: 0.15686275}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &7824453094504610616
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6b0f7b394d841a648bad71195b95612b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -57,6 +57,7 @@ Material:
m_Floats:
- _Debug: 0
- _Demo: 0
- _EnableFacing: 0
- _IgnoreAtten: 1
- _Intendity: 0.828
- _Intensity: 1
@@ -17,6 +17,9 @@
},
{
"m_Id": "53d5afff3c3f4a9db8281850eee533f8"
},
{
"m_Id": "0d915a4254bd45bc817e7fafacd8e7e2"
}
],
"m_Keywords": [],
@@ -98,6 +101,9 @@
},
{
"m_Id": "bd957a577b964244ac6b8f9854af3641"
},
{
"m_Id": "05c8f09eeb854bd68d6807ecd446e194"
}
],
"m_GroupDatas": [],
@@ -117,6 +123,20 @@
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "05c8f09eeb854bd68d6807ecd446e194"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "8c33db14052d44f58d122f6121da5b71"
},
"m_SlotId": 18
}
},
{
"m_OutputSlot": {
"m_Node": {
@@ -452,6 +472,42 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "05c8f09eeb854bd68d6807ecd446e194",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1129.9998779296875,
"y": 174.99996948242188,
"width": 147.0001220703125,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "846801b25c654018842d22cb8451db27"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "0d915a4254bd45bc817e7fafacd8e7e2"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
@@ -483,10 +539,41 @@
"m_ChildObjectList": [
{
"m_Id": "f8301001f4f843788881d0078777ce68"
},
{
"m_Id": "0d915a4254bd45bc817e7fafacd8e7e2"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty",
"m_ObjectId": "0d915a4254bd45bc817e7fafacd8e7e2",
"m_Guid": {
"m_GuidSerialized": "79134197-ced2-4d6a-9699-2745ad92af90"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "EnableFacing",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "EnableFacing",
"m_DefaultReferenceName": "_EnableFacing",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
@@ -1474,6 +1561,20 @@
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot",
"m_ObjectId": "846801b25c654018842d22cb8451db27",
"m_Id": 0,
"m_DisplayName": "EnableFacing",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": false,
"m_DefaultValue": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@@ -1577,6 +1678,9 @@
{
"m_Id": "4087f03500c74575947fac907d28ba80"
},
{
"m_Id": "db4f5d0986904c7aa591a381a57ee4fd"
},
{
"m_Id": "7ec1359c52ff4769a1a604ffaa6239a5"
},
@@ -1922,8 +2026,8 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1299.9998779296875,
"y": 195.0,
"x": 1314.9998779296875,
"y": 232.99996948242188,
"width": 91.0,
"height": 34.0
}
@@ -2413,6 +2517,20 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot",
"m_ObjectId": "db4f5d0986904c7aa591a381a57ee4fd",
"m_Id": 18,
"m_DisplayName": "EnableFacing",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "EnableFacing",
"m_StageCapability": 3,
"m_Value": false,
"m_DefaultValue": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
@@ -7,7 +7,7 @@ float2 WorldToScreenUV(float3 posWS)
return ndc * .5 + .5; // [0, 1]
}
float3 GetBillboardPositionWS(float3 PositionOS, float3 PivotWS, float3 ViewDirWS)
float3 GetBillboardPositionWS(float3 PositionOS, float3 PivotWS, float3 ViewDirWS, uint EnableFacing)
{
float3 upWS = normalize(TransformObjectToWorldDir(float3(0, 1, 0)));
@@ -19,6 +19,13 @@ float3 GetBillboardPositionWS(float3 PositionOS, float3 PivotWS, float3 ViewDirW
rightWS = normalize(rightWS);
float3 forwardWS = normalize(cross(rightWS, upWS));
// Local object-space axes, used as fallback when facing is disabled
float3 localRightWS = normalize(TransformObjectToWorldDir(float3(1, 0, 0)));
float3 localForwardWS = normalize(TransformObjectToWorldDir(float3(0, 0, 1)));
rightWS = lerp(localRightWS, rightWS, (float)EnableFacing);
forwardWS = lerp(localForwardWS, forwardWS, (float)EnableFacing);
float3 pOS = PositionOS.x * rightWS + PositionOS.y * upWS + PositionOS.z * forwardWS;
@@ -45,6 +52,7 @@ void Ray_float
float3 PositionOS,
float4 ScreenPos,
uint Orthographic,
uint EnableFacing,
float UvDebug,
out float3 OutPosition,
out float3 OutColor
@@ -67,9 +75,9 @@ void Ray_float
float3 pOS_1 = AppyTaperAndScale(float3( .5, PositionOS.y, 0), scale);
float3 pOS_2 = AppyTaperAndScale(float3(-.5, PositionOS.y, 0), scale);
float3 pWS_0 = GetBillboardPositionWS(pOS_0, pivot, viewDir);
float3 pWS_1 = GetBillboardPositionWS(pOS_1, pivot, viewDir);
float3 pWS_2 = GetBillboardPositionWS(pOS_2, pivot, viewDir);
float3 pWS_0 = GetBillboardPositionWS(pOS_0, pivot, viewDir, EnableFacing);
float3 pWS_1 = GetBillboardPositionWS(pOS_1, pivot, viewDir, EnableFacing);
float3 pWS_2 = GetBillboardPositionWS(pOS_2, pivot, viewDir, EnableFacing);
float2 pSC_0 = ScreenPos.xy;
float2 pSC_1 = WorldToScreenUV(pWS_1);