Regarding 07:45: GPUs are built specifically to deal with 4x4 matrices and use 256 bit wide SIMD registers, so there's no difference in calculation time between a 4x4 and a 3x3 matrix. In fact, when multiplying a 3x3 matrix, the GPU will probably just pad the data with extra zeros to make it fit into the register.
This is by far the best tutorial i've seen! Explainations are very clear and easy to follow. I'm still early in the tutorial but I hope you continue these tutorials! Looking forward to the next one!
Hello Brendan Galea, thank for these amazing tutorials! Could you please make a tutorial on what render passes are? I am so confused about them. I can't understand the difference between swapchain, swapchain images, framebuffers, render targets and Image views, they all seem the same to me!I can't visualize the flow of Vulkan components
Great suggestion! We should be getting to this topic fairly soon. I plan to go through all of this in detail when we get to multiple render passes and building our own framebuffers. I may also create a video just going through the swap chain code and these topics before that.
Not exactly, but there are other methods that can help reduce duplicate vertices! Vulkan has something called the "provoking vertex", which uses one of the vertex normals as the normal for the entire face for flat shading. Also by using a different topology specification when creating the pipeline, such as triangle strip, or triangle fans can further reduce vertex duplication. However both these methods require some further processing on the model data to make sure its properly structured.
Couldn't apply directional light to models with textures. Why did that happen? Edit: Solved. Inside fragment shader file in main function, Instead of doing: outColor = texture(texSampler, fragTexCoords) * vec4(fragColor, 1.0); I was doing: outColor = texture(texSampler, fragTexCoords);
I am having a weird issue where the dark sides remain dark even while rotating around the z-axis. I can't seem to point out the part where I went wrong. If anybody had a similar issue, help me out please. It remains the same even with a cube. It is as if the color is directly baked into the mesh and doesnt change.
Hmmm one guess is maybe the vases are being drawn inside out? In the pipeline implementation default pipeline config info check your clip settings. I don’t remember off the top of my head what they’re called but make sure your front face is set to counter clockwise and your cull mode is either none or back face
@@BrendanGalea I have even tried copying your shaders from the repo but as it was before the dark side remains dark until when I rotate it on the y -axis , it suddenly shifts from black to white unnaturally. Another thing I noticed was that on the light side of the vase, their was no variation is brightness due to the topology. I have also checked my pipeline as per your comment and it seems to be fine.
@@BrendanGalea my comment would be probably left unnoticed, but for some reason I, as well as nyx1284, get the parts of the vase (and other objects) darker than in your example in the vid. I've tried to experiment with different settings, but was only able to achieve the same look by changing the amount of ambient light, significantly increasing (so, in the vertex shader, `const float AMBIENT = 0.12` instead of 0.02). At `AMBIENT = 0.1` the dark part of the vase become the same color as the background, and with the lower values it appears too dark
Just for time constraints mostly. I wanted to show both options but couldn’t fit it in this video. When we cover specular lighting we will also switch to per fragment lighting
Sup fam, half of a graphic programer's work is using mathematics to solve some problems ... Thank for the normal calculation stuff ... But I can't use this as muh PC took a hit.. I am coding a CAD prototype ... On a cheap android .... I wanna try mapping real world measurements in lengths in 3D space But I don't understand how much floats would make a metre in 3D space I don't have understand rasterizer renders while using the 2D pixels .... And there's math UA-camrs that I following up on coding something 4D ..... The bastard busted down before I got the chance to test it .... Any Opinions ?
For floats to meters you could just do a 1 to 1 mapping. Going to be hard to develop with just an android device though especially if it’s an older device. The earlier videos in the series go through how 3D rasterization works.
Ya this is something I’ll definitely need to look into more and will cover in the series when appropriate. I kind of wish this was released when I started the series, as I think I would’ve just walked through the swap chain code in that case right away since not having renderpasses or framebuffer setup would make things a lot simpler!! One thing I still need to look into is device support, hopefully most graphics devices are compatible with this extension. I would suspect this feature would be pretty widely supported, but if for some reason it isn’t yet I might hold off on covering it for a bit.
Ya I have a bunch listed in the resources section of the readme on the GitHub github.com/blurrypiano/littleVulkanEngine/tree/master/littleVulkanEngine/tutorial18/README.md
@@-Engineering01- - yup plenty! The early tutorials are mostly based off of vulkan-tutorial.com and the official vulkan documentation. Later tutorials branch out to use a wider variety of resources. Resources can be found for each tutorial in the README file on github github.com/blurrypiano/littleVulkanEngine
Regarding 07:45: GPUs are built specifically to deal with 4x4 matrices and use 256 bit wide SIMD registers, so there's no difference in calculation time between a 4x4 and a 3x3 matrix. In fact, when multiplying a 3x3 matrix, the GPU will probably just pad the data with extra zeros to make it fit into the register.
Oh that’s good to know! Thanks. Would you be alright with me pinning this comment?
@@BrendanGalea Yeah, sure! No problem!
"First let's fix a mistake from last week" I can relate to that on a spiritual level lmao
Hahaha 🙃
This is by far the best tutorial i've seen! Explainations are very clear and easy to follow. I'm still early in the tutorial but I hope you continue these tutorials! Looking forward to the next one!
Thank you!
only channel i've hit the notification bell for
😄 thanks, very much appreciated!
Hello Brendan Galea, thank for these amazing tutorials! Could you please make a tutorial on what render passes are? I am so confused about them. I can't understand the difference between swapchain, swapchain images, framebuffers, render targets and Image views, they all seem the same to me!I can't visualize the flow of Vulkan components
I have the same problem too
Great suggestion! We should be getting to this topic fairly soon. I plan to go through all of this in detail when we get to multiple render passes and building our own framebuffers.
I may also create a video just going through the swap chain code and these topics before that.
@@BrendanGalea Thank You
Thank you Brendan for all these amazing Vulkan videos. You rock!
Thank you. It’s great to know that they’re appreciated
I'm watching video #5 on this series, just want to let you know that this series is great, i really appreciate it and please keep up the good work.
Wow. I was literally waiting for this and i check youtube and its out. Thanks!
this is amazing please continue with these game engine videos even if you have to do patron. I'm definitely subbing.
Please do keep making tutorials, because eventually you could do PBR and deferred rendering :) would be nice to learn how to do more complex things
Next one should be out sometime next week! Sorry for the delay, been dealing with some life stuff. Everything’s all good though!
Great tutorials! Could we put normals into an instanced array to avoid duplicating vertices for the "flat" shading?
Not exactly, but there are other methods that can help reduce duplicate vertices! Vulkan has something called the "provoking vertex", which uses one of the vertex normals as the normal for the entire face for flat shading.
Also by using a different topology specification when creating the pipeline, such as triangle strip, or triangle fans can further reduce vertex duplication.
However both these methods require some further processing on the model data to make sure its properly structured.
Couldn't apply directional light to models with textures. Why did that happen?
Edit:
Solved.
Inside fragment shader file in main function,
Instead of doing:
outColor = texture(texSampler, fragTexCoords) * vec4(fragColor, 1.0);
I was doing:
outColor = texture(texSampler, fragTexCoords);
@10:56 ahh the complete void of space... that suits me just fine :)
I am having a weird issue where the dark sides remain dark even while rotating around the z-axis. I can't seem to point out the part where I went wrong. If anybody had a similar issue, help me out please. It remains the same even with a cube. It is as if the color is directly baked into the mesh and doesnt change.
Hmmm one guess is maybe the vases are being drawn inside out? In the pipeline implementation default pipeline config info check your clip settings. I don’t remember off the top of my head what they’re called but make sure your front face is set to counter clockwise and your cull mode is either none or back face
Or it could be that your not transforming your normals in the vertex shader.
@@BrendanGalea I have even tried copying your shaders from the repo but as it was before the dark side remains dark until when I rotate it on the y -axis , it suddenly shifts from black to white unnaturally. Another thing I noticed was that on the light side of the vase, their was no variation is brightness due to the topology. I have also checked my pipeline as per your comment and it seems to be fine.
@@BrendanGalea my comment would be probably left unnoticed, but for some reason I, as well as nyx1284, get the parts of the vase (and other objects) darker than in your example in the vid. I've tried to experiment with different settings, but was only able to achieve the same look by changing the amount of ambient light, significantly increasing (so, in the vertex shader, `const float AMBIENT = 0.12` instead of 0.02). At `AMBIENT = 0.1` the dark part of the vase become the same color as the background, and with the lower values it appears too dark
I can't wait for the shadows tutorial
Ya maybe by the end of the year! 🤞
How come you went for a vertex shader based lighting algorithm as opposed to a fragment shader based one? 🤔
Just for time constraints mostly. I wanted to show both options but couldn’t fit it in this video. When we cover specular lighting we will also switch to per fragment lighting
@@BrendanGalea Oh ok, I thought there was a deeper reason
Shouldn’t the lighting calculations be done in the fragment shader, with the normal passed from the vertex shader to the fragment shader?
Yep that’s another option that I’ll cover in the specular lighting tutorial. Just didn’t have enough time to cover everything in this one video
is it possible to add models with animation using fbx or something
haven't gotten to animations yet in the series, but it a planned topic for me to cover in the future!
yoo new episode
Sup fam, half of a graphic programer's work is using mathematics to solve some problems ...
Thank for the normal calculation stuff ...
But I can't use this as muh PC took a hit..
I am coding a CAD prototype ... On a cheap android ....
I wanna try mapping real world measurements in lengths in 3D space
But I don't understand how much floats would make a metre in 3D space
I don't have understand rasterizer renders while using the 2D pixels ....
And there's math UA-camrs that I following up on coding something 4D .....
The bastard busted down before I got the chance to test it ....
Any Opinions ?
I got it done for 2D ...
Doing 3D is a bit doubtful
For floats to meters you could just do a 1 to 1 mapping.
Going to be hard to develop with just an android device though especially if it’s an older device.
The earlier videos in the series go through how 3D rasterization works.
@@BrendanGalea One To One mapping ?
Like a float v = 3.5 would be 3.5 meters
@@BrendanGalea Tis a good thing to seek help from another
I love these videos. Thanks :)
Please, make video about StreamLine Rendering (dynamic render passes)
Ya this is something I’ll definitely need to look into more and will cover in the series when appropriate.
I kind of wish this was released when I started the series, as I think I would’ve just walked through the swap chain code in that case right away since not having renderpasses or framebuffer setup would make things a lot simpler!!
One thing I still need to look into is device support, hopefully most graphics devices are compatible with this extension. I would suspect this feature would be pretty widely supported, but if for some reason it isn’t yet I might hold off on covering it for a bit.
@@BrendanGalea How I now this was released
Yes laawdddd ...
XD
could you provide an article on this topic?
Ya I have a bunch listed in the resources section of the readme on the GitHub github.com/blurrypiano/littleVulkanEngine/tree/master/littleVulkanEngine/tutorial18/README.md
@@BrendanGalea thank you for the link)
@@BrendanGalea will anything be said about computing pipelines?
Ya I do plan to cover them at some point. But there’s quite a bit of other material I’d like to cover first
@@BrendanGalea this is good news, I'm happy) how long have you been working with vulkan api?
why dont you cover textures yet?
I subscribed.
Hı is this engine one Man made ?
yup!
@@BrendanGalea so are there any APIs and resources you use?
@@-Engineering01- - yup plenty! The early tutorials are mostly based off of vulkan-tutorial.com and the official vulkan documentation. Later tutorials branch out to use a wider variety of resources.
Resources can be found for each tutorial in the README file on github
github.com/blurrypiano/littleVulkanEngine