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

카테고리

분류 전체보기 (2853)
Unity3D (895)
Script (94)
Extensions (16)
Effect (3)
NGUI (81)
UGUI (9)
Physics (2)
Shader (43)
Math (1)
Design Pattern (2)
Xml (1)
Tips (204)
Link (26)
World (1)
AssetBundle (25)
Mecanim (2)
Plugins (87)
Trouble Shooting (71)
Encrypt (7)
LightMap (4)
Shadow (4)
Editor (12)
Crash Report (3)
Utility (9)
UnityVS (2)
Facebook SDK (2)
iTween (3)
Font (18)
Ad (14)
Photon (2)
IAP (1)
Google (11)
URP (4)
Android (54)
iOS (47)
Programming (479)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (189)
협업 (64)
3DS Max (3)
Game (12)
Utility (142)
Etc (99)
Link (34)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (16)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (19)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

[링크] https://misos03hop.booth.pm/items/5135844

 

【vrchat】[free]MisoShadow - MISO# - BOOTH

写真を撮ったり、きれいな影が欲しい人におすすめです。 ◎ 説明 ● liltoonの影をアニメの感じに変えてくれるアセットです。 ● リアルタイムでライトを使用しないため、フレームドロップ

misos03hop.booth.pm

 

 

[참조] https://gall.dcinside.com/mgallery/board/view/?id=vr&no=3367059

 

릴툰 그림자 카툰느낌내는 에셋 무료배포함 - 브이알챗 (VRChat) 마이너 갤러리

이런느낌으로 카툰느낌 나고그림자 각도조절 가능함광원 생각하면서 찍으면 사진도 잘나오고그냥 평범하게 있어도 이쁨그리고 젤 중요한게 pcss마냥 실시간 라이트가 아니라서프레임 드랍 없

gall.dcinside.com

 

반응형
Posted by blueasa
, |

NiloToon 같이 만들어 보고 싶어서 NiloToon 공개 소스를 참조한 URPSimpleGenshin Shader를 좀 개조해서 기능 추가 해봄.

 

// Based on SimpleGenshinFacial shader
// Simplified NiloToon Shader for Unity URP

/*
CustomURPToon Shader - A simplified toon shader based on SimpleGenshinFacial
Features:
- Basic toon lighting with cel shading
- Rim lighting
- Outline rendering
- Face shadow mapping support
- Mobile optimized
*/

 

 

[파일]

CustomURPToon.zip
0.51MB

 

 

[참조] https://github.com/NoiRC256/URPSimpleGenshinShaders

 

GitHub - NoiRC256/URPSimpleGenshinShaders: A simple Genshin Impact facial shader for Unity URP, based on NiloCat shader example

A simple Genshin Impact facial shader for Unity URP, based on NiloCat shader example - NoiRC256/URPSimpleGenshinShaders

github.com

 

반응형
Posted by blueasa
, |

[링크] https://github.com/NoiRC256/URPSimpleGenshinShaders

 

GitHub - NoiRC256/URPSimpleGenshinShaders: A simple Genshin Impact facial shader for Unity URP, based on NiloCat shader example

A simple Genshin Impact facial shader for Unity URP, based on NiloCat shader example - NoiRC256/URPSimpleGenshinShaders

github.com

 

반응형
Posted by blueasa
, |

[링크] https://github.com/ColinLeung-NiloCat/UnityURPToonLitShaderExample

 

GitHub - ColinLeung-NiloCat/UnityURPToonLitShaderExample: A very simple toon lit shader example, for you to learn writing custom

A very simple toon lit shader example, for you to learn writing custom lit shader in Unity URP - ColinLeung-NiloCat/UnityURPToonLitShaderExample

github.com

 

반응형
Posted by blueasa
, |

[링크] https://www.postype.com/@fail-blanc/post/17808791

 

5. 릴툰 쉐이더의 수치와 기능에 대해 알아보자!: 잡동사니

VRChat에서 사용되는 쉐이더에는 여러 종류가 있습니다… UTS라고 불리는 유니티 쨩 툰 쉐이더도 있고, poiyomi toon shader도 있습니다. 하지만 가장 대중적으로 많이 사용되는 건 누가 뭐래도 lilToon이

