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. window 更新 nodejs

    一直号称js程序员,结果发现自己机器的node版本才到 4.x.赶紧升级下. 在window下可以直接去nodejs.org下载最新的稳定版装上就行.同时也可以通过 powershell 命令行更新. ...

  2. RF/GBDT/XGBoost/LightGBM简单总结(完结)

    这四种都是非常流行的集成学习(Ensemble Learning)方式,在本文简单总结一下它们的原理和使用方法. Random Forest(随机森林): 随机森林属于Bagging,也就是有放回抽样 ...

  3. linux命令-定时任务at

    本文主要讲解一次性计划任务的命令at的用法! 1.相关操作命令及功能介绍: 在指定的时间执行一个任务,只能执行一次进程名为atd,首先需要确认该进程是否启动,并且配置开机自启动 ps -ef | gr ...

  4. c++ int 转 string 实现前缀补0

    最近需要读取一些格式化路径的文件.路径文件名字最后是数字从0开始到100结束,但是占了4位,即0000到0100这样. 需要将int转成string的同时加上前缀0. 方法一: 用sprintf()函 ...

  5. Visual Studio2010 支持MVC4开发

    最近的项目有一个维护的版本使用的是Visual Studio2010+MVC4开发的,记录一下软件的开发环境 ============================================= ...

  6. salesforce linghtning component 自动添加标准style css样式

    Your app automatically gets Lightning Design System styles if it extends  force:slds <aura:applic ...

  7. TASKER 定制你的手机让它在办公室时屏幕 30 分钟才灭

    TASKER 定制你的手机让它在办公室时屏幕 30 分钟才灭 因为到的办公室,手机一直是充电的,不想屏幕太快关关掉,所以使用 TASKER 做了一个条件. 当 WIFI 连接到公司 WIFI 且充电中 ...

  8. php fwrite写入文件bom头导致的乱码问题解决

    最近导出文件遇到fwrite导出乱码,而且中英文都乱码,很费解.折腾了一番之后终于找到问题所在了,mark下. UTF-8 BOM 又叫 UTF-8 签名,其实 UTF-8 的 BOM 对 UFT-8 ...

  9. (原创)AP6212移植到AM335X自主开发板上

    转载请指明出处. 参考<关于AM335X移植SDIO WIFI的简易教程> http://www.deyisupport.com/question_answer/dsp_arm/sitar ...

  10. Spring Cloud 入门 之 Eureka 篇(一)

    原文地址:Spring Cloud 入门 之 Eureka 篇(一) 博客地址:http://www.extlight.com 一.前言 Spring Cloud 是一系列框架的有序集合.它利用 Sp ...