Skip to content
Permalink
Branch: master
Commits on Jun 24, 2018
Commits on Jun 16, 2018
Commits on Jun 5, 2018
Commits on Jun 2, 2018
  1. Fix CMake windows config

    deyan-hadzhiev committed Jun 2, 2018
    * The logical name of the SDL imported target was changed, but the
      original was used for the post build dll copy. The target name should
      have been used from the variable in the initial implementation.
  2. Fix CMake configuration on Linux

    deyan-hadzhiev committed Jun 2, 2018
    * Change SDL inclusion. Since it is properly found with the find package
      function, only the name of the linked library had to be changed,
      because the SDL library does not need to be 'imported'. Also the
      shared library copying command had to be enabled only for Windows,
      since the SDL shared library is usually installed in one of the
      default load locations for ld.
    * Reimplement importing of the OpenEXR library. There is no single
      standard find package implementation for OpenEXR, so the only option
      avoiding additional installations and repository clonings, is to find
      the library manually. Simple search in the implicitly defined linker
      directories is performed for the main shared library, and then the
      path is reused to define all the required libraries, as dependency of
      the main imported one.
    * Disable Zlib linking and inclusion for Linux/OSX. It is required only
      by the non-shared version of OpenEXR, while the default installations
      on Linux/OSX are shared by default, so they already include zlib.
  3. Replace randomUnitDiscPoint from vector.h with Random::unitDiscSample()

    anrieff committed Jun 2, 2018
    The latter uses the multithreaded implementation of the random generator
    and the underlying random generator is better for Monte-Carlo simulations,
    especially on Windows (Mersenne Twister, instead of the LCPRNG rand()).
  4. Data files for Homework9.

    anrieff committed Jun 2, 2018
  5. Move the main undef statement below the SDL includes

    deyan-hadzhiev authored and anrieff committed Jun 2, 2018
    * The statement has to be below the includes.
  6. Add Code::Blocks project file for Windows, update scripts

    anrieff committed Jun 2, 2018
    There's one central SETUP_dev_win.sh script, which lets you
    choose whether you want to develop using Code::Blocks for Windows,
    or using Visual Studio, and downloads the respective SDK files.
    Also the script copies the relevant project file to the root dir.
  7. Update Linux CodeBlocks project with Lecture 13 compiler options

    anrieff committed Jun 2, 2018
    Compared to what was shown on the lecture, I'm using `-march=native`
    instead of `haswell`, as it's unwise to assume everybody has AVX2
  8. Change the default scene (forest.fray) to NOT use fullscreen.

    anrieff committed Jun 2, 2018
    While it is fullscreen it is quite hard to debug...
  9. Merge pull request #6 from anrieff/cmake_win_fixes

    anrieff committed Jun 2, 2018
    Cmake win fixes
Commits on Jun 1, 2018
  1. Improve error handling in main function

    deyan-hadzhiev committed Jun 1, 2018
    * Make the check for existing scene file after the command line was
      parsed to also include existance check of the initially set scene. In
      case of the CMake configuration, even it does not exist, because the
      default working dir for the debugged process is not the root of the
      repository.
    * Add a check for successfull scene parsing and abort the rest of the
      main function if the scene was not parsed properly.
  2. Set CXX flags before including any target

    deyan-hadzhiev committed Jun 1, 2018
    * This doesn't seem to be the real issue, but it is always good idea to
      have the CXX flags predefined as early as possible.
Commits on May 30, 2018
  1. Merge pull request #5 from anrieff/small_build_fix

    anrieff committed May 30, 2018
    Fix build on Windows
  2. Fix build on Windows

    deyan-hadzhiev committed May 30, 2018
    * On windows, SDL requires 'Windows' sybsystem, and defines a WinMain
      function, but if the compiled application is a 'Console' one, there is
      no main function defined, to be called by the CRT. Thus the
      compilation failed with linker error.
  3. Merge pull request #4 from anrieff/win/build_fixes

    anrieff committed May 30, 2018
    Fix build on Windows with MSVS 2017
Commits on May 29, 2018
  1. Fix build on Windows with MSVS 2017

    deyan-hadzhiev committed May 29, 2018
    * Downloadable SDL package contains 'include' directory with includes,
      so it is directly in the include paths, and there is no 'SDL' parent
      directory. This may be done manually, but it has to either be a script
      for introducing the intermediate directory, or the deployment archive
      will not be the original one from the SDL official site.
    * Fix ternary operator usage with lambda functions, by instantiating
      explicit std::function objects. This may lower performance, so it
      should be checked. The reason for the instantiation is, that the
      compiler considers two different possible ternary operator calls,
      based on the function calling conventions. By explicitly specifying a
      function, there is no ambiguity in resolving the ternary operator
      parameters.
  2. Eliminate some divisions in BBox intersection methods.

    anrieff committed May 29, 2018
    Since divisions by ray.dir.(x|y|z) happen a lot, it's beneficial to
    compute the reciprocal of ray.dir before the intersection calculation.
    This is made with a special, augmented Ray class (RRay).
    
    The same kind of optimization can be implemented in other parts of the
    raytracer, but doing it globally makes no sense: RRay::dir and rdir have
    to be kept in sync, which is too much work to do (esp. through
    model-view transformations).
    
    This optimization sheds about 1.5% of the render time.
  3. Optimize triangle intersections (~12% speedup)

    anrieff committed May 29, 2018
    - Precompute AB, AC and AB^AC in members of Triangle, to avoid
      calculating them each time in intersectTriangle.
    
    - Reorder exit checks a bit, to enable quicker culling of
      triangles we don't intersect.
    
    - Precompute 1/Dcr to avoid divisions.
  4. A few small improvements:

    anrieff committed May 29, 2018
    - change the Checker class so it matches the scene files' intended
      appearance;
    - change the default scene to 'forest.fray';
    - use the prescribed max trace depth specified in the scene;
    - do the scene rendertime measurement in main(), and display the
      result in the window's title bar.
  5. Several SDL-related features and enhancements.

    anrieff committed May 29, 2018
    - Render the scene in a thread. This allows the main thread to
      run an event loop and detect buttons being pressed (which is used
      to abort the rendering at any time).
    - Pressing "F12" takes a screenshot
    - Clicking on the rendered image traces a special "debugging" ray
      (can be used to debug issues).
  6. Add the "SmallPT" scene.

    anrieff committed May 29, 2018
  7. Forbid paths like camera -> diffuse -> light that happen due to chance

    anrieff committed May 29, 2018
    Only allow these with explicit light sampling, as this is a better
    method with lower noise.
Older
You can’t perform that action at this time.