Doctus / randomgamegenerator

Whiteboad client for human-run games (tabletop, role-playing, etc.)
GNU General Public License v3.0
6 stars 1 forks source link

Seamless Tilings #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Make a new map with space_tiles.png, default options
2. Zoom in or out various times
3. Witness the forming of vertical lines

What is the expected output? What do you see instead?
No lines!

Please use labels and text to provide additional information.
This can ONLY be fixed by modifying the tileset pictures, to be forced to have 
a border for EACH TILE. Because even with GL_CLAMP_TO_EDGE, opengl blends the 
drawn pixels with pixels outside of the tile, OR in the case of the tile being 
on the edge of the image, it uses the non-existent border, which defaults to 
blending with black.

Original issue reported on code.google.com by kingo...@gmail.com on 7 Feb 2012 at 3:47

GoogleCodeExporter commented 9 years ago
I think it should be possible to use some of the same libraries from the Pog 
Editor to automatically convert a border-less tileset to the bordered form, but 
no ETA on implementing that for now.

Original comment by kirikayu...@gmail.com on 11 Feb 2012 at 10:36

GoogleCodeExporter commented 9 years ago
Another solution would be to store every tile as a separate texture(uses quite 
a lot more VRAM), and before uploading each tile to VRAM, computer and add a 
border to the image(basically making 1 pixel higher and wider and taking the 
original border pixels to create new border pixels) and tell each rggTile to 
draw from that texture with smaller coordinates.

But this solution is on the same level as the previous comment's solution, 
except probably more work and making the program uses more VRAM than that 
solution.

Original comment by kingo...@gmail.com on 21 Feb 2012 at 12:26

GoogleCodeExporter commented 9 years ago
Hold on -- at least for me, it doesn't actually seem to blend with black if 
it's on the edge of the image. A single 32x32 tile "tileset" displayed no lines 
at all. I think this means we could fix it by chopping up tilesets into a 
single image for each tile, if that wouldn't be a performance problem.

Original comment by kirikayu...@gmail.com on 26 Aug 2012 at 4:56

GoogleCodeExporter commented 9 years ago
Ah, I see. In that case, we have two options:

1) just chop up the images and create some tileset.cfg file that links certain 
images to a tileset

2) Leave the tileset images alone and chop them up when they're loaded into a 
QImage(which is still 100% in software) then when sending them to opengl, keep 
track of which texture numbers each tile gets assigned etc.

Original comment by kingo...@gmail.com on 26 Aug 2012 at 8:49