From 6ee771ec150957c076607dc3d4580b40dab399f6 Mon Sep 17 00:00:00 2001 From: freezy Date: Mon, 26 Jul 2021 11:12:30 +0200 Subject: [PATCH 1/2] renderer: Ditch lerp vertex shader. --- Assets/Resources/Prefabs/Ball.prefab | 4 ++-- Runtime/MaterialConverter.cs | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Assets/Resources/Prefabs/Ball.prefab b/Assets/Resources/Prefabs/Ball.prefab index 8480913..4ac34cc 100644 --- a/Assets/Resources/Prefabs/Ball.prefab +++ b/Assets/Resources/Prefabs/Ball.prefab @@ -27,7 +27,7 @@ Transform: m_GameObject: {fileID: 3137072635913329210} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 0.05, y: 0.05, z: 0.05} m_Children: [] m_Father: {fileID: 7359349221216736378} m_RootOrder: 0 @@ -106,7 +106,7 @@ Transform: m_GameObject: {fileID: 7581969690477629512} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.05, y: 0.05, z: 0.05} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 3918960386272536723} m_Father: {fileID: 0} diff --git a/Runtime/MaterialConverter.cs b/Runtime/MaterialConverter.cs index 2a86812..fb9248e 100644 --- a/Runtime/MaterialConverter.cs +++ b/Runtime/MaterialConverter.cs @@ -53,9 +53,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) @@ -85,11 +83,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 From 2a4d139f82f6c8b750c4af9d2069905a1951d86d Mon Sep 17 00:00:00 2001 From: freezy Date: Wed, 28 Jul 2021 22:13:05 +0200 Subject: [PATCH 2/2] ball: Fix ball size. --- Assets/Resources/Prefabs/Ball.prefab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Resources/Prefabs/Ball.prefab b/Assets/Resources/Prefabs/Ball.prefab index 4ac34cc..c40bdb5 100644 --- a/Assets/Resources/Prefabs/Ball.prefab +++ b/Assets/Resources/Prefabs/Ball.prefab @@ -27,7 +27,7 @@ Transform: m_GameObject: {fileID: 3137072635913329210} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.05, y: 0.05, z: 0.05} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 7359349221216736378} m_RootOrder: 0