ThreeKingdomsSlingshot/Assets/Resources/UI/UiGray.shader

94 lines
3.1 KiB
Plaintext
Raw Normal View History

이벤트 화면 — 출석부(오픈 기념 7일 · 일일 14일) · 7일 특별 미션 · 행운 룰렛 · 이벤트 미션 · 선물 팩 팝업 · 특별 이벤트 「준비 중」 (PD 2026-11-19 「게임에 구현해」 · 시안 7장 event_attend/final/mock) PD 결정 4건(모두 추천안): - ① 로비 오른쪽 「이벤트」 버튼 · 기기 세이브 모드만(OutGameSession.EventAvailable · ServerSession = false → 준비 중 · 서버 이벤트 API = 따로) - ② 유료 선물 팩 = 「결제 준비 중」 토스트만(지급 0) · 광고 칸 = 시험 즉시 지급 하루 3회 - ③⑤ 값 = 시안 예시 그대로 게임 표 · 룰렛 판 = 시안 돌(흰 · 검은 · 최종 금 상감) · 등급 색 = 확률 정보 창에만 - ④ 하루 = 0시 · 접속일 기준(출석 = 접속한 날마다 1칸 · 일일 14일 = 다 받으면 새 회차 · 7일 미션 = 첫 접속일부터 하루 1일차 · 룰렛 = 표 날짜 · 문구 「오전 5시」 → 「0시」) - 규칙 표 Resources/Event/*.csv(event_config · items · kinds · attend · mission7(_steps) · roulette(_extra)) → EventData · EventRules · 세이브 SaveData.ev(EventState) - 화면 OutGame/Event/EventScreen(+ Attend · Mission · Roulette · EventSpin) · 화면 표 Resources/UI/Event/event_screen.csv · 글자 event_text.csv(그림에 글자 0) - 층(P41) = Bg(Static) · Page/Art(Static) · Page/Info(Event + 레이캐스터) · Page/Fx(Frame) · EventTabs(Event) · 부품 아틀라스 UI_Event - 미션 집계 = OutGameSession 동작 성공 경로마다 EventRules.Count 한 줄 · OutGameRoot(이벤트 화면 등록 · ShowEvents · OwnTabBar) · LobbyScreen(이벤트 버튼 + 받을 것 붉은 점) - 받은 칸 탈색 셰이더 Resources/UI/UiGray.shader · 세로 그러데이션 OutGame/UI/UiGradient · 임포트 분기 UnitArtImporter UiEventRoot - 공용 표 읽기 OutGame/UI/ScreenTable 함께 올림(이벤트 화면이 씀 · 같은 날 영웅 배경 · 편성 미커밋 작업에서 만든 파일) - 캡처 UICaptureDriver -uiOnly event_*(9장) · 테스트 EventTests 2 검증: 컴파일 오류 0 · EventTests 2/2 · OutGameTests.Lobby_Tabs_Back_ComingSoon 1/1 · UILayerTests.Canvases_SplitByUpdateRate_InputAndAtlas 1/1 · 캡처 9장 시안 대조 · Fable QA r1 PASS(B 0) → M 일괄 수정 · 이 커밋 묶음만(HEAD + 이벤트) 검증 사본 배치 컴파일 오류 0 섞인 파일(OutGameRoot · LobbyScreen · UICaptureDriver · CLAUDE.md)은 이벤트 부분만 올림 — 메뉴 숨김 · 팝업 글꼴 · 영웅 배경 · 편성 변경은 작업 트리에 그대로(미커밋) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:37:08 +00:00
// UI 탈색(받은 칸 아이콘 · PD 2026-11-19 이벤트 화면 · 시안 dim_icon = 회색과 원색을 _Keep 만큼 섞음) — UI/Default 와 같은 입력(스프라이트 · 정점 색 · RectMask2D 자르기 · 스텐실) · 합성 = 보통 알파.
// Resources 에 두어 빌드에 항상 포함 — 코드 = EventScreen.GrayMat(Resources.Load<Shader>("UI/UiGray")) · 섞는 비율 = 화면 표 event_screen gray 줄.
Shader "TKS/UI Gray"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_Keep ("Keep Color", Range(0,1)) = 0.25
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
}
SubShader
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" "CanUseSpriteAtlas"="True" }
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
};
sampler2D _MainTex;
fixed4 _Color;
fixed4 _TextureSampleAdd;
float4 _ClipRect;
float4 _MainTex_ST;
fixed _Keep;
v2f vert(appdata_t v)
{
v2f o;
o.worldPosition = v.vertex;
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
o.color = v.color * _Color;
return o;
}
fixed4 frag(v2f i) : SV_Target
{
fixed4 c = (tex2D(_MainTex, i.texcoord) + _TextureSampleAdd) * i.color;
fixed g = dot(c.rgb, fixed3(0.299, 0.587, 0.114));
c.rgb = lerp(fixed3(g, g, g), c.rgb, _Keep);
#ifdef UNITY_UI_CLIP_RECT
c.a *= UnityGet2DClipping(i.worldPosition.xy, _ClipRect);
#endif
return c;
}
ENDCG
}
}
}