Blending

  Blending is used to make transparent objects.

  

  When graphics are rendered, after all shaders have executed and all textures have been applied, the pixels are written to the screen. How they are combined with what is already there is controlled by the Blend command.

[Syntax]

  

  

  Additionally, you can set upper-rendertarget blending modes. When using multiple render target (MRT) rendering, the regular syntax above sets up the same blending modes for all render targets. The following syntax can set up different blending modes for individual render targets, where N is the render target index (0..7). This feature works on most modern APIs/GPUs (DX11/12, GLCore, Metal, PS4):

  • Blend N SrcFactor DstFactor
  • Blend N SrcFactor DstFactor, SrcFactorA DstFactorA
  • BlendOp N Op
  • BlendOp N OpColor, OpAlpha

[Blend Operations]

  

[Blend factors]

  

[常用混合类型]

  

[Examples]

1、Here is a small example shader that adds a texture to whatever is on the screen already:

Shader "Simple Additive" {
Properties {
_MainTex ("Texture to blend", 2D) = "black" {}
}
SubShader {
Tags { "Queue" = "Transparent" }
Pass {
Blend One One
SetTexture [_MainTex] { combine texture }
}
}
}

参考:file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/Components/SL-Blend.html

Blending的更多相关文章

  1. 骨骼蒙皮动画算法(Linear Blending Skinning)

    交互式变形是编辑几何模型的重要手段,目前出现了许多实时.直观的交互式变形方法.本文介绍一种利用线性混合蒙皮(Linear Blending Skinning,LBS)技术来实现网格变形的方法,线性混合 ...

  2. Image Blending

    给定两幅或者多幅图像,如何无缝自然拼接,这就是Image Blending 需要解决的问题(演示效果请看http://blog.sina.com.cn/s/blog_67f034a50100iuqt. ...

  3. Aggregation(1):Blending、Bagging、Random Forest

    假设我们有很多机器学习算法(可以是前面学过的任何一个),我们能不能同时使用它们来提高算法的性能?也即:三个臭皮匠赛过诸葛亮. 有这么几种aggregation的方式: 一些性能不太好的机器学习算法(弱 ...

  4. Unity3d Shader开发(三)Pass(Blending )

    混合被用于制作透明物体. 当图像被渲染时,所有着色器被执行以后,所有贴图被应用后,像素将被写到屏幕.他们是如何通过Blend命令的控制和已有的图像合并呢? Syntax 语法 Blend Off Tu ...

  5. Directx11学习笔记【十八】 Blending混合

    本文由zhangbaochong原创,转载请注明出处http://www.cnblogs.com/zhangbaochong/p/5634580.html 在d3d11中是按frame来渲染物体的,在 ...

  6. 图片alpha blending的计算

    转载时请注明出处和作者联系方式:http://blog.csdn.net/mimepp作者联系方式:YU TAO <yut616 at sohu dot com> 一幅彩色图像的每一个像素 ...

  7. 图像处理------透明混合 - Alpha Blending效果

    基本原理: 图像的透明混合有个专属名词– Alpha Blending 对任意两张图像可以合成为一张图像,合成图像的像素取值根据数学公式: RGB3 = (1- a) * RGB1 + a * RGB ...

  8. Blending, Bootstrap

    听林轩田老师的<机器学习技法>,Lecture 7讲到model的blending. 理解了一个之前一直模棱两可的概念:bootstrap. 先说一下什么是blending.在机器学习中, ...

  9. 机器学习技法:07 Blending and Bagging

    Roadmap Motivation of Aggregation Uniform Blending Linear and Any Blending Bagging (Bootstrap Aggreg ...

  10. 【Unity Shaders】Alpha Test和Alpha Blending

    写在前面 关于alpha的问题一直是个比较容易摸不清头脑的事情,尤其是涉及到半透明问题的时候,总是不知道为什么A就遮挡了B,而B明明在A前面.这篇文章就总结一下我现在的认识~ Alpha Test和A ...

随机推荐

  1. 通过 Windows API 获取鼠标位置等状态信息

    #include <graphics.h> #include <stdio.h> void main() { initgraph(, ); // 初始化绘图窗口 HWND hw ...

  2. Sprint第一个冲刺(第五天)

    一.Sprint介绍 今天我们主要做的是修复乱码,完善项目. 任务进度: 二.Sprint周期 看板: 燃尽图:

  3. lapis 框架安装试用

    备注:     此次安装使用的是openresty 的openresty-1.11.2.1(openresty-1.11.2.1.tar.gz,最新版本存在cjson 包的问题 )   同时对于lua ...

  4. jdk、jre、JVM的简单区别与联系

    2015-10-20 23:08:52 (1)jdk Java development toolkit(开发工具包),JDK是整个JAVA的核心,包括了Java运行环境jre(Java Runtime ...

  5. bzoj 2632 [neerc2011]Gcd guessing game——贪心(存疑)

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2632 官方题解:http://neerc.ifmo.ru/archive/2011/neer ...

  6. 搭建基于hyperledger fabric的联盟社区(二) --环境配置

    接下来讲一下在本地测试区块链网络的过程.我要部署的是2peer+1orderer架构,所以需要准备三台虚拟机,为了方便起见可以先把一台配置好,然后复制出剩余两台即可.搭建虚拟机我用的是virtualb ...

  7. Memory stream is not expandable

    发现项目有一个地方在做图片缩放剪切的一个操作中.碰到有一些特殊的图片会报 Memory stream is not expandable 的错误 跟踪的时候发现是 由方法 originalStream ...

  8. Spring Cloud 服务网关Zuul

    Spring Cloud 服务网关Zuul 服务网关是分布式架构中不可缺少的组成部分,是外部网络和内部服务之间的屏障,例如权限控制之类的逻辑应该在这里实现,而不是放在每个服务单元. Spring Cl ...

  9. 01:Sysbench 基准压测 IO篇

    line:V1.1 mail: gczheng@139.com date: 2017-11-17 一.Sysench测试前准备 1.1.压测环境 配置 信息 主机 Dell PowerEdge R73 ...

  10. Lamp 安装教程

    Ubuntu 14.04 麒麟版安装:Apache+php5+mysql+phpmyadmin. LAMP是Linux web服务器组合套装的缩写,分别是Linux+Apache+MySQL+PHP. ...