test equirect timelapse

This commit is contained in:
2019-11-02 14:36:44 +01:00
parent a6a4f4f501
commit 167cceabfd
3 changed files with 20 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ TextureCube Layer::gen_cube()
return ret;
}
Texture2D Layer::gen_equirect()
Texture2D Layer::gen_equirect(glm::ivec2 size /*= { 0, 0 }*/)
{
Texture2D ret;
@@ -60,10 +60,13 @@ Texture2D Layer::gen_equirect()
TextureCube cube;
RTT latlong;
if (size.x == 0 || size.y == 0)
size = { w, h };
cube = gen_cube();
latlong.create(w * 4, h * 2);
ret.create(w * 4, h * 2);
latlong.create(size.x * 4, size.y * 2);
ret.create(size.x * 4, size.y * 2);
glDisable(GL_BLEND);