当前位置:网站首页>[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 .
边栏推荐
- 线程数据共享和安全 -ThreadLocal
- Nacos
- 30. 串联所有单词的子串
- RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs
- 8. 字符串转换整数 (atoi)
- Thread data sharing and security -threadlocal
- 【TA-霜狼_may-《百人计划》】2.4 传统经验光照模型
- 165. 比较版本号
- Sort linked list (merge sort)
- Edge drawing: a combined real-time edge and segment detector
猜你喜欢

详解Spark运行模式(local+standalone+yarn)

Home online shopping project

ASGNet论文和代码解读2

Are you still wasting brain cells for self-study? This interview note is definitely the ceiling of station C

IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?

在线公网安备案保姆级教程【伸手党福利】
![[深度学习]激活函数(Sigmoid等)、前向传播、反向传播和梯度优化;optimizer.zero_grad(), loss.backward(), optimizer.step()的作用及原理](/img/9f/187ca83be1b88630a6c6fbfb0620ed.png)
[深度学习]激活函数(Sigmoid等)、前向传播、反向传播和梯度优化;optimizer.zero_grad(), loss.backward(), optimizer.step()的作用及原理

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

The preorder traversal of leetcode 144 binary tree and the expansion of leetcode 114 binary tree into a linked list

RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs
随机推荐
pytorch训练深度学习网络设置cuda指定的GPU可见
使用selenium自动化测试工具爬取高考相关院校专业招生分数线及排名情况
Complete knapsack problem
【EI检索】2022年第六届材料工程与先进制造技术国际会议(MEAMT 2022)重要信息会议网址:www.meamt.org会议时间:2022年9月23-25日召开地点:中国南京截稿时间:2
Addition without addition, subtraction, multiplication and division
Use of comment keyword in database
How to achieve 0 error (s) and 0 warning (s) in keil5
详解Spark运行模式(local+standalone+yarn)
[深度学习]激活函数(Sigmoid等)、前向传播、反向传播和梯度优化;optimizer.zero_grad(), loss.backward(), optimizer.step()的作用及原理
jeecgboot输出日志,@Slf4j的使用方法
214. 最短回文串
166. 分数到小数
Leetcode:剑指 Offer 59 - I. 滑动窗口的最大值
衡量两个向量相似度的方法:余弦相似度、pytorch 求余弦相似度:torch.nn.CosineSimilarity(dim=1, eps=1e-08)
Gorilla/mux framework (RK boot): RPC error code design
数据库DDL(Data Definition Language,数据定义语言)知识点
[party benefits] jsonobject to string, leave blank
168. Excel表列名称
在 C 中声明函数之前调用函数会发生什么?
IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?