A simple Go library for 3D ray-tracing rendering, implementing the book Ray Tracing in One Weekend.

Overview

Ray Tracing in Go

cover image

A Go implementation of the book Ray Tracing in One Weekend. The repository provides a library to describe and render your own scenes. For more detail, see examples/main.go.

Getting Started

git clone [email protected]:y-taka-23/raytracing-go.git
cd raytracing-go
make examples
./bin/example > example.ppm
open example.ppm

Materials

Lambertian

color result
(0.8, 0.1, 0.1) red lambertian sphere
(1.0, 1.0, 1.0) white lambertian sphere
(0.0, 0.0, 0.0) black lambertian sphere

Metalic

fuzziness result
0.0 metalic sphere of fuzziness 0.0
0.15 metalic sphere of fuzziness 0.15
0.3 metalic sphere of fuzziness 0.3

Dielectric

refractive index result
1.0 dielectric sphere of refractive index 1.0
1.5 dielectric sphere of refractive index 1.5
2.0 dielectric sphere of refractive index 2.0

Camera Setting

Angle of View

virtical angle (degree) result
90 result of the vertical angle in 90 degree
60 result of the vertical angle in 60 degree
30 result of the vertical angle in 30 degree

Aperture

aperture result
0.0 result of the aperture 0.0
0.5 result of the aperture 0.5
1.0 result of the aperture 1.0

Depth of Field

focus distance result
6 result of the depth of field 6
9 result of the depth of field 9
12 result of the depth of field 12

Reference

You might also like...
Donburi is just another Entity Component System library for Ebiten inspired by legion.
Donburi is just another Entity Component System library for Ebiten inspired by legion.

Donburi Donburi is just another Entity Component System library for Ebiten inspired by legion. It aims to be a feature rich and high performance ECS L

Spaceshooter - A port to go of the pygame Space Shooter game using the ebiten library
Spaceshooter - A port to go of the pygame Space Shooter game using the ebiten library

Space Shooter This is a port to go of the pygame Space Shooter (https://github.c

TCG - terminal cell graphics library
TCG - terminal cell graphics library

TCG - terminal cell graphics Go Graphics library for use in a text terminal. Only 1bit graphics can be used with two colors. Used unicode block symbol

Simple 2D game prototyping framework.
Simple 2D game prototyping framework.

prototype Simply prototype 2D games using an easy, minimal interface that lets you draw simple primitives and images on the screen, easily handle mous

Bampf is a simple 3D arcade style game. Collect Energy Cores in order to finish a level. Teleport (bampf) to safety or use cloaking abilities to avoid Sentinels.

Bampf Bampf is a simple 3D arcade style game. Collect energy cores in order to finish a level. Teleport (bampf) to safety or use cloaking abilities to

This is a
This is a "simple" game server. Main functionalities are matching and establishing a connection between players

Game Server This is a "simple" game server. Main functionalities are matching and establishing a connection between players How to Run? run the server

 Simple rule based matchmaking for your online game with support of Redcon(RESP) protocol.
Simple rule based matchmaking for your online game with support of Redcon(RESP) protocol.

Simple Matchmaking Simple rule based matchmaking for your online game with support of Redcon(RESP) protocol. 1- Simple Match Rule Easiest usage of sys

A simple desktop snake game

A simple desktop snake game that's supposed to run on Linux and Mac OS (maybe eventually on Windows). Work on the game is currently in progress - so i

Simple word guessing game written in golang.
Simple word guessing game written in golang.

Word Guessing Game Simple word guessing game written in golang. successTexts := []string{ "You guessed right! 👏🏻🥳🎉", "Correct! ✅", "Horray!

Owner
Yuto Takahashi
Yuto Takahashi
A dead simple 2D game library for Go

Ebiten (v2) A dead simple 2D game library for Go Ebiten is an open source game library for the Go programming language. Ebiten's simple API allows you

Hajime Hoshi 7.6k Dec 28, 2022
Go bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.

raylib-go Golang bindings for raylib, a simple and easy-to-use library to enjoy videogames programming. Requirements Ubuntu X11 apt-get install libgl1

Milan Nikolic 915 Dec 28, 2022
A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy!

galactic-asteroid-belt Overview A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy! Run To run, you will need Go

null 0 Dec 2, 2021
A hand-crafted 2D game library in Go

Pixel A hand-crafted 2D game library in Go. Take a look into the features to see what it can do. go get github.com/faiface/pixel If you are using Mod

Michal Štrba 4.1k Dec 31, 2022
Helper library to transform TMX tile maps into a simpler format for Ebiten

Ebitmx Ebitmx is a super simple parser to help render TMX maps when using Ebiten for your games. Right now is super limited to XML and CSV data struct

Raúl 20 Nov 16, 2022
build and animate objects according to verlet physics. pure golang library

verlet build and animate objects according to verlet physics. pure golang library Examples depend on pixel library, see requirements to build them: wo

Paolo Calao 25 Dec 22, 2022
Rock-paper-scissors game library

jankensheep Rock-paper-scissors game library Examples Play with two players:

Genta Kamitani 6 May 13, 2022
Golang writen 3D render library and some game-relative concepts

Golang writen 3D render library and some game-relative concepts.

null 2 Jun 6, 2022
Golang library for connecting to EOSIO SHIP

go-eosio-ship go-eosio-ship is a golang library built on top of go-eosio for con

null 0 Jan 3, 2022
Battleblips - Work in progress multiplayer terminal base battleship game written in Go (with mouse support!) using tcell library

battleblips Work in progress multiplayer terminal base battleship game written in Go (with mouse support!) using tcell library (see https://github.com

null 1 Apr 26, 2022