Skip to content

Commit

Permalink
Iridescent lightmode bug
Browse files Browse the repository at this point in the history
  • Loading branch information
naitoookami committed Jun 1, 2023
1 parent e4054de commit 4866c1f
Show file tree
Hide file tree
Showing 8 changed files with 572 additions and 572 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -668,13 +668,13 @@ Shader "Furality/Sylva Shader/Sylva Cutout Outline"
uniform float _IridescentScale;
uniform float _IridescentOffset;
uniform float4 _IridescentEmissionColor3;
uniform float _IridescentIntensity;
uniform int _IridescentEmissionMode;
uniform float _Glossiness;
uniform sampler2D _MetallicGlossMap;
uniform float _GlossMapScale;
float4 _MetallicGlossMap_TexelSize;
uniform int _IridescenceLightMode;
uniform float _IridescentIntensity;
uniform int _IridescentEmissionMode;
uniform float _Enableiridescence;
uniform float4 _Color;
uniform sampler2D _OcclusionMap;
Expand Down Expand Up @@ -1439,17 +1439,17 @@ Shader "Furality/Sylva Shader/Sylva Cutout Outline"
}


float3 HSVToRGB( float3 c )
inline float ggx( float nh, float roughness )
{
float4 K = float4( 1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0 );
float3 p = abs( frac( c.xxx + K.xyz ) * 6.0 - K.www );
return c.z * lerp( K.xxx, saturate( p - K.xxx ), c.y );
return GGXTerm(nh, roughness);
}


inline float ggx( float nh, float roughness )
float3 HSVToRGB( float3 c )
{
return GGXTerm(nh, roughness);
float4 K = float4( 1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0 );
float3 p = abs( frac( c.xxx + K.xyz ) * 6.0 - K.www );
return c.z * lerp( K.xxx, saturate( p - K.xxx ), c.y );
}


Expand Down Expand Up @@ -3096,19 +3096,8 @@ Shader "Furality/Sylva Shader/Sylva Cutout Outline"
float temp_output_2_0_g5015 = pow( ( 1.0 / 2.71828 ) , pow( ( -( 1.0 - 4.0 ) * max( ( temp_output_34_0_g5010 - 1.0 ) , 0.0 ) ) , 2.0 ) );
float temp_output_38_0_g5010 = ( 1.0 - temp_output_2_0_g5015 );
float4 lerpResult32_g5010 = lerp( lerpResult26_g5010 , _IridescentEmissionColor3 , temp_output_38_0_g5010);
float Intensity132_g5010 = _IridescentIntensity;
float4 temp_output_110_0_g5010 = ( lerpResult32_g5010 * Intensity132_g5010 );
float4 lerpResult46_g5010 = lerp( ( temp_output_110_0_g5010 + EmissionRGBA135_g5010 ) , ( temp_output_110_0_g5010 * EmissionRGBA135_g5010 ) , (float)saturate( _IridescentEmissionMode ));
float AnimatedDot130_g5010 = ( temp_output_211_0_g5010 + EmissionGlowAnimation62_g5010 );
float3 hsvTorgb3_g5017 = HSVToRGB( float3(AnimatedDot130_g5010,1.0,1.0) );
int temp_output_52_0_g5010 = ( _IridescentEmissionMode - 1 );
float4 lerpResult54_g5010 = lerp( lerpResult46_g5010 , ( EmissionRGBA135_g5010 + float4( ( hsvTorgb3_g5017 * Intensity132_g5010 ) , 0.0 ) ) , (float)saturate( temp_output_52_0_g5010 ));
int temp_output_90_0_g5010 = ( temp_output_52_0_g5010 - 1 );
int temp_output_91_0_g5010 = saturate( temp_output_90_0_g5010 );
float4 lerpResult89_g5010 = lerp( lerpResult54_g5010 , EmissionRGBA135_g5010 , (float)temp_output_91_0_g5010);
float4 lerpResult82_g5010 = lerp( EmissionRGBA135_g5010 , ( temp_output_55_0_g5010 * lerpResult89_g5010 ) , temp_output_55_0_g5010);
#ifdef UNITY_PASS_FORWARDBASE
float4 staticSwitch108_g5010 = lerpResult82_g5010;
float4 staticSwitch108_g5010 = lerpResult32_g5010;
#else
float4 staticSwitch108_g5010 = float4( 0,0,0,0 );
#endif
Expand Down Expand Up @@ -3150,7 +3139,18 @@ Shader "Furality/Sylva Shader/Sylva Cutout Outline"
float Atten232_g5010 = temp_output_208_0_g5010;
float temp_output_233_0_g5010 = ( lerpResult222_g5010 * Atten232_g5010 );
float4 lerpResult229_g5010 = lerp( staticSwitch108_g5010 , ( staticSwitch108_g5010 * temp_output_233_0_g5010 ) , (float)temp_output_225_0_g5010);
float4 lerpResult246_g5010 = lerp( EmissionRGBA135_g5010 , lerpResult229_g5010 , _Enableiridescence);
float Intensity132_g5010 = _IridescentIntensity;
float4 temp_output_110_0_g5010 = ( lerpResult229_g5010 * Intensity132_g5010 );
float4 lerpResult46_g5010 = lerp( ( temp_output_110_0_g5010 + EmissionRGBA135_g5010 ) , ( temp_output_110_0_g5010 * EmissionRGBA135_g5010 ) , (float)saturate( _IridescentEmissionMode ));
float AnimatedDot130_g5010 = ( temp_output_211_0_g5010 + EmissionGlowAnimation62_g5010 );
float3 hsvTorgb3_g5017 = HSVToRGB( float3(AnimatedDot130_g5010,1.0,1.0) );
int temp_output_52_0_g5010 = ( _IridescentEmissionMode - 1 );
float4 lerpResult54_g5010 = lerp( lerpResult46_g5010 , ( EmissionRGBA135_g5010 + float4( ( hsvTorgb3_g5017 * Intensity132_g5010 ) , 0.0 ) ) , (float)saturate( temp_output_52_0_g5010 ));
int temp_output_90_0_g5010 = ( temp_output_52_0_g5010 - 1 );
int temp_output_91_0_g5010 = saturate( temp_output_90_0_g5010 );
float4 lerpResult89_g5010 = lerp( lerpResult54_g5010 , EmissionRGBA135_g5010 , (float)temp_output_91_0_g5010);
float4 lerpResult82_g5010 = lerp( EmissionRGBA135_g5010 , ( temp_output_55_0_g5010 * lerpResult89_g5010 ) , temp_output_55_0_g5010);
float4 lerpResult246_g5010 = lerp( EmissionRGBA135_g5010 , lerpResult82_g5010 , _Enableiridescence);
float4 FinalEmission1029 = lerpResult246_g5010;
o.Emission = FinalEmission1029.rgb;
}
Expand Down Expand Up @@ -4110,4 +4110,4 @@ WireConnection;1210;3;988;0
WireConnection;1210;4;986;0
WireConnection;1210;23;1032;0
ASEEND*/
//CHKSM=521FF0AD393FB278319A19A3EA75DCAF8C0343D7
//CHKSM=1D552EF7F2962F6D0D1A50F62D8903528548F733
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,13 @@ Shader "Furality/Sylva Shader/Sylva Cutout"
uniform float _IridescentScale;
uniform float _IridescentOffset;
uniform float4 _IridescentEmissionColor3;
uniform float _IridescentIntensity;
uniform int _IridescentEmissionMode;
uniform float _Glossiness;
uniform sampler2D _MetallicGlossMap;
uniform float _GlossMapScale;
float4 _MetallicGlossMap_TexelSize;
uniform int _IridescenceLightMode;
uniform float _IridescentIntensity;
uniform int _IridescentEmissionMode;
uniform float _Enableiridescence;
uniform float4 _Color;
uniform sampler2D _OcclusionMap;
Expand Down Expand Up @@ -1262,17 +1262,17 @@ Shader "Furality/Sylva Shader/Sylva Cutout"
}


float3 HSVToRGB( float3 c )
inline float ggx( float nh, float roughness )
{
float4 K = float4( 1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0 );
float3 p = abs( frac( c.xxx + K.xyz ) * 6.0 - K.www );
return c.z * lerp( K.xxx, saturate( p - K.xxx ), c.y );
return GGXTerm(nh, roughness);
}


