0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

テクスチャフィルタリングを簡潔に

Posted at

バイリニア

  • textureSize = 100x100
  • texelColor = sample(x, y)
  • uv = (0.221,0.817)

とすると

pixelColor 
    = (sample(22, 81) * 0.1 + sample(23, 81) * 0.9) * 0.3
    + (sample(22, 21) * 0.1 + sample(23, 82) * 0.9) * 0.7

拡大には強いが縮小に弱い。

ミップマップ

縮小の際にはミップマップを使う。

切り替わるところが目立つ。

トライリニア

  • mipmapLSize = 100x100
  • mipmapMSize = 50x50
  • mipmapSSize = 25x25
  • texelColor = sample(x, y, mipmap)
  • uv = (0.221,0.817)
  • depth = 0.8

depth=0の時L,depth=1の時M,depth=2の時Sを使うとすると

pixelColor 
    = (
        (sample(22, 81, L) * 0.1 + sample(23, 81, L) * 0.9) * 0.3
        + (sample(22, 21, L) * 0.1 + sample(23, 82, L) * 0.9) * 0.7
    ) * 0.2
    + (
        (sample(22, 81, M) * 0.1 + sample(23, 81, M) * 0.9) * 0.3
        + (sample(22, 21, M) * 0.1 + sample(23, 82, M) * 0.9) * 0.7
    ) * 0.8

遠くがぼけるのは改善しない

異方性

// 今度書く

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?