prototype release

This commit is contained in:
Lilith Schier 2026-10-05 22:31:33 +02:00
parent 5794f50856
commit 3197ae9e6f
9 changed files with 543 additions and 572 deletions

Binary file not shown.

25
src/assets/sdf.gl100.glsl Normal file
View file

@ -0,0 +1,25 @@
#version 100
precision mediump float;
// Input vertex attributes (from vertex shader)
varying vec2 fragTexCoord;
varying vec4 fragColor;
// Input uniform values
uniform sampler2D texture0;
uniform vec4 colDiffuse;
// NOTE: Add your custom variables here
const float smoothing = 1.0/8.0;
void main()
{
// Texel color fetching from texture sampler
// NOTE: Calculate alpha using signed distance field (SDF)
float distance = texture2D(texture0, fragTexCoord).a;
float alpha = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance);
// Calculate final fragment color
gl_FragColor = vec4(fragColor.rgb, fragColor.a*alpha);
}

26
src/assets/sdf.gl330.glsl Normal file
View file

@ -0,0 +1,26 @@
#version 330
// Input vertex attributes (from vertex shader)
in vec2 fragTexCoord;
in vec4 fragColor;
// Input uniform values
uniform sampler2D texture0;
uniform vec4 colDiffuse;
// Output fragment color
out vec4 finalColor;
// NOTE: Add your custom variables here
void main()
{
// Texel color fetching from texture sampler
// NOTE: Calculate alpha using signed distance field (SDF)
float distanceFromOutline = texture(texture0, fragTexCoord).a - 0.5;
float distanceChangePerFragment = length(vec2(dFdx(distanceFromOutline), dFdy(distanceFromOutline)));
float alpha = smoothstep(-distanceChangePerFragment, distanceChangePerFragment, distanceFromOutline);
// Calculate final fragment color
finalColor = vec4(fragColor.rgb, fragColor.a*alpha);
}

View file

@ -80,3 +80,65 @@ CARDS := [Card_Handle(TAROT_COUNT)]Card {
{.Wand, 13},
{.Wand, 14},
}
card_full_name :: proc(card: Card) -> (name: string) {
suit_name: string
switch card.suit {
case .Major:
switch card.number {
case 0:
return "The Fool"
case 1:
return "The Magician"
case 2:
return "The High Priestess"
case 3:
return "The Empress"
case 4:
return "The Emperor"
case 5:
return "The Hierophant"
case 6:
return "The Lovers"
case 7:
return "The Chariot"
case 8:
return "Strength"
case 9:
return "The Hermit"
case 10:
return "Wheel of Fortune"
case 11:
return "Justice"
case 12:
return "The Hanged Man"
case 13:
return "Death"
case 14:
return "Temperance"
case 15:
return "The Devil"
case 16:
return "The Tower"
case 17:
return "The Star"
case 18:
return "The Moon"
case 19:
return "The Sun"
case 20:
return "Judgment"
case 21:
return "The World"
}
case .Chalice:
suit_name = "of Chalices"
case .Coin:
suit_name = "of Coins"
case .Sword:
suit_name = "of Swords"
case .Wand:
suit_name = "of Wands"
}
return name
}

File diff suppressed because it is too large Load diff

View file

@ -4,19 +4,19 @@
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Odin + Raylib on the web</title>
<meta name="title" content="Odin + Raylib on the web">
<meta name="description" content="Make games using Odin + Raylib that work in the browser">
<title>Fortune's Foundation</title>
<meta name="title" content="Fortune's Foundation">
<meta name="description" content="A clone of an excellent solitaire designed by Zachtronics!">
<meta name="viewport" content="width=device-width">
<style>
body {
margin: 0px;
overflow: hidden;
body {
margin: 0px;
overflow: hidden;
background-color: black;
}
canvas.game_canvas {
border: 0px none;
canvas.game_canvas {
border: 0px none;
background-color: black;
padding-left: 0;
padding-right: 0;