#Rendering a visually infinite ground plane

1 messages · Page 1 of 1 (latest)

forest hill
#

I'm trying to render a visually infinite ground plane with a repeating texture for my game.

My current implementation is a very large plane that moves with the camera and snaps at 1-unit intervals so the texture stays aligned on its grid. This works, although it seems to have an impact on performance and also causes terrible aliasing on the repeated texture when viewed from a distance (see images). Note that in the second image, the plane has been made smaller.

I'm assuming the ideal way to do this would be by using shaders but I have little to no experience with them and I'm wondering if anybody could give me some tips on how I could go about implementing something like this.

cedar lark
#

I think you can solve both of the issues with mipmaps. Bevy supports mipmapped textures, but doesn't generate mipmaps by itself (I'm not sure of this but I've searched it and couldn't find anything about it)
Non surprisingly, there is a crate for it 😅
https://github.com/DGriffin91/bevy_mod_mipmap_generator

GitHub

A basic mipmap generator for bevy. Contribute to DGriffin91/bevy_mod_mipmap_generator development by creating an account on GitHub.

vestal badger