🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Vulkan shadow (cube) maps

Started by
23 comments, last by taby 1 year, 2 months ago

Right. So, D3D and Vulkan use a left-handed coordinate system, and OpenGL (and GLM) use a right-handed coordinate system. I’ve tried a few things that I found on the web, but nothing is working properly just yet. I implore you to please fix the code that is found on GitHub, because I’m at a loss, basically.

Advertisement

For the sake of simplicity, just flip the y coordinate at the end of the vertex shader.

void main() 
{
	...
	gl_Position.y = -gl_Position.y;	
}

Ok I’ve tried that, but I will try again. thanks for your ideas.

P.S. I tried flipping it in the offscreen.vert and scene.vert, but that does not solve the problem.

Rather than hacking the code to bits, I'll just live with the fact that the y-axis is backwards. It'll take some getting used to, but that's life.

This topic is closed to new replies.

Advertisement