浏览代码

Setup MPBs on the boats

More set dressing
/main
Andre McGrail 7 年前
当前提交
379cda8c
共有 17 个文件被更改,包括 1470 次插入880 次删除
  1. 995
      Assets/MainIsland.asset
  2. 10
      Assets/Objects/boats/Interceptor.mat
  3. 25
      Assets/Objects/boats/Test/Prefabs/_Boat.prefab
  4. 2
      Assets/Objects/boats/Test/blockout_boat.mat
  5. 2
      Assets/Objects/environment/Trees/Materials/Softvegetation.mat
  6. 32
      Assets/Scripts/Boat/BoatController.cs
  7. 2
      Assets/Shaders/PackedPBR.ShaderGraph
  8. 46
      Assets/Shaders/RaceBoats.ShaderGraph
  9. 2
      Assets/Shaders/Vegetation.hlsl
  10. 4
      Assets/Textures/Sky.mat
  11. 873
      Assets/scenes/Island.unity
  12. 111
      Assets/Objects/boats/Interceptor 1.mat
  13. 8
      Assets/Objects/boats/Interceptor 1.mat.meta
  14. 111
      Assets/Objects/boats/Interceptor 2.mat
  15. 8
      Assets/Objects/boats/Interceptor 2.mat.meta
  16. 111
      Assets/Objects/boats/Interceptor 3.mat
  17. 8
      Assets/Objects/boats/Interceptor 3.mat.meta

995
Assets/MainIsland.asset
文件差异内容过多而无法显示
查看文件

10
Assets/Objects/boats/Interceptor.mat


m_Shader: {fileID: 4800000, guid: 7cc6d8245162d41df970ab2856566de3, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}

m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: d6d26acf8cf2f4eec91705947f7dee16, type: 3}
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}
- _MRLL:
m_Texture: {fileID: 2800000, guid: 38cb46170a3af4223840f9dcdd1cd226, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
m_Scale: {x: 1, y: 1}

- Color_C2C751EC: {r: 1, g: 0, b: 0, a: 0}
- Color_D7707493: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color1: {r: 1, g: 1, b: 1, a: 0}
- _Color2: {r: 1, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}

25
Assets/Objects/boats/Test/Prefabs/_Boat.prefab


- component: {fileID: 4534809148113994}
- component: {fileID: 54710712322113256}
- component: {fileID: 64258884862185400}
- component: {fileID: 114651856573695240}
- component: {fileID: 114559526544640098}
- component: {fileID: 114129291822198474}
- component: {fileID: 114571606569623246}

m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1553288845585282}
m_LocalRotation: {x: -0, y: -0.56714237, z: -0, w: 0.8236198}
m_LocalPosition: {x: -35.022, y: 1.64, z: -61.719}
m_LocalPosition: {x: -36.08, y: 1.64, z: -63.2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4566539937980892}

m_EditorClassIdentifier:
Human: 0
AIdifficulty: 0
speed: 0
weight: 0
strength: 0
wakeWidth: 0
PrimaryColor: {r: 0.8396226, g: 0.8396226, b: 0.8396226, a: 0}
TrimColor: {r: 0.8490566, g: 0.13216448, b: 0.13216448, a: 0}
boatRenderer: {fileID: 23139903168929634}
--- !u!114 &114135153223430406
MonoBehaviour:
m_ObjectHideFlags: 1

colliders:
- {fileID: 64258884862185400}
percentSubmerged: 0
--- !u!114 &114651856573695240
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1553288845585282}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ad25c0660b199484a806598b69f0f280, type: 3}
m_Name:
m_EditorClassIdentifier:
boatHull: {fileID: 4300000, guid: 2df96455c7a214a93aef825dcf7042d5, type: 3}
centerOfMass: {x: 0, y: -0.3, z: -1.8}
multiplier: 1
debugMesh: 0
--- !u!198 &198104015329072190
ParticleSystem:
m_ObjectHideFlags: 1

2
Assets/Objects/boats/Test/blockout_boat.mat


Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: blockout_boat
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}

2
Assets/Objects/environment/Trees/Materials/Softvegetation.mat


m_ShaderKeywords: _ALPHATEST_ON _CORRECTNORMALS_OFF _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 1
m_CustomRenderQueue: 2100
stringTagMap: {}

32
Assets/Scripts/Boat/BoatController.cs