inline float ggx( float nh, float roughness )
float3 HSVToRGB( float3 c )
{
return GGXTerm(nh, roughness);
float4 K = float4( 1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0 );
float3 p = abs( frac( c.xxx + K.xyz ) * 6.0 - K.www );
return c.z * lerp( K.xxx, saturate( p - K.xxx ), c.y );
}


Expand Down Expand Up @@ -2796,19 +2796,8 @@ Shader "Furality/Sylva Shader/Sylva Cutout"
float temp_output_2_0_g5311 = pow( ( 1.0 / 2.71828 ) , pow( ( -( 1.0 - 4.0 ) * max( ( temp_output_34_0_g5306 - 1.0 ) , 0.0 ) ) , 2.0 ) );
float temp_output_38_0_g5306 = ( 1.0 - temp_output_2_0_g5311 );
float4 lerpResult32_g5306 = lerp( lerpResult26_g5306 , _IridescentEmissionColor3 , temp_output_38_0_g5306);
float Intensity132_g5306 = _IridescentIntensity;
float4 temp_output_110_0_g5306 = ( lerpResult32_g5306 * Intensity132_g5306 );
float4 lerpResult46_g5306 = lerp( ( temp_output_110_0_g5306 + EmissionRGBA135_g5306 ) , ( temp_output_110_0_g5306 * EmissionRGBA135_g5306 ) , (float)saturate( _IridescentEmissionMode ));
float AnimatedDot130_g5306 = ( temp_output_211_0_g5306 + EmissionGlowAnimation62_g5306 );
float3 hsvTorgb3_g5313 = HSVToRGB( float3(AnimatedDot130_g5306,1.0,1.0) );
int temp_output_52_0_g5306 = ( _IridescentEmissionMode - 1 );
float4 lerpResult54_g5306 = lerp( lerpResult46_g5306 , ( EmissionRGBA135_g5306 + float4( ( hsvTorgb3_g5313 * Intensity132_g5306 ) , 0.0 ) ) , (float)saturate( temp_output_52_0_g5306 ));
int temp_output_90_0_g5306 = ( temp_output_52_0_g5306 - 1 );
int temp_output_91_0_g5306 = saturate( temp_output_90_0_g5306 );
float4 lerpResult89_g5306 = lerp( lerpResult54_g5306 , EmissionRGBA135_g5306 , (float)temp_output_91_0_g5306);
float4 lerpResult82_g5306 = lerp( EmissionRGBA135_g5306 , ( temp_output_55_0_g5306 * lerpResult89_g5306 ) , temp_output_55_0_g5306);
#ifdef UNITY_PASS_FORWARDBASE
float4 staticSwitch108_g5306 = lerpResult82_g5306;
float4 staticSwitch108_g5306 = lerpResult32_g5306;
#else
float4 staticSwitch108_g5306 = float4( 0,0,0,0 );
#endif
Expand Down Expand Up @@ -2850,7 +2839,18 @@ Shader "Furality/Sylva Shader/Sylva Cutout"
float Atten232_g5306 = temp_output_208_0_g5306;
float temp_output_233_0_g5306 = ( lerpResult222_g5306 * Atten232_g5306 );
float4 lerpResult229_g5306 = lerp( staticSwitch108_g5306 , ( staticSwitch108_g5306 * temp_output_233_0_g5306 ) , (float)temp_output_225_0_g5306);
float4 lerpResult246_g5306 = lerp( EmissionRGBA135_g5306 , lerpResult229_g5306 , _Enableiridescence);
float Intensity132_g5306 = _IridescentIntensity;
float4 temp_output_110_0_g5306 = ( lerpResult229_g5306 * Intensity132_g5306 );
float4 lerpResult46_g5306 = lerp( ( temp_output_110_0_g5306 + EmissionRGBA135_g5306 ) , ( temp_output_110_0_g5306 * EmissionRGBA135_g5306 ) , (float)saturate( _IridescentEmissionMode ));
float AnimatedDot130_g5306 = ( temp_output_211_0_g5306 + EmissionGlowAnimation62_g5306 );
float3 hsvTorgb3_g5313 = HSVToRGB( float3(AnimatedDot130_g5306,1.0,1.0) );
int temp_output_52_0_g5306 = ( _IridescentEmissionMode - 1 );
float4 lerpResult54_g5306 = lerp( lerpResult46_g5306 , ( EmissionRGBA135_g5306 + float4( ( hsvTorgb3_g5313 * Intensity132_g5306 ) , 0.0 ) ) , (float)saturate( temp_output_52_0_g5306 ));
int temp_output_90_0_g5306 = ( temp_output_52_0_g5306 - 1 );
int temp_output_91_0_g5306 = saturate( temp_output_90_0_g5306 );
float4 lerpResult89_g5306 = lerp( lerpResult54_g5306 , EmissionRGBA135_g5306 , (float)temp_output_91_0_g5306);
float4 lerpResult82_g5306 = lerp( EmissionRGBA135_g5306 , ( temp_output_55_0_g5306 * lerpResult89_g5306 ) , temp_output_55_0_g5306);
float4 lerpResult246_g5306 = lerp( EmissionRGBA135_g5306 , lerpResult82_g5306 , _Enableiridescence);
float4 FinalEmission1029 = lerpResult246_g5306;
o.Emission = FinalEmission1029.rgb;
}
Expand Down Expand Up @@ -3832,4 +3832,4 @@ WireConnection;1240;3;988;0
WireConnection;1240;4;986;0
WireConnection;1240;23;1032;0
ASEEND*/
//CHKSM=762FCA8CA7DD5040BF3995265199422F30D888C0
//CHKSM=0742C93EE8B7EEBD3C6986EB0673A6D33A30EDA0
Original file line number Diff line number Diff line change
Expand Up @@ -653,13 +653,13 @@ Shader "Furality/Sylva Shader/Sylva Opaque Outline"
uniform float _IridescentScale;
uniform float _IridescentOffset;
uniform float4 _IridescentEmissionColor3;
uniform float _IridescentIntensity;
uniform int _IridescentEmissionMode;
uniform float _Glossiness;
uniform sampler2D _MetallicGlossMap;
uniform float _GlossMapScale;
float4 _MetallicGlossMap_TexelSize;
uniform int _IridescenceLightMode;
uniform float _IridescentIntensity;
uniform int _IridescentEmissionMode;
uniform float _Enableiridescence;
uniform sampler2D _OcclusionMap;
uniform float _OcclusionStrength;
Expand Down Expand Up @@ -1424,17 +1424,17 @@ Shader "Furality/Sylva Shader/Sylva Opaque Outline"
}


