UE4 Material Custom Expressions
来源:互联网 发布:屏幕录像软件ios 编辑:程序博客网 时间:2024/06/03 15:49
Custom
The Custom expression allows you to write custom HLSL shader code operating on an arbitrary amount of inputs and outputting the result of the operation.
Properties
Input Name
Specifies the name of the input. This is the name displayed on the expression in the Material Editor as well as the name used within the HLSL code to reference the input's value.
Add as many inputs as you need to the Inputs array, and name them. You can then write code in the Code property. You can type either a full function body with return statements as shown in the example, or a simple expression such as Input.bgr. You must also specify the output data type in OutputType.
Here is the code that was used above so you can try out the Custom node for yourself.
float3 blur = Texture2DSample(Tex, TexSampler, UV);for (int i = 0; i < r; i++){ blur += Texture2DSample(Tex, TexSampler, UV + float2(i * dist, 0)); blur += Texture2DSample(Tex, TexSampler, UV - float2(i * dist, 0));}for (int j = 0; j < r; j++){ blur += Texture2DSample(Tex, TexSampler, UV + float2(0, j * dist)); blur += Texture2DSample(Tex, TexSampler, UV - float2(0, j * dist));}blur /= 2*(2*r)+1;return blur;
- UE4 Material Custom Expressions
- 后期材质(PostProcess Material)+ Custom Node 实现"描边"和"马赛克"效果【UE4】
- UE4 Material Properties
- UE4 Material Functions Overview
- ShaderGUI: Custom Material Inspectors in Unity 5+
- Creating New Material Nodes in UE4
- 材质实例化(Material Instancing)【UE4】
- [UE4][Custom Animation Graph Node]Evaluate Pose by Curve
- Creating Apps With Material Design —— Defining Custom Animations
- Android Material Design-Defining Custom Animations(自定义动画)-(六)
- Android Material Design-Defining Custom Animations(自定义动画)-(六)
- Material Design系列第六篇——Defining Custom Animations
- Material Design系列第六篇——Defining Custom Animations
- UE4 Material - How To Use Fresnel in your Materials
- UE4学习笔记(5)—— Material Parameter Collection
- 动态材质实例(Dynamic Material Instance)【UE4】
- 后期处理材质(Post Process Material)【UE4】
- UE4 Mobile Physical-Based Rendering and Material Template Design
- CoreLocation框架的使用
- 指针值加上一个数值的实际意义
- 无法自动获取IP地址
- swift学习笔记之运算符及常用语句
- 数字图像处理学习笔记
- UE4 Material Custom Expressions
- 解决Mysql导入乱码问题
- php 验证手机号码
- 计算机视觉基础5——本质矩阵与基本矩阵(Essential and Fundamental Matrices)
- C++实现LRU(最久未使用)缓存算法
- 给定一个01串(仅由‘ 0’或‘1’组成的字符串),现在想把这个数字串排序成“非递减”有序序列,请问至少需要多少次交换(任意两个位置交换)
- 小解CSDN论坛首页面的布局方式
- JAVA异常处理
- 中国省,市,区 json数据