Ohisama (The Sun) is an essential toolkit for Kage (Ebitengine Shading Language).
Just as the sun casts the shadow ("Kage"), this extension illuminates your shader code with an instant, live preview.
Features
🚀 Real-time WebAssembly Preview: Edit your .kage files and see the changes instantly! Powered by WebAssembly and Ebitengine.
🖼️ Customizable Background:
Change the background image (.png, .jpg) to test your shaders with real textures.
Set a custom background color (RGBA) to verify transparency and blending.
✨ Syntax Highlighting: Complete colorization for Kage keywords, types (vec2, vec3, etc.), and built-in functions.
🛠️ Uniforms Support: Pre-configured with essential uniforms like Time, Cursor, Resolution, and CRT-related parameters.
How to Use
1. Open Preview
Open a .kage file.
Open the Command Palette (Cmd + Shift + P / Ctrl + Shift + P).
Select Ohisama: Open Preview.
2. Change Background Image
Select Ohisama: Change Background Image from the Command Palette to load your own image.
3. Change Background Color
Select Ohisama: Change Background Color and enter RGBA values (e.g., 40, 44, 52, 255).
Supported Uniforms
The previewer automatically provides the following uniforms to your Kage code:
Uniform
Type
Description
Time
float
Elapsed time in seconds
Cursor
vec2
Current mouse position
Resolution
vec2
Preview area resolution (640x360)
Intensity
float
Effect intensity multiplier
CurveAmount
float
Distortion amount for CRT effects
Requirements
VS Code 1.108.1 or higher
Future Plans
Code Formatting
Diagnostics / Linting (Error highlighting on the editor)