Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Assets/Resources/Prefabs/DefaultBall.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2309223392540829464}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 434, y: 1648, z: 37.9}
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
Expand Down
11 changes: 1 addition & 10 deletions Runtime/MaterialConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ public class MaterialConverter : IMaterialConverter
private static readonly int Smoothness = Shader.PropertyToID("_Smoothness");
private static readonly int BaseMap = Shader.PropertyToID("_BaseMap");
private static readonly int NormalMap = Shader.PropertyToID("_BumpMap");
private static readonly int UVChannelVertices = Shader.PropertyToID("_UVChannelVertices");
private static readonly int UVChannelNormals = Shader.PropertyToID("_UVChannelNormals");

#endregion

Expand All @@ -53,9 +51,7 @@ public Shader GetShader()

private Shader GetShader(PbrMaterial vpxMaterial)
{
return vpxMaterial.VertexLerpWithUvEnabled
? Shader.Find("Visual Pinball/Srp/LerpVertex")
: GetShader();
return GetShader();
}

public static Material GetDefaultMaterial(BlendMode blendMode)
Expand All @@ -82,11 +78,6 @@ public Material CreateMaterial(PbrMaterial vpxMaterial, ITextureProvider texture
unityMaterial.CopyPropertiesFromMaterial(defaultMaterial);
unityMaterial.name = vpxMaterial.Id;

if (vpxMaterial.VertexLerpWithUvEnabled) {
unityMaterial.SetFloat(UVChannelVertices, Mesh.AnimationUVChannelVertices);
unityMaterial.SetFloat(UVChannelNormals, Mesh.AnimationUVChannelNormals);
}

// apply some basic manipulations to the color. this just makes very
// very white colors be clipped to 0.8204 aka 204/255 is 0.8
// this is to give room to lighting values. so there is more modulation
Expand Down