VRChat 마이너 갤러리 저장소

제 목
일반 유니티 스탠다드 양면 쉐이더
글쓴이
으ㅡ음
추천
2
댓글
1
원본 글 주소
https://gall.dcinside.com/vr/43955
  • 2018-08-23 07:27:02
							

아래 코드 복사해서 사용 하면댐 에셋스토어에 있는 더블 쉐이더 같은건 메탈릭값이랑 여러가지 없었어서 갠적으로 못쓰겠드라


// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)


Shader "Standard 2-Sided"

{

Properties

{

_Color("Color", Color) = (1,1,1,1)

_MainTex("Albedo", 2D) = "white" {}

_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5


_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5

_GlossMapScale("Smoothness Scale", Range(0.0, 1.0)) = 1.0

[Enum(Metallic Alpha,0,Albedo Alpha,1)] _SmoothnessTextureChannel ("Smoothness texture channel", Float) = 0


[Gamma] _Metallic("Metallic", Range(0.0, 1.0)) = 0.0

_MetallicGlossMap("Metallic", 2D) = "white" {}


[ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0

[ToggleOff] _GlossyReflections("Glossy Reflections", Float) = 1.0


_BumpScale("Scale", Float) = 1.0

_BumpMap("Normal Map", 2D) = "bump" {}


_Parallax ("Height Scale", Range (0.005, 0.08)) = 0.02

_ParallaxMap ("Height Map", 2D) = "black" {}


_OcclusionStrength("Strength", Range(0.0, 1.0)) = 1.0

_OcclusionMap("Occlusion", 2D) = "white" {}


_EmissionColor("Color", Color) = (0,0,0)

_EmissionMap("Emission", 2D) = "white" {}

_DetailMask("Detail Mask", 2D) = "white" {}


_DetailAlbedoMap("Detail Albedo x2", 2D) = "grey" {}

_DetailNormalMapScale("Scale", Float) = 1.0

_DetailNormalMap("Normal Map", 2D) = "bump" {}


[Enum(UV0,0,UV1,1)] _UVSec ("UV Set for secondary textures", Float) = 0



// Blending state

[HideInInspector] _Mode ("__mode", Float) = 0.0

[HideInInspector] _SrcBlend ("__src", Float) = 1.0

[HideInInspector] _DstBlend ("__dst", Float) = 0.0

[HideInInspector] _ZWrite ("__zw", Float) = 1.0

}


CGINCLUDE

#define UNITY_SETUP_BRDF_INPUT MetallicSetup

ENDCG


SubShader

{

Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }

LOD 300


// ------------------------------------------------------------------

//  Base forward pass (directional light, emission, lightmaps, ...)

Pass

{

Name "FORWARD" 

Tags { "LightMode" = "ForwardBase" }


Blend [_SrcBlend] [_DstBlend]

ZWrite [_ZWrite]

Cull Off


CGPROGRAM

#pragma target 3.0


// -------------------------------------


#pragma shader_feature _NORMALMAP

#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON

#pragma shader_feature _EMISSION

#pragma shader_feature _METALLICGLOSSMAP

#pragma shader_feature ___ _DETAIL_MULX2

#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A

#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF

#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF

#pragma shader_feature _PARALLAXMAP


#pragma multi_compile_fwdbase

#pragma multi_compile_fog

#pragma multi_compile_instancing


#pragma vertex vertBase

#pragma fragment fragBase

#include "UnityStandardCoreForward.cginc"


ENDCG

}

// ------------------------------------------------------------------

//  Additive forward pass (one light per pass)

Pass

{

Name "FORWARD_DELTA"

Tags { "LightMode" = "ForwardAdd" }

Blend [_SrcBlend] One

Fog { Color (0,0,0,0) } // in additive pass fog should be black

ZWrite Off

ZTest LEqual

Cull Off


CGPROGRAM

#pragma target 3.0


// -------------------------------------



#pragma shader_feature _NORMALMAP

#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON

#pragma shader_feature _METALLICGLOSSMAP

#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A

#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF

#pragma shader_feature ___ _DETAIL_MULX2

#pragma shader_feature _PARALLAXMAP


#pragma multi_compile_fwdadd_fullshadows

#pragma multi_compile_fog


#pragma vertex vertAdd

#pragma fragment fragAdd

#include "UnityStandardCoreForward.cginc"


ENDCG

}

// ------------------------------------------------------------------

//  Shadow rendering pass

Pass {

Name "ShadowCaster"

Tags { "LightMode" = "ShadowCaster" }


ZWrite On ZTest LEqual


CGPROGRAM

#pragma target 3.0


// -------------------------------------



#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON

#pragma shader_feature _METALLICGLOSSMAP

#pragma shader_feature _PARALLAXMAP

#pragma multi_compile_shadowcaster

#pragma multi_compile_instancing


#pragma vertex vertShadowCaster

#pragma fragment fragShadowCaster


#include "UnityStandardShadow.cginc"


ENDCG

}

// ------------------------------------------------------------------

//  Deferred pass

Pass

{

Name "DEFERRED"

Tags { "LightMode" = "Deferred" }


CGPROGRAM

#pragma target 3.0

#pragma exclude_renderers nomrt



// -------------------------------------


#pragma shader_feature _NORMALMAP

#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON

#pragma shader_feature _EMISSION

#pragma shader_feature _METALLICGLOSSMAP

#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A

#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF

#pragma shader_feature ___ _DETAIL_MULX2

#pragma shader_feature _PARALLAXMAP


#pragma multi_compile_prepassfinal

#pragma multi_compile_instancing


#pragma vertex vertDeferred

#pragma fragment fragDeferred


#include "UnityStandardCore.cginc"


ENDCG

}


// ------------------------------------------------------------------

// Extracts information for lightmapping, GI (emission, albedo, ...)

// This pass it not used during regular rendering.

Pass

{

Name "META" 

Tags { "LightMode"="Meta" }


Cull Off


CGPROGRAM

#pragma vertex vert_meta

#pragma fragment frag_meta


#pragma shader_feature _EMISSION

#pragma shader_feature _METALLICGLOSSMAP

#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A

#pragma shader_feature ___ _DETAIL_MULX2

#pragma shader_feature EDITOR_VISUALIZATION


#include "UnityStandardMeta.cginc"

ENDCG

}

}


SubShader

{

Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }

LOD 150


// ------------------------------------------------------------------

//  Base forward pass (directional light, emission, lightmaps, ...)

Pass

{

Name "FORWARD" 

Tags { "LightMode" = "ForwardBase" }


Blend [_SrcBlend] [_DstBlend]

ZWrite [_ZWrite]

Cull Off


CGPROGRAM

#pragma target 2.0

#pragma shader_feature _NORMALMAP

#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON

#pragma shader_feature _EMISSION 

#pragma shader_feature _METALLICGLOSSMAP 

#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A

#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF

#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF

// SM2.0: NOT SUPPORTED shader_feature ___ _DETAIL_MULX2

// SM2.0: NOT SUPPORTED shader_feature _PARALLAXMAP


#pragma skip_variants SHADOWS_SOFT DIRLIGHTMAP_COMBINED


#pragma multi_compile_fwdbase

#pragma multi_compile_fog


#pragma vertex vertBase

#pragma fragment fragBase

#include "UnityStandardCoreForward.cginc"


ENDCG

}

// ------------------------------------------------------------------

//  Additive forward pass (one light per pass)

Pass

{

Name "FORWARD_DELTA"

Tags { "LightMode" = "ForwardAdd" }

Blend [_SrcBlend] One

Fog { Color (0,0,0,0) } // in additive pass fog should be black

ZWrite Off

ZTest LEqual

Cull Off

CGPROGRAM

#pragma target 2.0


#pragma shader_feature _NORMALMAP

#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON

#pragma shader_feature _METALLICGLOSSMAP

#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A

#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF

#pragma shader_feature ___ _DETAIL_MULX2

// SM2.0: NOT SUPPORTED shader_feature _PARALLAXMAP

#pragma skip_variants SHADOWS_SOFT

#pragma multi_compile_fwdadd_fullshadows

#pragma multi_compile_fog

#pragma vertex vertAdd

#pragma fragment fragAdd

#include "UnityStandardCoreForward.cginc"


ENDCG

}

// ------------------------------------------------------------------

//  Shadow rendering pass

Pass {

Name "ShadowCaster"

Tags { "LightMode" = "ShadowCaster" }

ZWrite On ZTest LEqual


CGPROGRAM

#pragma target 2.0


#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON

#pragma shader_feature _METALLICGLOSSMAP

#pragma skip_variants SHADOWS_SOFT

#pragma multi_compile_shadowcaster


#pragma vertex vertShadowCaster

#pragma fragment fragShadowCaster


#include "UnityStandardShadow.cginc"


ENDCG

}


// ------------------------------------------------------------------

// Extracts information for lightmapping, GI (emission, albedo, ...)

// This pass it not used during regular rendering.

Pass

{

Name "META" 

Tags { "LightMode"="Meta" }


Cull Off


CGPROGRAM

#pragma vertex vert_meta

#pragma fragment frag_meta


#pragma shader_feature _EMISSION

#pragma shader_feature _METALLICGLOSSMAP

#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A

#pragma shader_feature ___ _DETAIL_MULX2

#pragma shader_feature EDITOR_VISUALIZATION


#include "UnityStandardMeta.cginc"

ENDCG

}

}



