diff --git a/ChangeLog.md b/ChangeLog.md index 09247a75..9a58751b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.1] - 2020-05-28 +### Fixed +- Unlit shader now works with vertex colors + ## [1.1.0] - 2020-05-25 ### Added - `GltFast.LoadingDone` state property indicates if loading routine has finished diff --git a/Runtime/Shader/glTFUnlit.shader b/Runtime/Shader/glTFUnlit.shader index c4fc4176..f88d2fcb 100644 --- a/Runtime/Shader/glTFUnlit.shader +++ b/Runtime/Shader/glTFUnlit.shader @@ -52,12 +52,14 @@ SubShader { struct appdata_t { float4 vertex : POSITION; float2 texcoord : TEXCOORD0; + fixed4 color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct v2f { float4 vertex : SV_POSITION; float2 texcoord : TEXCOORD0; + fixed4 color : COLOR; UNITY_FOG_COORDS(1) UNITY_VERTEX_OUTPUT_STEREO }; @@ -84,6 +86,7 @@ SubShader { #endif UNITY_TRANSFER_FOG(o,o.vertex); + o.color = v.color; return o; } @@ -92,6 +95,7 @@ SubShader { fixed4 col = tex2D(_MainTex, i.texcoord) * _Color; UNITY_APPLY_FOG(i.fogCoord, col); UNITY_OPAQUE_ALPHA(col.a); + col *= i.color; return col; } ENDCG diff --git a/package.json b/package.json index 11fdc920..4f9dc62f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.atteneder.gltfast", - "version": "1.1.0", + "version": "1.1.1", "displayName": "glTFast", "description": "Load glTF assets at runtime.", "unity": "2019.1",