Skip to content

Commit

Permalink
set alpha to 1 when using alpha test
Browse files Browse the repository at this point in the history
  • Loading branch information
z3y committed Oct 10, 2024
1 parent 3ab9414 commit 06ccc72
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Editor/Targets/Lit/FragmentForward.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ half4 frag(Varyings varyings) : SV_Target

half4 color = COLOR_IMPL(surf, fragData, giInput, giOutput);

#ifdef _ALPHATEST_ON
color.a = 1.0;
#endif

UNITY_APPLY_FOG(varyings.fogCoord, color);

return color;
Expand Down
4 changes: 4 additions & 0 deletions Editor/Targets/Unlit/FragmentForward.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ half4 frag(Varyings varyings) : SV_Target
col.a = 1.0;
#endif

#ifdef _ALPHATEST_ON
col.a = 1.0;
#endif

UNITY_APPLY_FOG(varyings.fogCoord, col);

return col;
Expand Down
2 changes: 1 addition & 1 deletion Shaders/Lit.graphlit
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
"defaultPreviewState": 1,
"customEditor": "",
"fallback": "",
"include": "#ifndef _NORMALMAP\n#define _NORMAL_DROPOFF_OFF\n#endif\n\n// enable monosh\n//#define _BAKERY_MONOSH",
"include": "//#define _BAKERY_MONOSH",
"outlinePass": 0,
"stencil": false,
"vrcFallbackTags": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.z3y.graphlit",
"version": "1.0.14",
"version": "1.0.15",
"unity": "2022.3",
"displayName": "Graphlit",
"hideInEditor": false,
Expand Down

0 comments on commit 06ccc72

Please sign in to comment.