High-level API
Contents
High-level API
Raytracer.render
— Methodrender(image_tracer::ImageTracer,
renderer::Renderer
; output_file::String = "out.pfm"
use_threads::Bool = true,
disable_output::Bool = false)
Render an image given an ImageTracer
and a Renderer
, and save the generated hdr image in output_file
.
If use_threads
is true
, use macro Threads.@threads
. If disable_output
is true
, no message is printed.
Raytracer.render_from_script
— Methodrender_from_script(input_script::String
; output_file::String = "out.pfm",
time::Float32 = 0f0,
vars::String = "",
use_threads::Bool = true,
disable_output::Bool = false)
Render an image given an input_script
written in SceneLang and save the generated hdr image in output_file
.
If use_threads
is true
, use macro Threads.@threads
. If disable_output
is true
, no message is printed.
Raytracer.tonemapping
— Methodtonemapping(input_file::String,
output_file::String
; α::Float32,
γ::Float32,
luminosity::Union{Float32, Nothing} = nothing,
disable_output::Bool = false)
Load a pfm hdr image, apply the tone mapping, and save the generated ldr image.
input_file
is the path to a valid PFM image. output_file
is the path in which save the generated image + the name of the output file. The output format is deduced by the extension of the output file: if the name is example.jpg
, the image will be exported in JPEG format. α
is the normalization coefficient. γ
is the actor of the γ correction. Optional parameter luminosity
can be used for better tuning.
If disable_output
is true
, no message is printed.