//Boat stats
public bool Human;
public int AIdifficulty;
public float speed;
public float weight;
public float strength;
public float wakeWidth;
//cache the engine connected to the boat
//private Engine boatEngine;
//local cache
//private Rigidbody RB;
//private AudioSource AS;
public Color PrimaryColor;
public Color TrimColor;
public Renderer boatRenderer;
// Use this for initialization
void Start ()
void OnValidate()
//RB = gameObject.GetComponent<Rigidbody>();
//AS = gameObject.GetComponent<AudioSource>();
//boatEngine = gameObject.GetComponent<Engine>();
if (boatRenderer)
{
MaterialPropertyBlock mpb = new MaterialPropertyBlock();
mpb.SetColor("_Color1", PrimaryColor);
mpb.SetColor("_Color2", TrimColor);
boatRenderer.SetPropertyBlock(mpb);
}
}
if (Human == true)
// Use this for initialization
void Start ()
{
if (Human == true)
{
gameObject.AddComponent<HumanController>();
}

2
Assets/Shaders/PackedPBR.ShaderGraph
文件差异内容过多而无法显示
查看文件

46
Assets/Shaders/RaceBoats.ShaderGraph
文件差异内容过多而无法显示
查看文件

2
Assets/Shaders/Vegetation.hlsl


#include "LWRP/ShaderLibrary/Lighting.hlsl"
#define UNITY_USE_SHCOEFFS_ARRAYS 1
//#define UNITY_USE_SHCOEFFS_ARRAYS 1
struct VegetationVertexInput
{

4
Assets/Textures/Sky.mat


Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Sky
m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0}

- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
- _Tint: {r: 0.5, g: 0.5, b: 0.829, a: 0.5}

873
Assets/scenes/Island.unity
文件差异内容过多而无法显示
查看文件

111
Assets/Objects/boats/Interceptor 1.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Interceptor 1
m_Shader: {fileID: 4800000, guid: 7cc6d8245162d41df970ab2856566de3, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- Texture2D_3637FDC3:
m_Texture: {fileID: 2800000, guid: 38cb46170a3af4223840f9dcdd1cd226, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_5C2FBDE6:
m_Texture: {fileID: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_C2C29284:
m_Texture: {fileID: 2800000, guid: d6d26acf8cf2f4eec91705947f7dee16, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_3637FDC3:
m_Texture: {fileID: 2800000, guid: 38cb46170a3af4223840f9dcdd1cd226, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_5C2FBDE6:
m_Texture: {fileID: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_C2C29284:
m_Texture: {fileID: 2800000, guid: d6d26acf8cf2f4eec91705947f7dee16, type: 3}
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: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
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}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _Cull: 2
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- Color_C2C751EC: {r: 0, g: 0.36037755, b: 1, a: 0}
- Color_D7707493: {r: 0.8962264, g: 0.7692272, b: 0.021137413, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}

8
Assets/Objects/boats/Interceptor 1.mat.meta


fileFormatVersion: 2
guid: d8cabb270440047a5abba8c970e45c8d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

111
Assets/Objects/boats/Interceptor 2.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Interceptor 2
m_Shader: {fileID: 4800000, guid: 7cc6d8245162d41df970ab2856566de3, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- Texture2D_3637FDC3:
m_Texture: {fileID: 2800000, guid: 38cb46170a3af4223840f9dcdd1cd226, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_5C2FBDE6:
m_Texture: {fileID: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_C2C29284:
m_Texture: {fileID: 2800000, guid: d6d26acf8cf2f4eec91705947f7dee16, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_3637FDC3:
m_Texture: {fileID: 2800000, guid: 38cb46170a3af4223840f9dcdd1cd226, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_5C2FBDE6:
m_Texture: {fileID: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_C2C29284:
m_Texture: {fileID: 2800000, guid: d6d26acf8cf2f4eec91705947f7dee16, type: 3}
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: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
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}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _Cull: 2
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- Color_C2C751EC: {r: 0.028301895, g: 0, b: 0.015173143, a: 0}
- Color_D7707493: {r: 0.016491678, g: 0.5377358, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}

8
Assets/Objects/boats/Interceptor 2.mat.meta


fileFormatVersion: 2
guid: 1fda813a9ea6f4f8296f96db07778bda
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

111
Assets/Objects/boats/Interceptor 3.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Interceptor 3
m_Shader: {fileID: 4800000, guid: 7cc6d8245162d41df970ab2856566de3, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- Texture2D_3637FDC3:
m_Texture: {fileID: 2800000, guid: 38cb46170a3af4223840f9dcdd1cd226, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_5C2FBDE6:
m_Texture: {fileID: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_C2C29284:
m_Texture: {fileID: 2800000, guid: d6d26acf8cf2f4eec91705947f7dee16, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_3637FDC3:
m_Texture: {fileID: 2800000, guid: 38cb46170a3af4223840f9dcdd1cd226, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_5C2FBDE6:
m_Texture: {fileID: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_C2C29284:
m_Texture: {fileID: 2800000, guid: d6d26acf8cf2f4eec91705947f7dee16, type: 3}
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: 2800000, guid: f5227ae6cb5d6410b8e28d489c88f244, type: 3}
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}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _Cull: 2
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- Color_C2C751EC: {r: 0.9988669, g: 0.24056602, b: 1, a: 0}
- Color_D7707493: {r: 0, g: 0, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}

8
Assets/Objects/boats/Interceptor 3.mat.meta


fileFormatVersion: 2
guid: a1609301b70be44b5bb43b8a931fca57
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存