Skip to content

Commit

Permalink
add offset
Browse files Browse the repository at this point in the history
  • Loading branch information
z3y committed Aug 20, 2024
1 parent cb4cfa3 commit 2817628
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Editor/Importer/LitImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace z3y.Shaders
{
[ScriptedImporter(5, Ext, 0)]
[ScriptedImporter(6, Ext, 0)]
public class LitImporter : ScriptedImporter
{
public const string Ext = "litshader";
Expand Down Expand Up @@ -303,6 +303,8 @@ private string GetShaderLabCode(AssetImportContext ctx)
sb.AppendLine("Cull [_Cull]");
sb.AppendLine("ZTest [_ZTest]");
sb.AppendLine("ZWrite [_ZWrite]");
sb.AppendLine("Offset [_OffsetFactor], [_OffsetUnits]");


if (settings.alphaToCoverage) sb.AppendLine("AlphaToMask [_AlphaToMask]");

Expand Down Expand Up @@ -395,6 +397,8 @@ private string GetShaderLabCode(AssetImportContext ctx)
sb.AppendLine("ZTest [_ZTest]");
sb.AppendLine("ZWrite Off");
sb.AppendLine("ZTest LEqual");
sb.AppendLine("Offset [_OffsetFactor], [_OffsetUnits]");

if (settings.alphaToCoverage) sb.AppendLine("AlphaToMask [_AlphaToMask]");

sb.AppendLine("HLSLPROGRAM");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.z3y.shaders",
"description": "A Standard Shader and Surface Shaders alternative for Unity for Built-In pipeline and forward rendering (VRChat)",
"version": "3.3.5",
"version": "3.3.6",
"unity": "2019.4",
"displayName": "Lit Shaders",
"hideInEditor": false,
Expand Down

0 comments on commit 2817628

Please sign in to comment.