shader
文章平均质量分 88
unity shader
Jo.H
Daily self reflection
展开
-
Image 模糊遮罩Shader
Shader "Custom/Vague" { Properties{ _Color("Main Color", Color) = (1,1,1,1) _BumpAmt("Distortion", Range(0,128)) = 10 _MainTex("Tint Color (RGB)", 2D) = "white" {} _BumpMap("Normalmap", 2D) = "bu...原创 2019-06-28 10:52:25 · 596 阅读 · 0 评论 -
Shader中RGB和HSV的相互转换
RGB中的xyz分别对应r(红色)g(绿色)b(蓝色) HSV中的xyz分别对应h(色调、颜色)s(饱和度)v(明度) RGB转化到HSV的算法: max=max(R,G,B); min=min(R,G,B); V=max(R,G,B); S=(max-min)/max; if (R = max) H =(G-B)/(max-min)* 60; if (G = max) H = 120+(B-R)/(max-min)* 60; if (B = max) H = 240 +(R-G)/(max-min)*原创 2020-07-02 10:54:23 · 1372 阅读 · 0 评论