Procházet zdrojové kódy

Update examples for v0.14.0;

bjorn před 4 roky
rodič
revize
c48b2e9c50
86 změnil soubory, kde provedl 257 přidání a 508 odebrání
  1. 8 4
      examples/Animation/2_Bone_IK/main.lua
  2. 0 0
      examples/Debugging/Raw_Input/main.lua
  3. 0 0
      examples/Effects/Blur/eye-chart-test-vintage-cc0.jpg
  4. 0 0
      examples/Effects/Blur/main.lua
  5. 2 20
      examples/Interaction/Hand_Tracking/main.lua
  6. 0 126
      examples/Interaction/Index_Hands/knuckles.lua
  7. 0 79
      examples/Interaction/Index_Hands/main.lua
  8. 2 2
      examples/Intro/Custom_Mesh/main.lua
  9. 0 0
      examples/Intro/Custom_Mesh/shader.lua
  10. 5 7
      examples/Intro/Thread/main.lua
  11. 4 4
      examples/Lighting/PBR_Materials/conf.lua
  12. 0 0
      examples/Lighting/PBR_Materials/env/m0_nx.png
  13. 0 0
      examples/Lighting/PBR_Materials/env/m0_ny.png
  14. 0 0
      examples/Lighting/PBR_Materials/env/m0_nz.png
  15. 0 0
      examples/Lighting/PBR_Materials/env/m0_px.png
  16. 0 0
      examples/Lighting/PBR_Materials/env/m0_py.png
  17. 0 0
      examples/Lighting/PBR_Materials/env/m0_pz.png
  18. 0 0
      examples/Lighting/PBR_Materials/env/m1_nx.png
  19. 0 0
      examples/Lighting/PBR_Materials/env/m1_ny.png
  20. 0 0
      examples/Lighting/PBR_Materials/env/m1_nz.png
  21. 0 0
      examples/Lighting/PBR_Materials/env/m1_px.png
  22. 0 0
      examples/Lighting/PBR_Materials/env/m1_py.png
  23. 0 0
      examples/Lighting/PBR_Materials/env/m1_pz.png
  24. 0 0
      examples/Lighting/PBR_Materials/env/m2_nx.png
  25. 0 0
      examples/Lighting/PBR_Materials/env/m2_ny.png
  26. 0 0
      examples/Lighting/PBR_Materials/env/m2_nz.png
  27. 0 0
      examples/Lighting/PBR_Materials/env/m2_px.png
  28. 0 0
      examples/Lighting/PBR_Materials/env/m2_py.png
  29. 0 0
      examples/Lighting/PBR_Materials/env/m2_pz.png
  30. 0 0
      examples/Lighting/PBR_Materials/env/m3_nx.png
  31. 0 0
      examples/Lighting/PBR_Materials/env/m3_ny.png
  32. 0 0
      examples/Lighting/PBR_Materials/env/m3_nz.png
  33. 0 0
      examples/Lighting/PBR_Materials/env/m3_px.png
  34. 0 0
      examples/Lighting/PBR_Materials/env/m3_py.png
  35. 0 0
      examples/Lighting/PBR_Materials/env/m3_pz.png
  36. 0 0
      examples/Lighting/PBR_Materials/env/m4_nx.png
  37. 0 0
      examples/Lighting/PBR_Materials/env/m4_ny.png
  38. 0 0
      examples/Lighting/PBR_Materials/env/m4_nz.png
  39. 0 0
      examples/Lighting/PBR_Materials/env/m4_px.png
  40. 0 0
      examples/Lighting/PBR_Materials/env/m4_py.png
  41. 0 0
      examples/Lighting/PBR_Materials/env/m4_pz.png
  42. 0 0
      examples/Lighting/PBR_Materials/env/m5_nx.png
  43. 0 0
      examples/Lighting/PBR_Materials/env/m5_ny.png
  44. 0 0
      examples/Lighting/PBR_Materials/env/m5_nz.png
  45. 0 0
      examples/Lighting/PBR_Materials/env/m5_px.png
  46. 0 0
      examples/Lighting/PBR_Materials/env/m5_py.png
  47. 0 0
      examples/Lighting/PBR_Materials/env/m5_pz.png
  48. 0 0
      examples/Lighting/PBR_Materials/env/m6_nx.png
  49. 0 0
      examples/Lighting/PBR_Materials/env/m6_ny.png
  50. 0 0
      examples/Lighting/PBR_Materials/env/m6_nz.png
  51. 0 0
      examples/Lighting/PBR_Materials/env/m6_px.png
  52. 0 0
      examples/Lighting/PBR_Materials/env/m6_py.png
  53. 0 0
      examples/Lighting/PBR_Materials/env/m6_pz.png
  54. 0 0
      examples/Lighting/PBR_Materials/env/m7_nx.png
  55. 0 0
      examples/Lighting/PBR_Materials/env/m7_ny.png
  56. 0 0
      examples/Lighting/PBR_Materials/env/m7_nz.png
  57. 0 0
      examples/Lighting/PBR_Materials/env/m7_px.png
  58. 0 0
      examples/Lighting/PBR_Materials/env/m7_py.png
  59. 0 0
      examples/Lighting/PBR_Materials/env/m7_pz.png
  60. 0 0
      examples/Lighting/PBR_Materials/env/m8_nx.png
  61. 0 0
      examples/Lighting/PBR_Materials/env/m8_ny.png
  62. 0 0
      examples/Lighting/PBR_Materials/env/m8_nz.png
  63. 0 0
      examples/Lighting/PBR_Materials/env/m8_px.png
  64. 0 0
      examples/Lighting/PBR_Materials/env/m8_py.png
  65. 0 0
      examples/Lighting/PBR_Materials/env/m8_pz.png
  66. 0 0
      examples/Lighting/PBR_Materials/env/nx.png
  67. 0 0
      examples/Lighting/PBR_Materials/env/ny.png
  68. 0 0
      examples/Lighting/PBR_Materials/env/nz.png
  69. 0 0
      examples/Lighting/PBR_Materials/env/px.png
  70. 0 0
      examples/Lighting/PBR_Materials/env/py.png
  71. 0 0
      examples/Lighting/PBR_Materials/env/pz.png
  72. 11 11
      examples/Lighting/PBR_Materials/env/sphericalHarmonics.lua
  73. 0 0
      examples/Lighting/PBR_Materials/helmet/DamagedHelmet.glb
  74. 0 0
      examples/Lighting/PBR_Materials/main.lua
  75. 0 33
      examples/Microphones/main.lua
  76. 0 0
      examples/Physics/Drawing_Colliders/main.lua
  77. 0 0
      examples/Physics/Hand_Physics/main.lua
  78. 0 0
      examples/Physics/Newtons_Cradle/main.lua
  79. 0 0
      examples/Physics/Saloon_Door/main.lua
  80. 0 0
      examples/Physics/Wrecking_Ball/main.lua
  81. 0 0
      examples/Physics/Zip_Line/main.lua
  82. 54 54
      examples/UI/Spectator_Camera/main.lua
  83. 2 1
      examples/UI/Window_HUD/main.lua
  84. 115 115
      examples/UI/Window_HUD/mouse.lua
  85. 39 39
      examples/UI/Window_HUD/shader.lua
  86. 15 13
      examples/init.lua

+ 8 - 4
examples/Animation/2_Bone_IK/main.lua

@@ -24,10 +24,10 @@ local function solve(root, target, control, lengths)
 end
 
 function lovr.load()
-  boneLengths = { .6, .6 }
-  root = lovr.math.newVec3(0, 1.5, -.5)
-  target = lovr.math.newVec3(1.0, 1.5, -.7)
-  control = lovr.math.newVec3(.5, 2, -.6)
+  boneLengths = { .3, .3 }
+  root = lovr.math.newVec3(-.2, 1.5, -.5)
+  target = lovr.math.newVec3(.2, 1.5, -.7)
+  control = lovr.math.newVec3(0, 1.8, -.6)
   pointSize = .04
   drags = {}
 end
@@ -55,11 +55,15 @@ function lovr.update(dt)
 end
 
 function lovr.draw()
+
+  -- Draw the joints and the control point
   lovr.graphics.setColor(0xff80ff)
   lovr.graphics.sphere(root, pointSize / 2)
   lovr.graphics.sphere(target, pointSize / 2)
+  lovr.graphics.setColor(0x80ffff)
   lovr.graphics.sphere(control, pointSize / 2)
 
+  -- Draw the hand
   lovr.graphics.setColor(0xffffff)
   for _, hand in ipairs({ 'left', 'right' }) do
     if lovr.headset.isTracked(hand) then

+ 0 - 0
examples/Debugging/RawInput/main.lua → examples/Debugging/Raw_Input/main.lua


+ 0 - 0
examples/Postprocessing/eye-chart-test-vintage-cc0.jpg → examples/Effects/Blur/eye-chart-test-vintage-cc0.jpg


+ 0 - 0
examples/Postprocessing/main.lua → examples/Effects/Blur/main.lua


+ 2 - 20
examples/Interaction/Hand_Tracking/main.lua

@@ -1,25 +1,7 @@
-function lovr.load()
-  lovr.graphics.setBackgroundColor(.2, 0, .4)
-  lovr.graphics.setShader(lovr.graphics.newShader('unlit', { flags = { animated = true } }))
-
-  models = {
-    left = lovr.headset.newModel('hand/left'),
-    right = lovr.headset.newModel('hand/right')
-  }
-end
-
 function lovr.draw()
   for _, hand in ipairs({ 'left', 'right' }) do
-    if models[hand] then
-      local skeleton, scale = lovr.headset.getSkeleton(hand)
-
-      if skeleton then
-        for i, bone in ipairs(skeleton) do
-          models[hand]:pose(i, unpack(bone))
-        end
-
-        models[hand]:draw(mat4(lovr.headset.getPose(hand)):scale(scale))
-      end
+    for _, joint in ipairs(lovr.headset.getSkeleton(hand) or {}) do
+      lovr.graphics.points(unpack(joint, 1, 3))
     end
   end
 end

+ 0 - 126
examples/Interaction/Index_Hands/knuckles.lua

@@ -1,126 +0,0 @@
--- Valve Knuckles Skeleton Indices
-Root = 1
-Wrist = 2
-Thumb0 = 3
-Thumb1 = 4
-Thumb2 = 5
-Thumb3 = 6
-IndexFinger0 = 7
-IndexFinger1 = 8
-IndexFinger2 = 9
-IndexFinger3 = 10
-IndexFinger4 = 11
-MiddleFinger0 = 12
-MiddleFinger1 = 13
-MiddleFinger2 = 14
-MiddleFinger3 = 15
-MiddleFinger4 = 16
-RingFinger0 = 17
-RingFinger1 = 18
-RingFinger2 = 19
-RingFinger3 = 20
-RingFinger4 = 21
-PinkyFinger0 = 22
-PinkyFinger1 = 23
-PinkyFinger2 = 24
-PinkyFinger3 = 25
-PinkyFinger4 = 26
-Aux_Thumb = 27
-Aux_IndexFinger = 28
-Aux_MiddleFinger = 29
-Aux_RingFinger = 30
-Aux_PinkyFinger = 31
-Count = 32
-
-local knuckles = {}
-
--- node to right Knuckles Skeleton
-knuckles.right_to_index = {
-  finger_thumb_r_end=Thumb3,
-  finger_thumb_2_r=Thumb2,
-  finger_thumb_1_r=Thumb1,
-  finger_thumb_0_r=Thumb0,
-
-  finger_index_r_end=IndexFinger4,
-  finger_index_2_r=IndexFinger3,
-  finger_index_1_r=IndexFinger2,
-  finger_index_0_r=IndexFinger1,
-  finger_index_meta_r=IndexFinger0,
-
-  finger_middle_r_end=MiddleFinger4,
-  finger_middle_2_r=MiddleFinger3,
-  finger_middle_1_r=MiddleFinger2,
-  finger_middle_0_r=MiddleFinger1,
-  finger_middle_meta_r=MiddleFinger0,
-
-  finger_ring_r_end=RingFinger4,
-  finger_ring_2_r=RingFinger3,
-  finger_ring_1_r=RingFinger2,
-  finger_ring_0_r=RingFinger1,
-  finger_ring_meta_r=RingFinger0,
-
-  finger_pinky_r_end=PinkyFinger4,
-  finger_pinky_2_r=PinkyFinger3,
-  finger_pinky_1_r=PinkyFinger2,
-  finger_pinky_0_r=PinkyFinger1,
-  finger_pinky_meta_r=PinkyFinger0,
-
-  wrist_r=Wrist,
-
-  finger_index_r_aux=Aux_IndexFinger,
-  finger_middle_r_aux=Aux_MiddleFinger,
-  finger_pinky_r_aux=Aux_PinkyFinger,
-  finger_ring_r_aux=Aux_RingFinger,
-  finger_thumb_r_aux=Aux_Thumb,
-
-  Root=Root
-}
-
--- node to left Knuckles Skeleton
-knuckles.left_to_index = {
-  finger_thumb_l_end=Thumb3,
-  finger_thumb_2_l=Thumb2,
-  finger_thumb_1_l=Thumb1,
-  finger_thumb_0_l=Thumb0,
-
-  finger_index_l_end=IndexFinger4,
-  finger_index_2_l=IndexFinger3,
-  finger_index_1_l=IndexFinger2,
-  finger_index_0_l=IndexFinger1,
-  finger_index_meta_l=IndexFinger0,
-
-  finger_middle_l_end=MiddleFinger4,
-  finger_middle_2_l=MiddleFinger3,
-  finger_middle_1_l=MiddleFinger2,
-  finger_middle_0_l=MiddleFinger1,
-  finger_middle_meta_l=MiddleFinger0,
-
-  finger_ring_l_end=RingFinger4,
-  finger_ring_2_l=RingFinger3,
-  finger_ring_1_l=RingFinger2,
-  finger_ring_0_l=RingFinger1,
-  finger_ring_meta_l=RingFinger0,
-
-  finger_pinky_l_end=PinkyFinger4,
-  finger_pinky_2_l=PinkyFinger3,
-  finger_pinky_1_l=PinkyFinger2,
-  finger_pinky_0_l=PinkyFinger1,
-  finger_pinky_meta_l=PinkyFinger0,
-
-  wrist_l=Wrist,
-
-  finger_index_l_aux=Aux_IndexFinger,
-  finger_middle_l_aux=Aux_MiddleFinger,
-  finger_pinky_l_aux=Aux_PinkyFinger,
-  finger_ring_l_aux=Aux_RingFinger,
-  finger_thumb_l_aux=Aux_Thumb,
-
-  Root=Root
-}
-
-knuckles.hand_to_index = {
-  right=knuckles.right_to_index,
-  left=knuckles.left_to_index
-}
-
-return knuckles

+ 0 - 79
examples/Interaction/Index_Hands/main.lua

@@ -1,79 +0,0 @@
--- load constants from file
-local knuckles = require 'knuckles'
-
-function setPoses(model, hand)
-  -- get hand pose skeleton from controller
-  pose_skeleton = lovr.headset.getSkeleton(hand)
-
-  -- check controller exists
-  if not (pose_skeleton == nil) then
-    -- go through the 28 bones in the vr_glove model
-    for i=1,28 do
-      -- get the name of the node from the model
-      node_name = model:getNodeName(i)
-      -- get table with name-to-skeleton-index values
-      hand_table = knuckles.hand_to_index[hand]
-      -- get skeleton index value from table
-      skeleton_index = hand_table[node_name]
-      -- get pose of respective node in skeleton
-      pose = pose_skeleton[skeleton_index]
-
-      -- check if the pose has been instantiated yet
-      if not (pose == nil) then
-        -- set pose of model bone from controller skeleton
-        model:pose(node_name, unpack(pose))
-      end
-    end
-  end
-end
-
-function lovr.load()
-  -- set grey background so we can see the gloves well
-  lovr.graphics.setBackgroundColor(.5, .5, .5)
-  
-  -- make a new shader with animated set true so we can see the moving model
-  shader = lovr.graphics.newShader('unlit', { flags = { animated = true } })
-
-  -- path for SteamVR resources and vr_glove models
-  local vr_glove_path = "C:\\Program Files (x86)\\Steam\\steamapps\\common\\SteamVR\\resources\\rendermodels\\vr_glove\\"
-  local right_model_file = vr_glove_path .. "vr_glove_right_model.glb"
-  local left_model_file = vr_glove_path .. "vr_glove_left_model.glb"
-
-  -- load right vr_glove model data
-  local f = assert(io.open(right_model_file, "rb"))
-  local right_model_data = f:read("*all")
-  f:close()
-
-  -- load left vr_glove model data
-  local f = assert(io.open(left_model_file, "rb"))
-  local left_model_data = f:read("*all")
-  f:close()
-
-  -- convert model data to blobs so we can pass it to newModel
-  local right_blob = lovr.data.newBlob(right_model_data, "right_blob")
-  local left_blob = lovr.data.newBlob(left_model_data, "left_blob")
-
-  -- create model objects to use
-  right_hand_model = lovr.graphics.newModel(right_blob)
-  left_hand_model = lovr.graphics.newModel(left_blob)
-end
-
-function lovr.draw()
-  -- set skin node poses in model
-  setPoses(right_hand_model, 'right')
-  setPoses(left_hand_model, 'left')
-
-  -- use out animated shader
-  lovr.graphics.setShader(shader)
-
-  -- draw right glove at controller position
-  x, y, z, ang, ax, ay, az = lovr.headset.getPose('right')
-  right_hand_model:draw(x, y, z, 1, ang, ax, ay, az)
-
-  -- draw left glove at controller position
-  x, y, z, ang, ax, ay, az = lovr.headset.getPose('left')
-  left_hand_model:draw(x, y, z, 1, ang, ax, ay, az)
-
-  -- clear shader
-  lovr.graphics.setShader()
-end

+ 2 - 2
examples/Custom_Mesh/main.lua → examples/Intro/Custom_Mesh/main.lua

@@ -14,7 +14,7 @@ local mesh1Program, mesh3Program, mesh4Program
 local gridSize = 8
 local gridSizeCubed = gridSize*gridSize*gridSize
 
--- This reproduces the simple shader from the Physics example, but in the vertex shader
+-- This reproduces a simple lighting shader, but in the vertex shader
 -- the mesh coordinate is run through a customized function first.
 -- Call this function with a string containing a glsl function preTransform()
 -- which maps world space coordinates to world space coordinates to construct a shader.
@@ -46,7 +46,7 @@ local animate = 0
 function lovr.load()
   lovr.graphics.setCullingEnabled(true)
 
-  -- This "standard" program is the same as the standard light shader from the other examples-- it does nothing.
+  -- This "standard" program is the same as the lighting shader from the other examples-- it does nothing.
   mesh1Program = makeShader("vec4 preTransform(vec4 v) { return v; }")
 
   -- This mesh is a single triangle

+ 0 - 0
examples/Custom_Mesh/shader.lua → examples/Intro/Custom_Mesh/shader.lua


+ 5 - 7
examples/Thread/main.lua → examples/Intro/Thread/main.lua

@@ -1,10 +1,9 @@
 function lovr.load()
   -- This holds the thread code
-  -- This must be wrapped with [[]] or "" to
-  -- allow the engine to run it as a .lua file
-  thread_code = [[
+  -- This must be wrapped with [[]] or '' to allow the engine to run it as Lua
+  threadCode = [[
     local lovr = { thread = require 'lovr.thread' }
-    local channel = lovr.thread.getChannel("test")
+    local channel = lovr.thread.getChannel('test')
     local x = 0
     while true do
       x = x + 1
@@ -15,9 +14,8 @@ function lovr.load()
   -- Create a new test channel
   channel = lovr.thread.getChannel('test')
 
-  -- Create a new thread called "thread" using
-  -- the code above
-  thread = lovr.thread.newThread(thread_code)
+  -- Create a new thread called 'thread' using the code above
+  thread = lovr.thread.newThread(threadCode)
 
   -- Start the thread
   thread:start()

+ 4 - 4
examples/PBR_Materials/conf.lua → examples/Lighting/PBR_Materials/conf.lua

@@ -1,4 +1,4 @@
-function lovr.conf(t)
-  t.window.msaa = 4
-  t.gammacorrect = lovr.getOS() ~= 'Web'
-end
+function lovr.conf(t)
+  t.window.msaa = 4
+  t.gammacorrect = lovr.getOS() ~= 'Web'
+end

+ 0 - 0
examples/PBR_Materials/env/m0_nx.png → examples/Lighting/PBR_Materials/env/m0_nx.png


+ 0 - 0
examples/PBR_Materials/env/m0_ny.png → examples/Lighting/PBR_Materials/env/m0_ny.png


+ 0 - 0
examples/PBR_Materials/env/m0_nz.png → examples/Lighting/PBR_Materials/env/m0_nz.png


+ 0 - 0
examples/PBR_Materials/env/m0_px.png → examples/Lighting/PBR_Materials/env/m0_px.png


+ 0 - 0
examples/PBR_Materials/env/m0_py.png → examples/Lighting/PBR_Materials/env/m0_py.png


+ 0 - 0
examples/PBR_Materials/env/m0_pz.png → examples/Lighting/PBR_Materials/env/m0_pz.png


+ 0 - 0
examples/PBR_Materials/env/m1_nx.png → examples/Lighting/PBR_Materials/env/m1_nx.png


+ 0 - 0
examples/PBR_Materials/env/m1_ny.png → examples/Lighting/PBR_Materials/env/m1_ny.png


+ 0 - 0
examples/PBR_Materials/env/m1_nz.png → examples/Lighting/PBR_Materials/env/m1_nz.png


+ 0 - 0
examples/PBR_Materials/env/m1_px.png → examples/Lighting/PBR_Materials/env/m1_px.png


+ 0 - 0
examples/PBR_Materials/env/m1_py.png → examples/Lighting/PBR_Materials/env/m1_py.png


+ 0 - 0
examples/PBR_Materials/env/m1_pz.png → examples/Lighting/PBR_Materials/env/m1_pz.png


+ 0 - 0
examples/PBR_Materials/env/m2_nx.png → examples/Lighting/PBR_Materials/env/m2_nx.png


+ 0 - 0
examples/PBR_Materials/env/m2_ny.png → examples/Lighting/PBR_Materials/env/m2_ny.png


+ 0 - 0
examples/PBR_Materials/env/m2_nz.png → examples/Lighting/PBR_Materials/env/m2_nz.png


+ 0 - 0
examples/PBR_Materials/env/m2_px.png → examples/Lighting/PBR_Materials/env/m2_px.png


+ 0 - 0
examples/PBR_Materials/env/m2_py.png → examples/Lighting/PBR_Materials/env/m2_py.png


+ 0 - 0
examples/PBR_Materials/env/m2_pz.png → examples/Lighting/PBR_Materials/env/m2_pz.png


+ 0 - 0
examples/PBR_Materials/env/m3_nx.png → examples/Lighting/PBR_Materials/env/m3_nx.png


+ 0 - 0
examples/PBR_Materials/env/m3_ny.png → examples/Lighting/PBR_Materials/env/m3_ny.png


+ 0 - 0
examples/PBR_Materials/env/m3_nz.png → examples/Lighting/PBR_Materials/env/m3_nz.png


+ 0 - 0
examples/PBR_Materials/env/m3_px.png → examples/Lighting/PBR_Materials/env/m3_px.png


+ 0 - 0
examples/PBR_Materials/env/m3_py.png → examples/Lighting/PBR_Materials/env/m3_py.png


+ 0 - 0
examples/PBR_Materials/env/m3_pz.png → examples/Lighting/PBR_Materials/env/m3_pz.png


+ 0 - 0
examples/PBR_Materials/env/m4_nx.png → examples/Lighting/PBR_Materials/env/m4_nx.png


+ 0 - 0
examples/PBR_Materials/env/m4_ny.png → examples/Lighting/PBR_Materials/env/m4_ny.png


+ 0 - 0
examples/PBR_Materials/env/m4_nz.png → examples/Lighting/PBR_Materials/env/m4_nz.png


+ 0 - 0
examples/PBR_Materials/env/m4_px.png → examples/Lighting/PBR_Materials/env/m4_px.png


+ 0 - 0
examples/PBR_Materials/env/m4_py.png → examples/Lighting/PBR_Materials/env/m4_py.png


+ 0 - 0
examples/PBR_Materials/env/m4_pz.png → examples/Lighting/PBR_Materials/env/m4_pz.png


+ 0 - 0
examples/PBR_Materials/env/m5_nx.png → examples/Lighting/PBR_Materials/env/m5_nx.png


+ 0 - 0
examples/PBR_Materials/env/m5_ny.png → examples/Lighting/PBR_Materials/env/m5_ny.png


+ 0 - 0
examples/PBR_Materials/env/m5_nz.png → examples/Lighting/PBR_Materials/env/m5_nz.png


+ 0 - 0
examples/PBR_Materials/env/m5_px.png → examples/Lighting/PBR_Materials/env/m5_px.png


+ 0 - 0
examples/PBR_Materials/env/m5_py.png → examples/Lighting/PBR_Materials/env/m5_py.png


+ 0 - 0
examples/PBR_Materials/env/m5_pz.png → examples/Lighting/PBR_Materials/env/m5_pz.png


+ 0 - 0
examples/PBR_Materials/env/m6_nx.png → examples/Lighting/PBR_Materials/env/m6_nx.png


+ 0 - 0
examples/PBR_Materials/env/m6_ny.png → examples/Lighting/PBR_Materials/env/m6_ny.png


+ 0 - 0
examples/PBR_Materials/env/m6_nz.png → examples/Lighting/PBR_Materials/env/m6_nz.png


+ 0 - 0
examples/PBR_Materials/env/m6_px.png → examples/Lighting/PBR_Materials/env/m6_px.png


+ 0 - 0
examples/PBR_Materials/env/m6_py.png → examples/Lighting/PBR_Materials/env/m6_py.png


+ 0 - 0
examples/PBR_Materials/env/m6_pz.png → examples/Lighting/PBR_Materials/env/m6_pz.png


+ 0 - 0
examples/PBR_Materials/env/m7_nx.png → examples/Lighting/PBR_Materials/env/m7_nx.png


+ 0 - 0
examples/PBR_Materials/env/m7_ny.png → examples/Lighting/PBR_Materials/env/m7_ny.png


+ 0 - 0
examples/PBR_Materials/env/m7_nz.png → examples/Lighting/PBR_Materials/env/m7_nz.png


+ 0 - 0
examples/PBR_Materials/env/m7_px.png → examples/Lighting/PBR_Materials/env/m7_px.png


+ 0 - 0
examples/PBR_Materials/env/m7_py.png → examples/Lighting/PBR_Materials/env/m7_py.png


+ 0 - 0
examples/PBR_Materials/env/m7_pz.png → examples/Lighting/PBR_Materials/env/m7_pz.png


+ 0 - 0
examples/PBR_Materials/env/m8_nx.png → examples/Lighting/PBR_Materials/env/m8_nx.png


+ 0 - 0
examples/PBR_Materials/env/m8_ny.png → examples/Lighting/PBR_Materials/env/m8_ny.png


+ 0 - 0
examples/PBR_Materials/env/m8_nz.png → examples/Lighting/PBR_Materials/env/m8_nz.png


+ 0 - 0
examples/PBR_Materials/env/m8_px.png → examples/Lighting/PBR_Materials/env/m8_px.png


+ 0 - 0
examples/PBR_Materials/env/m8_py.png → examples/Lighting/PBR_Materials/env/m8_py.png


+ 0 - 0
examples/PBR_Materials/env/m8_pz.png → examples/Lighting/PBR_Materials/env/m8_pz.png


+ 0 - 0
examples/PBR_Materials/env/nx.png → examples/Lighting/PBR_Materials/env/nx.png


+ 0 - 0
examples/PBR_Materials/env/ny.png → examples/Lighting/PBR_Materials/env/ny.png


+ 0 - 0
examples/PBR_Materials/env/nz.png → examples/Lighting/PBR_Materials/env/nz.png


+ 0 - 0
examples/PBR_Materials/env/px.png → examples/Lighting/PBR_Materials/env/px.png


+ 0 - 0
examples/PBR_Materials/env/py.png → examples/Lighting/PBR_Materials/env/py.png


+ 0 - 0
examples/PBR_Materials/env/pz.png → examples/Lighting/PBR_Materials/env/pz.png


+ 11 - 11
examples/PBR_Materials/env/sphericalHarmonics.lua → examples/Lighting/PBR_Materials/env/sphericalHarmonics.lua

@@ -1,11 +1,11 @@
-return {
-  { 0.375931705762083,  0.358656319030575,  0.308453761543167},
-  { 0.354636762547562,  0.351933427534857,  0.346643193593808},
-  { 0.213680467209818,  0.208764154253828,  0.185992646424045},
-  { 0.094452764555327,  0.087423796528460,  0.078299527458197},
-  { 0.129722100892800,  0.126512402478568,  0.121503396241859},
-  { 0.236712791137010,  0.233931621210715,  0.222236168254197},
-  {-0.020735133497873, -0.020241604203896, -0.018707677741929},
-  {-0.073279787762454, -0.073091939150411, -0.068554941014884},
-  {-0.102740171078351, -0.099605437423063, -0.094746265045717}
-}
+return {
+  { 0.375931705762083,  0.358656319030575,  0.308453761543167},
+  { 0.354636762547562,  0.351933427534857,  0.346643193593808},
+  { 0.213680467209818,  0.208764154253828,  0.185992646424045},
+  { 0.094452764555327,  0.087423796528460,  0.078299527458197},
+  { 0.129722100892800,  0.126512402478568,  0.121503396241859},
+  { 0.236712791137010,  0.233931621210715,  0.222236168254197},
+  {-0.020735133497873, -0.020241604203896, -0.018707677741929},
+  {-0.073279787762454, -0.073091939150411, -0.068554941014884},
+  {-0.102740171078351, -0.099605437423063, -0.094746265045717}
+}

+ 0 - 0
examples/PBR_Materials/helmet/DamagedHelmet.glb → examples/Lighting/PBR_Materials/helmet/DamagedHelmet.glb


+ 0 - 0
examples/PBR_Materials/main.lua → examples/Lighting/PBR_Materials/main.lua


+ 0 - 33
examples/Microphones/main.lua

@@ -1,33 +0,0 @@
--- Measures amplitude of microphone over time and uses it to scale a circle
-
-amplitude = 0
-
-function lovr.load()
-  name = lovr.audio.getMicrophoneNames()[1]
-  assert(name, 'No microphone found!')
-  microphone = lovr.audio.newMicrophone(name)
-  microphone:startRecording()
-  print('Recording from ' .. name)
-end
-
-function lovr.update(dt)
-  if microphone:isRecording() then
-    local soundData = microphone:getData()
-
-    if soundData then
-      local samples = soundData:getSampleCount()
-      local totalAmplitude = 0
-
-      for i = 0, samples - 1 do
-        totalAmplitude = totalAmplitude + math.abs(soundData:getSample(i))
-      end
-
-      amplitude = amplitude + (totalAmplitude / samples - amplitude) * (1 - .05 ^ dt)
-    end
-  end
-end
-
-function lovr.draw()
-  lovr.graphics.setColor(1, 1, 1, .5)
-  lovr.graphics.circle('line', 0, 1.7, -1, amplitude * 20 + .01)
-end

+ 0 - 0
examples/Physics/DrawingColliders/main.lua → examples/Physics/Drawing_Colliders/main.lua


+ 0 - 0
examples/Physics/HandPhysics/main.lua → examples/Physics/Hand_Physics/main.lua


+ 0 - 0
examples/Physics/NewtonsCradle/main.lua → examples/Physics/Newtons_Cradle/main.lua


+ 0 - 0
examples/Physics/SaloonDoor/main.lua → examples/Physics/Saloon_Door/main.lua


+ 0 - 0
examples/Physics/WreckingBall/main.lua → examples/Physics/Wrecking_Ball/main.lua


+ 0 - 0
examples/Physics/ZipLine/main.lua → examples/Physics/Zip_Line/main.lua


+ 54 - 54
examples/Spectator_Camera/main.lua → examples/UI/Spectator_Camera/main.lua

@@ -1,54 +1,54 @@
-function lovr.load()
-  lovr.graphics.setBackgroundColor(.7, .7, .7)
-
-  -- Precompute camera transform (could also be attached to a controller)
-  local x, y, z = -3, 3, 3
-  camera = lovr.math.newMat4():lookAt(vec3(x, y, z), vec3(0, 0, 0))
-  view = lovr.math.newMat4(camera):invert()
-end
-
-local renderScene
-
--- Render to the mirror window using the camera perspective
-function lovr.mirror()
-  lovr.graphics.clear()
-  lovr.graphics.origin()
-  lovr.graphics.transform(view)
-  renderScene(true)
-end
-
--- Render to the headset using the headset perspective
-function lovr.draw()
-  renderScene(false)
-end
-
-renderScene = function(isCamera)
-  local t = lovr.timer.getTime()
-
-  -- Draw the ground
-  lovr.graphics.setColor(.15, .15, .15)
-  lovr.graphics.plane('fill', 0, 0, 0, 4, 4, math.pi / 2, 1, 0, 0)
-
-  -- Draw some cubes
-  lovr.graphics.setColor(1, 0, 0)
-  for i = -3, 3 do
-    local ax, ay, az = lovr.math.noise(i + t), lovr.math.noise(i + t * .3), lovr.math.noise(i + t * .7)
-    lovr.graphics.cube('fill', i, 2 + math.sin(i + t), -1, .2, (t * .1) ^ 2 * math.pi, ax, ay, az)
-  end
-
-  -- Draw the headset or the camera, depending on the viewer
-  if isCamera then
-    lovr.graphics.setColor(1, 1, 1)
-    local x, y, z, angle, ax, ay, az = lovr.headset.getPose()
-    lovr.graphics.cube('fill', x, y, z, .2, angle, ax, ay, az)
-  else
-    lovr.graphics.setColor(1, 1, 1)
-    lovr.graphics.cube('fill', camera)
-  end
-
-  -- Always draw the controllers
-  for i, hand in ipairs(lovr.headset.getHands()) do
-    local x, y, z, angle, ax, ay, az = lovr.headset.getPose(hand)
-    lovr.graphics.cube('fill', x, y, z, .06, angle, ax, ay, az)
-  end
-end
+function lovr.load()
+  lovr.graphics.setBackgroundColor(.7, .7, .7)
+
+  -- Precompute camera transform (could also be attached to a controller)
+  local x, y, z = -3, 3, 3
+  camera = lovr.math.newMat4():lookAt(vec3(x, y, z), vec3(0, 0, 0))
+  view = lovr.math.newMat4(camera):invert()
+end
+
+local renderScene
+
+-- Render to the mirror window using the camera perspective
+function lovr.mirror()
+  lovr.graphics.clear()
+  lovr.graphics.origin()
+  lovr.graphics.transform(view)
+  renderScene(true)
+end
+
+-- Render to the headset using the headset perspective
+function lovr.draw()
+  renderScene(false)
+end
+
+renderScene = function(isCamera)
+  local t = lovr.timer.getTime()
+
+  -- Draw the ground
+  lovr.graphics.setColor(.15, .15, .15)
+  lovr.graphics.plane('fill', 0, 0, 0, 4, 4, math.pi / 2, 1, 0, 0)
+
+  -- Draw some cubes
+  lovr.graphics.setColor(1, 0, 0)
+  for i = -3, 3 do
+    local ax, ay, az = lovr.math.noise(i + t), lovr.math.noise(i + t * .3), lovr.math.noise(i + t * .7)
+    lovr.graphics.cube('fill', i, 2 + math.sin(i + t), -1, .2, (t * .1) ^ 2 * math.pi, ax, ay, az)
+  end
+
+  -- Draw the headset or the camera, depending on the viewer
+  if isCamera then
+    lovr.graphics.setColor(1, 1, 1)
+    local x, y, z, angle, ax, ay, az = lovr.headset.getPose()
+    lovr.graphics.cube('fill', x, y, z, .2, angle, ax, ay, az)
+  else
+    lovr.graphics.setColor(1, 1, 1)
+    lovr.graphics.cube('fill', camera)
+  end
+
+  -- Always draw the controllers
+  for i, hand in ipairs(lovr.headset.getHands()) do
+    local x, y, z, angle, ax, ay, az = lovr.headset.getPose(hand)
+    lovr.graphics.cube('fill', x, y, z, .06, angle, ax, ay, az)
+  end
+end

+ 2 - 1
examples/Hud/main.lua → examples/UI/Window_HUD/main.lua

@@ -114,7 +114,8 @@ function lovr.mirror()
 	lovr.graphics.setShader(nil)
 	lovr.graphics.setDepthTest(nil)
 	lovr.graphics.origin()
-	lovr.graphics.setProjection(matrix) -- Switch to screen space coordinates
+  lovr.graphics.setViewPose(1, mat4())
+	lovr.graphics.setProjection(1, matrix) -- Switch to screen space coordinates
 	drawGrid()
 
 	-- Draw instructions

+ 115 - 115
examples/Hud/mouse.lua → examples/UI/Window_HUD/mouse.lua

@@ -1,116 +1,116 @@
--- Source: https://github.com/bjornbytes/lovr-mouse/
--- Source: c2f704db2463e05c453580b80b26200d5dd508a9
-
-local ffi = require 'ffi'
-local C = ffi.os == 'Windows' and ffi.load('glfw3') or ffi.C
-
-ffi.cdef [[
-  typedef enum {
-    GLFW_CURSOR = 0x00033001,
-    GLFW_CURSOR_NORMAL = 0x00034001,
-    GLFW_CURSOR_HIDDEN = 0x00034002,
-    GLFW_CURSOR_DISABLED = 0x00034003
-  } Constants;
-
-  typedef struct GLFWwindow GLFWwindow;
-  typedef void(*GLFWmousebuttonfun)(GLFWwindow*, int, int, int);
-  typedef void(*GLFWcursorposfun)(GLFWwindow*, double, double);
-  typedef void(*GLFWscrollfun)(GLFWwindow*, double, double);
-
-  GLFWwindow* glfwGetCurrentContext(void);
-  void glfwGetInputMode(GLFWwindow* window, int mode);
-  void glfwSetInputMode(GLFWwindow* window, int mode, int value);
-  void glfwGetCursorPos(GLFWwindow* window, double* x, double* y);
-  void glfwSetCursorPos(GLFWwindow* window, double x, double y);
-  int glfwGetMouseButton(GLFWwindow* window, int button);
-  void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
-  GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun callback);
-  GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun callback);
-  GLFWcursorposfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun callback);
-]]
-
-local window = C.glfwGetCurrentContext()
-
-local mouse = {}
-
--- Lovr uses framebuffer scale for everything, but glfw uses window scale for events.
--- It is necessary to convert between the two at all boundaries.
-function mouse.getScale()
-  local x, _ = ffi.new('int[1]'), ffi.new('int[1]')
-  C.glfwGetWindowSize(window, x, _)
-  return lovr.graphics.getWidth()/x[0]
-end
-
-function mouse.getX()
-  local x = ffi.new('double[1]')
-  C.glfwGetCursorPos(window, x, nil)
-  return x[0] * mouse.getScale()
-end
-
-function mouse.getY()
-  local y = ffi.new('double[1]')
-  C.glfwGetCursorPos(window, nil, y)
-  return y[0] * mouse.getScale()
-end
-
-function mouse.getPosition()
-  local x, y = ffi.new('double[1]'), ffi.new('double[1]')
-  local scale = mouse.getScale()
-  C.glfwGetCursorPos(window, x, y)
-  return x[0] * scale, y[0] * scale
-end
-
-function mouse.setX(x)
-  local y = mouse.getY()
-  local scale = mouse.getScale()
-  C.glfwSetCursorPos(window, x/scale, y/scale)
-end
-
-function mouse.setY(y)
-  local x = mouse.getX()
-  C.glfwSetCursorPos(window, x/scale, y/scale)
-end
-
-function mouse.setPosition(x, y)
-  C.glfwSetCursorPos(window, x/scale, y/scale)
-end
-
-function mouse.isDown(button, ...)
-  if not button then return false end
-  return C.glfwGetMouseButton(window, button - 1) > 0 or mouse.isDown(...)
-end
-
-function mouse.getRelativeMode()
-  return C.glfwGetInputMode(window, C.GLFW_CURSOR) == C.GLFW_CURSOR_DISABLED
-end
-
-function mouse.setRelativeMode(enable)
-  C.glfwSetInputMode(window, C.GLFW_CURSOR, enable and C.GLFW_CURSOR_DISABLED or C.GLFW_CURSOR_NORMAL)
-end
-
-C.glfwSetMouseButtonCallback(window, function(target, button, action, mods)
-  if target == window then
-    local x, y = mouse.getPosition()
-    lovr.event.push(action > 0 and 'mousepressed' or 'mousereleased', x, y, button + 1, false)
-  end
-end)
-
-local px, py = mouse.getPosition()
-C.glfwSetCursorPosCallback(window, function(target, x, y)
-  if target == window then
-    local scale = mouse.getScale()
-    x = x * scale
-    y = y * scale
-    lovr.event.push('mousemoved', x, y, x - px, y - py, false)
-    px, py = x, y
-  end
-end)
-
-C.glfwSetScrollCallback(window, function(target, x, y)
-  if target == window then
-    local scale = mouse.getScale()
-    lovr.event.push('wheelmoved', x*scale, y*scale)
-  end
-end)
-
+-- Source: https://github.com/bjornbytes/lovr-mouse/
+-- Source: c2f704db2463e05c453580b80b26200d5dd508a9
+
+local ffi = require 'ffi'
+local C = ffi.os == 'Windows' and ffi.load('glfw3') or ffi.C
+
+ffi.cdef [[
+  typedef enum {
+    GLFW_CURSOR = 0x00033001,
+    GLFW_CURSOR_NORMAL = 0x00034001,
+    GLFW_CURSOR_HIDDEN = 0x00034002,
+    GLFW_CURSOR_DISABLED = 0x00034003
+  } Constants;
+
+  typedef struct GLFWwindow GLFWwindow;
+  typedef void(*GLFWmousebuttonfun)(GLFWwindow*, int, int, int);
+  typedef void(*GLFWcursorposfun)(GLFWwindow*, double, double);
+  typedef void(*GLFWscrollfun)(GLFWwindow*, double, double);
+
+  GLFWwindow* glfwGetCurrentContext(void);
+  void glfwGetInputMode(GLFWwindow* window, int mode);
+  void glfwSetInputMode(GLFWwindow* window, int mode, int value);
+  void glfwGetCursorPos(GLFWwindow* window, double* x, double* y);
+  void glfwSetCursorPos(GLFWwindow* window, double x, double y);
+  int glfwGetMouseButton(GLFWwindow* window, int button);
+  void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
+  GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun callback);
+  GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun callback);
+  GLFWcursorposfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun callback);
+]]
+
+local window = C.glfwGetCurrentContext()
+
+local mouse = {}
+
+-- Lovr uses framebuffer scale for everything, but glfw uses window scale for events.
+-- It is necessary to convert between the two at all boundaries.
+function mouse.getScale()
+  local x, _ = ffi.new('int[1]'), ffi.new('int[1]')
+  C.glfwGetWindowSize(window, x, _)
+  return lovr.graphics.getWidth()/x[0]
+end
+
+function mouse.getX()
+  local x = ffi.new('double[1]')
+  C.glfwGetCursorPos(window, x, nil)
+  return x[0] * mouse.getScale()
+end
+
+function mouse.getY()
+  local y = ffi.new('double[1]')
+  C.glfwGetCursorPos(window, nil, y)
+  return y[0] * mouse.getScale()
+end
+
+function mouse.getPosition()
+  local x, y = ffi.new('double[1]'), ffi.new('double[1]')
+  local scale = mouse.getScale()
+  C.glfwGetCursorPos(window, x, y)
+  return x[0] * scale, y[0] * scale
+end
+
+function mouse.setX(x)
+  local y = mouse.getY()
+  local scale = mouse.getScale()
+  C.glfwSetCursorPos(window, x/scale, y/scale)
+end
+
+function mouse.setY(y)
+  local x = mouse.getX()
+  C.glfwSetCursorPos(window, x/scale, y/scale)
+end
+
+function mouse.setPosition(x, y)
+  C.glfwSetCursorPos(window, x/scale, y/scale)
+end
+
+function mouse.isDown(button, ...)
+  if not button then return false end
+  return C.glfwGetMouseButton(window, button - 1) > 0 or mouse.isDown(...)
+end
+
+function mouse.getRelativeMode()
+  return C.glfwGetInputMode(window, C.GLFW_CURSOR) == C.GLFW_CURSOR_DISABLED
+end
+
+function mouse.setRelativeMode(enable)
+  C.glfwSetInputMode(window, C.GLFW_CURSOR, enable and C.GLFW_CURSOR_DISABLED or C.GLFW_CURSOR_NORMAL)
+end
+
+C.glfwSetMouseButtonCallback(window, function(target, button, action, mods)
+  if target == window then
+    local x, y = mouse.getPosition()
+    lovr.event.push(action > 0 and 'mousepressed' or 'mousereleased', x, y, button + 1, false)
+  end
+end)
+
+local px, py = mouse.getPosition()
+C.glfwSetCursorPosCallback(window, function(target, x, y)
+  if target == window then
+    local scale = mouse.getScale()
+    x = x * scale
+    y = y * scale
+    lovr.event.push('mousemoved', x, y, x - px, y - py, false)
+    px, py = x, y
+  end
+end)
+
+C.glfwSetScrollCallback(window, function(target, x, y)
+  if target == window then
+    local scale = mouse.getScale()
+    lovr.event.push('wheelmoved', x*scale, y*scale)
+  end
+end)
+
 return mouse

