Interesting effect with scaling
This commit is contained in:
@@ -20,13 +20,13 @@ RenderSettings:
|
|||||||
m_FogDensity: 0.01
|
m_FogDensity: 0.01
|
||||||
m_LinearFogStart: 0
|
m_LinearFogStart: 0
|
||||||
m_LinearFogEnd: 300
|
m_LinearFogEnd: 300
|
||||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
m_AmbientSkyColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||||
m_AmbientIntensity: 1
|
m_AmbientIntensity: 1
|
||||||
m_AmbientMode: 0
|
m_AmbientMode: 3
|
||||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
m_SkyboxMaterial: {fileID: 0}
|
||||||
m_HaloStrength: 0.5
|
m_HaloStrength: 0.5
|
||||||
m_FlareStrength: 1
|
m_FlareStrength: 1
|
||||||
m_FlareFadeSpeed: 3
|
m_FlareFadeSpeed: 3
|
||||||
@@ -119,6 +119,119 @@ NavMeshSettings:
|
|||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &4654394
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4654395}
|
||||||
|
- component: {fileID: 4654398}
|
||||||
|
- component: {fileID: 4654397}
|
||||||
|
- component: {fileID: 4654396}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Quad
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4654395
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4654394}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: -1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1904087984}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!64 &4654396
|
||||||
|
MeshCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4654394}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Convex: 0
|
||||||
|
m_CookingOptions: 30
|
||||||
|
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &4654397
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4654394}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_ForceMeshLod: -1
|
||||||
|
m_MeshLodSelectionBias: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_GlobalIlluminationMeshLod: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!33 &4654398
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4654394}
|
||||||
|
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
--- !u!1001 &49971200
|
--- !u!1001 &49971200
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -127,6 +240,10 @@ PrefabInstance:
|
|||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
|
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
|
propertyPath: m_PropertySheet.m_Uint.m_Array.Array.size
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
propertyPath: m_PropertySheet.m_Float.m_Array.Array.size
|
propertyPath: m_PropertySheet.m_Float.m_Array.Array.size
|
||||||
value: 2
|
value: 2
|
||||||
@@ -135,6 +252,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_PropertySheet.m_Vector3f.m_Array.Array.size
|
propertyPath: m_PropertySheet.m_Vector3f.m_Array.Array.size
|
||||||
value: 1
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
|
propertyPath: m_PropertySheet.m_Uint.m_Array.Array.data[0].m_Name
|
||||||
|
value: SplatCount
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
propertyPath: m_PropertySheet.m_Float.m_Array.Array.data[0].m_Name
|
propertyPath: m_PropertySheet.m_Float.m_Array.Array.data[0].m_Name
|
||||||
value: ScaleMultiplier
|
value: ScaleMultiplier
|
||||||
@@ -143,6 +264,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_PropertySheet.m_Float.m_Array.Array.data[1].m_Name
|
propertyPath: m_PropertySheet.m_Float.m_Array.Array.data[1].m_Name
|
||||||
value: OpacityMultiplier
|
value: OpacityMultiplier
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
|
propertyPath: m_PropertySheet.m_Uint.m_Array.Array.data[0].m_Value
|
||||||
|
value: 200000
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
propertyPath: m_PropertySheet.m_Float.m_Array.Array.data[0].m_Value
|
propertyPath: m_PropertySheet.m_Float.m_Array.Array.data[0].m_Value
|
||||||
value: 1
|
value: 1
|
||||||
@@ -155,6 +280,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_PropertySheet.m_Vector3f.m_Array.Array.data[0].m_Name
|
propertyPath: m_PropertySheet.m_Vector3f.m_Array.Array.data[0].m_Name
|
||||||
value: Pivot
|
value: Pivot
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
|
propertyPath: m_PropertySheet.m_Uint.m_Array.Array.data[0].m_Overridden
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
- target: {fileID: -973084862543737302, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
propertyPath: m_PropertySheet.m_Float.m_Array.Array.data[0].m_Overridden
|
propertyPath: m_PropertySheet.m_Float.m_Array.Array.data[0].m_Overridden
|
||||||
value: 1
|
value: 1
|
||||||
@@ -181,7 +310,11 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -774367247743995920, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
- target: {fileID: -774367247743995920, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
propertyPath: m_Enabled
|
propertyPath: m_Enabled
|
||||||
value: 1
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -364223573239433514, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
|
propertyPath: m_LocalScale.y
|
||||||
|
value: -1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -364223573239433514, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
- target: {fileID: -364223573239433514, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
@@ -229,13 +362,45 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8980549144392899874, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
- target: {fileID: 8980549144392899874, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents: []
|
m_AddedComponents: []
|
||||||
m_SourcePrefab: {fileID: -4216948427090074523, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
m_SourcePrefab: {fileID: -4216948427090074523, guid: 25c54d8c074f08447ab1c822a6a052fa, type: 3}
|
||||||
|
--- !u!1 &262750850
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 262750851}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GameObject
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &262750851
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 262750850}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0.09383813, y: 0.44299415, z: -0.1847652, w: 0.87224567}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 2.32, y: 3.76, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 1904087984}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 53.85, z: -23.92}
|
||||||
--- !u!1 &1826889287
|
--- !u!1 &1826889287
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -272,8 +437,8 @@ Camera:
|
|||||||
m_GameObject: {fileID: 1826889287}
|
m_GameObject: {fileID: 1826889287}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_ClearFlags: 1
|
m_ClearFlags: 2
|
||||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
m_projectionMatrixMode: 1
|
m_projectionMatrixMode: 1
|
||||||
m_GateFitMode: 2
|
m_GateFitMode: 2
|
||||||
m_FOVAxisMode: 0
|
m_FOVAxisMode: 0
|
||||||
@@ -323,7 +488,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 1826889287}
|
m_GameObject: {fileID: 1826889287}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
@@ -373,6 +538,51 @@ MonoBehaviour:
|
|||||||
m_VarianceClampScale: 0.9
|
m_VarianceClampScale: 0.9
|
||||||
m_ContrastAdaptiveSharpening: 0
|
m_ContrastAdaptiveSharpening: 0
|
||||||
m_Version: 2
|
m_Version: 2
|
||||||
|
--- !u!1 &1904087983
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1904087984}
|
||||||
|
- component: {fileID: 1904087985}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GameObject
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1904087984
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1904087983}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0.1847652, y: 0.87224567, z: 0.09383813, w: 0.44299415}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 4654395}
|
||||||
|
m_Father: {fileID: 262750851}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: -768.2, z: 0}
|
||||||
|
--- !u!114 &1904087985
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1904087983}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 8393160045a3abd48809f9ced6b0df58, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::TestLook
|
||||||
--- !u!1 &1911516430
|
--- !u!1 &1911516430
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -507,3 +717,4 @@ SceneRoots:
|
|||||||
- {fileID: 1826889290}
|
- {fileID: 1826889290}
|
||||||
- {fileID: 1911516433}
|
- {fileID: 1911516433}
|
||||||
- {fileID: 49971200}
|
- {fileID: 49971200}
|
||||||
|
- {fileID: 262750851}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// Multiply two 4x4 matrices
|
||||||
|
// Returns C = A * B
|
||||||
|
float4x4 MatrixMultiply(float4x4 A, float4x4 B) {
|
||||||
|
// Matrix multiplication: C[i][j] = sum of A[i][k] * B[k][j]
|
||||||
|
return mul(A, B);
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c71f6c8aac32d6e489a61477b1469ca4
|
||||||
|
ShaderIncludeImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// Extract coordinate axes from transformation matrix
|
||||||
|
// Returns the rotation part (3x3 upper-left submatrix)
|
||||||
|
float3x3 MatrixToAxes(float4x4 t) {
|
||||||
|
// Extract the 3x3 rotation submatrix from the 4x4 transformation matrix
|
||||||
|
// Row 0 = X-axis direction (t[0].xyz)
|
||||||
|
// Row 1 = Y-axis direction (t[1].xyz)
|
||||||
|
// Row 2 = Z-axis direction (t[2].xyz)
|
||||||
|
|
||||||
|
return float3x3(
|
||||||
|
t[0].xyz, // X-axis
|
||||||
|
t[1].xyz, // Y-axis
|
||||||
|
t[2].xyz // Z-axis
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8b5037aa7089c944a9d657d0c98e831c
|
||||||
|
ShaderIncludeImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// Convert quaternion to 4x4 transformation matrix
|
||||||
|
// Quaternion is stored as (w, x, y, z) where w is the scalar part
|
||||||
|
float4x4 QuaternionToMatrix(float4 q) {
|
||||||
|
// Extract quaternion components
|
||||||
|
float w = q.w;
|
||||||
|
float x = q.x;
|
||||||
|
float y = q.y;
|
||||||
|
float z = q.z;
|
||||||
|
|
||||||
|
// Calculate matrix elements
|
||||||
|
float m00 = 1.0 - 2.0 * (y * y + z * z);
|
||||||
|
float m01 = 2.0 * (x * y - z * w);
|
||||||
|
float m02 = 2.0 * (x * z + y * w);
|
||||||
|
float m03 = 0.0;
|
||||||
|
|
||||||
|
float m10 = 2.0 * (x * y + z * w);
|
||||||
|
float m11 = 1.0 - 2.0 * (x * x + z * z);
|
||||||
|
float m12 = 2.0 * (y * z - x * w);
|
||||||
|
float m13 = 0.0;
|
||||||
|
|
||||||
|
float m20 = 2.0 * (x * z - y * w);
|
||||||
|
float m21 = 2.0 * (y * z + x * w);
|
||||||
|
float m22 = 1.0 - 2.0 * (x * x + y * y);
|
||||||
|
float m23 = 0.0;
|
||||||
|
|
||||||
|
float m30 = 0.0;
|
||||||
|
float m31 = 0.0;
|
||||||
|
float m32 = 0.0;
|
||||||
|
float m33 = 1.0;
|
||||||
|
|
||||||
|
// Return matrix
|
||||||
|
return float4x4(
|
||||||
|
m00, m01, m02, m03,
|
||||||
|
m10, m11, m12, m13,
|
||||||
|
m20, m21, m22, m23,
|
||||||
|
m30, m31, m32, m33
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 674225b6ca8589e42a54be781c36af9d
|
||||||
|
ShaderIncludeImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
// Convert scaling vector to 4x4 transformation matrix
|
||||||
|
// Scaling values are applied to X, Y, Z axes (sxyz.x, sxyz.y, sxyz.z)
|
||||||
|
float4x4 ScaleToMatrix(float3 s) {
|
||||||
|
// Create diagonal scaling matrix
|
||||||
|
// s.x applied to X-axis
|
||||||
|
// s.y applied to Y-axis
|
||||||
|
// s.z applied to Z-axis
|
||||||
|
|
||||||
|
return float4x4(
|
||||||
|
s.x, 0.0, 0.0, 0.0,
|
||||||
|
0.0, s.y, 0.0, 0.0,
|
||||||
|
0.0, 0.0, s.z, 0.0,
|
||||||
|
0.0, 0.0, 0.0, 1.0
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2e2b8d8010fe4a34e879d0b679e1bf37
|
||||||
|
ShaderIncludeImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+4342
-2651
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user