Initial commit: Odin editor client + Kotlin daemon prototype
Native SDL3 editor written in Odin with a piece-table buffer core, backed by a Kotlin/JVM daemon speaking newline-delimited JSON over localhost TCP for Gradle import, Kotlin/Java diagnostics, and heuristic completion/hover/definition/references/rename. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
commit
4a15350860
21 changed files with 8112 additions and 0 deletions
8
client/odin/shaders/rect.frag.glsl
Normal file
8
client/odin/shaders/rect.frag.glsl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#version 450
|
||||
|
||||
layout(location = 0) in vec4 v_color;
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
void main() {
|
||||
out_color = v_color;
|
||||
}
|
||||
17
client/odin/shaders/rect.vert.glsl
Normal file
17
client/odin/shaders/rect.vert.glsl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#version 450
|
||||
|
||||
layout(location = 0) in vec2 a_pos;
|
||||
layout(location = 1) in vec4 a_color;
|
||||
|
||||
layout(set = 1, binding = 0) uniform VertexUniforms {
|
||||
vec2 u_viewport;
|
||||
};
|
||||
|
||||
layout(location = 0) out vec4 v_color;
|
||||
|
||||
void main() {
|
||||
vec2 ndc = vec2((a_pos.x / u_viewport.x) * 2.0 - 1.0,
|
||||
1.0 - (a_pos.y / u_viewport.y) * 2.0);
|
||||
gl_Position = vec4(ndc, 0.0, 1.0);
|
||||
v_color = a_color;
|
||||
}
|
||||
12
client/odin/shaders/text.frag.glsl
Normal file
12
client/odin/shaders/text.frag.glsl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#version 450
|
||||
|
||||
layout(location = 0) in vec2 v_uv;
|
||||
layout(location = 1) in vec4 v_color;
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
layout(set = 2, binding = 0) uniform sampler2D u_font;
|
||||
|
||||
void main() {
|
||||
float alpha = texture(u_font, v_uv).r;
|
||||
out_color = vec4(v_color.rgb, v_color.a * alpha);
|
||||
}
|
||||
20
client/odin/shaders/text.vert.glsl
Normal file
20
client/odin/shaders/text.vert.glsl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#version 450
|
||||
|
||||
layout(location = 0) in vec2 a_pos;
|
||||
layout(location = 1) in vec2 a_uv;
|
||||
layout(location = 2) in vec4 a_color;
|
||||
|
||||
layout(set = 1, binding = 0) uniform VertexUniforms {
|
||||
vec2 u_viewport;
|
||||
};
|
||||
|
||||
layout(location = 0) out vec2 v_uv;
|
||||
layout(location = 1) out vec4 v_color;
|
||||
|
||||
void main() {
|
||||
vec2 ndc = vec2((a_pos.x / u_viewport.x) * 2.0 - 1.0,
|
||||
1.0 - (a_pos.y / u_viewport.y) * 2.0);
|
||||
gl_Position = vec4(ndc, 0.0, 1.0);
|
||||
v_uv = a_uv;
|
||||
v_color = a_color;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue