Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
z3y committed Jun 30, 2023
2 parents f6285ce + 96c3010 commit ee17532
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Editor/Importer/LitImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ internal static string GetShaderLabCode(ShaderSettings settings, string assetPat
SourceDependencies.Add("Packages/com.z3y.shaders/ShaderLibrary/FragmentShadowCaster.hlsl");
SourceDependencies.Add("Packages/com.z3y.shaders/ShaderLibrary/FragmentMeta.hlsl");
SourceDependencies.Add("Packages/com.z3y.shaders/ShaderLibrary/Structs.hlsl");
SourceDependencies.Add("Packages/com.z3y.shaders/ShaderLibrary/CustomLighting.hlsl");
SourceDependencies.Add("Packages/com.z3y.shaders/ShaderLibrary/ForwardLighting.hlsl");

string definesSbString = shaderBlocks.definesSb.ToString();
string codeSbSbString = shaderBlocks.codeSb.ToString();
Expand Down
2 changes: 1 addition & 1 deletion Editor/Importer/LitImporterDefaultProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ [ToggleGroupEnd] [UnIndent] [ToggleOff] _OpaqueLights(""Opaque Lights"", Float)
// #define BICUBIC_LIGHTMAP // enable bicubic lightmap
// #define BAKERY_SHNONLINEAR_OFF // disable non linear lightmap sh, enabled by default
// #define NONLINEAR_LIGHTPROBESH // enable non linear lightprobe sh
// #define DISABLE_LIGHT_PROBE_PROXY_VOLUME // enable LPPV
// #define DISABLE_LIGHT_PROBE_PROXY_VOLUME // disable LPPV
// #undef UNITY_SPECCUBE_BLENDING // disable blending of 2 reflection probes
DEFINES_END
Expand Down
4 changes: 2 additions & 2 deletions Editor/ProjectSettings/ProjectSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace z3y.Shaders
{
public class ProjectSettings
{
public const string ShaderName = "Lit Variants/Legacy/Lit v2";
public const string ShaderName = "Lit Variants/Lit v2";

public static Shader lit => Shader.Find(ShaderName);

Expand All @@ -23,7 +23,7 @@ public static SettingsProvider CreateProvider()
}
var provider = new SettingsProvider("Project/Lit Shader", SettingsScope.Project)
{
label = "Lit Shader",
label = "Lit Shader v2 (Legacy)",
guiHandler = (searchContext) =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ namespace CustomLighting
surfaceDescription.Albedo.rgb = lerp(1.0, surfaceDescription.Albedo.rgb, surfaceDescription.Alpha);
#endif

half4 finalColor = half4(surfaceDescription.Albedo * (1.0 - surfaceDescription.Metallic) * (giData.IndirectDiffuse * surfaceDescription.Occlusion + (giData.Light))
half4 finalColor = half4(surfaceDescription.Albedo * (1.0 - surfaceDescription.Metallic) * (giData.IndirectDiffuse * surfaceDescription.Occlusion + giData.Light)
+ giData.Reflections + giData.Specular + surfaceDescription.Emission, surfaceDescription.Alpha);

// fog
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ShaderLibrary/Fragment.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Packages/com.z3y.shaders/ShaderLibrary/CustomLighting.hlsl"
#include "Packages/com.z3y.shaders/ShaderLibrary/ForwardLighting.hlsl"


#ifdef GENERATION_CODE
Expand Down
7 changes: 6 additions & 1 deletion ShaderLibrary/LightFunctions.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef LIGHTFUNCTIONS_INCLUDED
#define LIGHTFUNCTIONS_INCLUDED

namespace Filament
{
// License included at FilamentLicense.md
Expand Down Expand Up @@ -468,4 +471,6 @@ half3 GlossyEnvironmentReflection(half3 reflectVector, float3 positionWS, half p
irradiance = DecodeHDREnvironment(encodedIrradiance, unity_SpecCube0_HDR);
#endif // UNITY_SPECCUBE_BLENDING
return irradiance * occlusion;
}
}

#endif
2 changes: 1 addition & 1 deletion Shaders/Lit.litshader
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PROPERTIES_START // Properties
_ParallaxOffset ("Parallax Offset", Range(-1, 1)) = 0
[IntRange] [UnIndent] [ToggleGroupEnd] _ParallaxSteps ("Steps", Range(1, 32)) = 16


[Tooltip(Mask(R), Tangent(AG))]
[Toggle(_ANISOTROPY)] [NoScaleOffset] [ExtraProperty] [Linear] _AnisotropyMap ("Anisotropy", 2D) = "black" {}
_Anisotropy ("", Range(-1.0, 1.0)) = 0

Expand Down
3 changes: 2 additions & 1 deletion Shaders/Lit/Lit/Lit.shader
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Shader "Lit Variants/Legacy/Lit v2"
Shader "Lit Variants/Lit v2"
{

Properties
Expand Down Expand Up @@ -147,6 +147,7 @@ CGINCLUDE
// #endif

//ConfigStart
#define _ALLOW_LPPV
#define FIX_BLACK_LEVEL
#pragma skip_variants LOD_FADE_CROSSFADE
#pragma skip_variants LTCGI
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 replacement for Unity for Built-In pipeline and forward rendering (VRChat)",
"version": "3.2.3",
"version": "3.2.4",
"unity": "2019.4",
"displayName": "z3y - Shaders",
"hideInEditor": false,
Expand Down

0 comments on commit ee17532

Please sign in to comment.