# Input this file to make a "backplane" object, a rectangle in back
# of everything in the scene, just shy of the far clip plane and
# exactly covering the full viewport.  Set a surface shader first.
# 
# The patch is marked as being in geometry set "camera", which means
# that the camera will see it, but you don't have to worry about it
# showing up in ray-traced shadows or reflections.
#
# Example application:
# 1. Set the C (color) attribute and use the "constant" shader to put
#    a background color in your image.

# Modified to work around some issues in XRT
PushAttributes()
Attribute ("string geometryset", "camera")
Attribute ("int twosided", 1)
SetTransform ("screen")
screenwin = GetAttribute ("float[4] screen")
# Currently being ignored ... 
#Parameter ("float background_object", 1)
# so force object to be opaque
Attribute ("color opacity", (1, 1, 1))
# Close to the far plane but not too close
Patch ("linear", 2, 2, "vertex point P", (screenwin[0], screenwin[2], 0.9999,
                                          screenwin[1], screenwin[2], 0.9999,
                                          screenwin[0], screenwin[3], 0.9999,
                                          screenwin[1], screenwin[3], 0.9999))
PopAttributes()
