Tagged Questions
0
votes
0answers
42 views
Correct way to calculate Perspective Matrix
I have seen at least 3 different ways to calculate the perspective matrix and I'm confused as to which one I should be using and what the differences are?
OpenGL says to do it this way:
f = ...
0
votes
1answer
61 views
Ways to “invert Z-axis” in shader-based core-profile OpenGL?
In my hobbyist shader-based (non-FFP) GL (3.2+ core) "engine", everything in world-space and model-space is by design "left-handed" (and to stay that way), so X-axis goes from -1 ("left") to 1 ...
2
votes
1answer
180 views
How to do perspective projection “parallax” but without changing the scale or offset of objects?
Hello everyone I have this problem that I have tried everything I could think of. The problem: I am making a 2D game with parallax effect but I am using 3d space so am not simulating the parallax but ...
1
vote
1answer
157 views
OpenGL fovx question
To boil my question down to the simplest form, I fear I am oversimplifying how mat4 perspective works. I am using
mat4.perspective(45, 2, 0.1, 1000.0)
(the binding is WebGL fwiw). With a fovy of ...
-1
votes
1answer
309 views
How to fix OpenGL Co-ordinate System in SFML?
My OpenGL setup is somehow configured to work like so:
(-1, 1) (0, 1) (1, 1)
(-1, 0) (0, 0) (1, 0)
(-1, -1) (0, -1) (1, -1)
How do I configure it so that it works like so:
(0, 0) (SW/2, 0) (SW, 0)
...
3
votes
1answer
388 views
The Depth buffer and Perspective
I'm having trouble understanding the behaviour of my OpenGL program; and in drawing my Z-Buffer out to the screen.
It will probably be best to just start with code, here is my GLSL shader:
in vec3 ...