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/width
  • y contains 1.0/height
  • z contains width
  • w contains height

https://docs.unity3d.com/Manual/SL-PropertiesInPrograms.html

_MainTex_TexelSize what's the meaning?的更多相关文章

  1. 2016暑假多校联合---Another Meaning

    2016暑假多校联合---Another Meaning Problem Description As is known to all, in many cases, a word has two m ...

  2. HDU 5763 Another Meaning

    HDU 5763 Another Meaning 题意:一个字串有可能在模式串出现多次,问有多少种可能出现的情况.关键是有重合的字串是不能同时计入的. 思路:先用kmp求出所有字串的位置.然后,dp. ...

  3. HDU 5763 Another Meaning KMP+DP

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5763 Another Meaning Time Limit: 2000/1000 MS (Java/ ...

  4. HDU 5763 Another Meaning (kmp + dp)

    Another Meaning 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5763 Description As is known to all, ...

  5. hdu_5763_Another Meaning(dp)

    题目链接:hdu_5763_Another Meaning 题意: 一个文本串A,一个模式串B,如果文本串含有模式串B,那么就能组合成多种意思,如下: In the first case, “ heh ...

  6. Analyzing the Meaning of Sentences

    1. How can we represent natural language meaning so that a computer can process these representation ...

  7. JEECG&JWT异常捕获强化处理 | Java: Meaning of catch (final SomeException e)?

    //从header中得到token String authHeader = request.getHeader(JwtConstants.AUTHORIZATION); if (authHeader ...

  8. 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 ...

  9. HDU 5763Another Meaning

    Another Meaning Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)T ...

随机推荐

  1. New Concept English Two 21 55

    $课文53  触电的蛇 544. At last firemen have put out a big forest fire in California. 消防队员们终于扑灭了加利福尼亚的一场森林大 ...

  2. 回测框架pybacktest简介(二)

    pybacktest 的疑点 第(一)节“教程”原文,是用 ipython notebook 写成,程序代码是一些片段组成. 为了阅读方便,合并在一起. 本文转载于:http://blog.csdn. ...

  3. PHP write byte array to file

    /********************************************************************************* * PHP write byte ...

  4. 自定义redis session

    1.思路 2.程序实现 1.用户系统类 这里模拟一个蹩脚的用户系统类(userSystem),如下: #coding=utf-8 #Redis实现用户系统 __author__ = 'beginman ...

  5. 进程的proc文件系统信息

    一.实验代码 #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include &l ...

  6. c++交叉#include问题

    这个问题会引起莫名其妙的编译错误, 碰到类里有其他类的指针的话,不要#include,提前声明下即可 class_a.h #ifndef CLASS_A_H #define CLASS_A_H cla ...

  7. 【转】为什么要用GIT而不是SVN

    原文网址:http://www.cnblogs.com/perseus/archive/2012/11/22/2782051.html 使用了近一年的git之后,再使用svn,发现自己svn这种版本管 ...

  8. MySQL This function has none of DETERMINISTIC, NO SQL...错误1418 的原因分析及解决方法

    MySQL开启bin-log后,调用存储过程或者函数以及触发器时,会出现错误号为1418的错误: ERROR 1418 (HY000): This function has none of DETER ...

  9. npm查看全局安装过的包

    在使用node的时候,用npm安装了很多软件,过一段时间没有使用就会忘记,怎么查看自己全局安装过的包,用命令 npm list -g --depth 0 在百度里搜不到结果的,我在google里老外的 ...

  10. 利用WeX5给手机APP增加短信验证码功能

    帖子来源:http://bbs.wex5.com/thread-70908-1-1.html 遇到一个手机APP项目客户要求注册到APP上的用户手机号必须是真实的通过X5平台整合短信发送平台接口完成了 ...