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
번호 분류 제목 글쓴이 날짜 추천
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
44172 일반 드디어 나도 자괴감 안드냐는 소리 첨으로 들어봤음 5 ㅇㅇ 211.246 2018-08-23 0
44171 일반 mmd방 버그가 4 ㅇㅇ 180.231 2018-08-23 0
44170 일반 라무네 샀따 5 Luche 2018-08-23 1
44169 일반 아침제조후 시원하게 출근중 4 시즈델타 117.111 2018-08-23 1
44168 일반 브알챗이 너무 좋아졌어 9 ㅇㅇ 223.33 2018-08-23 10
44167 일반 지금 업뎃때문에 불안정해짐 cv52468 175.223 2018-08-23 0
44166 일반 컨트롤러 이거 자주 부딪히는데 괜찮을려나 1 ㅇㅇ 112.151 2018-08-23 0
44165 일반 월드 넘어갈려니깐 계속 검은화면에서 멈추는데 어떻게 함? ㅇㅇ 119.201 2018-08-23 0
44164 일반 5달전만해도 트롤링 수준이 3 ㅇㅇ 180.231 2018-08-23 0
44162 일반 유쾌했던 그떄 그 영상 1 ㅇㅇ 180.231 2018-08-23 1
44159 일반 r-18 mmd보고 이제 안서 1 ㅇㅇ 180.231 2018-08-23 0
44157 일반 갑자기 겜 맵에만 접속하면 배경음만 들리고 꺼먼화면 뜨는데 히키 220.78 2018-08-23 0
44156 일반 바이브 컨트롤러 수시로 인식끊어지는데 해결법 아시는분..?ㅠㅠ 1 ㅇㅇ 59.14 2018-08-23 0
44155 일반 요ㅡ염하게 찍힌거 같음 1 거미군주 2018-08-23 2
44154 일반 아바타 뚜따 끝냈다... 1 고로로상 2018-08-23 1
44151 일반 바이브 컨트롤러 표정 안나가게 못하나 3 ㅇㅇ 112.151 2018-08-23 0
44150 일반 H방 친구따라왔는데 ㅋㅋㅋㅋㅋ 1 니똥고파밀리야 2018-08-23 1
44148 강좌/정보 브랄챗 2.3 업데이트 내역 (번역 포함) 8 MANKALO 2018-08-23 19
념글 삭제글 갤러리 랭킹