_MainTex_TexelSize what's the meaning?
uniform float4 _MainTex_TexelSize
where is the value of the float4 _MainTexelSize from?
It's set by the application if it's present in the shader - it is the size of a texel of the texture in question, in other words, if it's a 1k x 1k texture, both x and y will be 1.0/1024.0
_MainTex_TexelSize is set by magic sauce in the darkness of Unity's source code.
It follows the dimensions of the _MainTex sampler and has these contents:
Vector4(1 / width, 1 / height, width, height)
https://forum.unity3d.com/threads/_maintex_texelsize-whats-the-meaning.110278/
Texture size
{TextureName}_TexelSize
- a float4 property contains texture size information:
x
contains 1.0/widthy
contains 1.0/heightz
contains widthw
contains height
https://docs.unity3d.com/Manual/SL-PropertiesInPrograms.html
_MainTex_TexelSize what's the meaning?的更多相关文章
- 2016暑假多校联合---Another Meaning
2016暑假多校联合---Another Meaning Problem Description As is known to all, in many cases, a word has two m ...
- HDU 5763 Another Meaning
HDU 5763 Another Meaning 题意:一个字串有可能在模式串出现多次,问有多少种可能出现的情况.关键是有重合的字串是不能同时计入的. 思路:先用kmp求出所有字串的位置.然后,dp. ...
- HDU 5763 Another Meaning KMP+DP
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5763 Another Meaning Time Limit: 2000/1000 MS (Java/ ...
- HDU 5763 Another Meaning (kmp + dp)
Another Meaning 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5763 Description As is known to all, ...
- hdu_5763_Another Meaning(dp)
题目链接:hdu_5763_Another Meaning 题意: 一个文本串A,一个模式串B,如果文本串含有模式串B,那么就能组合成多种意思,如下: In the first case, “ heh ...
- Analyzing the Meaning of Sentences
1. How can we represent natural language meaning so that a computer can process these representation ...
- JEECG&JWT异常捕获强化处理 | Java: Meaning of catch (final SomeException e)?
//从header中得到token String authHeader = request.getHeader(JwtConstants.AUTHORIZATION); if (authHeader ...
- The Real Meaning of Peace
The Real Meaning of Peace There once was a king who offered a prize to the artist who would paint th ...
- HDU 5763Another Meaning
Another Meaning Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)T ...
随机推荐
- bacnet ip转MQTT
迈思德网关最新支持BACNET IP协议,可以将BACNET IP转换为MODBUS.MQTT.OPC等协议,与百度天工,阿里云等无缝对接. 支持AI.AO.DI.DO.AV.DV六个对象的读写.
- 使用Lucene对doc、docx、pdf、txt文档进行全文检索功能的实现
转载请注明出处:http://blog.csdn.net/dongdong9223/article/details/76273859 本文出自[我是干勾鱼的博客] 这里讲一下使用Lucene对doc. ...
- LOJ2319. 「NOIP2017」列队【线段树】
LINK 思路 神仙线段树 你考虑怎么样才能快速维护出答案 首先看看一条链怎么做? 首先很显然的思路是维护每个节点的是否出过队 然后对于重新入队的点 直接在后面暴力vector存一下就可以了 最核心的 ...
- Windows 下的高 DPI 应用开发(UWP / WPF / Windows Forms / Win32)
本文将介绍 Windows 系统中高 DPI 开发的基础知识.由于涉及到坐标转换,这种转换经常发生在计算的不知不觉中:所以无论你使用哪种 Windows 下的 UI 框架进行开发,你都需要了解这些内容 ...
- 【idea】idea的常规设置
[一]在输入框输入字符,自动提示代码 File->Power Save Mode 去掉“对号” [二]自动代码提示的快捷键设置 (1)不区分大小写提示 (2)修改快捷提示快捷键.将basic= ...
- test20181029 宝藏
题意 分析 考场做法 一眼看出是支持换根的树形dp. 用\(f(x,0/1)\)表示x及其子树中,从x出发,不一定/一定回到x的最大收益. 然后子树很好做. 换根的时候,我先计算后还原,需要考虑很多, ...
- 使用Spec Markdown 编写手册文档
Spec Markdown 是一个基于markdown 的文档编写工具,安装简单,可以让我们编写出专业的文档 参考项目 https://github.com/rongfengliang/spec-md ...
- apache伪静态设置
在网站根目录下新建一个.htaccess文件即可,编辑如下 RewriteEngine On #游戏列表详细介绍 RewriteRule ^g-([0-9]+).html$ game.php?acti ...
- 设置JAVA HOME环境变量的秕处理
echo "放在JDK目录下,win xp需要下载SETX.EXE" setx /m Java_Home "%cd%" setx /m ClassPath &q ...
- css3中的相关单位
引用地址 :http://blog.csdn.net/jyy_12/article/details/42557241