Skip to content

Commit a3209b5

Browse files
committed
Write README.md
1 parent 4f5585a commit a3209b5

File tree

5 files changed

+174
-2
lines changed

5 files changed

+174
-2
lines changed

Images/Font.png

Lines changed: 3 additions & 0 deletions
Loading

Images/Inspector-Properties.png

Lines changed: 3 additions & 0 deletions
Loading

README.ja.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## Unity Number Counter Shader
2+
3+
このドキュメントは以下の言語でもご覧いただけます。
4+
[[English]](./README.md) [[한국어]](./README.ko.md) [[日本語]](README.ja.md)
5+
6+
[![GitHub Release][shields-release]][github-release]
7+
8+
[shields-release]: https://img.shields.io/github/v/release/hisacat/Unity-NumberCounterShader
9+
[github-release]: https://github.com/hisacat/Unity-NumberCounterShader/releases/latest
10+
11+
これはUnityで数字を表示するためのシンプルなシェーダーです。
12+
13+
- 最大6桁の数字を表示可能
14+
- パフォーマンスを最適化した軽量シェーダー
15+
- `Particle System`と完全互換
16+
- 7種類のデフォルトフォントテクスチャを提供
17+
18+
このプロジェクトにクレジットを付ける義務はありませんが、付けていただけると嬉しいです!
19+
もしこのプロジェクトがお気に召しましたら、以下のボタンから**サポート**をしてください <3
20+
21+
<a href="https://www.buymeacoffee.com/HisaCat"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me Milk&emoji=🥛&slug=HisaCat&button_colour=bd5fff&font_colour=ffffff&font_family=Bree&outline_colour=000000&coffee_colour=ffffff" /></a>
22+
23+
## フォントテクスチャ例
24+
25+
以下はフォントテクスチャの例です。(実際には背景が透明である必要があります)
26+
![Font example](./Images/Font.png)
27+
カスタムフォントテクスチャを作成して使用することもできます。サポート用に [Font Template.psd](./Assets/HisaCat/Number Counter/FontTemplate.psd) ファイルを提供しています。
28+
29+
## 使用方法
30+
31+
- [`HisaCat/Number Counter/Sample Scene`](./Assets/HisaCat/Number Counter/Samples/Sample Scene.unity) をご参照ください。
32+
使用するには、`HisaCat/Number Counter Unlit Cutout``HisaCat/Number Counter Unlit Alpha Blended` シェーダーをQuadやMeshに適用します。
33+
- プロパティ:
34+
![Properties](./Images/Inspector-Properties.png)
35+
- `Color`: 最終的に掛け合わせる色です。
36+
- `Sprite Sheet`: 数字0〜9が含まれたテクスチャです。(5列2行)
37+
- `Display Length`: 表示する桁数です。
38+
- `Value`: 表示する値です。
39+
- `Align`: 数値の配置方法。
40+
- `Fill Zeros`: 数字を右揃えし、空いた左の桁を`0`で埋めます。
41+
- `Left`: 数字を左揃えします。
42+
- `Right`: 数字を右揃えします。
43+
44+
## その他
45+
46+
このシェーダーは手動でコーディングされており、パフォーマンス面で非常に軽量です。
47+
メインロジックは [Number Counter.cginc](./Assets/HisaCat/Number Counter/Shaders/Number Counter.cginc) に記載されていますので、興味のある方はご確認ください。
48+
49+
このシェーダーは、テクスチャの周辺の一部のパディング領域をレンダリングから除外するため、テクスチャの`Mipmaps`オプションを有効にしても視覚的なアーティファクトが発生しません。これにより、VRChatなどのゲームとの互換性も高くなっています。
50+
問題が発生した場合は、[Issue](https://github.com/hisacat/Unity-NumberCounterShader/issues) タブからお知らせください!
51+
52+
## ライセンス
53+
54+
このプロジェクトは完全なオープンソースであり、著作権情報を含める条件の下、誰でも自由に使用、改変、配布することができます。このソフトウェアは「現状のまま」提供されており、使用に伴う問題や損害について著作権者は一切責任を負いません。
55+
56+
詳細については、[ライセンス](./LICENSE) をご参照ください。

README.ko.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## Unity Number Counter Shader
2+
3+
이 문서는 아래 언어로도 읽을 수 있습니다.
4+
[[English]](./README.md) [[한국어]](./README.ko.md) [[日本語]](README.ja.md)
5+
6+
[![GitHub Release][shields-release]][github-release]
7+
8+
[shields-release]: https://img.shields.io/github/v/release/hisacat/Unity-NumberCounterShader
9+
[github-release]: https://github.com/hisacat/Unity-NumberCounterShader/releases/latest
10+
11+
이것은 숫자를 표시하기 위한 간단한 Unity용 Shader 입니다.
12+
13+
- 최대 6자리의 숫자를 표시 가능
14+
- 직접 작성된 쉐이더로 매우 가벼움
15+
- `Particle System`과 완벽 호환
16+
- 7여종의 텍스처 폰트가 기본적으로 제공
17+
18+
이 프로젝트를 사용함에 따른 라이센스 표기는 당신의 자유입니다!
19+
제 프로젝트가 마음에 드신다면 아래 버튼으로 제게 **후원**을 해 주세요 <3
20+
21+
<a href="https://www.buymeacoffee.com/HisaCat"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me Milk&emoji=🥛&slug=HisaCat&button_colour=bd5fff&font_colour=ffffff&font_family=Bree&outline_colour=000000&coffee_colour=ffffff" /></a>
22+
23+
## 텍스처 폰트 예제
24+
25+
아래는 텍스처 폰트의 예제입니다. (실제로는 배경이 투명이어야 함)
26+
![Font example](./Images/Font.png)
27+
커스텀 폰트 텍스처를 직접 만들어 사용하실 수도 있습니다. 이를 돕기 위한 [Font Template.psd](./Assets/HisaCat/Number Counter/FontTemplate.psd)가 함께 제공됩니다.
28+
29+
## Usage
30+
31+
- [`HisaCat/Number Counter/Sample Scene`](./Assets/HisaCat/Number Counter/Samples/Sample Scene.unity)을 참고하세요.
32+
기본적으로 Quad에 Mesh에 `HisaCat/Number Counter Unlit Cutout`, `HisaCat/Number Counter Unlit Alpha Blended`등의 Shader를 적용한 Material을 할당하면 됩니다.
33+
- Properties:
34+
![Properties](./Images/Inspector-Properties.png)
35+
- `Color`: 최종적으로 곱해질 색상입니다.
36+
- `Sprite Sheet`: 0~9까지의 숫자가 포함된 텍스처입니다. (5 Columns 2 Rows)
37+
- `Display Length`: 표시될 숫자의 자릿수입니다.
38+
- `Value`: 표시될 값입니다.
39+
- `Align`: 값의 표시 방법입니다.
40+
- `Fill Zeros`: 숫자를 오른쪽으로 정렬하고 빈 왼쪽 자리를 `0`으로 채웁니다.
41+
- `Left`: 숫자를 왼쪽으로 정렬합니다.
42+
- `Right`: 숫자를 오른쪽으로 정렬합니다.
43+
44+
## 기타
45+
46+
이 쉐이더는 코드를 통해 직접 작성되으며, 퍼포먼스 측면에서 매우 가볍습니다.
47+
메인 로직은 [Number Counter.cginc](./Assets/HisaCat/Number Counter/Shaders/Number Counter.cginc)에 작성되어 있으니 궁금하시다면 확인해보세요!
48+
49+
기본적으로 가장자리의 일부 padding 영역을 렌더링에서 제외하기 때문에 텍스처의 `Mipmaps`옵션을 활성화해도 시각적 아티펙트가 발생하지 않습니다. 이로 인해 VRChat등의 게임과의 호환성이 좋습니다.
50+
문제가 발생할 경우 [Issue](https://github.com/hisacat/Unity-NumberCounterShader/issues) 탭 등을 통해 제게 알려주세요!
51+
52+
## LICENSE
53+
54+
이 프로젝트는 완전한 오픈 소스로, 저작권 표기를 포함하는 조건 하에 누구나 자유롭게 사용, 수정, 배포할 수 있습니다. 이 소프트웨어는 "있는 그대로" 제공되며, 저작권자는 사용에 따른 문제나 손해에 대해 책임을 지지 않습니다.
55+
56+
자세한 내용은 [라이센스](./LICENSE) 문서를 참조하세요.

README.md

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,56 @@
1-
# Unity-NumberCounter
2-
Simple Number Counter Shader for Unity
1+
## Unity Number Counter Shader
2+
3+
This document is also available in other languages:
4+
[[English]](./README.md) [[한국어]](./README.ko.md) [[日本語]](README.ja.md)
5+
6+
[![GitHub Release][shields-release]][github-release]
7+
8+
[shields-release]: https://img.shields.io/github/v/release/hisacat/Unity-NumberCounterShader
9+
[github-release]: https://github.com/hisacat/Unity-NumberCounterShader/releases/latest
10+
11+
This is a simple shader for displaying numbers in Unity.
12+
13+
- Displays up to 6 digits
14+
- Lightweight shader with optimized performance
15+
- Fully compatible with `Particle System`
16+
- Comes with 7 default font textures
17+
18+
There’s no requirement to credit this project, though it is appreciated!
19+
If you enjoy my project, please consider **supporting me** through the button below <3
20+
21+
<a href="https://www.buymeacoffee.com/HisaCat"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me Milk&emoji=🥛&slug=HisaCat&button_colour=bd5fff&font_colour=ffffff&font_family=Bree&outline_colour=000000&coffee_colour=ffffff" /></a>
22+
23+
## Font Texture Example
24+
25+
Below is an example of a font texture. (The actual background should be transparent.)
26+
![Font example](./Images/Font.png)
27+
You can create and use custom font textures as well. A [Font Template.psd](./Assets/HisaCat/Number Counter/FontTemplate.psd) file is provided to help you get started.
28+
29+
## Usage
30+
31+
- Refer to the [`HisaCat/Number Counter/Sample Scene`](./Assets/HisaCat/Number Counter/Samples/Sample Scene.unity) for examples.
32+
To use, simply apply materials with shaders like `HisaCat/Number Counter Unlit Cutout` or `HisaCat/Number Counter Unlit Alpha Blended` to a Quad or Mesh.
33+
- Properties:
34+
![Properties](./Images/Inspector-Properties.png)
35+
- `Color`: The final color to be multiplied.
36+
- `Sprite Sheet`: A texture containing digits 0–9 (5 Columns 2 Rows).
37+
- `Display Length`: Number of digits to display.
38+
- `Value`: The value to display.
39+
- `Align`: Alignment of the displayed value.
40+
- `Fill Zeros`: Right-align with empty spaces filled with `0`.
41+
- `Left`: Left-aligns the number.
42+
- `Right`: Right-aligns the number.
43+
44+
## Additional Information
45+
46+
This shader is manually coded and optimized for performance.
47+
The core logic is located in [Number Counter.cginc](./Assets/HisaCat/Number Counter/Shaders/Number Counter.cginc) if you’re interested in exploring the code.
48+
49+
Since this shader excludes certain padding areas around the edges, enabling the texture’s `Mipmaps` option won’t cause visual artifacts, which makes it compatible with games like VRChat.
50+
If you encounter any issues, please let me know through the [Issue](https://github.com/hisacat/Unity-NumberCounterShader/issues) tab!
51+
52+
## LICENSE
53+
54+
This project is completely open-source, allowing anyone to freely use, modify, and distribute it under the condition that the copyright information is included in all copies. The software is provided “as is,” with no liability held by the author for any issues or damages resulting from its use.
55+
56+
For details, please refer to the [License](./LICENSE).

0 commit comments

Comments
 (0)