#include "shaders/vblend.h"
#endif
+#define WORKSHOP_PREVIEW_WIDTH 504
+#define WORKSHOP_PREVIEW_HEIGHT 336
+
VG_STATIC void render_water_texture( world_instance *world, camera *cam,
int layer_depth );
VG_STATIC void render_water_surface( world_instance *world, camera *cam );
framebuffer *fb_main,
*fb_water_reflection,
- *fb_water_beneath;
+ *fb_water_beneath,
+ *fb_workshop_preview;
int ready;
float view_render_scale,
.attachment = GL_DEPTH_STENCIL_ATTACHMENT
}
}
+ },
+ {
+ "workshop_preview",
+ .link = &gpipeline.fb_workshop_preview,
+ .resolution_div = 0,
+ .fixed_w = WORKSHOP_PREVIEW_WIDTH, .fixed_h = WORKSHOP_PREVIEW_HEIGHT,
+ .attachments =
+ {
+ {
+ "colour", k_framebuffer_attachment_type_texture,
+ .internalformat = GL_RGB,
+ .format = GL_RGB,
+ .type = GL_UNSIGNED_BYTE,
+ .attachment = GL_COLOR_ATTACHMENT0
+ },
+ {
+ "depth_stencil", k_framebuffer_attachment_type_renderbuffer,
+ .internalformat = GL_DEPTH24_STENCIL8,
+ .attachment = GL_DEPTH_STENCIL_ATTACHMENT
+ }
+ }
}
};
}
float quad[] = {
- 0.00f,0.00f, 1.00f,1.00f, 0.00f,1.00f,
- 0.00f,0.00f, 1.00f,0.00f, 1.00f,1.00f,
+ 0.00f,0.00f, 1.00f,1.00f, 0.00f,1.00f, /* fsquad */
+ 0.00f,0.00f, 1.00f,0.00f, 1.00f,1.00f,
- 0.20f,0.00f, 0.80f,1.00f, 0.20f,1.00f,
- 0.20f,0.00f, 0.80f,0.00f, 0.80f,1.00f,
+ 0.00f,0.00f, 1.00f,0x1p-4f,0.00f,0x1p-4f, /* fsquad1 */
+ 0.00f,0.00f, 1.00f,0.00f, 1.00f,0x1p-4f,
/* 9x9 debug grid */
/* row0 */
*/
VG_STATIC void render_view_framebuffer_ui(void)
{
+#if 0
int viewing_count = 0;
glBindVertexArray( gpipeline.fsquad.vao );
viewing_count ++;
}
}
+#endif
}
VG_STATIC void render_framebuffer_show( struct framebuffer *fb,