From 5a561b1278128e22a8770aefce06680193ee92a9 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 5 Feb 2021 15:30:01 +0100 Subject: [PATCH] Update materials --- Content/Editor/Camera/M_Camera.flax | 4 +-- .../Editor/CubeTexturePreviewMaterial.flax | 4 +-- Content/Editor/DefaultFontMaterial.flax | 4 +-- .../Editor/Gizmo/FoliageBrushMaterial.flax | 4 +-- Content/Editor/Gizmo/Material.flax | 4 +-- Content/Editor/Gizmo/MaterialWire.flax | 4 +-- .../Gizmo/SelectionOutlineMaterial.flax | 4 +-- .../Gizmo/VertexColorsPreviewMaterial.flax | 4 +-- Content/Editor/Highlight Material.flax | 4 +-- Content/Editor/Icons/IconsMaterial.flax | 4 +-- Content/Editor/IesProfilePreviewMaterial.flax | 4 +-- .../Editor/MaterialTemplates/Terrain.shader | 36 ++++++++----------- .../Particles/Particle Material Color.flax | 4 +-- Content/Editor/Particles/Smoke Material.flax | 4 +-- .../Editor/Terrain/Circle Brush Material.flax | 4 +-- .../Terrain/Highlight Terrain Material.flax | 4 +-- Content/Editor/TexturePreviewMaterial.flax | 4 +-- Content/Editor/Wires Debug Material.flax | 4 +-- Content/Engine/DefaultMaterial.flax | 4 +-- Content/Engine/DefaultTerrainMaterial.flax | 4 +-- Content/Engine/SingleColorMaterial.flax | 4 +-- Content/Engine/SkyboxMaterial.flax | 4 +-- 22 files changed, 56 insertions(+), 64 deletions(-) diff --git a/Content/Editor/Camera/M_Camera.flax b/Content/Editor/Camera/M_Camera.flax index b5473caa3..9e2154ed9 100644 --- a/Content/Editor/Camera/M_Camera.flax +++ b/Content/Editor/Camera/M_Camera.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8b77651be81af931c1e63c1cb411b9f2764b4b0be4a7fa51e2c3c043a063435 -size 38085 +oid sha256:919822dc6234c58fe9efa48676845cb3f780cc2ad3a8b8edcb2badb6cfb8183c +size 30119 diff --git a/Content/Editor/CubeTexturePreviewMaterial.flax b/Content/Editor/CubeTexturePreviewMaterial.flax index 90bc9f368..c16307620 100644 --- a/Content/Editor/CubeTexturePreviewMaterial.flax +++ b/Content/Editor/CubeTexturePreviewMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:959f9d4006dc11b0ecbd57cbb406213b2519a388de0d798bff69d61c2042c89b -size 39859 +oid sha256:16b75ef1da889ff19d3f7cbd52073358cd0a433cd84912bd9802e3c21fcf90f2 +size 31676 diff --git a/Content/Editor/DefaultFontMaterial.flax b/Content/Editor/DefaultFontMaterial.flax index a0f703a85..9fc057b01 100644 --- a/Content/Editor/DefaultFontMaterial.flax +++ b/Content/Editor/DefaultFontMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e424d2436f4973a0ecef28c241e222e7e5f992a2ae017e943f4ba033608b3bd7 -size 38383 +oid sha256:7addee999e9325dac84f0ed70a817dbbdd549b84dfa7d0260403cca89abb399a +size 30200 diff --git a/Content/Editor/Gizmo/FoliageBrushMaterial.flax b/Content/Editor/Gizmo/FoliageBrushMaterial.flax index d8cc3fb6a..8b33f3404 100644 --- a/Content/Editor/Gizmo/FoliageBrushMaterial.flax +++ b/Content/Editor/Gizmo/FoliageBrushMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3b239a3122fe40c386c3161576cf74c94248d92a3d501b18ed2d658f18742a2 -size 41087 +oid sha256:792fd8ca00b3ad5b06a43a66cbca624e96af845c157519bf6038c08ae3d6dcd6 +size 34661 diff --git a/Content/Editor/Gizmo/Material.flax b/Content/Editor/Gizmo/Material.flax index b4917f502..fb9729627 100644 --- a/Content/Editor/Gizmo/Material.flax +++ b/Content/Editor/Gizmo/Material.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:85435f0342a96eeebad705692df74ec19871e28bc35a3d3046f8f63dee4d9334 -size 35945 +oid sha256:28de48669af8729327e4d3797076c1c28674ec86edf90d365d5f7426d7f23f01 +size 31187 diff --git a/Content/Editor/Gizmo/MaterialWire.flax b/Content/Editor/Gizmo/MaterialWire.flax index 888846500..d0a37c641 100644 --- a/Content/Editor/Gizmo/MaterialWire.flax +++ b/Content/Editor/Gizmo/MaterialWire.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ab58f495cdd9fee4c81332a291bbee4f1adc327d7d14b5158d4360aac1ef8fa -size 35158 +oid sha256:e00d2943edb8ab1a1cdd2c7adfabc5e418fd9c0f414ed54a97ba33a3c1b23aac +size 30400 diff --git a/Content/Editor/Gizmo/SelectionOutlineMaterial.flax b/Content/Editor/Gizmo/SelectionOutlineMaterial.flax index 48a87ba88..6a082e985 100644 --- a/Content/Editor/Gizmo/SelectionOutlineMaterial.flax +++ b/Content/Editor/Gizmo/SelectionOutlineMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f578d4b9e0dbd295de0674cf46cfc5d2894db225fd2c3cfc443c6f2e9c7167d3 -size 15941 +oid sha256:ae4775c4ade6c4e50f81b68a8a8546696f58bb1d701f2d8397a47d757707782f +size 15863 diff --git a/Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax b/Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax index e42b74129..5dbab8006 100644 --- a/Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax +++ b/Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c2abe350d858eeb42158b6c5fa8b0875a332bc003038fe846bf63aa3a9117577 -size 39316 +oid sha256:d5c14383f163282e144d9af8d89a817ea4f450ef200164dcd6f4af1406936d4a +size 31134 diff --git a/Content/Editor/Highlight Material.flax b/Content/Editor/Highlight Material.flax index 9f1de8fcd..48ec19fdb 100644 --- a/Content/Editor/Highlight Material.flax +++ b/Content/Editor/Highlight Material.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0eba0cb1115fb6510ed32159a8fa5a81bbfabfd0e6ec00f4d5ccbfa0426fad97 -size 35356 +oid sha256:6bf05e8133b46a764b6bda2a0b80a9a7dd44fcf3a9169e4da7a99d72fade6c67 +size 28995 diff --git a/Content/Editor/Icons/IconsMaterial.flax b/Content/Editor/Icons/IconsMaterial.flax index 91bba0296..30c96a8ef 100644 --- a/Content/Editor/Icons/IconsMaterial.flax +++ b/Content/Editor/Icons/IconsMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51bceae1877ea1859c8757a1e21abade8cf21eda8857d3204bf4b0239fc66d18 -size 35289 +oid sha256:6820dc041a4dc8fa66ac4dbacaf28efffb9a7083ac16b53850d8bfdb3b4fe80a +size 28927 diff --git a/Content/Editor/IesProfilePreviewMaterial.flax b/Content/Editor/IesProfilePreviewMaterial.flax index f9e249e81..7dbe080c9 100644 --- a/Content/Editor/IesProfilePreviewMaterial.flax +++ b/Content/Editor/IesProfilePreviewMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:946c1c4723c46a55c2d47a67009810a58c6e790b0af27137507e2c5cb9f3d64e -size 18669 +oid sha256:58bba43288fb4b2dbcc8a6401ac765fd269bb231c1b19c64aa2bb9ca72e9c106 +size 18415 diff --git a/Content/Editor/MaterialTemplates/Terrain.shader b/Content/Editor/MaterialTemplates/Terrain.shader index ef8afa2a6..d7624dfd6 100644 --- a/Content/Editor/MaterialTemplates/Terrain.shader +++ b/Content/Editor/MaterialTemplates/Terrain.shader @@ -104,18 +104,20 @@ struct MaterialInput }; // Extracts geometry data to the material input -void GetGeometryMaterialInput(inout MaterialInput result, in GeometryData geometry) +MaterialInput GetGeometryMaterialInput(GeometryData geometry) { - result.WorldPosition = geometry.WorldPosition; - result.TexCoord = geometry.TexCoord; + MaterialInput output = (MaterialInput)0; + output.WorldPosition = geometry.WorldPosition; + output.TexCoord = geometry.TexCoord; #if USE_LIGHTMAP - result.LightmapUV = geometry.LightmapUV; + output.LightmapUV = geometry.LightmapUV; #endif - result.TBN = CalcTangentBasisFromWorldNormal(geometry.WorldNormal); - result.HolesMask = geometry.HolesMask; + output.TBN = CalcTangentBasisFromWorldNormal(geometry.WorldNormal); + output.HolesMask = geometry.HolesMask; #if USE_TERRAIN_LAYERS - result.Layers = geometry.Layers; + output.Layers = geometry.Layers; #endif + return output; } #if USE_TESSELLATION @@ -154,23 +156,13 @@ GeometryData InterpolateGeometry(GeometryData p0, float w0, GeometryData p1, flo MaterialInput GetMaterialInput(PixelInput input) { - MaterialInput result = (MaterialInput)0; - result.WorldPosition = input.Geometry.WorldPosition; - result.TexCoord = input.Geometry.TexCoord; -#if USE_LIGHTMAP - result.LightmapUV = input.Geometry.LightmapUV; -#endif - result.TBN = CalcTangentBasisFromWorldNormal(input.Geometry.WorldNormal); - result.TwoSidedSign = WorldDeterminantSign * (input.IsFrontFace ? 1.0 : -1.0); - result.SvPosition = input.Position; - result.HolesMask = input.Geometry.HolesMask; -#if USE_TERRAIN_LAYERS - result.Layers = input.Geometry.Layers; -#endif + MaterialInput output = GetGeometryMaterialInput(input.Geometry); + output.TwoSidedSign = WorldDeterminantSign * (input.IsFrontFace ? 1.0 : -1.0); + output.SvPosition = input.Position; #if USE_CUSTOM_VERTEX_INTERPOLATORS - result.CustomVSToPS = input.CustomVSToPS; + output.CustomVSToPS = input.CustomVSToPS; #endif - return result; + return output; } // Removes the scale vector from the local to world transformation matrix diff --git a/Content/Editor/Particles/Particle Material Color.flax b/Content/Editor/Particles/Particle Material Color.flax index 6c83bfc35..577b1689e 100644 --- a/Content/Editor/Particles/Particle Material Color.flax +++ b/Content/Editor/Particles/Particle Material Color.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bf5ada0acae289fa7fbbbd6135779ef544d36999de9df0f29b2b9ce10ad52bb -size 30474 +oid sha256:15b814eb7cf2a263562004f3d440835ef50e6cf11be211c8b0171040ce87972d +size 29326 diff --git a/Content/Editor/Particles/Smoke Material.flax b/Content/Editor/Particles/Smoke Material.flax index a3ae100ca..a29ea1649 100644 --- a/Content/Editor/Particles/Smoke Material.flax +++ b/Content/Editor/Particles/Smoke Material.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c8642a2a7024ae38ae371d95c3411d8e362f42ef98c54dc9da9c061d2a568c1 -size 36552 +oid sha256:6f0df0dea34c8105df1f26a60f5ba013e28d125297b1d630b62d6333ce3ec966 +size 35425 diff --git a/Content/Editor/Terrain/Circle Brush Material.flax b/Content/Editor/Terrain/Circle Brush Material.flax index dc30e39fe..08aed3e07 100644 --- a/Content/Editor/Terrain/Circle Brush Material.flax +++ b/Content/Editor/Terrain/Circle Brush Material.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bd0529d1088670eb9edd3533f9493d259bcc9797d0e01f12922f6f3b05daef4d -size 33136 +oid sha256:df1d754dc7a6046740e50ba20bc90278aa4894d83d01f41d7fdb50455e6d7763 +size 27923 diff --git a/Content/Editor/Terrain/Highlight Terrain Material.flax b/Content/Editor/Terrain/Highlight Terrain Material.flax index 49f76cb07..8e39ed806 100644 --- a/Content/Editor/Terrain/Highlight Terrain Material.flax +++ b/Content/Editor/Terrain/Highlight Terrain Material.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:820f0265ca7249f84f0c91b402f817dc5ca12a0a5884756b6d0bf712c12a9b06 -size 26815 +oid sha256:db149ec425c1baf245356eff3a819c3c06e857550e86d419c7bd70c55bde4b94 +size 21602 diff --git a/Content/Editor/TexturePreviewMaterial.flax b/Content/Editor/TexturePreviewMaterial.flax index 0a68763cd..cc3b32eb9 100644 --- a/Content/Editor/TexturePreviewMaterial.flax +++ b/Content/Editor/TexturePreviewMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9029bd6c09c686f551356800b6f16c60f7392fb3a396d2fe583e6cb1f83c46f7 -size 10907 +oid sha256:f92a749ea24fc5d7b45e0e4f2be5619402163f4292d565e5fe014268a46a1275 +size 10653 diff --git a/Content/Editor/Wires Debug Material.flax b/Content/Editor/Wires Debug Material.flax index 9dedbfea2..2839044c1 100644 --- a/Content/Editor/Wires Debug Material.flax +++ b/Content/Editor/Wires Debug Material.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb08e24a379cd67db22025bf5e3ae84979f0686179db871387d388f11aae20f0 -size 35356 +oid sha256:0ce7aa7e754b27beda160a78e0636a6d6e12f99c59c127ca0557fc3d5a75285e +size 28995 diff --git a/Content/Engine/DefaultMaterial.flax b/Content/Engine/DefaultMaterial.flax index cd7cd19e0..2472013e3 100644 --- a/Content/Engine/DefaultMaterial.flax +++ b/Content/Engine/DefaultMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d195b3434472636eff8e34a2052f1ef5d02b1415802414bad6e15f21d0b16de8 -size 39864 +oid sha256:88a4aa4b72322807ce9fcf30faca1d2e20ae78a65bdefd29ae16bf2596d93d8f +size 31898 diff --git a/Content/Engine/DefaultTerrainMaterial.flax b/Content/Engine/DefaultTerrainMaterial.flax index be5145720..9104a5a20 100644 --- a/Content/Engine/DefaultTerrainMaterial.flax +++ b/Content/Engine/DefaultTerrainMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98a8347591e895fccbe327f393d6376ad1113321daa8a7ad4f47d0753c2e76a1 -size 28681 +oid sha256:c82750f189ac803962c8b6d885b54aa3332af7249d4a53c00a6e530161d157e7 +size 23373 diff --git a/Content/Engine/SingleColorMaterial.flax b/Content/Engine/SingleColorMaterial.flax index d11046007..fe51af1bb 100644 --- a/Content/Engine/SingleColorMaterial.flax +++ b/Content/Engine/SingleColorMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:502f451e0b232b4288a85a274d81d22a7053c84f174286a05043707dc75fe193 -size 38381 +oid sha256:0569cdb10e6c832ba0d741144e54e92c31e25b9e8555743ae21c6a1bd8cc784e +size 30199 diff --git a/Content/Engine/SkyboxMaterial.flax b/Content/Engine/SkyboxMaterial.flax index 24d56521b..f099cb9e4 100644 --- a/Content/Engine/SkyboxMaterial.flax +++ b/Content/Engine/SkyboxMaterial.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4b60416f9e2deb1f717860ae9a4cc1a74be0517db921526d21a79434b7506e7 -size 39603 +oid sha256:a29b3b287910fecb955b5627bca91a202cb1663f78ea642e4dfde911add86ee6 +size 31420