FallBack "VertexLit"

CustomEditor "StandardShaderGUI"

}


갓파 2018.08.23 13:20:55
번호 분류 제목 글쓴이 날짜 추천
44240 일반 나랑 친해지면 다 브알 접음 6 타나토스시스템 2018-08-24 0
44238 일반 가라오케 버튼 누르면 노래나오게 하는거 아시는분..... 2 2143 121.168 2018-08-24 0
44237 일반 오늘 버스 사고났는데 허리 너무아프다 2 IlIl 2018-08-24 0
44236 일반 그림 그리는 영상 올림 3 비드 1.249 2018-08-24 1
44235 일반 바이브 도착해따 8 ㅇㅇ 223.62 2018-08-24 2
44234 일반 결국 다시 만든다... 4 멜리나 2018-08-24 0
44233 일반 평일 이시간에 하고있는 사람들 뭐임? 10 ㅇㅇ 115.22 2018-08-24 0
44231 일반 혼자만의 생일파티 1 아델리펭귄 2018-08-24 0
44229 일반 바이브 컨트롤러 너무 잘부딪혀 1 ㅇㅇ 112.151 2018-08-24 0
44227 일반 미친 눈떠보니 12시내... 3 쉔가오랜 211.36 2018-08-24 0
44226 일반 메세지하는거 설정했는데 ㅇㅇ 61.83 2018-08-24 0
44224 일반 VR은 기기 혼용 안돼죠? 5 히키 220.78 2018-08-24 0
44223 일반 유니티에 아바타 불러오면 다 핑크인간 되는데 이거 어떻게 해결해? 3 ㅇㅇ 211.179 2018-08-24 0
44222 일반 아이 썅!! 10 ㅇㅇ 218.209 2018-08-24 2
44221 일반 한글 닉네임 쓰면 옆에 영어랑 숫자붙는거 없앨수없는거야? 5 Ryuon 2018-08-24 0
44220 일반 앉을때 손이 장애가 됨 2 ㅇㅇㅇㅇ 117.111 2018-08-24 0
44219 일반 브알챗 방송보는건 고통스럽네 3 Wooni 2018-08-24 0
44218 일반 머리카락 만지다가 똥망함.jpg 10 아사트루 2018-08-24 1
44217 일반 업데이트이후로 맵에가면사람이안보임... 1 ㅇㅇ 61.83 2018-08-24 0
44213 일반 오큘러스 터치 유니티에 어떻게 적용하나요? ㅇㅇ 116.38 2018-08-24 0
44212 일반 친구한테 만들어주거나 나 쓸려고 만든 아바타가 벌써 50개 가량 되네 8 Ι아이스젤리Ι 2018-08-24 5
44211 일반 i7 8700k 맥스코어 4.7아냐? 14 하벤하이드 2018-08-24 0
44210 일반 MMD월드에서 부탁해 달링 이노래 첨들어봤는데 노래 좋네 2 림크 2018-08-24 0
44209 일반 vrc트래커 몇개까지 인식됨? 3 ㅇㅇ 39.7 2018-08-24 0
44208 일반 이스피커 어떰? 그로자 2018-08-24 0
44207 일반 Ctrl p로 본 합쳐놧는데 5 류아람 2018-08-24 0
44206 일반 오늘 점심쯤 트래커 주문하면 언제옴???? 5 타다할배 119.196 2018-08-24 0
44205 일반 요번에 컴업글할때 쿨러는 쓰던거 썻는데 11 하벤하이드 2018-08-24 0
44204 일반 1080Ti 떡락중 그러나 4 Wooni 2018-08-24 0
44203 일반 아바타 월드나 만들까 ... 3 Ι아이스젤리Ι 2018-08-24 3
44202 일반 오디오 스트랩 있으면 확실히 안정감 있음? 5 1234 119.192 2018-08-24 0
44201 일반 아바타 월드고정 오브젝트에다가 픽업 뭐이런거 넣으면 3 하벤하이드 2018-08-24 0
44200 일반 아싸 새끼가 노는법 4 어흑마이갓 2018-08-24 4
44199 일반 컴업글전엔 혼춤을 많이췄는데 8 하벤하이드 2018-08-24 0
44198 일반 이런거 만들면 인싸일듯 ㅇㅇ 27.100 2018-08-24 1
44197 일반 바이브 유저들중에 오디오스트랩 없는놈 있는놈 비율이 10 아리수챤 2018-08-24 0
44196 일반 바이브 오디오 스트랩해서 쓰는데 마이크는 어찌 합니까 3 ㅇㅇ 223.62 2018-08-24 0
44195 일반 VR 사고 브얄챗 시작하자 마자 제작의 필요성을 느꼈다. 3 1234 119.192 2018-08-24 0
44194 일반 패치하고 방이동 저만안대요?? 뱌텔 220.117 2018-08-24 0
44193 일반 MR 왜 까는거임? 2 ㅇㅇ 175.223 2018-08-24 0
념글 삭제글 갤러리 랭킹