www.postype.com

 

반응형
Posted by blueasa
, |

[링크] https://github.com/lilxyzw/lilToon

 

GitHub - lilxyzw/lilToon: Feature-rich shaders for avatars

Feature-rich shaders for avatars. Contribute to lilxyzw/lilToon development by creating an account on GitHub.

github.com

 

반응형
Posted by blueasa
, |

[링크] https://toconakis.tech/glassmorphism/

 

【Unity】すりガラス風UIの作り方を解説 -グラスモーフィズム-|toconakis.tech

現在開発中の個人開発ゲーム「EUREKA5」で使っている「すりガラス風UI」の作り方を解説します。   EUR

toconakis.tech

 

Shader "glassShader"
{
    Properties
    {
        _MainTex("Texture", 2D) = "white" {}
        _Blur("Blur", Float) = 10
    }
    SubShader
    {

        Tags{ "Queue" = "Transparent" }

        GrabPass
        {   
        }

        Pass
        {
            CGPROGRAM

            #pragma vertex vert
            #pragma fragment frag
            #include "UnityCG.cginc"

            struct appdata
            {
                float4 vertex : POSITION;
                float2 uv : TEXCOORD0;
                fixed4 color : COLOR;
            };

            struct v2f
            {
                float4 grabPos : TEXCOORD0;
                float4 pos : SV_POSITION;
                float4 vertColor : COLOR;
            };

            v2f vert(appdata v)
            {
                v2f o;
                o.pos = UnityObjectToClipPos(v.vertex);
                o.grabPos = ComputeGrabScreenPos(o.pos);
                o.vertColor = v.color;
                return o;
            }

            sampler2D _GrabTexture;
            fixed4 _GrabTexture_TexelSize;

            float _Blur;

            half4 frag(v2f i) : SV_Target
            {
                float blur = _Blur;
                blur = max(1, blur);

                fixed4 col = (0, 0, 0, 0);
                float weight_total = 0;

                [loop]
                for (float x = -blur; x <= blur; x += 1)
                {
                    float distance_normalized = abs(x / blur);
                    float weight = exp(-0.5 * pow(distance_normalized, 2) * 5.0);
                    weight_total += weight;
                    col += tex2Dproj(_GrabTexture, i.grabPos + float4(x * _GrabTexture_TexelSize.x, 0, 0, 0)) * weight;
                }

                col /= weight_total;
                return col;
            }
            ENDCG
        }
        GrabPass
        {   
        }

        Pass
        {
            CGPROGRAM

            #pragma vertex vert
            #pragma fragment frag
            #include "UnityCG.cginc"

            struct appdata
            {
                float4 vertex : POSITION;
                float2 uv : TEXCOORD0;
                fixed4 color : COLOR;
            };

            struct v2f
            {
                float4 grabPos : TEXCOORD0;
                float4 pos : SV_POSITION;
                float4 vertColor : COLOR;
            };

            v2f vert(appdata v)
            {
                v2f o;
                o.pos = UnityObjectToClipPos(v.vertex);
                o.grabPos = ComputeGrabScreenPos(o.pos);
                o.vertColor = v.color;
                return o;
            }

            sampler2D _GrabTexture;
            fixed4 _GrabTexture_TexelSize;

            float _Blur;

            half4 frag(v2f i) : SV_Target
            {
                float blur = _Blur;
                blur = max(1, blur);

                fixed4 col = (0, 0, 0, 0);
                float weight_total = 0;

                [loop]
                for (float y = -blur; y <= blur; y += 1)
                {
                    float distance_normalized = abs(y / blur);
                    float weight = exp(-0.5 * pow(distance_normalized, 2) * 5.0);
                    weight_total += weight;
                    col += tex2Dproj(_GrabTexture, i.grabPos + float4(0, y * _GrabTexture_TexelSize.y, 0, 0)) * weight;
                }

                col /= weight_total;
                return col;
            }
            ENDCG
        }

    }
}
반응형
Posted by blueasa
, |

[요약]

1) Tags { "Queue"="Transparent" "RenderType" = "Opaque" }

