[PICA] Attempt depth offset/scale and depthmap enable

This commit is contained in:
wheremyfoodat 2023-03-04 03:42:01 +02:00
parent e9673c9255
commit f25bc2dd89
3 changed files with 67 additions and 15 deletions

View file

@ -143,14 +143,14 @@ struct DepthBuffer {
};
static constexpr std::array<GLenum, 4> types = {
GL_FLOAT, GL_FLOAT, GL_FLOAT, GL_UNSIGNED_INT_24_8
GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, GL_UNSIGNED_INT, GL_UNSIGNED_INT_24_8
};
auto internalFormat = internalFormats[(int)format];
auto fmt = formats[(int)format];
auto type = types[(int)format];
texture.createDSTexture(size.x(), size.y(), internalFormat, fmt, nullptr, type);
texture.createDSTexture(size.x(), size.y(), internalFormat, fmt, nullptr, type, GL_TEXTURE_2D);
texture.bind();
texture.setMinFilter(OpenGL::Linear);
texture.setMagFilter(OpenGL::Linear);