Sha256: 1b3979895d24e7bded2737504dcb7321bd24340f45ddb0bb8506dee120be7b46

Contents?: true

Size: 1 KB

Versions: 6

Compression:

Stored size: 1 KB

Contents

package org.sunflow.core;

import org.sunflow.image.Color;

/**
 * A shader represents a particular light-surface interaction.
 */
public interface Shader extends RenderObject {

    /**
     * Gets the radiance for a specified rendering state. When this method is
     * called, you can assume that a hit has been registered in the state and
     * that the hit surface information has been computed.
     *
     * @param state current render state
     * @return color emitted or reflected by the shader
     */
    public Color getRadiance(ShadingState state);

    /**
     * Scatter a photon with the specied power. Incoming photon direction is
     * specified by the ray attached to the current render state. This method
     * can safely do nothing if photon scattering is not supported or relevant
     * for the shader type.
     *
     * @param state current state
     * @param power power of the incoming photon.
     */
    public void scatterPhoton(ShadingState state, Color power);
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
joonsrenderer-1.3.1-java src/main/java/org/sunflow/core/Shader.java
joonsrenderer-1.2.0-java src/main/java/org/sunflow/core/Shader.java
joonsrenderer-1.1.3-java src/main/java/org/sunflow/core/Shader.java
joonsrenderer-1.1.2-java src/main/java/org/sunflow/core/Shader.java
joonsrenderer-1.1.1-java src/main/java/org/sunflow/core/Shader.java
joonsrenderer-1.1-java src/main/java/org/sunflow/core/Shader.java