Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions data/font.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-FileCopyrightText: 2025 Erin Catto
// SPDX-License-Identifier: MIT

#version 330 core

in vec4 color;
in vec2 uv;

uniform sampler2D FontAtlas;

out vec4 fragColor;

void main()
{
fragColor = vec4(color.rgb, color.a * texture(FontAtlas, uv).r);
}
21 changes: 21 additions & 0 deletions data/font.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-FileCopyrightText: 2025 Erin Catto
// SPDX-License-Identifier: MIT

#version 330 core

layout (location = 0) in vec2 aPosition;
layout (location = 1) in vec2 aUV;
layout (location = 2) in vec4 aColor;

out vec4 color;
out vec2 uv;

uniform mat4 ProjectionMatrix;

void main()
{
gl_Position = ProjectionMatrix * vec4(aPosition, 0.0, 1.0);

color = aColor;
uv = aUV;
}
12 changes: 12 additions & 0 deletions data/line.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-FileCopyrightText: 2025 Erin Catto
// SPDX-License-Identifier: MIT

#version 330

in vec4 f_color;
out vec4 color;

void main(void)
{
color = f_color;
}
16 changes: 16 additions & 0 deletions data/line.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-FileCopyrightText: 2024 Erin Catto
// SPDX-License-Identifier: MIT

#version 330

uniform mat4 projectionMatrix;
layout(location = 0) in vec2 v_position;
layout(location = 1) in vec4 v_color;

out vec4 f_color;

void main(void)
{
f_color = v_color;
gl_Position = projectionMatrix * vec4(v_position, 0.0f, 1.0f);
}
12 changes: 12 additions & 0 deletions data/point.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-FileCopyrightText: 2025 Erin Catto
// SPDX-License-Identifier: MIT

#version 330

in vec4 f_color;
out vec4 color;

void main(void)
{
color = f_color;
}
18 changes: 18 additions & 0 deletions data/point.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-FileCopyrightText: 2024 Erin Catto
// SPDX-License-Identifier: MIT

#version 330

uniform mat4 projectionMatrix;
layout(location = 0) in vec2 v_position;
layout(location = 1) in float v_size;
layout(location = 2) in vec4 v_color;

out vec4 f_color;

void main(void)
{
f_color = v_color;
gl_Position = projectionMatrix * vec4(v_position, 0.0f, 1.0f);
gl_PointSize = v_size;
}
116 changes: 0 additions & 116 deletions src/Box2D.NET.Samples/Camera.cs

This file was deleted.

Loading
Loading