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
번호 분류 제목 글쓴이 날짜 추천
48206 일반 평생 가상세계에서 사는것도 나쁘지 않을지도 5 린코 2018-09-06 1
48205 일반 던전보니까 또생각나는게있는데 3 꿀뚤 2018-09-06 0
48204 일반 ivry 이거 하면 화면이 옆으로 눕는데 해결하는법좀 1 223.131 2018-09-06 0
48203 일반 바이브 가격 3 ㅇㅇ 203.207 2018-09-06 0
48202 일반 이모트로 춤추는거 1분넘으면 다시누르는거 밖에 방법없음? ㅇㅇ 175.223 2018-09-06 0
48200 일반 난 최근 귀여운 캐릭을 안써서 옛날저댄영상 4 엘에르엘 2018-09-06 2
48199 일반 오큘트래커는 만약에 나오면 진짜괜찮을거같은데 울테 2018-09-06 0
48198 일반 너무 힘들다 3 ㅇㅇ 113.192 2018-09-06 1
48197 일반 최근에 저댄영상 3 하벤하이드 2018-09-06 0
48196 일반 귀여운 캐릭터가 춤추는거 7 카디아. 2018-09-06 4
48195 일반 저댄 노래 질문점 3 ㅇㅇ 58.239 2018-09-06 0
48193 일반 오큘러스 고는 뭐임?? 8 ㅇㅇ 119.70 2018-09-06 0
48192 일반 던전보니까 생각나는건데 차렷충장점하나있는듯 4 꿀뚤 2018-09-06 0
48191 일반 오랜만에 돌아온 커미션용 포폴 [스압] 10 Jatking 2018-09-06 6
48190 일반 하얀화면 저주한다 ㅡㅡ Huntere 2018-09-06 0
48189 일반 Miko of Brothers 2차 세계대전 미코 10 음료 2018-09-06 10
48188 일반 그리고 쉐이더로는 시침 움직이게 할수없지 않나 4 검은연 2018-09-06 0
48187 일반 뭐야 일본 지진났었네 3 하벤하이드 2018-09-06 0
48185 일반 브알 뉴비인데 키넥트랑 트래커가 뭐야? 꼭 사야돼? 7 ㅇㅇ 119.70 2018-09-06 0
48184 일반 아침체조 오늘 처음가봤는데 왜이리 운동잘함 2 갓쿠라트 2018-09-06 0
48183 일반 아 그리고 진짜 바람에 트래커 날아다니더라? ㅋㅋㅋㅋㅋㅋㅋ 15 린코 2018-09-06 0
48182 일반 혹시 제네릭 아바타 카메라 시점 변경 방법 아는사람 있음? IRUOD 2018-09-06 0
48181 일반 ??: 어딜 보시는겁니까? 그건 제 잔상입니다 1 그만하자 2018-09-06 1
48180 일반 이렇게 만들면 VRC 아바타에 손목시계 만들기 씹 가능하다 22 검은연 2018-09-06 0
48178 일반 자취방에서 vr 하려고하는 갤럼아 4 엘에르엘 2018-09-06 0
48177 일반 VR인데 묵언하는 기분을 어제 이해했다 8 린코 2018-09-06 0
48176 일반 던전 짤막한 후기 2 ㅇㅇ 223.38 2018-09-06 0
48175 일반 (데이터)던전 베타도안하고 존버해서 퍼블릭 솔플도전해봄 2 하벤하이드 2018-09-06 2
48174 일반 vr챗하고 좋아진점 6 꿀뚤 2018-09-06 2
48173 일반 VR챗에서 전자시계 만들수 있을거같다. 1 검은연 2018-09-06 1
48172 일반 차렷충이 좋을때 1 사요 2018-09-06 0
48171 일반 던전)혼자 빨간해골 어떻게 잡으면 될까... 엘에르엘 2018-09-06 0
48170 일반 금일 아침점호는 09시 30분, 09시 30분 연병장에서 있겠습니다. 3 ㅇㅇ 1.248 2018-09-06 0
48169 일반 담주면 나도 던전 갈수이따,, 1 검은연 2018-09-06 0
48168 일반 던전) 퍼블릭 뉴비들 뒤에서 지켜봐주는거 너무 재밌다 1 엘에르엘 2018-09-05 0
48167 일반 오큘 사용중인데 바이브 갈아탈 예정 4 sing)Hana 2018-09-05 0
48164 일반 풀트래킹 실패했다 13 린코 2018-09-05 0
48163 일반 곧장 바이브+트래커3개 vs 2019 오큘 존버 4 ㅇㅇ 211.36 2018-09-05 0
48162 일반 빅시스터 던젼 죄수 번호 정답이 뭐임 1 ㅇㅇ 182.208 2018-09-05 0
48161 일반 아바타 쓸만한거 다 부스같은데서 돈주고 사야댐? 3 ㅁㅁ 2018-09-05 0
념글 삭제글 갤러리 랭킹