What are Mipmaps? Texture Filtering in GLSL [Shaders Monthly #6]

  Рет қаралды 4,945

GSN Composer

GSN Composer

Күн бұрын

In Episode #6 of Shaders Monthly, we talk about mipmaps and how they are used for texture filtering in computer graphics. Furthermore, we will demonstrate the implementation in GLSL.
1) Magnification Filter
GSN Composer: www.gsn-lib.org/index.html#pr...
C++: www.mathematik.uni-marburg.de...
Java: www.mathematik.uni-marburg.de...
2) TextureLod
GSN Composer: www.gsn-lib.org/index.html#pr...
C++: www.mathematik.uni-marburg.de...
Java: www.mathematik.uni-marburg.de...
3) Mipmaps
GSN Composer: www.gsn-lib.org/index.html#pr...
C++: www.mathematik.uni-marburg.de...
Java: www.mathematik.uni-marburg.de...
More information by NVIDIA on mipmap creation for non-power-of-two textures:
download.nvidia.com/developer...
Documentation for the shader plugin node of the GSN Composer:
gsn-lib.org/docs/nodes/Shader...
Additional lecture slides:
www.uni-marburg.de/en/fb12/re...
00:00 Introduction
00:20 What are Mipmaps?
01:21 Multum in parvo
02:17 Mipmap Generation
03:48 Mipmaps for Texture Mapping
05:33 Magnification and Minification Filter
06:06 Nearest-Neighbor Interpolation
06:56 Bilinear Interpolation
10:12 GLSL implementation: Magnification Filter
15:59 GLSL implementation: TextureLod
18:25 GLSL implementation: Mipmaps
Music: Left U Into - Otis McDonald (KZbin Audio Library)

Пікірлер: 6
@antontretyakov486
@antontretyakov486 9 ай бұрын
These series are pure gold. Thank you sir for provision of such a great exemplification!
@rouchy_
@rouchy_ Жыл бұрын
It's not clear to me why we getting noise effect on 19:38, is that because the result pixel color is the nearest of four texels, and due to plane rotation and thus perspective interpolation the texture coordinate is varying in time, and amount of the texel also probably varying, thus resulting in different result color in time? Can you pls eleborate why that happens)
@gsn-composer
@gsn-composer Жыл бұрын
I think you got that right. If there are many texels per framebuffer pixel, the true solution would be to average all the texels within the framebuffer pixel's footprint on the texture. This averaging is approximated using mipmaps (shown at 3:48 min:sec). This is close to the true solution and therefore produces little noise. In contrast, if we use the nearest-neighbor interpolation on the original texture (without mipmaps), the color is only determined by the nearest texture pixel. Which texel is the closest is "kind of" random (of course it is a deterministic process, but since the scene is dynamic, different texels are selected each time, which produces sampling noise, called "aliasing"). Imagine there was a black and white checkerboard of texels within the framebuffer pixel's footprint on the texture. The true solution would be medium gray, which can be achieved with mipmaps. The nearest-neighbor interpolation would toggle between black and white.
@rouchy_
@rouchy_ Жыл бұрын
​@@gsn-composer Now I think I understand, thank you for eleborating
@starbuck3980
@starbuck3980 Жыл бұрын
So, it is useful so that if i have a far object doesnt use the original texture but something with lower resolution and so save memory?
@gsn-composer
@gsn-composer Жыл бұрын
Yes, the resolution is reduced for a far object (larger mipmap level). But not to save memory but to prevent sampling artifacts (aliasing). This is shown at 19:38 min:sec in the video. The mipmap level is determined per framebuffer pixel and not per triangle/primitive.
Procedural Textures: A Practical Introduction [Shaders Monthly #7]
27:01
Blinn Phong Shading: Theory and Implementation [Shaders Monthly #4]
1:00:06
Eccentric clown jack #short #angel #clown
00:33
Super Beauty team
Рет қаралды 19 МЛН
Miracle Doctor Saves Blind Girl ❤️
00:59
Alan Chikin Chow
Рет қаралды 36 МЛН
100😭🎉 #thankyou
00:28
はじめしゃちょー(hajime)
Рет қаралды 23 МЛН
[Vowel]물고기는 물에서 살아야 해🐟🤣Fish have to live in the water #funny
00:53
Introduction to shaders: Learn the basics!
34:50
Barney Codes
Рет қаралды 272 М.
An introduction to Raymarching
34:03
kishimisu
Рет қаралды 113 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 905 М.
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 783 М.
Gaussian Splatting! The next big thing in 3D!
7:04
Olli Huttunen
Рет қаралды 247 М.
How do games render their scenes? | Bitwise
13:12
DigiDigger
Рет қаралды 561 М.
Perspective Projection in GLSL [Shaders Monthly #2]
19:44
GSN Composer
Рет қаралды 4 М.
Image-based Lighting (IBL) of PBR Materials [Shaders Monthly #11]
46:40
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,4 МЛН
Eccentric clown jack #short #angel #clown
00:33
Super Beauty team
Рет қаралды 19 МЛН