当前位置:网站首页>[TA frost wolf \u may- hundred people plan] 1.3 secret of texture
[TA frost wolf \u may- hundred people plan] 1.3 secret of texture
2022-07-01 03:42:00 【zczplus】
【TA- Frost Wolf _may-《 Hundred people plan 》】1.3 The secret of texture
1.3 Three questions about texture
1.3.1 What is the texture ?
Any picture can be a texture ,
From the perspective of computer rendering , It is a structured storage form that can be read and written by shaders .
Textures can be more than just pictures , You can also include various settings when sampling textures .
1.3.2 Why texture is needed ?
By sacrificing geometric details , Achieve the purpose of greatly reducing the workload , It can effectively save storage space and improve reading speed .
1.3.3 Texture pipeline
The whole process of texture pipeline :
Model space location =》
Projection function ( It is completely different from the projection in the geometric phase of the overall process of rendering the pipeline before , Pay attention to distinguish between )=》
Texture mapping =》
Texture coordinates =》
Communication function =》
New texture coordinates =》
Texture sampling ( Avoid relying on texture reading )=》
Texture value
Example

1.3.4 Texture sampling settings Wrap Mode
decision UV Values in [0,1] Performance beyond
OpenGL ——“ Packaging mode ” (Wrapping Model)
DirectX ——“ Texture addressing mode ”(Texture Addressing Model)
The following is a Wrap Mode Four common methods of , To solve when uv Mapping coordinates to [0,1] Extraneous problems . It is divided into :Repeat,Mirror,Clamp,Border

1.3.5 Texture sampling settings Filter Mode
When the texture changes due to stretching, which filtering mode should be used to adjust its performance . Simply speaking : It is used to resist the distortion caused by graphic distortion ( I summed it up myself ).
In general , Texture filtering is accomplished through a series of specific technologies on proprietary hardware , It can also be done in software , You can also combine software and hardware .
1.3.5.1 Zoom in :
Nearest neighbor
- The method of sampling the same texture element through multiple pixels , To achieve the purpose of amplification , So as to produce the phenomenon of pixelation .
- It costs less
Bilinear interpolation
- Examples are as follows :

(u’,v’) The origin of :
- adopt uv Coordinates get the center coordinates of the current texture ,
- Thus, the nearest four pixels that can wrap the current texture element position are derived ,
- Then the coordinates are formed based on the four points ,
- The position of the texture element in this coordinate system is the above (u’,v’).
- The bottom formula achieves the purpose of linear interpolation by adding four times of weights , The effect is four times that of the nearest neighbor .
- Examples are as follows :
cubic convolution
- Simple understanding , Do it yourself

- Simple understanding , Do it yourself
Qu’iLez Smooth linear interpolation
- There are two common curves :

Interpolation process of smooth curve :
- There are two common curves :
Effect comparison diagram of four methods :
1.3.5.2 narrow :
- Nearest neighbor

- Bilinear interpolation
- The performance is similar to that of the nearest neighbor ,2x2 The sampling method of is still not able to resist the flicker conditions listed in the above figure .
- Mipmap
- Take the original picture as the bottom of the pyramid
- take 2x2 Of 4 The average value of adjacent textures is used as the new texture element value of the next level
- Repeat until the pixel size is 1x1
- The overall data occupation is only more 1/3
- The key is to choose the right level( important )
- There is a question :overblur
- Use anisotropic filtering
- SAT
- ( This part needs game101 The basis of , Make up for it gkd)
Common ways of rendering optimization
- in the light of CPU: Texture atlas / Array
- prompt CPU and GPU Parallel work
- DrawCall It's one of them , The bottleneck lies mainly in CPU
- GPU The optimization mainly starts from the bandwidth - Texture compression
Introduction to common textures
- Cube map CubeMap( Commonly used for environment mapping )

- Bump map Bump Mapping

- Displacement mapping Displacement Mapping

summary
Filter Mode With what kind of ?
- Zoom in :
- Nearest neighbor : Take values directly from a single texture element
- Bilinear interpolation : take 2x2 The texture element of
- q Curve interpolation : The effect is between bilinear interpolation and cubic convolution interpolation
- Cubic convolution interpolation : take 4x4 Pixels , And consider the rate of change
- narrow :
- Nearest neighbor
- Bilinear interpolation
- mipmap( heavy difficult Look again games101)
Texture Optimization Methods and principles :
- cpu Optimize , Combine with texture number , Texture collection , promote CPU performance , Reduce DrawCall
- gpu Optimize , Using texture compression , Make effective use of limited bandwidth .
边栏推荐
- 166. 分数到小数
- 完全背包问题
- 谷粒学院微信扫码登录过程记录以及bug解决
- Split(), split(), slice(), can't you tell?
- Data exchange JSON
- Leetcode:829. Sum of continuous integers
- 小程序容器技术与物联网IoT的结合点
- SEM of C language_ Tvariable type
- RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs
- Leetcode: offer 59 - I. maximum value of sliding window
猜你喜欢

Gorilla/mux framework (RK boot): RPC error code design

pytorch中的双线性插值上采样(Bilinear Upsampling)、F.upsample_bilinear

【TA-霜狼_may-《百人计划》】2.1 色彩空间

Filter

TEC: Knowledge Graph Embedding with Triple Context

Idea plug-in backup table

File upload and download

Nacos

Research on target recognition and tracking based on 3D laser point cloud

后台系统页面左边菜单按钮和右边内容的处理,后台系统页面出现双滚动
随机推荐
Processing of menu buttons on the left and contents on the right of the background system page, and double scrolling appears on the background system page
How to use hybrid format to output ISO files? isohybrid:command not found
Blueprism registration, download and install -rpa Chapter 1
【TA-霜狼_may-《百人计划》】2.1 色彩空间
Binary tree god level traversal: Morris traversal
Database DDL (data definition language) knowledge points
静态库使用MFC和共享库使用MFC的区别
205. 同构字符串
Learning notes for introduction to C language multithreaded programming
Leetcode:剑指 Offer 59 - I. 滑动窗口的最大值
LeetCode 31下一个排列、LeetCode 64最小路径和、LeetCode 62不同路径、LeetCode 78子集、LeetCode 33搜索旋转排序数组(修改二分法)
Feature pyramid networks for object detection
复习专栏之---消息队列
数据库DDL(Data Definition Language,数据定义语言)知识点
ECMAScript 6.0
pytorch训练深度学习网络设置cuda指定的GPU可见
FCN full Convolution Network Understanding and Code Implementation (from pytorch Official Implementation)
Go tool cli for command line implementation
torch.histc
【快捷键】