tensorflow / graphics

TensorFlow Graphics: Differentiable Graphics Layers for TensorFlow
Apache License 2.0
2.75k stars 361 forks source link

Add Mipmap #308

Open osanseviero opened 4 years ago

osanseviero commented 4 years ago

MIP mapping is a technique where an original high-resolution texture map is scaled and filtered into multiple resolutions. This requires constructing a pyramid of images and sampling the good level. A detailed explanation can be found here.

taiya commented 4 years ago

@osanseviero you might want to indicate the path within the library where you think it would be good to have this implemented ;)

drebain commented 4 years ago

What would be the preferred way of representing a mipmap in the API? Presumably, the implementation would include a build operation and a sample operation, but this would require a way to pass the mip levels between the functions. Would a tuple of tensors suffice? Or would this warrant a dedicated class? I am curious to know the general preference on this as it would also apply to my BVH proposal.