Sha256: 478aa70bba1a68171879c39fd1d705c9f6ba8d71622f3bbd08075d222f8952aa

Contents?: true

Size: 1.54 KB

Versions: 2

Compression:

Stored size: 1.54 KB

Contents

package org.sunflow.core;

import org.sunflow.image.Color;

/**
 * This represents a global illumination algorithm. It provides an interface to
 * compute indirect diffuse bounces of light and make those results available to
 * shaders.
 */
public interface GIEngine {

    /**
     * This is an optional method for engines that contain a secondary
     * illumination engine which can return an approximation of the global
     * radiance in the scene (like a photon map). Engines can safely return
     * <code>Color.BLACK</code> if they can't or don't wish to support this.
     *
     * @param state shading state
     * @return color approximating global radiance
     */
    public Color getGlobalRadiance(ShadingState state);

    /**
     * Initialize the engine.This is called before rendering begins.
     *
     * @param options
     * @param scene
     * @return <code>true</code> if the init phase succeeded, <code>false</code>
     * otherwise
     */
    public boolean init(Options options, Scene scene);

    /**
     * Return the incomming irradiance due to indirect diffuse illumination at
     * the specified surface point.
     *
     * @param state current render state describing the point to be computed
     * @param diffuseReflectance diffuse albedo of the point being shaded, this
     * can be used for importance tracking
     * @return irradiance from indirect diffuse illumination at the specified
     * point
     */
    public Color getIrradiance(ShadingState state, Color diffuseReflectance);
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
joonsrenderer-1.3.1-java src/main/java/org/sunflow/core/GIEngine.java
joonsrenderer-1.2.0-java src/main/java/org/sunflow/core/GIEngine.java