コード例 #1
0
ファイル: raycast2.py プロジェクト: mario007/renmas
def shade(sample, hp):
    #loop through lights
    tmp_spec = renmas.core.Spectrum(0.0, 0.0, 0.0)
    for light in lst_lights:
        if light.L(hp) is True:  #light is visible
            #mat1.brdf(hp)
            ren.get_material(hp.material).brdf(hp)
            tmp_spec = tmp_spec + hp.spectrum
            #hp.spectrum = hp.spectrum * hp.ndotwi
    hp.spectrum = tmp_spec
コード例 #2
0
ファイル: raycast2.py プロジェクト: mario007/renmas
def shade(sample, hp):
    #loop through lights
    tmp_spec = renmas.core.Spectrum(0.0, 0.0, 0.0)
    for light in lst_lights:
        if light.L(hp) is True: #light is visible
            #mat1.brdf(hp)
            ren.get_material(hp.material).brdf(hp)
            tmp_spec = tmp_spec + hp.spectrum
            #hp.spectrum = hp.spectrum * hp.ndotwi
    hp.spectrum = tmp_spec
コード例 #3
0
def shade(hp):
    #loop through lights
    lights = ren.lst_lights()
    tmp_spec = renmas.core.Spectrum(0.0, 0.0, 0.0)
    for light in lights:
        if light.L(hp) is True:  #light is visible
            ren.get_material(hp.material).brdf(hp)
            tmp_spec = tmp_spec + hp.spectrum
    hp.spectrum = tmp_spec
    return hp