블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2309)N
Unity3D (565)N
Programming (471)N
Unreal (4)
Gamebryo (56)
Tip & Tech (182)
협업 (34)
3DS Max (3)
Game (12)
Utility (114)
Etc (92)
Link (31)
Portfolio (19)
Subject (90)
iOS,OSX (37)
Android (12)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (1)
Memories (19)
Interest (37)
Thinking (36)
한글 (26)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (19)
Exercise (3)
나만의 맛집 (2)
냥이 (9)
육아 (5)
Total1,332,751
Today16
Yesterday299
Statistics Graph

달력

« » 2019.10
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

공지사항

태그목록

'overlay'에 해당되는 글 2건

  1. 2015.06.09 [NGUI] Overlay Shader with Panel Clipping
  2. 2015.04.27 Shader: Photoshop Overlay Effect


참조 : http://blueasa.tistory.com/1777

참조 : http://www.tasharen.com/forum/index.php?topic=10223.0


[파일]

Photoshop Overlay.zip



이전에 포토샵의 Overlay와 비슷한 느낌의 Shader가 필요해서 찾아서 올려놨는데 NGUI 패널에서 클리핑이 안돼서


수정 및 추가해서 올려 놓음.

Posted by blueasa

댓글을 달아 주세요

  1. //Somehow achieves an effect similar to this:
  2. //#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))
  3. Shader "Photoshop/Overlay"
  4. {
  5. Properties
  6. {
  7. _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
  8. }
  9. SubShader
  10. {
  11. Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
  12. ZWrite Off Lighting Off Cull Off Fog { Mode Off } Blend DstColor SrcColor
  13. LOD 110
  14. Pass
  15. {
  16. CGPROGRAM
  17. #pragma vertex vert_vct
  18. #pragma fragment frag_mult
  19. #pragma fragmentoption ARB_precision_hint_fastest
  20. #include "UnityCG.cginc"
  21. sampler2D _MainTex;
  22. float4 _MainTex_ST;
  23. struct vin_vct
  24. {
  25. float4 vertex : POSITION;
  26. float4 color : COLOR;
  27. float2 texcoord : TEXCOORD0;
  28. };
  29. struct v2f_vct
  30. {
  31. float4 vertex : POSITION;
  32. fixed4 color : COLOR;
  33. half2 texcoord : TEXCOORD0;
  34. };
  35. v2f_vct vert_vct(vin_vct v)
  36. {
  37. v2f_vct o;
  38. o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
  39. o.color = v.color;
  40. o.texcoord = v.texcoord;
  41. return o;
  42. }
  43. float4 frag_mult(v2f_vct i) : COLOR
  44. {
  45. float4 tex = tex2D(_MainTex, i.texcoord);
  46. float4 final;
  47. final.rgb = i.color.rgb * tex.rgb * 2;
  48. final.a = i.color.a * tex.a;
  49. return lerp(float4(0.5f,0.5f,0.5f,0.5f), final, final.a);
  50. }
  51. ENDCG
  52. }
  53. }
  54. }




출처 : http://answers.unity3d.com/questions/384550/shader-photoshop-overlay-effect.html

Posted by blueasa
TAG overlay

댓글을 달아 주세요