Skip to content

Latest commit

 

History

History
168 lines (134 loc) · 3.88 KB

README.md

File metadata and controls

168 lines (134 loc) · 3.88 KB

lanuch.vs.json [setting for command line arguments]

{
  "version": "0.2.1",
  "defaults": {},
  "configurations": [
    {
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "mproject.exe (mproject\\mproject.exe)",
      "name": "mproject.exe (mproject\\mproject.exe)",
      "args": ["--scene", "mesh.scene", "--obj", "subdiv.obj", "--threads", "12", "--shadow"]
    },
  ]
}

command line arguments

--scene <string:scene_file_name>
--obj <string:obj_file_name> [optional] 
--out <string:out_file_name> [optional] [default: "output.bmp"]
--threads <int:number_of_threads> [optional] [default: <all_cores_available>]
--width <int:width_of_image> [optional] [default: 1000]
--height <int:height_of_image> [optional] [default: 1000]
--no-shadow [optional]

configure file

#define CHECK_CMAKE false

output exmaple

basic alt

spheramid alt

mesh alt


Profiling

Shpheramid:

>>> SHADOW [false]
Total render time: 1.431968 seconds  
Average time per pixel: 0.000001 seconds  
Total lighting calculation time: 0.643970 seconds  
Average lighting calculation time per pixel: 0.000001 seconds 
>>> SHADOW [true]
Total render time: 20.180865 seconds  
Average time per pixel: 0.000018 seconds  
Total lighting calculation time: 18.221199 seconds  
Average lighting calculation time per pixel: 0.000018 seconds  

mesh:

Total render time: 267.880153 seconds  
Average time per pixel: 0.000266 seconds  
Total lighting calculation time: 0.029447 seconds  
Average lighting calculation time per pixel: 0.000000 seconds  

Basic CPU Multi Threading

Spheramid multithreading output would be:

number of threads: 12
Thread 0 execution time: 4.64883 seconds
Thread 1 execution time: 4.61504 seconds
Thread 2 execution time: 4.72122 seconds
Thread 3 execution time: 4.78215 seconds
Thread 4 execution time: 4.71916 seconds
Thread 5 execution time: 4.57796 seconds
Thread 6 execution time: 4.4709 seconds
Thread 7 execution time: 4.39865 seconds
Thread 8 execution time: 4.29523 seconds
Thread 9 execution time: 3.66754 seconds
Thread 10 execution time: 2.78233 seconds
Thread 11 execution time: 3.80514 seconds
Total render time: 4.794441 seconds

Mesh multithreading output would be:

scene file: mesh.scene
obj file: subdiv.obj
num threads: 12
width: 1000
height: 1000
shadow: true

Thread 0 execution time: 34.7879 seconds
Thread 1 execution time: 35.2287 seconds
Thread 2 execution time: 35.4175 seconds
Thread 3 execution time: 34.9558 seconds
Thread 4 execution time: 35.4999 seconds
Thread 5 execution time: 34.0669 seconds
Thread 6 execution time: 34.3035 seconds
Thread 7 execution time: 34.5124 seconds
Thread 8 execution time: 34.281 seconds
Thread 9 execution time: 34.598 seconds
Thread 10 execution time: 34.4974 seconds
Thread 11 execution time: 36.2338 seconds
Total render time: 36.255803 seconds