
GLSL ES
Android · OpenGL ES · WebGL
Portable shader source for OpenGL ES applications on Android and for WebGL.
COMPILATION PROCESS
Write your shader logic in C#. Yotsuba Shader produces SPIR-V, then Yotsuba ShaderCross translates it into the shader language your application needs.
Explore the C# authoring syntaxes →Lighting, procedural patterns, texture sampling, and reusable functions start in the same C# project. The compiler works with the supported shader subset of C#.

Your types, functions, and shader logic.


Roslyn analysis → Yotsuba IR → SPIR-V generation.
A binary shader module shared by the output paths.


Translate the SPIR-V module into the target shader language.

Android · OpenGL ES · WebGL
Portable shader source for OpenGL ES applications on Android and for WebGL.

OpenGL
Shader source for an OpenGL rendering pipeline.

Metal
Metal Shading Language source for Apple platforms.

Direct3D 11 / 12
Shader source to compile with a Direct3D shader compiler such as DXC.

WebGPU
Planned for 2027. WGSL output is not available yet.
Illustrative imagery by independent photographers and 3D artists.
In development. This diagram describes the intended compilation pipeline. The complete C# → IR → SPIR-V path is still being assembled. WGSL output is planned for 2027.
YOTSUBA SHADER
The vertex stage receives a position and color, converts the position to homogeneous clip-space coordinates, and passes the color to the fragment stage. The fragment stage returns the interpolated color.
This example contains the shader code for both stages. The application configures the graphics pipeline, supplies vertex data, and issues draw calls.
using Microsoft.Xna.Framework;
using YotsubaShader.Language;
using YotsubaShader.HlslSyntax;
public class BasicColorShader
{
public struct VS_Input
{
[POSITION]
public Vector2 Position;
[COLOR]
public Vector4 Color;
}
public struct VS_Output
{
[SV_Position]
public Vector4 Position;
[COLOR]
public Vector4 Color;
}
[ShaderStage(Stage.Vertex)]
public VS_Output VS(VS_Input input)
{
VS_Output output = new VS_Output();
output.Position = new Vector4(
input.Position.X,
input.Position.Y,
0.0f,
1.0f
);
output.Color = input.Color;
return output;
}
[ShaderStage(Stage.Fragment)]
[return: SV_Target(0)]
public Vector4 FS(VS_Output input)
{
return input.Color;
}
}
SPIR-V
SPIR-V stores shader instructions, types, entry points, and resource bindings in a binary module. A Vulkan application can use a compatible module directly; other output paths pass it to Yotsuba ShaderCross.
YOTSUBA SHADERCROSS
ShaderCross reads SPIR-V and emits GLSL ES, GLSL, MSL, or HLSL source. WGSL is a planned output. Your engine or graphics API then compiles the generated source as required by the target platform.
Android is a platform, not a shader format: use GLSL ES for an OpenGL ES renderer, or SPIR-V for a Vulkan renderer. WebGL uses GLSL ES; WebGPU uses WGSL.
No results. Try “stage”, “SPIR-V”, “uniform” or “Metal”.