Browse Source

Removed redundant division in QTriVertex conversion, and scaled up the rest of the test scene to match. Fixes scale of imported alias models when compared to the world brush model.

console
Nico de Poel 5 years ago
parent
commit
05731a8e09
  1. 39
      Assets/Scenes/Default.unity
  2. 2
      Assets/Scripts/Data/QExtensions.cs
  3. 6
      Assets/Scripts/Modules/RenderModule.cs

39
Assets/Scenes/Default.unity

@ -271,6 +271,7 @@ GameObject:
- component: {fileID: 963194228} - component: {fileID: 963194228}
- component: {fileID: 963194227} - component: {fileID: 963194227}
- component: {fileID: 963194226} - component: {fileID: 963194226}
- component: {fileID: 963194229}
m_Layer: 0 m_Layer: 0
m_Name: Main Camera m_Name: Main Camera
m_TagString: MainCamera m_TagString: MainCamera
@ -309,8 +310,8 @@ Camera:
y: 0 y: 0
width: 1 width: 1
height: 1 height: 1
near clip plane: 0.3
far clip plane: 1000
near clip plane: 4
far clip plane: 16384
field of view: 60 field of view: 60
orthographic: 0 orthographic: 0
orthographic size: 5 orthographic size: 5
@ -337,9 +338,41 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225} m_GameObject: {fileID: 963194225}
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: 250, z: -2500}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &963194229
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2

2
Assets/Scripts/Data/QExtensions.cs

@ -43,6 +43,6 @@ public static class QExtensions
public static Vector3 ToVector3(this QTriVertex triVertex) public static Vector3 ToVector3(this QTriVertex triVertex)
{ {
byte[] v = triVertex.v; byte[] v = triVertex.v;
return new Vector3(v[0] / 255f, v[1] / 255f, v[2] / 255f);
return new Vector3(v[0], v[1], v[2]);
} }
} }

6
Assets/Scripts/Modules/RenderModule.cs

@ -14,7 +14,7 @@ public partial class RenderModule
BuildCallbacks(); BuildCallbacks();
zPos = globalZPos; zPos = globalZPos;
globalZPos -= 1.0f;
globalZPos -= 256f;
} }
public override void Destroy() public override void Destroy()
@ -36,7 +36,7 @@ public partial class RenderModule
textures.Clear(); textures.Clear();
} }
private float xPos = -8f;
private float xPos = -2048f;
private float zPos = 0f; private float zPos = 0f;
private static float globalZPos = 0f; private static float globalZPos = 0f;
@ -115,7 +115,7 @@ public partial class RenderModule
mr.reflectionProbeUsage = ReflectionProbeUsage.Off; mr.reflectionProbeUsage = ReflectionProbeUsage.Off;
} }
xPos += 0.5f;
xPos += 128f;
return 1; return 1;
} }

Loading…
Cancel
Save