hue shift shader, a simple way 简单高效方法
来源:互联网 发布:数控线切割编程五角星 编辑:程序博客网 时间:2024/06/06 04:22
hue shift effect in Photoshop:
http://forum.unity3d.com/threads/hue-saturation-brightness-contrast-shader.260649/
Shader "Craft/Simple Hue"{ Properties { _Color ("Main Color", Color) = (1,1,1,1) _MainTex ("Base (RGB)", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 100 Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma target 3.0 #include "UnityCG.cginc" sampler2D _MainTex; float4 _Color; struct appdata { float4 vertex : POSITION; float3 texcoord : TEXCOORD0; }; struct v2f { float4 pos : SV_POSITION; float2 uv : TEXCOORD0; }; v2f vert(appdata v) { v2f o; o.pos = mul(UNITY_MATRIX_MVP, v.vertex); o.uv = v.texcoord; return o; } fixed4 frag(v2f i) : COLOR { float4 tex = tex2D(_MainTex, i.uv); return fixed4( tex.r-_Color.r*(2*tex.r-tex.g-tex.b), tex.g-_Color.g*(2*tex.g-tex.r-tex.b), tex.b-_Color.b*(2*tex.b-tex.r-tex.g), tex.a ); } ENDCG } }}
效果:
ref:
https://dexint.wordpress.com/2015/02/03/awkward-but-a-cheaper-option-instead-of-hue-shift-shader/
0 0
- hue shift shader, a simple way 简单高效方法
- A SIMPLE WAY TO USE SELECT (socket)
- a simple way ,to programing or writting!
- A simple way to cure sleepless
- A very efficient and economical way to shift an array
- Unity--A simple way of fading a Texture2D
- A simple way to read an XML file in Java
- QueryBuilder: A Simple Way to Read and Write Query Strings
- Simple way to repeat a String in java
- Dropout: A Simple Way to Prevent Neural Networks from Overfitting
- Dropout:A Simple Way to Prevent Neural Networks from Overfitting
- HDU 2612 Find a way 简单BFS
- 两个简单方法--shift()和unshift();
- HUE的简单介绍
- hdu 4972 A simple dynamic programming problem(高效)
- A Simple Way to Enable a Windows XP Look and Feel for VC++ 6.0 MFC Applications
- 简单计算器(A simple calculator)
- a simple and easy way to export grid(grid view) to excel
- strom
- php内核分析1 sapi_module_struct
- 阿里2015基础平台研发工程师实习生笔试卷
- urldecode()二次解码引发注入
- sql 高级语法
- hue shift shader, a simple way 简单高效方法
- 初步了解JAR,WAR,EAR的区别
- 蓝桥杯基础练习 芯片测试
- Xmaneger+xshell远程访问图形化程序
- Mac 显示隐藏文件夹
- HDU 1024 Max Sum Plus Plus
- java中向文本文件中读取数据之使用Scanner
- beego MySQL数据库连接池
- MYSQL性能优化详解(一)