Exemple #1
0
    GaussianFilter(const ParamSet& paramSet)
    {
        float radius = paramSet.getFloat("radius", 2.0f);
        m_size.x = m_size.y = radius;

        float stddev = paramSet.getFloat("stddev", 0.5f);
        m_alpha = 1.0f / (2.0f * stddev * stddev);

        m_expX = exp(-m_alpha * m_size.x * m_size.x);
        m_expY = exp(-m_alpha * m_size.y * m_size.y);
    }
 HeterogeneousMedium(const ParamSet& paramSet)
 {
     m_albedo = paramSet.getColor("albedo");
     m_filename = paramSet.getString("filename");
     m_densityMultiplier = paramSet.getFloat("densityMultiplier", 1.0f);
     m_worldToMedium = paramSet.getTransform("toWorld", Transform()).inverse();
 }
Exemple #3
0
 BoxFilter(const ParamSet& paramSet)
 {
     float radius = paramSet.getFloat("radius", 0.5f);
     m_size.x = m_size.y = radius;
 }