1 sided triangle polygon doesn't cast shadows

2009-06-22
2013-04-25
  • Using simple triangle polygon and turning Sides to 1 - raytraced shadow is
    dissapear!
    If set Sides 2 - shadow is Ok. It's important to me - because all my scenes uses triangles.

    Short example rib:

    Display "shadow.tif" "framebuffer" "rgba"
    Projection "perspective" "fov" 45
    Translate 0 0 8
    Rotate 80 1 0 0
    Rotate 80 0 0 1
    WorldBegin
    Sides 1
    LightSource "shadowdistant" 1 "from" [0 0 0] "to" [0.5 1 1] "shadowname" "raytrace" "intensity" 1
    Color [0 1 0]
    Surface "plastic"
    Polygon "P" [-5 5 1 5 5 1 5 -5 1 -5 -5 1]
    Translate 0 0 -1
    Rotate 40 -1 -1 -1
    Scale 2 2 2
    Attribute "visibility" "transmission" 1
    Polygon "P" [1 -1 0 1 1 0 -1 1 0]
    #Polygon "P" [-1 -1 0 1 -1 0 1 1 0 -1 1 0]
    WorldEnd