Grid class of voxel example has fog effect but should not?

@Simeon the grid in the voxel editor example (and shade) ‘fades’ away as a function of distance from the viewer camera. This effect shouldn’t really be happening should it, unless the fog parameters are enabled?! I use the Grid class in my code and would like to avoid the ‘fog effect’-any way to do that?

@piinthesky might have to defer this question to @John as he authored the grid effect. Will see what he says

Hey @piinthesky, I think this is a bit of an oversight due to some changes to do with mipmapping.

For now you can add the following code to the Grid class in Grid:modified() right after the closing setContext():

craft.texture(self.img):generateMipmaps()

Which will generate mipmaps for the grid texture. Technically if no mipmaps are generated then craft shouldn’t be using mip filtering but it is for some reason.

Internally there is a thing called craft.texture which wraps up Codea images into a format that craft can use. I’m not happy with the way all this works (and the lack of documentation). I’m planning to unify everything so that there’s only the image class and that will handle all this stuff more consistently.

@John, that works nicely, thanks.