Created
April 4, 2019 16:56
-
-
Save JPBotelho/f388d0817b08b90a51247ca22fc9ae47 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
/* to map a cubemap into a texture atlas; bottom to top left to right */ | |
float faceWidth; | |
float faceHeight; | |
float atlasWidth = faceWidth*3; | |
float atlasHeight = faceHeight*2; | |
for(int i = 0; i < 2; i++) | |
for(int z = 0; z < 3; z++) | |
GL.ViewPort(z*faceWidth, i * faceHeight, faceWidth, faceHeight) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment