Thanks to visit codestin.com
Credit goes to github.com

Skip to content

wouteroostervld/snell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snell

Raytracer in haskell

Goal

Implementing a haskell raytracer which can render physically believable pictures. The 'pbrt' of haskell ( https://github.com/mmp ).

TODO

  • Absract stuff into modules.
  • Use lua to define scene(s), camera's, objects, shaders, texture (image and mapping), position and scale (STR matrices).
  • Use lua, multiple scenes and something like ffmpeg to create animation.
  • Make asynchreous processing using the lua scripting -possible- default.

Use the Surface datatype with only funtions. Add state using (custom) constructor function. Static state by inserting partially evaluated functions. Like colorplain :: Color -> Hitpoint -> Color the Surface takes a Hitpoint -> Color so suplly the plain color. -Dynamic state by using a ST/Ref or something. Most of the time a Configuration as SRT-matrix as state is enough.- Dynamic state is not needed. Add SRT to init and make lua plumbing. (With an object keeping track of STR. Make STR setting (even if null) happen before setting shaders etc.) Actual contructor can be in haskell taking some long record.

Diffuse balls

Example using a point light:

Diffuse balls pointlight

Example using a point light and the reflection shader with a blue teint:

Reflection

Example with sheen (schlick approximation):

Sheen

Example with Schlick- (yellow ivory) and SchlickMetal-shader (gold):

Gold

About

Raytracer in haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published