diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..b922d5a --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build Go (Linux + Windows) + +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: docker:docker://golang:1.24 + + steps: + - uses: actions/checkout@v4 + + - name: Build binaries + run: | + cd src + GOOS=linux GOARCH=amd64 go build -o raymarchgo-linux-amd64 + GOOS=windows GOARCH=amd64 go build -o raymarchgo-windows-amd64.exe + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: binaries + path: | + builds/raymarchgo-linux-amd64 + builds/raymarchgo-windows-amd64.exe diff --git a/builds/empty_file b/builds/empty_file new file mode 100644 index 0000000..e69de29 diff --git a/src/app-linux-amd64 b/src/app-linux-amd64 new file mode 100755 index 0000000..7871720 Binary files /dev/null and b/src/app-linux-amd64 differ diff --git a/src/go.mod b/src/go.mod index 468a4ae..97073ed 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,4 +1,4 @@ -module test_raylib +module raymarching_go go 1.24.7 diff --git a/src/main.go b/src/main.go index 275e33d..ba5f914 100644 --- a/src/main.go +++ b/src/main.go @@ -15,7 +15,7 @@ import ( const WIDTH = 200 const HEIGHT = 200 -const TEXTURE_SCALE = 2 +const TEXTURE_SCALE = 4 const MAX_DIST = 500.0 const MAX_STEP = 100 @@ -43,9 +43,11 @@ func init() { func update(t float64) { sphereMat := RED_MAT + sphereMat2 := BLUE_MAT sphereMat.specularFac = 0.5 + sphereMat2.specularFac = 0.5 sphere := TranslatedSDF{Sphere{10, sphereMat}, Vector3{-15, 100, 10}} - sphere2 := TranslatedSDF{Sphere{10, sphereMat}, Vector3{15, 100, 10}} + sphere2 := TranslatedSDF{Sphere{10, sphereMat2}, Vector3{15, 100, 10}} // boxMat := BLUE_MAT // box := TranslatedSDF{Box{Vector3{10, 2, 10}, boxMat}, Vector3{0, 100, 10}} diff --git a/src/raymarching_go b/src/raymarching_go new file mode 100755 index 0000000..7871720 Binary files /dev/null and b/src/raymarching_go differ