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. 作业要求 20181030-1 Alpha发布用户使用报告

    作业链接[https://edu.cnblogs.com/campus/nenu/2018fall/homework/2325] 队名:二次元梦之队 组长:刘莹莹 组员:周昊 潘世维  王玉潘 赵美增 ...

  2. Alpha冲刺一 (8/10)

    前言 队名:拖鞋旅游队 组长博客:https://www.cnblogs.com/Sulumer/p/10023260.html 作业博客:https://edu.cnblogs.com/campus ...

  3. 06-jenkins的账号相关的问题

    飞测说:最近几天,在团队分享jenkins后,大家都十分感兴趣,各自下载安装和练习,然而jenkins2.3安装默认有权限设置,这块好多人遇到了问题,现在统一就账号登录的问题一起看看,踩过的坑,希望对 ...

  4. IOS中UITableViewCell使用详解

    IOS中UITableViewCell使用详解 - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(N ...

  5. 关于cookie和session的使用和理解

    由于项目需要,最近用session容器比较多,传载的同时加上了自己的一些理解,不足之处还请大家补充和纠正. 一.cookie机制和session机制的区别 ********************** ...

  6. cratedb 基本试用

    安装 docker run -d -p 4200:4200 crate UI访问 http://localhost:4200/#!/ 创建数据 tweets 是默认导入的,点击帮助导航可以操作 登陆 ...

  7. javaweb经典面试题

    1.hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得java程序员可以随心所欲的使用对象编程思维来操纵数据库. 工作原理: 1.读取并解析配置文件2. ...

  8. 记录tomcat的完整日志

    Tomcat报的错太含糊了,什么错都没报出来,只提示了Error listenerStart.为了调试,我们要获得更详细的日志.可以在WEB-INF/classes目录下新建一个文件叫logging. ...

  9. Java反射机制的适用场景及其利与弊 ***

    一.反射的适用场景是什么? 1).Java的反射机制在做基础框架的时候非常有用,有一句话这么说来着:反射机制是很多Java框架的基石.而一般应用层面很少用,不过这种东西,现在很多开源框架基本都已经给你 ...

  10. emacs之配置symbol浏览界面

    由于ecb的method-buffer不能更新,因此抛弃ecb,speedbar的method也不能更新,换imenu-tree 使用el-get install安装imenu-tree imenu- ...