-
Notifications
You must be signed in to change notification settings - Fork 201
Opt urp tex #708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Opt urp tex #708
Changes from all commits
e54b54f
a800f28
880d483
bd27016
d3efb4c
008570d
95966af
b8bd791
36d52ca
95a18b6
5f920d9
fa759bb
13185fd
5dccadc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,7 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0 | |||||||||
|
|
||||||||||
| float3x3 tangentTransform = float3x3(i.tangentDir, i.bitangentDir, i.normalDir); | ||||||||||
|
|
||||||||||
| float2 Set_UV0 = i.uv0; | ||||||||||
| const float2 Set_UV0 = i.uv0; | ||||||||||
| //v.2.0.6 | ||||||||||
|
|
||||||||||
| float3 _NormalMap_var = UnpackNormalScale( | ||||||||||
|
|
@@ -75,7 +75,11 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0 | |||||||||
| #endif | ||||||||||
| ); | ||||||||||
|
|
||||||||||
| float4 _MainTex_var = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)); | ||||||||||
| const float4 _MainTex_var = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)); | ||||||||||
| const float4 _Set_1st_ShadePosition_var = tex2D(_Set_1st_ShadePosition, TRANSFORM_TEX(Set_UV0, _Set_1st_ShadePosition)); | ||||||||||
| const float4 _Set_2nd_ShadePosition_var = tex2D(_Set_2nd_ShadePosition, TRANSFORM_TEX(Set_UV0, _Set_2nd_ShadePosition)); | ||||||||||
| const float4 _HighColor_Tex_var = tex2D(_HighColor_Tex, TRANSFORM_TEX(Set_UV0, _HighColor_Tex)); | ||||||||||
| const float4 _Set_HighColorMask_var = tex2D(_Set_HighColorMask, TRANSFORM_TEX(Set_UV0, _Set_HighColorMask)); | ||||||||||
|
|
||||||||||
| #ifdef _DBUFFER | ||||||||||
| ApplyDecalToSurfaceDataUTS(input.positionCS, _MainTex_var.rgb, surfaceData, normalDirection); | ||||||||||
|
|
@@ -139,24 +143,19 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0 | |||||||||
| //v.2.0.5 | ||||||||||
| _Color = _BaseColor; | ||||||||||
|
|
||||||||||
|
|
||||||||||
| #ifdef _IS_PASS_FWDBASE | ||||||||||
| float3 Set_LightColor = lightColor.rgb; | ||||||||||
| float3 Set_BaseColor = lerp((_BaseColor.rgb * _MainTex_var.rgb), | ||||||||||
| ((_BaseColor.rgb * _MainTex_var.rgb) * Set_LightColor), _Is_LightColor_Base); | ||||||||||
| //v.2.0.5 | ||||||||||
| float4 _1st_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_1st_ShadeMap, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)), | ||||||||||
| _MainTex_var, _Use_BaseAs1st); | ||||||||||
| float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb), | ||||||||||
| ((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | ||||||||||
| //v.2.0.5 | ||||||||||
| float4 _2nd_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_2nd_ShadeMap, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)), | ||||||||||
| _1st_ShadeMap_var, _Use_1stAs2nd); | ||||||||||
| float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb), | ||||||||||
| ((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_2nd_Shade); | ||||||||||
| const float4 _1st_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_1st_ShadeMap, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)),_MainTex_var, _Use_BaseAs1st); | ||||||||||
| float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb),((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | ||||||||||
| const float4 _2nd_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_2nd_ShadeMap, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)),_1st_ShadeMap_var, _Use_1stAs2nd); | ||||||||||
| float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb),((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_2nd_Shade); | ||||||||||
| float _HalfLambert_var = 0.5 * dot(lerp(i.normalDir, normalDirection, _Is_NormalMapToBase), lightDirection) + 0.5; | ||||||||||
|
|
||||||||||
| float4 _Set_2nd_ShadePosition_var = tex2D(_Set_2nd_ShadePosition, TRANSFORM_TEX(Set_UV0, _Set_2nd_ShadePosition)); | ||||||||||
| float4 _Set_1st_ShadePosition_var = tex2D(_Set_1st_ShadePosition, TRANSFORM_TEX(Set_UV0, _Set_1st_ShadePosition)); | ||||||||||
|
|
||||||||||
| //v.2.0.6 | ||||||||||
| //Minmimum value is same as the Minimum Feather's value with the Minimum Step's value as threshold. | ||||||||||
| float _SystemShadowsLevel_var = (shadowAttenuation * 0.5) + 0.5 + _Tweak_SystemShadowsLevel > 0.001 | ||||||||||
|
|
@@ -174,15 +173,13 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0 | |||||||||
| _Set_2nd_ShadePosition_var.rgb).r - 1.0)) / (_ShadeColor_Step - (_ShadeColor_Step - | ||||||||||
| _1st2nd_Shades_Feather))))), Set_FinalShadowMask); // Final Color | ||||||||||
|
|
||||||||||
| float4 _Set_HighColorMask_var = tex2D(_Set_HighColorMask, TRANSFORM_TEX(Set_UV0, _Set_HighColorMask)); | ||||||||||
|
|
||||||||||
| float _Specular_var = 0.5 * dot(halfDirection, lerp(i.normalDir, normalDirection, _Is_NormalMapToHighColor)) + 0.5; | ||||||||||
| // Specular | ||||||||||
| float _TweakHighColorMask_var = (saturate((_Set_HighColorMask_var.g + _Tweak_HighColorMaskLevel)) * lerp( | ||||||||||
| (1.0 - step(_Specular_var, (1.0 - pow(abs(_HighColor_Power), 5)))), | ||||||||||
| pow(abs(_Specular_var), exp2(lerp(11, 1, _HighColor_Power))), _Is_SpecularToHighColor)); | ||||||||||
|
|
||||||||||
| float4 _HighColor_Tex_var = tex2D(_HighColor_Tex, TRANSFORM_TEX(Set_UV0, _HighColor_Tex)); | ||||||||||
|
|
||||||||||
| float3 _HighColor_var = (lerp((_HighColor_Tex_var.rgb * _HighColor.rgb), | ||||||||||
| ((_HighColor_Tex_var.rgb * _HighColor.rgb) * Set_LightColor), | ||||||||||
|
|
@@ -365,20 +362,10 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0 | |||||||||
| float3 Set_BaseColor = lerp((_BaseColor.rgb * _MainTex_var.rgb * _LightIntensity), | ||||||||||
| ((_BaseColor.rgb * _MainTex_var.rgb) * Set_LightColor), _Is_LightColor_Base); | ||||||||||
| //v.2.0.5 | ||||||||||
| float4 _1st_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_1st_ShadeMap, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)), | ||||||||||
| _MainTex_var, _Use_BaseAs1st); | ||||||||||
| float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb * _LightIntensity), | ||||||||||
| ((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | ||||||||||
| //v.2.0.5 | ||||||||||
| float4 _2nd_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_2nd_ShadeMap, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)), | ||||||||||
| _1st_ShadeMap_var, _Use_1stAs2nd); | ||||||||||
| float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb * _LightIntensity), | ||||||||||
| ((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_2nd_Shade); | ||||||||||
| float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb * _LightIntensity),((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | ||||||||||
| float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb * _LightIntensity),((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_2nd_Shade); | ||||||||||
|
Comment on lines
+365
to
+366
|
||||||||||
| float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb * _LightIntensity),((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | |
| float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb * _LightIntensity),((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_2nd_Shade); | |
| float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb * _LightIntensity), ((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | |
| float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb * _LightIntensity), ((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_2nd_Shade); |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces after commas in function arguments. For consistency with the codebase style, add spaces after commas in the lerp function calls.
| float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb * _LightIntensity),((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | |
| float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb * _LightIntensity),((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_2nd_Shade); | |
| float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb * _LightIntensity), ((_1st_ShadeColor.rgb * _1st_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | |
| float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb * _LightIntensity), ((_2nd_ShadeColor.rgb * _2nd_ShadeMap_var.rgb) * Set_LightColor), _Is_LightColor_2nd_Shade); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,7 +6,7 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0 | |||||
| i.normalDir = normalize(i.normalDir); | ||||||
| float3x3 tangentTransform = float3x3(i.tangentDir, i.bitangentDir, i.normalDir); | ||||||
| float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); | ||||||
| float2 Set_UV0 = i.uv0; | ||||||
| const float2 Set_UV0 = i.uv0; | ||||||
| //v.2.0.6 | ||||||
|
|
||||||
|
|
||||||
|
|
@@ -75,7 +75,10 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0 | |||||
| #endif | ||||||
| ); | ||||||
|
|
||||||
| float4 _MainTex_var = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)); | ||||||
| const float4 _MainTex_var = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)); | ||||||
| const float4 _1st_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_1st_ShadeMap, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)),_MainTex_var, _Use_BaseAs1st); | ||||||
| const float4 _HighColor_Tex_var = tex2D(_HighColor_Tex, TRANSFORM_TEX(Set_UV0, _HighColor_Tex)); | ||||||
| const float4 _Set_HighColorMask_var = tex2D(_Set_HighColorMask, TRANSFORM_TEX(Set_UV0, _Set_HighColorMask)); | ||||||
|
|
||||||
| #ifdef _DBUFFER | ||||||
| ApplyDecalToSurfaceDataUTS(input.positionCS, _MainTex_var.rgb, surfaceData, normalDirection); | ||||||
|
|
@@ -135,10 +138,7 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0 | |||||
| float3 Set_BaseColor = lerp((_MainTex_var.rgb * _BaseColor.rgb), | ||||||
| ((_MainTex_var.rgb * _BaseColor.rgb) * Set_LightColor), _Is_LightColor_Base); | ||||||
| //v.2.0.5 | ||||||
| float4 _1st_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_1st_ShadeMap, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)), | ||||||
| _MainTex_var, _Use_BaseAs1st); | ||||||
| float3 _Is_LightColor_1st_Shade_var = lerp((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb), | ||||||
| ((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | ||||||
| float3 _Is_LightColor_1st_Shade_var = lerp((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb),((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | ||||||
|
||||||
| float3 _Is_LightColor_1st_Shade_var = lerp((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb),((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); | |
| float3 _Is_LightColor_1st_Shade_var = lerp((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb), ((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb) * Set_LightColor), _Is_LightColor_1st_Shade); |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after comma in function arguments. For consistency with the codebase style, add a space after the comma between the first and second arguments in the lerp function call.
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces after commas in function arguments. For consistency with the codebase style, add spaces after commas in the lerp function calls.
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after comma in function arguments. For consistency with the codebase style, add a space after the comma between the first and second arguments in the lerp function call.
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces after commas in function arguments. For consistency with the codebase style, add spaces after commas in the lerp function calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces after commas in function arguments. For consistency with the codebase style, add spaces after commas in the
lerpfunction calls.