Commit 3d653018 authored by TheNumbat's avatar TheNumbat
Browse files

update cmakelists for grader

parent 43c0d37c
......@@ -197,6 +197,7 @@ else()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(Scotty3D PRIVATE -fno-omit-frame-pointer)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address")
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=address")
endif()
......@@ -212,6 +213,7 @@ target_link_libraries(Scotty3D PRIVATE Threads::Threads)
target_include_directories(Scotty3D PRIVATE "deps/" "deps/assimp/include")
target_include_directories(Scotty3D PRIVATE "${CMAKE_BINARY_DIR}/deps/assimp/include")
include_directories("${Scotty3D_SOURCE_DIR}/deps/")
include_directories("${Scotty3D_SOURCE_DIR}/src/")
source_group(lib FILES ${SOURCES_SCOTTY3D_LIB})
source_group(scene FILES ${SOURCES_SCOTTY3D_SCENE})
......
......@@ -62,8 +62,8 @@
ImVec4(const Vec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \
operator Vec4() const { return Vec4(x,y,z,w); }
#include "../src/lib/vec2.h"
#include "../src/lib/vec4.h"
#include <lib/vec2.h>
#include <lib/vec4.h>
//---- Using 32-bits vertex indices (default is 16-bits) is one way to allow large meshes with more than 64K vertices.
// Your renderer back-end will need to support it (most example renderer back-ends support both 16/32-bits indices).
......
......@@ -20,9 +20,9 @@ This tutorial from [Scratchapixel](https://www.scratchapixel.com/lessons/3d-basi
**Step 2:** Implement `Camera::generate_ray`. This function should return a ray **in world space** that reaches the given sensor sample point. We recommend that you compute this ray in camera space (where the camera pinhole is at the origin, the camera is looking down the -Z axis, and +Y is at the top of the screen.). In `util/camera.h`, the `Camera` class stores `vert_fov` and `aspect_ratio` indicating the vertical field of view of the camera (in degrees, not radians) as well as the aspect ratio. Note that the camera maintains camera-space-to-world space transform matrix `iview` that will come fairly handy.
**Step 3:** Your implementation of `Pathtracer::trace_pixel` must support super-sampling. The member `Pathtracer::n_samples` specifies the number of samples of scene radiance to evaluate per pixel. The starter code will hence call `Pathtracer::trace_pixel` one time for each sample, so your implementation of `Pathtracer::trace_pixel` should choose a new location within the pixel each time.
**Step 3:** Your implementation of `Pathtracer::trace_pixel` must support super-sampling. The starter code will call `Pathtracer::trace_pixel` one time for each sample (given by `Pathtracer::n_samples`), so your implementation of `Pathtracer::trace_pixel` should choose a new location within the pixel each time.
To choose a sample within the pixel, you should implement `Rect::Uniform::sample` (see `src/student/samplers.cpp`), such that it provides (random) uniformly distributed 2D points within the rectangular region specified by the origin and the member `Rect::Uniform::size`. Then you may then create a `Rect::Uniform` sampler with a one-by-one region and call `sample()` to obtain randomly chosen offsets within the pixel.
To choose a sample within the pixel, you should implement `Rect::Uniform::sample` (see `src/student/samplers.cpp`), such that it provides (random) uniformly distributed 2D points within the rectangular region specified by the origin and the member `Rect::Uniform::size`. You may then create a `Rect::Uniform` sampler with a one-by-one region and call `sample()` to obtain randomly chosen offsets within the pixel.
Once you have implemented `Pathtracer::trace_pixel`, `Rect::Uniform::sample` and `Camera::generate_ray`, you should have a working camera.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment