Adjusting Sprite Cards to Counter Projection

?

?# Keyboard Navigation

## Global Keys

[, < / ], > Jump to previous / next episode

W, K, P / S, J, N Jump to previous / next timestamp

t / T Toggle theatre / SUPERtheatre mode

V Revert filter to original state Y Select link (requires manual Ctrl-c)## Menu toggling

q Quotes
r References
f Filter
y Link
c Credits
## In-Menu and Index Controls

## Quotes and References Menus and Index

Enter Jump to timestamp

## Quotes, References and Credits Menus

o Open URL (in new tab)
## Filter Menu

x, Space Toggle category and focus next

X, ShiftSpace Toggle category and focus previous

v Invert topics / media as per focus## Filter and Link Menus

z Toggle filter / linking mode
## Credits Menu

Enter Open URL (in new tab)

W, K, P / S, J, N Jump to previous / next timestamp

t / T Toggle theatre / SUPERtheatre mode

V Revert filter to original state Y Select link (requires manual Ctrl-c)

a

w

s

s

d

h
j
k
l

←

↑

↓

↓

→

Esc Close menu / unfocus timestamp

X, ShiftSpace Toggle category and focus previous

v Invert topics / media as per focus

⏫

Previous: 'Enabling the OpenGL Depth Buffer'

⏫

0:02Recap and set the stage for the day

0:02Recap and set the stage for the day

0:02Recap and set the stage for the day

1:07handmade_math.h: Make PerspectiveProjection() set the near clip plane to a positive value and perform some test multiplications

1:07handmade_math.h: Make PerspectiveProjection() set the near clip plane to a positive value and perform some test multiplications

3:58Step into PerspectiveProjection() and inspect Test0 and Test1

3:58Step into PerspectiveProjection() and inspect Test0 and Test1

3:58Step into PerspectiveProjection() and inspect Test0 and Test1

6:42Blackboard: Check our clip plane equations

6:42Blackboard: Check our clip plane equations

6:42Blackboard: Check our clip plane equations

12:29handmade_math.h: Swap the perspective and non-perspective code in PerspectiveProjection(), step into it and inspect Test0 and Test1 again

12:29handmade_math.h: Swap the perspective and non-perspective code in PerspectiveProjection(), step into it and inspect Test0 and Test1 again

16:42Blackboard: Solving for d and e

16:42Blackboard: Solving for d and e

16:42Blackboard: Solving for d and e

22:04handmade_math.h: Make PerspectiveProjection() compute Test0 and Test1 using negated n and f, step into it and inspect them again

22:04handmade_math.h: Make PerspectiveProjection() compute Test0 and Test1 using negated n and f, step into it and inspect them again

23:37handmade_math.h: Switch PerspectiveProjection() to use the perspective correct equation, step in and inspect the Test0 and Test1

23:37handmade_math.h: Switch PerspectiveProjection() to use the perspective correct equation, step in and inspect the Test0 and Test1

24:42Blackboard: Checking the math for the perspective correct terms

24:42Blackboard: Checking the math for the perspective correct terms

24:42Blackboard: Checking the math for the perspective correct terms

33:32handmade_math.h: Simplify the d term for the perspective correct equation

33:32handmade_math.h: Simplify the d term for the perspective correct equation

33:32handmade_math.h: Simplify the d term for the perspective correct equation

34:43Blackboard: Solving for d and e in the perspective correct clip plane equations

34:43Blackboard: Solving for d and e in the perspective correct clip plane equations

34:43Blackboard: Solving for d and e in the perspective correct clip plane equations

38:51handmade_platform.h: Rename w to __ in the v3 union

38:51handmade_platform.h: Rename w to __ in the v3 union

38:51handmade_platform.h: Rename w to __ in the v3 union

40:48Step into PerspectiveProjection() and inspect Test0 and Test1

40:48Step into PerspectiveProjection() and inspect Test0 and Test1

40:48Step into PerspectiveProjection() and inspect Test0 and Test1

42:06Run the game to see that we're back in business

42:06Run the game to see that we're back in business

42:06Run the game to see that we're back in business

43:30handmade_render_group.cpp: Make PushBitmap() tilt upright sprites and run the game

43:30handmade_render_group.cpp: Make PushBitmap() tilt upright sprites and run the game

43:30handmade_render_group.cpp: Make PushBitmap() tilt upright sprites and run the game

44:40Reflect on our unwitting correctness

44:40Reflect on our unwitting correctness

44:40Reflect on our unwitting correctness

47:27Blackboard: Sprite Cards

47:27Blackboard: Sprite Cards

47:27Blackboard: Sprite Cards

51:24Run the game to demo the squatness of the trees

51:24Run the game to demo the squatness of the trees

