Changeset 60578ce in opengl-game for scene-notes.txt


Ignore:
Timestamp:
Dec 18, 2019, 2:48:28 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
a79be34
Parents:
7c929fc
Message:

In VulkanGame, make lighting work correctly in the ship shader with the model, view, and projection matrices all being applied

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scene-notes.txt

    r7c929fc r60578ce  
    22In vulkan, it is upper left, so I set the projection matrix [1][1] cell to -1 to flip the y-axis and make it match opengl
    33
    4 +z goes into the screen (in Vulkan)
     4depth ranges ([-1, 1] in OpenGL, [0, 1] in Vulkan)
     5
     6Vulkan coordinates:
     7X+ points toward right
     8Y+ points toward down (but I flip it in vulkangame in the perspective matrix to point up)
     9Z+ points toward inside the screen
     10
     11In opengl, all 3 coordinates range from -1 to 1
     12
     13For the perspective matrix, after the vertex shader finishes, the x, y, and z of the final point are automatically divided
     14by the w. For testing the projection matrix in the console, I could do that manually as well.
Note: See TracChangeset for help on using the changeset viewer.