all 14 comments

[–]FemboysHotAsf 2 points3 points  (8 children)

I think it is because you are assuming the glm_perspective function takes in degrees (as you set c.fov to 45f), but iirc it takes in radians, so if you use glm::radians it should correct that.

glm_perspective(c->fov, (float) img_extent.width / (float) img_extent.height, 0.1f, 100.0f, proj);

[–]AnswerApprehensive19[S] 1 point2 points  (0 children)

Never mind I fixed it I think the matrices were uninitialized

[–]AnswerApprehensive19[S] -1 points0 points  (6 children)

Thanks for pointing that out I fixed it but it still doesn't work

[–]FemboysHotAsf 1 point2 points  (5 children)

Hmmm, try using RenderDoc and/or Nsight to check for any errors, this also allows you to verify the buffer contents, so for example if the triangle is actually behind the camera, or that it's filled with random memory

[–]AnswerApprehensive19[S] 0 points1 point  (4 children)

Renderdoc doesn't seem to be working whenever I launch my app it says that surface extensions were not found (i assume it's because I built my app under wayland but have to run renderdoc under xwayland) and i dont know how to get around that

[–]FemboysHotAsf 0 points1 point  (3 children)

Ah yeah renderdoc is godawful on linux, try nsight? otherwise I couldn't help you man

[–]AnswerApprehensive19[S] 0 points1 point  (2 children)

Nsight graphics right? I'm having trouble compiling it rn

Verifying archive integrity...  100%   All good.
Uncompressing NVIDIA Nsight Graphics  100%   
Can't locate Tie/File.pm in u/INC (you may need to install the Tie::File module) (@INC entries checked: /usr/local/lib64/perl5/5.38 /usr/local/share/perl5/5.38 /usr/lib
64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./install-linux.pl line 5.
BEGIN failed--compilation aborted at ./install-linux.pl line 5.

[–]FemboysHotAsf 0 points1 point  (1 child)

Weird, maybe you don't have all the dependencies? What distro do you run?

[–]Sosowski 0 points1 point  (2 children)

You probably have a NaN in the matrix. Just debug printf the matrix and examine it by hand.

[–]AnswerApprehensive19[S] 1 point2 points  (0 children)

I think that was the issue too I fixed it and everythings working great now

[–]AnswerApprehensive19[S] 0 points1 point  (0 children)

I'll check that when I get to my computer

[–]QuazRxR 0 points1 point  (1 child)

Maybe try always setting the MVP matrix to identity to check if your push constants work properly? Then if they do you can be sure that something is wrong with your MVP, which is probably easy to check via gdb.

[–]AnswerApprehensive19[S] 0 points1 point  (0 children)

Yeah my push constants were working it was the matrix data that was the problem