2) #pragma surface surf Lambert alpha

 

----------------------------------------------------------------------------

Three steps:

Add objects rendered with this shader to the Transparent queue by adding “Queue”=“Transparent” to the subshader’s Tags list.
Add “alpha” to the surface function declaration, after the lighting function declaration, so the line becomes “#pragma surface surf Lambert alpha”
Actually set the alpha to something in the surface function, i.e. set o.Alpha = whatever you want.
I have done these modifications and used the _ColorTint’s alpha channel in the example. Then the shader becomes this:

 

Shader "-smn-/GlowingBorder" {
    Properties {
       _ColorTint("ColorTint", Color) = (1,1,1,1)
       _MainTex("Main Texture", 2D) = "white" {}
       _BumpMap("Normal Map", 2D) = "bump" {}
       _RimColorOuter("Rim Color Outer", Color) = (1,1,1,1)
       _RimColorInner("Rim Color Inner", Color) = (1,1,1,1)
       _RimPowerOuter("Rim Power Outer", Range(0.0, 7.0)) = 3.0
       _RimPowerInner("Rim Power Inner", Range(0.0, 20.0)) = 3.0
    }
    SubShader {
       Tags { "Queue"="Transparent" "RenderType" = "Opaque" }
 
 
       CGPROGRAM
       #pragma surface surf Lambert alpha
 
       struct Input {
         float4 color : COLOR;
         float2 uv_MainTex;
         float2 uv_BumpMap;
         float3 viewDir;
       };
 
       float4 _ColorTint;
       sampler2D _MainTex;
       sampler2D _BumpMap;
       float4 _RimColorOuter;
       float4 _RimColorInner;
       float _RimPowerOuter;
       float _RimPowerInner;
 
       void surf (Input IN, inout SurfaceOutput o) {
         IN.color = _ColorTint;
         o.Albedo = tex2D(_MainTex, IN.uv_MainTex).rgb * IN.color;
         o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
 		 o.Alpha = _ColorTint.a; // For example. Could also be the alpha channel on the interpolated vertex color (IN.color.a), or the one from the texture.
		
         half rimOuter = 1.0 -saturate(dot(normalize(IN.viewDir), o.Normal));
         half rimInner = saturate(dot(normalize(IN.viewDir), o.Normal));
         o.Emission = (_RimColorOuter.rgb * pow(rimOuter, _RimPowerOuter)) + (_RimColorInner.rgb * pow(rimInner, _RimPowerInner)) ;
       }
       ENDCG
    } 
    FallBack "Diffuse"
}

 

 

[출처] https://discussions.unity.com/t/how-can-i-add-alpha-channel-to-this-shader/100942

 

How can I add alpha-channel to this shader?

Hello, I have this shader that does not support alpha map. How can I modify it so I can adjust the alpha channel so as to be transparent? Thanks! Shader "-smn-/GlowingBorder" { Properties { _ColorTint("ColorTint", Color) = (1,1,1,1) _MainTex("Main Texture"

discussions.unity.com

 

 

반응형
Posted by blueasa
, |

[링크] https://liveupdate.tistory.com/308

 

[unity3d] 서피스 쉐이더 정리

ShaderLab : http://liveupdate.tistory.com/336 Unity3D 쉐이더 레퍼런스 : https://docs.unity3d.com/kr/530/Manual/SL-Reference.html 서피스 쉐이더 Shader "이름" {Properties {_프로퍼티("이름", 타입) = 값} Subshaders {Tags {// 유니티

liveupdate.tistory.com

 

반응형
Posted by blueasa
, |

[파일]

Transparent - Cutout ChromakeyShader.shader
0.00MB

 

[링크] https://seokiki0413.tistory.com/1

 

[Unity] Chromakey 동영상 투명하게 플레이 하는 Tip

유니티에서 동영상 배경을 투명하게 처리하는 방법은 Shader를 이용해서 합니다.Shader란 정의를 찾아보았으나 없었고,제가 생각하기에 Shader란 자바스크립트 계열의 일종으로 보입니다.(제 생각)

seokiki0413.tistory.com

 

 

반응형
Posted by blueasa
, |