FlareFlo / smallpt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Licensed under the MIT license

Installation

Stable rust toolchain from the official installation guide

Prerequisites

Windows

If the executable installer is not used, you may need to manually install the MSVC prerequisites for Windows

Linux

The GNU Compiler Collection tools must be installed, as Rust uses the linker from said toolchain.
These can typically be installed through a package-manager:

  • build-essential on ubuntu and debian
  • base-devel on arch

Rendering

Run with optimal settings

RUSTFLAGS="--emit=asm -Ctarget-cpu=native" cargo run --release $SAMPLE_COUNT

View image

Image viewers like Gwenview are required to view the PPM file format directly emitted
If no such program is available, converting the image to alternative formats such as PNG are recommended

gwenview image.ppm

Convert PPM to PNG using ImageMagick

ImageMagick is available for all operating systems Converting to PNG usually cuts file size down by 60%

convert image.ppm image.png

About

License:MIT License


Languages

Language:Rust 100.0%