Reflect Light

Using the reflectlight() function in VEX.

Create a mirror surface.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Thursday July 31st, 2008 10:09 PM

Reflect Light -

#pragma hint refl color
#pragma hint blur toggle
#pragma disable samples blur 0
#pragma disable angle blur 0

d_mirror(vector refl=1float bias=.005angle=0.1int samples=16blur=0)
    vector Nn normalize(N);
    vector In normalize(I);

    if (!blur) {
        Cf refl reflectlight(P,Nn,In,biasmax(refl));
    } else {
        Cf refl reflectlight(P,Nn,In,biasmax(refl),"angle",angle,"samples",samples);

Download: reflect_light.vfl 462 B

Please login or Click Here to register for downloads
Creative Commons License
Reflect Light by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at
Permissions beyond the scope of this license may be available at