Add new meta files and initial implementations for VRCBoard components and materials

This commit is contained in:
2024-09-30 13:16:04 +03:00
commit 01bc67dcff
32 changed files with 4975 additions and 0 deletions

8
Materials/Editor.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: beb1ece4e81f7d54481022aa41ad1214
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UdonSharp;
using UnityEngine;
using UnityEditor;
namespace VRCBoard
{
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class VRCBoardShaderEditor : ShaderGUI
{
// Start is called before the first frame update
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
EditorGUILayout.LabelField("Please use the VRCBoardImage component to edit the material properties.");
//base.OnGUI(materialEditor, properties);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 54050364012eda64b93ac4539faa4a15
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

103
Materials/VRCBoardImage.mat Normal file
View File

@@ -0,0 +1,103 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: VRCBoardImage
m_Shader: {fileID: 4800000, guid: 8391ead9ad6feee41a7c2f7f6ccd5f81, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _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}
- _EmissionMapAtlas:
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}
- _MainTexAtlas:
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}
- _NormalMapAtlas:
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_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EmissionMapAtlasIndex: 0
- _EmissionMapAtlasSize: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _MainTexAtlasIndex: 0
- _MainTexAtlasSize: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapAtlasIndex: 0
- _NormalMapAtlasSize: 1
- _NormalMapScale: 1
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _MainTexColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 66b314f6e6cbc5a4a97f18dde3864299
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,98 @@
Shader "VRCBoard/VRCBoardAtlasShader"
{
Properties
{
// _MainTex
_MainTexAtlas("Albedo", 2D) = "white" {}
[HideInInspector] _MainTexAtlasSize("Atlas Size", int) = 1
[HideInInspector] _MainTexAtlasIndex("Atlas Position", int) = 0
[HideInInspector] _MainTexColor("Color", Color) = (1,1,1,1)
// _EmissionMap
_EmissionMapAtlas("Emission", 2D) = "black" {}
[HideInInspector] _EmissionMapAtlasSize("Emission Atlas Size", int) = 1
[HideInInspector] _EmissionMapAtlasIndex("Emission Atlas Position", int) = 0
[HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
// _NormalMap
_NormalMapAtlas("Normal", 2D) = "bump" {}
[HideInInspector] _NormalMapAtlasSize("Normal Atlas Size", int) = 1
[HideInInspector] _NormalMapAtlasIndex("Normal Atlas Position", int) = 0
[HideInInspector] _NormalMapScale("Normal Scale", float) = 1
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Standard fullforwardshadows
#pragma target 3.0
sampler2D _MainTexAtlas;
sampler2D _EmissionMapAtlas;
sampler2D _NormalMapAtlas;
uint _MainTexAtlasSize;
uint _MainTexAtlasIndex;
float4 _MainTexColor;
uint _EmissionMapAtlasSize;
uint _EmissionMapAtlasIndex;
float4 _EmissionColor;
uint _NormalMapAtlasSize;
uint _NormalMapAtlasIndex;
float _NormalMapScale;
struct Input
{
float2 uv_MainTexAtlas;
float2 uv_EmissionMapAtlas;
float2 uv_NormalMapAtlas;
};
// Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader.
// See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing.
// #pragma instancing_options assumeuniformscaling
UNITY_INSTANCING_BUFFER_START(Props)
UNITY_INSTANCING_BUFFER_END(Props)
void surf (Input IN, inout SurfaceOutputStandard o)
{
_MainTexAtlasIndex = _MainTexAtlasIndex+_MainTexAtlasSize;
_EmissionMapAtlasIndex = _EmissionMapAtlasIndex+_EmissionMapAtlasSize;
_NormalMapAtlasIndex = _NormalMapAtlasIndex+_NormalMapAtlasSize;
float2 MainTexAtlasUV = float2(
(float(_MainTexAtlasIndex % _MainTexAtlasSize) + IN.uv_MainTexAtlas.x) / _MainTexAtlasSize,
1.0 - (float(_MainTexAtlasIndex / _MainTexAtlasSize) - IN.uv_MainTexAtlas.y) / _MainTexAtlasSize
);
float2 EmissionMapAtlasUV = float2(
(float(_EmissionMapAtlasIndex % _EmissionMapAtlasSize) + IN.uv_EmissionMapAtlas.x) / _EmissionMapAtlasSize,
1.0 - (float(_EmissionMapAtlasIndex / _EmissionMapAtlasSize) - IN.uv_EmissionMapAtlas.y) / _EmissionMapAtlasSize
);
float2 NormalMapAtlasUV = float2(
(float(_NormalMapAtlasIndex % _NormalMapAtlasSize) + IN.uv_NormalMapAtlas.x) / _NormalMapAtlasSize,
1.0 - (float(_NormalMapAtlasIndex / _NormalMapAtlasSize) - IN.uv_NormalMapAtlas.y) / _NormalMapAtlasSize
);
fixed4 c = tex2D (_MainTexAtlas, MainTexAtlasUV);
fixed4 e = tex2D (_EmissionMapAtlas, EmissionMapAtlasUV);
fixed4 n = tex2D (_NormalMapAtlas, NormalMapAtlasUV);
o.Albedo = c.rgb * _MainTexColor.rgb;
o.Emission = e.rgb * _EmissionColor.rgb;
o.Normal = UnpackNormal(n);
}
ENDCG
}
FallBack "Diffuse"
CustomEditor "VRCBoard.VRCBoardShaderEditor"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8391ead9ad6feee41a7c2f7f6ccd5f81
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant: