forked from googlevr/tilt-brush-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Id000b015158f47021206ef93e9d23aafed2d0b72
- Loading branch information
Showing
19 changed files
with
637 additions
and
58 deletions.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
UnitySDK/Assets/TiltBrush/Materials/BasePbrBlendSingleSided.mat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!21 &2100000 | ||
Material: | ||
serializedVersion: 6 | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: BasePbrBlendSingleSided | ||
m_Shader: {fileID: 4800000, guid: f2ac7f21f7ce99242a92ce666e3a7df8, type: 3} | ||
m_ShaderKeywords: | ||
m_LightmapFlags: 4 | ||
m_EnableInstancingVariants: 0 | ||
m_DoubleSidedGI: 0 | ||
m_CustomRenderQueue: -1 | ||
stringTagMap: {} | ||
disabledShaderPasses: [] | ||
m_SavedProperties: | ||
serializedVersion: 3 | ||
m_TexEnvs: | ||
- _BaseColorTex: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _BumpMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _DetailAlbedoMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _DetailMask: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _DetailNormalMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _EmissionMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _MainTex: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _MetallicGlossMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _OcclusionMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _ParallaxMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
m_Floats: | ||
- _BumpScale: 1 | ||
- _Cutoff: 0.5 | ||
- _DetailNormalMapScale: 1 | ||
- _DstBlend: 0 | ||
- _GlossMapScale: 1 | ||
- _Glossiness: 0.5 | ||
- _GlossyReflections: 1 | ||
- _Metallic: 0 | ||
- _MetallicFactor: 1 | ||
- _Mode: 0 | ||
- _OcclusionStrength: 1 | ||
- _Parallax: 0.02 | ||
- _RoughnessFactor: 1 | ||
- _SmoothnessTextureChannel: 0 | ||
- _SpecularHighlights: 1 | ||
- _SrcBlend: 1 | ||
- _UVSec: 0 | ||
- _ZWrite: 1 | ||
m_Colors: | ||
- _BaseColorFactor: {r: 1, g: 1, b: 1, a: 1} | ||
- _Color: {r: 1, g: 1, b: 1, a: 1} | ||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
9 changes: 9 additions & 0 deletions
9
UnitySDK/Assets/TiltBrush/Materials/BasePbrBlendSingleSided.mat.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
84 changes: 84 additions & 0 deletions
84
UnitySDK/Assets/TiltBrush/Materials/BasePbrOpaqueSingleSided.mat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!21 &2100000 | ||
Material: | ||
serializedVersion: 6 | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: BasePbrOpaqueSingleSided | ||
m_Shader: {fileID: 4800000, guid: c3d2397b0f2a38a478072d4d66b2410c, type: 3} | ||
m_ShaderKeywords: | ||
m_LightmapFlags: 4 | ||
m_EnableInstancingVariants: 0 | ||
m_DoubleSidedGI: 0 | ||
m_CustomRenderQueue: -1 | ||
stringTagMap: {} | ||
disabledShaderPasses: [] | ||
m_SavedProperties: | ||
serializedVersion: 3 | ||
m_TexEnvs: | ||
- _BaseColorTex: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _BumpMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _DetailAlbedoMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _DetailMask: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _DetailNormalMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _EmissionMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _MainTex: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _MetallicGlossMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _OcclusionMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _ParallaxMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
m_Floats: | ||
- _BumpScale: 1 | ||
- _Cutoff: 0.5 | ||
- _DetailNormalMapScale: 1 | ||
- _DstBlend: 0 | ||
- _GlossMapScale: 1 | ||
- _Glossiness: 0.5 | ||
- _GlossyReflections: 1 | ||
- _Metallic: 0 | ||
- _MetallicFactor: 1 | ||
- _Mode: 0 | ||
- _OcclusionStrength: 1 | ||
- _Parallax: 0.02 | ||
- _RoughnessFactor: 1 | ||
- _SmoothnessTextureChannel: 0 | ||
- _SpecularHighlights: 1 | ||
- _SrcBlend: 1 | ||
- _UVSec: 0 | ||
- _ZWrite: 1 | ||
m_Colors: | ||
- _BaseColorFactor: {r: 1, g: 1, b: 1, a: 1} | ||
- _Color: {r: 1, g: 1, b: 1, a: 1} | ||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
9 changes: 9 additions & 0 deletions
9
UnitySDK/Assets/TiltBrush/Materials/BasePbrOpaqueSingleSided.mat.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
63 changes: 63 additions & 0 deletions
63
UnitySDK/Assets/TiltBrush/Materials/PbrBlendSingleSided.shader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright 2017 Google Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// GLTF2 PBR Transparent Shader. For spec info, see: | ||
// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/schema/material.pbrMetallicRoughness.schema.json | ||
Shader "Poly/PbrBlendSingleSided" { | ||
Properties { | ||
_BaseColorFactor ("Base Color Factor", Color) = (1,1,1,1) | ||
_BaseColorTex ("Base Color Texture", 2D) = "white" {} | ||
_MetallicFactor ("Metallic Factor", Range(0,1)) = 1.0 | ||
_RoughnessFactor ("Roughness Factor", Range(0,1)) = 1.0 | ||
} | ||
SubShader { | ||
Cull Back | ||
ZWrite Off | ||
Tags { "Queue"="Transparent" "RenderType"="Transparent" } | ||
|
||
CGPROGRAM | ||
// Physically based Standard lighting model | ||
// No shadow-receiving passes | ||
#pragma surface surf Standard noshadow alpha:blend | ||
|
||
// Use shader model 3.0 target, because we use VFACE and to get nicer looking lighting | ||
#pragma target 3.0 | ||
|
||
sampler2D _BaseColorTex; | ||
|
||
struct Input { | ||
float2 uv_BaseColorTex; | ||
// Filled in with (rgb=1, a=1) if the mesh doesn't have color | ||
float4 color : COLOR; | ||
fixed vface : VFACE; | ||
}; | ||
|
||
fixed4 _BaseColorFactor; | ||
half _MetallicFactor; | ||
half _RoughnessFactor; | ||
|
||
void surf (Input IN, inout SurfaceOutputStandard o) { | ||
// Albedo comes from a texture tinted by color | ||
float4 c = tex2D(_BaseColorTex, IN.uv_BaseColorTex) * _BaseColorFactor * IN.color; | ||
o.Normal = float3(0, 0, IN.vface); | ||
o.Albedo = c.rgb; | ||
o.Alpha = c.a; | ||
// Metallic and smoothness come from parameters. | ||
o.Metallic = _MetallicFactor; | ||
// Smoothness is the opposite of roughness. | ||
o.Smoothness = 1.0 - _RoughnessFactor; | ||
} | ||
ENDCG | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
UnitySDK/Assets/TiltBrush/Materials/PbrBlendSingleSided.shader.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
UnitySDK/Assets/TiltBrush/Materials/PbrOpaqueSingleSided.shader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright 2017 Google Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// GLTF2 PBR Basic Shader. For spec info, see: | ||
// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/schema/material.pbrMetallicRoughness.schema.json | ||
Shader "Poly/PbrOpaqueSingleSided" { | ||
Properties { | ||
_BaseColorFactor ("Base Color Factor", Color) = (1,1,1,1) | ||
_BaseColorTex ("Base Color Texture", 2D) = "white" {} | ||
_MetallicFactor ("Metallic Factor", Range(0,1)) = 1.0 | ||
_RoughnessFactor ("Roughness Factor", Range(0,1)) = 1.0 | ||
} | ||
SubShader { | ||
Cull Back | ||
Zwrite On | ||
Tags { "RenderType"="Opaque" } | ||
|
||
CGPROGRAM | ||
// Physically based Standard lighting model | ||
// Add shadow-casting pass | ||
// Stick with default shadow-receiving passes for now | ||
#pragma surface surf Standard addshadow // fullforwardshadows | ||
|
||
// Use shader model 3.0 target, because we use VFACE and to get nicer looking lighting | ||
#pragma target 3.0 | ||
|
||
sampler2D _BaseColorTex; | ||
|
||
struct Input { | ||
float2 uv_BaseColorTex; | ||
// Filled in with (rgb=1, a=1) if the mesh doesn't have color | ||
float4 color : COLOR; | ||
fixed vface : VFACE; | ||
}; | ||
|
||
fixed4 _BaseColorFactor; | ||
half _MetallicFactor; | ||
half _RoughnessFactor; | ||
|
||
void surf (Input IN, inout SurfaceOutputStandard o) { | ||
// Albedo comes from a texture tinted by color | ||
float4 c = tex2D(_BaseColorTex, IN.uv_BaseColorTex) * _BaseColorFactor * IN.color; | ||
o.Normal = float3(0, 0, IN.vface); | ||
o.Albedo = c.rgb; | ||
// Metallic and smoothness come from parameters. | ||
o.Metallic = _MetallicFactor; | ||
// Smoothness is the opposite of roughness. | ||
o.Smoothness = 1.0 - _RoughnessFactor; | ||
} | ||
ENDCG | ||
} | ||
FallBack "Diffuse" | ||
} |
8 changes: 8 additions & 0 deletions
8
UnitySDK/Assets/TiltBrush/Materials/PbrOpaqueSingleSided.shader.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.