
mdl 1.4;

import ::df::*;
import ::base::*;
import ::math::*;
import ::state::*;
import ::anno::*;
import ::tex::*;

export material dome_emission_direction (
    uniform color tint = color(1.0),
    uniform float Intensity=1000 [[ anno::soft_range(float(0.0f), float(1000.0f)) ]],
    uniform float Exposure=0
) = let {
    color col = color(state::position());
} in material(
	surface: material_surface(
        emission:  material_emission (
            df::diffuse_edf(),
            intensity: tint*col*Intensity*math::exp2(Exposure)
        )
    )
);


//      export material dome_emission_direction
//      (
//          color tint = color(1.0),
//          float intensity_scale = 1.0
//      ) = material
//      (
//          surface: material_surface
//      	(
//      		emission: material_emission
//      		(
//      			emission: 	df::diffuse_edf(),
//                  intensity: 	tint * color(state::position()) * intensity_scale
//      		)
//      	)
//      );
//      