Skip to content

Commit

Permalink
feat: adding slices and testing slice positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman committed Nov 22, 2023
1 parent b11a316 commit 1dfed17
Show file tree
Hide file tree
Showing 9 changed files with 756 additions and 38 deletions.
16 changes: 16 additions & 0 deletions UnityClient/Assets/Scenes/UnityMouseRenderer.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,22 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3393775226113162775, guid: a0c57925ee59dae4ebf1f78ba70837a6, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.size
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3393775226113162775, guid: a0c57925ee59dae4ebf1f78ba70837a6, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[1].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3393775226113162775, guid: a0c57925ee59dae4ebf1f78ba70837a6, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName
value: Urchin.Managers.VolumeManager, urchin.managers
objectReference: {fileID: 0}
- target: {fileID: 3393775226113162775, guid: a0c57925ee59dae4ebf1f78ba70837a6, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 3393775226405738686, guid: a0c57925ee59dae4ebf1f78ba70837a6, type: 3}
propertyPath: near clip plane
value: -50
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _APClip: {r: 0, g: 13.2, b: 0, a: 0}
- _APClip: {r: -0.5, g: 0.5, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _MLClip: {r: 0, g: 11.4, b: 0, a: 0}
- _MLClip: {r: -0.5, g: 0.5, b: 0, a: 0}
m_BuildTextureStacks: []
184 changes: 181 additions & 3 deletions UnityClient/Packages/vbl.urchin/Assets/Prefabs/Objects/Volume.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 8954339786776181354}
- {fileID: 8415940814923770898}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
--- !u!114 &4626749015476428916
Expand All @@ -47,6 +49,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_volumeTexture: {fileID: 0}
_coronalSliceGO: {fileID: 5016588722399749947}
_sagittalSliceGO: {fileID: 4720481565151869059}
--- !u!23 &8038298843418954421
MeshRenderer:
m_ObjectHideFlags: 0
Expand All @@ -55,12 +59,12 @@ MeshRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4113667031467724672}
m_Enabled: 1
m_CastShadows: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
Expand Down Expand Up @@ -97,3 +101,177 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4113667031467724672}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &4720481565151869059
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8415940814923770898}
- component: {fileID: 3553015889035563946}
- component: {fileID: 8412990848803479212}
m_Layer: 0
m_Name: SagittalSlice
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8415940814923770898
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4720481565151869059}
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: 6767609219490950675}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!33 &3553015889035563946
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4720481565151869059}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &8412990848803479212
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4720481565151869059}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c34410e932fb27d4ab00e5e7f176e9a0, 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_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &5016588722399749947
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8954339786776181354}
- component: {fileID: 4420576886839645230}
- component: {fileID: 4601583766600974901}
m_Layer: 0
m_Name: CoronalSlice
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8954339786776181354
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5016588722399749947}
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: 6767609219490950675}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!33 &4420576886839645230
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5016588722399749947}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4601583766600974901
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5016588722399749947}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 52026d84fa93f9c4699568e7b618f961, 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_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
32 changes: 32 additions & 0 deletions UnityClient/Packages/vbl.urchin/Assets/Prefabs/Urchin.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -5566,30 +5566,58 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 1585022055348087818}
m_Modifications:
- target: {fileID: 5697262124586181149, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: m_TagString
value: MainCamera
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.size
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[1].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1424787918614360421}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[1].m_Target
value:
objectReference: {fileID: 2555904598708727173}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[1].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: UpdateRotation
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName
value: UpdateCameraRotation
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: Urchin.Cameras.CameraMiniController, urchin.cameras
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName
value: Urchin.Managers.VolumeManager, urchin.managers
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797361, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: RotationChangedEvent.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 5697262125096797362, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: Name
value: main
Expand All @@ -5614,6 +5642,10 @@ PrefabInstance:
propertyPath: near clip plane
value: 0.01
objectReference: {fileID: 0}
- target: {fileID: 5697262126407426468, guid: df654a8b58b5be543a801b0bcda6f0de, type: 3}
propertyPath: m_TagString
value: MainCamera
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ Shader "Unlit/VolumeRayMarchShader"
//float3 rayOrigin = i.objectVertex;

// Check if the ray origin or any subsequent sample position is outside the clipping boundaries
if (i.objectVertex.x < _MLClip.x || i.objectVertex.x > _MLClip.y ||
i.objectVertex.z < _APClip.x || i.objectVertex.z > _APClip.y)
if (i.objectVertex.y < _MLClip.x || i.objectVertex.y > _MLClip.y ||
i.objectVertex.x < _APClip.x || i.objectVertex.x > _APClip.y)
{
// Set color to transparent and exit the loop
return float4(0, 0, 0, 0);
Expand Down
Loading

0 comments on commit 1dfed17

Please sign in to comment.