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
번호 분류 제목 글쓴이 날짜 추천
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
44192 일반 파티클리미터 공식 지원이라는 말은 6 아리수챤 2018-08-24 1
44191 일반 방문 열고하니까 허리트레커가 엄청튀네 4 ㅇㅇ 211.106 2018-08-24 0
44190 일반 조인해서 들어가면 그사람없는데 4 ㅇㅇ 210.126 2018-08-24 0
44189 일반 트래커 블루투스 동글말인데 6 아리수챤 2018-08-24 0
44188 일반 왼쪽눈 존나멋대러 깜박이는데 11 Huntere 2018-08-24 0
44187 일반 이아바타를 찾습니다~~ 4 Hoya 58.124 2018-08-24 0
44186 일반 안녕 하세요! ! 안녕하세요! ! 4 제네카린 2018-08-24 0
44185 일반 이건 무슨오류임 3 ㅇㅇ 112.156 2018-08-24 0
44184 일반 풀트래킹하고 자주하는짓이 5 ㅇㅇ 175.223 2018-08-24 0
44183 일반 그 비디오방 있잖아 2 spill 211.246 2018-08-24 0
44182 일반 트래커 착용하면 이상하게 꼭 1 Wooni 2018-08-24 0
44181 일반 금일 아침점호는 09시 30분, 09시 30분 연병장에서 있겠습니다. 1 ㅇㅇ 1.248 2018-08-24 0
44180 일반 요즘 저댄방에서 춤안춘지가 좀 된듯 1 하벤하이드 2018-08-24 0
44179 일반 바이브 트래커 하나 트래킹 열라튀는데 3 아리수챤 2018-08-23 0
44178 일반 요즘 9시 타임 체조만 가네 1 하피핏 2018-08-23 0
44177 일반 브알쳇에 오브젝트 생성기능 생김? 4 숟가락 2018-08-23 0
44176 일반 우콘할래? 7 하벤하이드 2018-08-23 0
44173 일반 시작하면 홈은 들어가지는데 월드 바꾸면 검은화면이다; 1 ㅊㅋㄹㅇ 59.1 2018-08-23 0
념글 삭제글 갤러리 랭킹