+ 39 - 39
examples/Hud/shader.lua → examples/UI/Window_HUD/shader.lua

@@ -1,39 +1,39 @@
-return lovr.graphics.newShader([[
-out vec3 lightDirection;
-out vec3 normalDirection;
-
-vec3 lightPosition = vec3(0, 10, 3);
-
-vec4 position(mat4 projection, mat4 transform, vec4 vertex) {
-  vec4 vVertex = transform * vec4(lovrPosition, 1.);
-  vec4 vLight = lovrView * vec4(lightPosition, 1.);
-
-  lightDirection = normalize(vec3(vLight - vVertex));
-  normalDirection = normalize(lovrNormalMatrix * lovrNormal);
-
-  return projection * transform * vertex;
-}
-]], [[
-in vec3 lightDirection;
-in vec3 normalDirection;
-
-vec3 cAmbient = vec3(.25);
-vec3 cDiffuse = vec3(.75);
-vec3 cSpecular = vec3(.35);
-
-vec4 color(vec4 graphicsColor, sampler2D image, vec2 uv) {
-  float diffuse = max(dot(normalDirection, lightDirection), 0.);
-  float specular = 0.;
-
-  if (diffuse > 0.) {
-    vec3 r = reflect(lightDirection, normalDirection);
-    vec3 viewDirection = normalize(-vec3(gl_FragCoord));
-
-    float specularAngle = max(dot(r, viewDirection), 0.);
-    specular = pow(specularAngle, 5.);
-  }
-
-  vec3 cFinal = pow(clamp(vec3(diffuse) * cDiffuse + vec3(specular) * cSpecular, cAmbient, vec3(1.)), vec3(.4545));
-  return vec4(cFinal, 1.) * graphicsColor * texture(image, uv);
-}
-]])
+return lovr.graphics.newShader([[
+out vec3 lightDirection;
+out vec3 normalDirection;
+
+vec3 lightPosition = vec3(0, 10, 3);
+
+vec4 position(mat4 projection, mat4 transform, vec4 vertex) {
+  vec4 vVertex = transform * vec4(lovrPosition, 1.);
+  vec4 vLight = lovrView * vec4(lightPosition, 1.);
+
+  lightDirection = normalize(vec3(vLight - vVertex));
+  normalDirection = normalize(lovrNormalMatrix * lovrNormal);
+
+  return projection * transform * vertex;
+}
+]], [[
+in vec3 lightDirection;
+in vec3 normalDirection;
+
+vec3 cAmbient = vec3(.25);
+vec3 cDiffuse = vec3(.75);
+vec3 cSpecular = vec3(.35);
+
+vec4 color(vec4 graphicsColor, sampler2D image, vec2 uv) {
+  float diffuse = max(dot(normalDirection, lightDirection), 0.);
+  float specular = 0.;
+
+  if (diffuse > 0.) {
+    vec3 r = reflect(lightDirection, normalDirection);
+    vec3 viewDirection = normalize(-vec3(gl_FragCoord));
+
+    float specularAngle = max(dot(r, viewDirection), 0.);
+    specular = pow(specularAngle, 5.);
+  }
+
+  vec3 cFinal = pow(clamp(vec3(diffuse) * cDiffuse + vec3(specular) * cSpecular, cAmbient, vec3(1.)), vec3(.4545));
+  return vec4(cFinal, 1.) * graphicsColor * texture(image, uv);
+}
+]])

