当前位置:网站首页>[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 .
边栏推荐
- LeetCode 31下一个排列、LeetCode 64最小路径和、LeetCode 62不同路径、LeetCode 78子集、LeetCode 33搜索旋转排序数组(修改二分法)
- Home online shopping project
- 171. Excel 表列序号
- Download and installation configuration of cygwin
- 【快捷键】
- Thread data sharing and security -threadlocal
- 【EI检索】2022年第六届材料工程与先进制造技术国际会议(MEAMT 2022)重要信息会议网址:www.meamt.org会议时间:2022年9月23-25日召开地点:中国南京截稿时间:2
- [party benefits] jsonobject to string, leave blank
- SEM of C language_ Tvariable type
- 不用加减乘除实现加法
猜你喜欢

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

LeetCode 128最长连续序列(哈希set)

The combination of applet container technology and IOT

TEC: Knowledge Graph Embedding with Triple Context

Feature pyramid networks for object detection

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

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

深度学习中的随机种子torch.manual_seed(number)、torch.cuda.manual_seed(number)

Appium自动化测试基础 — APPium基本原理

Unexpected token o in JSON at position 1 ,JSON解析问题
随机推荐
multiple linear regression
【伸手党福利】JSONObject转String保留空字段
Thread data sharing and security -threadlocal
5. [WebGIS practice] software operation - service release and permission management
Idea plug-in backup table
4、【WebGIS实战】软件操作篇——数据导入及处理
165. 比较版本号
LeetCode 128最长连续序列(哈希set)
快速筛选打卡时间日期等数据:EXCEL筛选查找某一时间点是否在某一时间段内
RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs
171. Excel 表列序号
5、【WebGIS实战】软件操作篇——服务发布及权限管理
MFC窗口滚动条用法
409. 最长回文串
The difference between MFC for static libraries and MFC for shared libraries
Feign remote call and getaway gateway
Pytorch training deep learning network settings CUDA specified GPU visible
187. 重复的DNA序列
FCN full Convolution Network Understanding and Code Implementation (from pytorch Official Implementation)
Test function in pychram