Use mipmaps and filtering for OpenVR Canvas;
It leads to a prettier mirror window.  There is some performance overhead, that can be dealt with as needed.
@@ -489,10 +489,11 @@ static void openvrRenderTo(void (*callback)(void*), void* userdata) {
if (!state.canvas) {
uint32_t width, height;
state.system->GetRecommendedRenderTargetSize(&width, &height);
- CanvasFlags flags = { .depth = { true, false, FORMAT_D24S8 }, .stereo = true, .msaa = state.msaa };
+ CanvasFlags flags = { .depth = { true, false, FORMAT_D24S8 }, .stereo = true, .mipmaps = true, .msaa = state.msaa };
state.canvas = lovrCanvasCreate(width * 2, height, flags);
- Texture* texture = lovrTextureCreate(TEXTURE_2D, NULL, 0, true, false, state.msaa);
+ Texture* texture = lovrTextureCreate(TEXTURE_2D, NULL, 0, true, true, state.msaa);
lovrTextureAllocate(texture, width * 2, height, 1, FORMAT_RGBA);
+ lovrTextureSetFilter(texture, lovrGraphicsGetDefaultFilter());
lovrCanvasSetAttachments(state.canvas, &(Attachment) { texture, 0, 0 }, 1);
lovrRelease(texture);
}
