cinera_handmade.network/cmuratori/hero/code/code362.hmml

87 lines
6.1 KiB
Plaintext

[video output=day362 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Matrix Multiplication and Transform Order" vod_platform=youtube id=5tKiQd73rPk annotator=Miblo]
[0:08][Recap and set the stage for the day]
[2:28][Run the game to show where we're at with randomly ordered drawing]
[5:54][Blackboard: Matrix Multiplication]
[9:00][Blackboard: Order dependence]
[13:49][Blackboard: Scaling matrix]
[15:36][Blackboard: Rotation matrix, and why order dependence is important for us]
[21:33][Blackboard: Matrix- and vector-multiplication are exactly the same thing]
[25:18][Blackboard: Multiplication order of a long series of matrices]
[28:29][Blackboard: Translation and 4x4 augmentation]
[37:30][Blackboard: Object Transform, conceiving of the matrix in columns]
[43:07][Blackboard: Camera Transform, conceiving of the matrix in rows]
[49:34][Blackboard: Row vs Column Picture]
[53:45][Blackboard: What is a camera transform and why does this do it?]
[1:00:03][Blackboard: Camera translation]
[1:01:30][Blackboard: Moving the world to align with the camera's axes]
[1:05:41][Blackboard: Inner product]
[1:07:57][Blackboard: Dot producting incoming points with the camera axes]
[1:09:48][Blackboard: Rows are Camera axes; Columns are Object axes]
[1:12:51][Blackboard: For an orthogonal matrix, the inverse is the transpose[ref
site="Handmade Hero"
page="Day 319 - Inverse and Transpose Matrices"
url="https://hero.handmade.network/episode/code/day319"]]
[1:17:20][Blackboard: The camera transforms we want to implement]
[1:25:20][Blackboard: Combining translation and rotation in camera transforms]
[1:32:32][handmade_math.h: Introduce CameraTransform(), Columns3x3(), Rows3x3() and Translate()]
[1:38:03][handmade_math.h: Introduce Transform() and an overloaded operator*() which takes a 4x4 matrix and a vector of length 3]
[1:43:53][handmade_math.h: Introduce GetColumn() and GetRow()]
[1:45:49][handmade_opengl.cpp: Consider how to implement our camera transform]
[1:47:22][handmade_render_group.cpp: Make PushClipRect() responsible for computing the focal length]
[1:49:57][Run the game to see the same thing we got before]
[1:51:47][Q&A][:speech]
[1:53:03][@zilarrezko][Can you interpolate if you wanted a smooth rotation about a point or axis over time?]
[1:54:35][@garryjohanson][There have been some problems with trolls causing flame wars in the chat. I forget who you dedicated the management of the chat to?[ref
site="Handmade Network"
page="Handmade Network IRC"
url="https://handmade.network/blogs/p/1138"]]
[1:55:46][@sahfortv][You mentioned (about six months ago, I think) that you have new art work. What's the plan with adding that?]
[1:56:16][@pepevel][Did you know beforehand that you where going to discard the sorting code? Did you do all that for the sake of teaching a variety of techniques?]
[1:59:18][@frank3434455][Do you know anything about DirectX 12?]
[2:01:06][@frank3434455][When are you gonna do OOP?]
[2:02:04][@frank3434455][Ever heard of design patterns?]
[2:02:25][@frank3434455][Try unit testing your code so we can actually see if something is working]
[2:04:04][@micahtron][Will the Molly Rocket team be at Emerald City Comicon this year?]
[2:04:11][@snoringtortoise][In terms of profiling, how would you tell when you are hitting upper bounds of CPU, PCI Bus and GPU? Obviously, we already have a CPU profiler, wondering more about PCI Bus and GPU]
[2:05:57][@zennmystic][Will you use Vulkan in your game at all, will it still be too new on release, or do some kind of tutorial on it?]
[2:07:48][@frank3434455][Do you think writing my own ring 0 driver would bypass VAC?]
[2:09:47][@snoringtortoise][Is there any way to do that from our own code, or do we have to rely on external tools?[ref
site="OpenGL"
page="ARB_timer_query"
url="https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_timer_query.txt"]]
[2:12:18][@graeme7][Near the beginning of the stream the back of my chair fell off. I spent the entire stream fixing my chair. It feels more solid now and squeaks less but I'm afraid to lean back on it?]
[2:12:55][@snoringtortoise][Not sure if anyone has mentioned this but Mac OSX doesn't support OpenGL core profile with OpenGL 1.x functions. This means that, if using glBegin etc, the maximum version of GL allowed is 2.1]
[2:14:44][@frank3434455][Can you name one of those exploits for my driver?[ref
site="GitHub"
page="sinkhole"
url="https://github.com/xoreaxeaxeax/sinkhole"][ref
site=YouTube
page="The Memory Sinkhole - Unleashing An X86 Design Flaw Allowing Universal Privilege Escalation"
url=https://www.youtube.com/watch?v=lR0nh-TdpVg]]
[2:18:22][@wobbly_bob][Can you give Shawn M & Sean B's stream a plug before you go please?]
[2:19:20][Plug Shawn,[ref
site="Twitch"
page="sssmcgrath"
url="https://twitch.tv/sssmcgrath"] Sean[ref
site="Twitch"
page="nothings2"
url="https://twitch.tv/nothings2"] and Jon's[ref
site="Twitch"
page="naysayer88"
url="https://twitch.tv/naysayer88"] streams]
[2:20:51][@frank3434455][Would ring 0 driver bypass the anti cheat protection of Destiny]
[2:22:19][@insofaras][Sean and Shawn are doing a specific stream today[ref
site="Twitter"
page="I'll be chatting/discussing programming/gamedev with @sssmcgrath..."
url="https://twitter.com/nothings/status/827978584954281984"]]
[2:23:04][@frank3434455][How do I read the RAM memory on an XBox or PS4?]
[2:27:44][@snoringtortoise][I'm not sure if anyone has mentioned this but in the cutscene shot 6, layer 3 and 4 are both at z=3.0f. Layer 3 should be at ~z-3.01f instead. Layer 4 is the child's tears and layer 3 is the child]
[2:30:25][@desuused][Will the order of matrix multiplication be reversed if we use transposed matrices and vectors?]
[2:31:04][Blackboard: Multiplying a matrix and a vector]
[2:35:03][@desuused][Yes, that's what I was asking. Earlier in the video you said that matrix application order is unintuitive, and this way we can reverse the order[ref
site="Wikipedia"
page="Covariance and contravariance of vectors"
url="https://en.wikipedia.org/wiki/Covariance_and_contravariance_of_vectors"]]
[2:38:54][Wrap it up][:speech]
[/video]