51:24Run the game to demo the squatness of the trees

53:41Blackboard: Producing the sprites' depth and height using the camera's relative position

53:41Blackboard: Producing the sprites' depth and height using the camera's relative position

53:41Blackboard: Producing the sprites' depth and height using the camera's relative position

55:18"Watch this point"^{α}

55:18"Watch this point"^{α}

55:18"Watch this point"^{α}

59:14Blackboard: Approaching this problem using ray intersections

59:14Blackboard: Approaching this problem using ray intersections

59:14Blackboard: Approaching this problem using ray intersections

1:03:08Blackboard: Solving for ray intersects ray

1:03:08Blackboard: Solving for ray intersects ray

1:03:08Blackboard: Solving for ray intersects ray

1:09:02Blackboard: Simplifying this down

1:09:02Blackboard: Simplifying this down

1:09:02Blackboard: Simplifying this down

1:12:56Blackboard: Handling the case when the vectors are parallel

1:12:56Blackboard: Handling the case when the vectors are parallel

1:12:56Blackboard: Handling the case when the vectors are parallel

1:20:13Blackboard: Determining the conditions under which this equation is unsolvable

1:20:13Blackboard: Determining the conditions under which this equation is unsolvable

1:20:13Blackboard: Determining the conditions under which this equation is unsolvable

1:23:29handmade_math.h: Introduce RayIntersect2()

1:23:29handmade_math.h: Introduce RayIntersect2()

1:23:29handmade_math.h: Introduce RayIntersect2()

1:27:01Blackboard: Producing a ta that goes with the same denominator

1:27:01Blackboard: Producing a ta that goes with the same denominator

1:27:01Blackboard: Producing a ta that goes with the same denominator

1:39:43handmade_math.h: Make RayIntersect2() compute ta and tb using the same denominator

1:39:43handmade_math.h: Make RayIntersect2() compute ta and tb using the same denominator

1:39:43handmade_math.h: Make RayIntersect2() compute ta and tb using the same denominator

1:43:21Try to solve our equations using an online tool

1:43:21Try to solve our equations using an online tool

1:43:21Try to solve our equations using an online tool

1:48:07handmade_render_group.cpp: Make PushBitmap() compute and call RayIntersect2() on the camera and card positions

1:48:07handmade_render_group.cpp: Make PushBitmap() compute and call RayIntersect2() on the camera and card positions

1:54:22handmade_render_group.h: Add CameraP, CameraX, CameraY and CameraZ to the render_group struct

1:54:22handmade_render_group.h: Add CameraP, CameraX, CameraY and CameraZ to the render_group struct

1:54:22handmade_render_group.h: Add CameraP, CameraX, CameraY and CameraZ to the render_group struct

1:57:56handmade_render_group.cpp: Make SetCameraTransform() take the Camera position values

1:57:56handmade_render_group.cpp: Make SetCameraTransform() take the Camera position values

1:57:56handmade_render_group.cpp: Make SetCameraTransform() take the Camera position values

2:01:17Run the game to see that it is not nearly as messed up as expected

2:01:17Run the game to see that it is not nearly as messed up as expected

2:01:17Run the game to see that it is not nearly as messed up as expected

2:02:07Q&A

🗩

2:02:07Q&A

🗩

2:02:07Q&A

🗩

2:05:26handmade_math.h: Try swapping the order of the sum in RayIntersect2()

2:05:26handmade_math.h: Try swapping the order of the sum in RayIntersect2()

2:05:26handmade_math.h: Try swapping the order of the sum in RayIntersect2()

2:17:57handmade_render_group.cpp: Make PushBitmap() use CardRyz to set the YAxis

2:17:57handmade_render_group.cpp: Make PushBitmap() use CardRyz to set the YAxis

2:17:57handmade_render_group.cpp: Make PushBitmap() use CardRyz to set the YAxis

2:18:24Run the game to see that we're surprisingly good

2:18:24Run the game to see that we're surprisingly good

2:18:24Run the game to see that we're surprisingly good

2:23:14handmade_render_group.cpp: Enable PushBitmap() to produce a standard sprite card and run the game to see that

2:23:14handmade_render_group.cpp: Enable PushBitmap() to produce a standard sprite card and run the game to see that

2:25:14handmade_opengl.cpp: Temporarily make OpenGLRenderCommands() clip out all transparent pixels, and run the game

2:25:14handmade_opengl.cpp: Temporarily make OpenGLRenderCommands() clip out all transparent pixels, and run the game

2:27:47Consider addressing transparency in the sort, and close it down

🗩

2:27:47Consider addressing transparency in the sort, and close it down

🗩

2:27:47Consider addressing transparency in the sort, and close it down

🗩

⏬

Next: 'Adding Cubes to the Renderer'

⏬