+ 15 - 13
examples/init.lua

@@ -5,6 +5,8 @@ return {
   'Intro/3D_Model',
   'Intro/360_Photo',
   'Intro/Tracked_Hands',
+  'Intro/Thread',
+  'Intro/Custom_Mesh',
   'Interaction/Pointer',
   'Interaction/Pointer_UI',
   'Interaction/Physics_Pointer',
@@ -13,22 +15,22 @@ return {
   'Interaction/Hand_Tracking',
   'Environment/Grid',
   'Environment/Skybox',
+  'Lighting/Cel_Shading',
+  'Lighting/PBR_Materials',
   'Animation/Playback',
   'Animation/2_Bone_IK',
   'Physics/Boxes',
-  'Physics/DrawingColliders',
-  'Physics/HandPhysics',
-  'Physics/NewtonsCradle',
-  'Physics/SaloonDoor',
-  'Physics/WreckingBall',
-  'Physics/ZipLine',
-  'Custom_Mesh',
-  'PBR_Materials',
-  'Postprocessing',
-  'Spectator_Camera',
-  'Microphones',
-  'Thread',
+  'Physics/Drawing_Colliders',
+  'Physics/Hand_Physics',
+  'Physics/Newtons_Cradle',
+  'Physics/Saloon_Door',
+  'Physics/Wrecking_Ball',
+  'Physics/Zip_Line',
+  'Effects/Blur',
+  'UI/Spectator_Camera',
+  'UI/Window_HUD',
   'Optimization/Instancing',
   'Optimization/Mask',
-  'Debugging/FPS_Controls'
+  'Debugging/FPS_Controls',
+  'Debugging/Raw_Input'
 }