示例#1
0
 private void UpdateLightBuffers()
 {
     if (lightService.PointLightUpdated)
     {
         var lightArray = lightService.PointLightStructures;
         renderService.UpdateConstantBuffer(Constants.ConstantBufferNames.POINT_LIGHT_CB, lightArray);
         lightService.ResetPointLight();
     }
     if (lightService.DirectionalLightUpdated)
     {
         var lightArray = lightService.DirectionalLightStructures;
         renderService.UpdateConstantBuffer(Constants.ConstantBufferNames.DIRECTIONAL_LIGHT_CB, lightArray);
         lightService.ResetDirectionalLight();
     }
 }