float3 HSVToRGB( float3 c )
inline float ggx( float nh, float roughness )
{
float4 K = float4( 1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0 );
float3 p = abs( frac( c.xxx + K.xyz ) * 6.0 - K.www );
return c.z * lerp( K.xxx, saturate( p - K.xxx ), c.y );
return GGXTerm(nh, roughness);
}


inline float ggx( float nh, float roughness )
float3 HSVToRGB( float3 c )
{
return GGXTerm(nh, roughness);
float4 K = float4( 1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0 );
float3 p = abs( frac( c.xxx + K.xyz ) * 6.0 - K.www );
return c.z * lerp( K.xxx, saturate( p - K.xxx ), c.y );
}


Expand Down Expand Up @@ -3079,19 +3079,8 @@ Shader "Furality/Sylva Shader/Sylva Opaque Outline"
float temp_output_2_0_g4910 = pow( ( 1.0 / 2.71828 ) , pow( ( -( 1.0 - 4.0 ) * max( ( temp_output_34_0_g4905 - 1.0 ) , 0.0 ) ) , 2.0 ) );
float temp_output_38_0_g4905 = ( 1.0 - temp_output_2_0_g4910 );
float4 lerpResult32_g4905 = lerp( lerpResult26_g4905 , _IridescentEmissionColor3 , temp_output_38_0_g4905);
float Intensity132_g4905 = _IridescentIntensity;
float4 temp_output_110_0_g4905 = ( lerpResult32_g4905 * Intensity132_g4905 );
float4 lerpResult46_g4905 = lerp( ( temp_output_110_0_g4905 + EmissionRGBA135_g4905 ) , ( temp_output_110_0_g4905 * EmissionRGBA135_g4905 ) , (float)saturate( _IridescentEmissionMode ));
float AnimatedDot130_g4905 = ( temp_output_211_0_g4905 + EmissionGlowAnimation62_g4905 );
float3 hsvTorgb3_g4912 = HSVToRGB( float3(AnimatedDot130_g4905,1.0,1.0) );
int temp_output_52_0_g4905 = ( _IridescentEmissionMode - 1 );
float4 lerpResult54_g4905 = lerp( lerpResult46_g4905 , ( EmissionRGBA135_g4905 + float4( ( hsvTorgb3_g4912 * Intensity132_g4905 ) , 0.0 ) ) , (float)saturate( temp_output_52_0_g4905 ));
int temp_output_90_0_g4905 = ( temp_output_52_0_g4905 - 1 );
int temp_output_91_0_g4905 = saturate( temp_output_90_0_g4905 );
float4 lerpResult89_g4905 = lerp( lerpResult54_g4905 , EmissionRGBA135_g4905 , (float)temp_output_91_0_g4905);
float4 lerpResult82_g4905 = lerp( EmissionRGBA135_g4905 , ( temp_output_55_0_g4905 * lerpResult89_g4905 ) , temp_output_55_0_g4905);
#ifdef UNITY_PASS_FORWARDBASE
float4 staticSwitch108_g4905 = lerpResult82_g4905;
float4 staticSwitch108_g4905 = lerpResult32_g4905;
#else
float4 staticSwitch108_g4905 = float4( 0,0,0,0 );
#endif
Expand Down Expand Up @@ -3133,7 +3122,18 @@ Shader "Furality/Sylva Shader/Sylva Opaque Outline"
float Atten232_g4905 = temp_output_208_0_g4905;
float temp_output_233_0_g4905 = ( lerpResult222_g4905 * Atten232_g4905 );
float4 lerpResult229_g4905 = lerp( staticSwitch108_g4905 , ( staticSwitch108_g4905 * temp_output_233_0_g4905 ) , (float)temp_output_225_0_g4905);
float4 lerpResult246_g4905 = lerp( EmissionRGBA135_g4905 , lerpResult229_g4905 , _Enableiridescence);
float Intensity132_g4905 = _IridescentIntensity;
float4 temp_output_110_0_g4905 = ( lerpResult229_g4905 * Intensity132_g4905 );
float4 lerpResult46_g4905 = lerp( ( temp_output_110_0_g4905 + EmissionRGBA135_g4905 ) , ( temp_output_110_0_g4905 * EmissionRGBA135_g4905 ) , (float)saturate( _IridescentEmissionMode ));
float AnimatedDot130_g4905 = ( temp_output_211_0_g4905 + EmissionGlowAnimation62_g4905 );
float3 hsvTorgb3_g4912 = HSVToRGB( float3(AnimatedDot130_g4905,1.0,1.0) );
int temp_output_52_0_g4905 = ( _IridescentEmissionMode - 1 );
float4 lerpResult54_g4905 = lerp( lerpResult46_g4905 , ( EmissionRGBA135_g4905 + float4( ( hsvTorgb3_g4912 * Intensity132_g4905 ) , 0.0 ) ) , (float)saturate( temp_output_52_0_g4905 ));
int temp_output_90_0_g4905 = ( temp_output_52_0_g4905 - 1 );
int temp_output_91_0_g4905 = saturate( temp_output_90_0_g4905 );
float4 lerpResult89_g4905 = lerp( lerpResult54_g4905 , EmissionRGBA135_g4905 , (float)temp_output_91_0_g4905);
float4 lerpResult82_g4905 = lerp( EmissionRGBA135_g4905 , ( temp_output_55_0_g4905 * lerpResult89_g4905 ) , temp_output_55_0_g4905);
float4 lerpResult246_g4905 = lerp( EmissionRGBA135_g4905 , lerpResult82_g4905 , _Enableiridescence);
float4 FinalEmission1029 = lerpResult246_g4905;
o.Emission = FinalEmission1029.rgb;
}
Expand Down Expand Up @@ -4086,4 +4086,4 @@ WireConnection;1204;3;988;0
WireConnection;1204;4;986;0
WireConnection;1204;23;1032;0
ASEEND*/
//CHKSM=78D600D7870AC9CDA2BFB4231AE9172863F3BB43
//CHKSM=F25B7DD018AB2FB1F2043F515BBF4F19E2B3817D
Loading

0 comments on commit 4866c1f

Please sign in to comment.