void LightingDemo::SetHSDirectionalLights( ShaderLightManager& shader_light_mgr, bool random_color ) { // Always use hemispheric lights const bool use_hemespheric_light = true; if( use_hemespheric_light ) { // HemisphericDirectionalLight light; // light.Attribute.UpperDiffuseColor.SetRGBA( 0.0f, 1.0f, 1.0f, 1.0f ); // light.Attribute.LowerDiffuseColor.SetRGBA( 1.0f, 0.1f, 0.1f, 1.0f ); // light.vDirection = Vec3GetNormalized( Vector3( -1.0f, -1.8f, -0.9f ) ); HemisphericDirectionalLight light; // light.Attribute.UpperDiffuseColor.SetRGBA( 1.0f, 1.0f, 1.0f, 1.0f ); // light.Attribute.LowerDiffuseColor.SetRGBA( 0.0f, 0.0f, 0.0f, 1.0f ); light.Attribute.UpperDiffuseColor = SFloatRGBAColor::Red(); light.Attribute.LowerDiffuseColor = SFloatRGBAColor::Blue(); light.vDirection = Vec3GetNormalized( Vector3( -1.0f, -1.5f, -0.9f ) ); shader_light_mgr.SetHemisphericDirectionalLight( light ); } else { DirectionalLight dir_light; dir_light.DiffuseColor = SFloatRGBColor(1,1,1); dir_light.fIntensity = 1.0f; dir_light.vDirection = Vec3GetNormalized( Vector3( 1.2f, -1.8f, 1.0f ) ); shader_light_mgr.SetDirectionalLight( dir_light ); } }