Created
January 26, 2019 15:54
-
-
Save Nihlus/5ccd92255d53c1c73b2b886e141e1b1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec3 ProjectToScreen(mat3 viewportMatrix, vec4 clipSpaceCoordinate) | |
{ | |
vec3 NDC = clipSpaceCoordinate.xyz / clipSpaceCoordinate.w; | |
return viewportMatrix * NDC; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment