In place change to reverse Z rendering and 32 bit float offscreen depth buffer

This commit is contained in:
Levi Burner
2023-07-11 14:10:14 -04:00
parent 14f1386fc0
commit d32eb6bd12
9 changed files with 24 additions and 161 deletions
-15
View File
@@ -39,15 +39,6 @@ typedef enum mjtFramebuffer_ { // OpenGL framebuffer option
mjFB_OFFSCREEN // offscreen buffer
} mjtFramebuffer;
typedef enum mjtDepthMapping_ { // OpenGL depth buffer mapping (from znear to zfar)
mjDB_NEGONETOONE = 0, // Negative one to one (OpenGL default)
mjDB_ONETOZERO // Reversed Z buffer (decreases numerical error)
} mjtDepthMapping;
typedef enum mjtDepthPrecision_ { // OpenGL depth buffer precision
mjDB_INT24 = 0, // 24 bit integer buffer (OpenGL default)
mjDB_FLOAT32 // 32 bit float buffer
} mjtDepthPrecision;
typedef enum mjtFontScale_ { // font scale, used at context creation
mjFONTSCALE_50 = 50, // 50% scale, suitable for low-res rendering
@@ -160,12 +151,6 @@ struct mjrContext_ { // custom OpenGL context
// pixel output format
int readPixelFormat; // default color pixel format for mjr_readPixels
// depth buffer mode
int depthMapping; // depth buffer mapping from [znear zfar] to normalized device coordinates: mjDB_NEGONETOONE or mjDB_ONETOZERO
// depth buffer precision
int depthPrecision; // depth buffer precision: mjDB_INT24 or mjDB_FLOAT32
};
typedef struct mjrContext_ mjrContext;