Now that lightfields are in GIT, it occurred to me that we could have moonlight with this bit of technology relatively easy (before anyone mentions Project Rembrandt, I was thinking of rendering cloud layers in the moonlight, or snow-covered mountain ranges, i.e. for any distance from high altitude).
The way I would imagine doing this is as follows: It would need the moon position passed to the shaders just like the sun, i.e. say as gl_lightSource[1].position. In addition it would need the moon phase (0: new moon, 1: full moon) as a property, to be passed as a uniform. A conditional statement would then check if the sunlight intensity is below some threshold, in which case it would simply switch over to the moon as primary light source (i.e. things are rendered either using sun or moon, but never both) with some smoothing, then simply moonlight and the different position is passed to the subsequent rendering steps, and voila - we could have relatively bright full moon nights, using the same light reduction rules on the ground due to clouds and fog which the sunlight rendering uses. Can the moon position info be passed in this way? * Thorsten ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel