Improve convolutional layer rendering.

Now all n individual images of w×h are packaged as a w×(n×h) image, with
the texture coordinates properly mapped so the individual rectangles
still get the proper texture.

This optimization causes slight glitches around the edges of the tiles,
but is so much faster that I think it's worth it.
This commit is contained in:
2018-02-23 15:19:30 +01:00
parent d5dd49b3d6
commit 99cf0740fe
4 changed files with 33 additions and 25 deletions

View File

@@ -12,9 +12,10 @@ namespace fmri {
* @param data
* @param width
* @param height
* @param subImages Number of subimages in the original image. Sub images are rescaled individually to preserve contrast. Optional, default 1.
* @return A texture reference.
*/
GLuint loadTexture(DType const * data, int width, int height);
GLuint loadTexture(DType const *data, int width, int height, int subImages = 1);
/**
* Callback handler to handle resizing windows.