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
번호 분류 제목 글쓴이 날짜 추천
44373 일반 파티클마커 찔끔나옴 Lakenls 2018-08-24 0
44372 일반 빅 브라더 ㅇㅇ 42.82 2018-08-24 0
44370 일반 양심고백) 닉 알려진 갤럼 다 블락함 ㅇㅇ 175.223 2018-08-24 2
44369 일반 메시지 기능 이제 안되는 듯 2 ㅇㅇ 42.82 2018-08-24 0
44367 일반 Vrchat용 아바타 다 만들었다 20 Veniac 2018-08-24 27
44366 일반 바이브 트리거안눌렀는데 왜자꾸 표정 바뀌는거야 1 ㅇㅇ 112.151 2018-08-24 0
44365 일반 MR컨트롤러 해결했다 너무고맙고 사랑해 6 ㅢㅣ 175.223 2018-08-24 0
44364 일반 챗붕이들아 5 ㅇㅇㅇㅇ 59.8 2018-08-24 2
44363 일반 요즘 vr챗 할 이유가 사라졌다 5 ㅇㅇ 125.190 2018-08-24 2
44362 일반 대딸음성 추가로 업로드됬다 5 카디아. 2018-08-24 5
44361 일반 요번 업데이트에 공식 파티클리미터 생김? 1 김야기 2018-08-24 0
44360 일반 저댄방에 있던 분홍색 입갈라진 괴물 실체를 알아 버렸다 3 링고베리 2018-08-24 0
44359 일반 이쁜 관람차 맵 다녀왔으 4 Red.Coco 2018-08-24 6
44358 일반 불금이니 댄스 막 달리고 싶다...ㅠ 2 아이리네 2018-08-24 0
44355 일반 업뎃후에 허브 처음 가봤는데 친구 2명 사귐 1 ㅇㅇ 218.157 2018-08-24 0
44354 일반 R18 TDA 낭자애 베이스 올린다 1 ㅇㅇ 220.240 2018-08-24 1
44352 일반 아바타 로딩속도 업뎃후로 개느림;;; 1 ㅇㅇ 180.65 2018-08-24 0
44351 일반 진짜제발 MR컨트롤러 페어링좀 도와줘 15 ㅢㅣ 175.223 2018-08-24 0
44350 일반 1060 3긱 슈샘 100 개잘된다 2 ㅇㅇ 211.36 2018-08-24 0
44348 일반 성님들 바이브 살께요 3 maron 2018-08-24 0
44346 일반 근데 원탁회의장 방패의미있어? 2 엘에르엘 2018-08-24 0
44345 일반 바이브 삿은데 렉때메 못하는중 ㅎㅎ.. 1 3학년1반이하린 2018-08-24 0
44343 일반 허리트래커 고프로 스트랩쓰는 갤러 도움좀 7 ㅇㅇ 211.114 2018-08-24 0
44342 일반 혼자만의 생일파티 보고싶다 1 엘에르엘 2018-08-24 0
44341 일반 그러고보니까 유사 성행위 MMD방에서 배울점은 있는거같다 3 ㅇㅇ 211.246 2018-08-24 2
44339 일반 펠라아바타는 대체 뭐옄ㅋㅋㅋㅋㅋ 당하는애는 무슨기분일거같냐 9 ㅇㅇ 211.246 2018-08-24 9
44338 일반 도와줘 월드 들어가면 계속 혼자 들어가네... 1 124124 121.168 2018-08-24 0
44336 일반 월드 퍼블릭 신청하면 얼마만에 되는지 아는분? 2 21421 121.168 2018-08-24 0
44335 일반 차렷충도 춤 출수있다 카디아. 2018-08-24 0
44334 일반 트래커 뉴비인데 10 Lewis_Kim 2018-08-24 0
44330 일반 이젠 그냥 대놓고 닉언하네? 13 ㅇㅇ 118.39 2018-08-24 0
44329 일반 tjsckrtns 2aud rnwpgownsek= 7 ㅇㅇ 211.246 2018-08-24 0
44328 일반 vr 고인물 지원 바람 ㅠ 14 maron 2018-08-24 0
44327 일반 이런 아바타도 있네 2 ㅇㅇ 59.151 2018-08-24 1
44323 일반 풀트래킹 아니여도 저댄 즐길수있더라 4 ㅇㅇ 112.151 2018-08-24 0
44322 일반 트래커 꼭 usb 3.0에 꽂아야해? 2 Lewis_Kim 2018-08-24 0
44321 일반 왜 꼭 이런 부류들은 PC유저일까 9 야너두 2018-08-24 0
44320 일반 오랫만에 춤추니 살아있음을 느낌 5 Luche 2018-08-24 0
44318 일반 근데 파티클 리미터 vrchat 안에서 지원해준다햇는데 1 ??(,,???,,)?? 2018-08-24 0
44315 일반 월드에 마커 어케넣음? 2 ㅇㅇ 14.53 2018-08-24 0
념글 삭제글 갤러리 랭킹