File tree Expand file tree Collapse file tree 4 files changed +45
-12
lines changed Expand file tree Collapse file tree 4 files changed +45
-12
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,11 @@ https://www.youtube.com/watch?v=NIAUFnNZGhE
207207 - https://devtalk.com/books/the-ray-tracer-challenge
208208- External Links:
209209 - https://betterexplained.com/articles/vector-calculus-understanding-the-dot-product/
210+ - cglm
211+ - https://github.com/recp/cglm
212+ - https://cglm.readthedocs.io/en/latest/mat4.html
213+ - #include "cglm/cglm.h"
214+ - #include <cglm/struct.h>
210215- Third party sources
211216 - C https://github.com/LiquidityC/ray_tracer_challenge/
212217 - complete 16 chapters
515520 - unit spheres (radii = 1)
516521 - centered at origin
517522- intesect(Sphere,Ray)
523+ ** 11 Reflections and Refractions
524+
525+ - Fresnel effect explains the inverse relationship between reflection and refraction
526+ - Real Calculations are expensive, so we use Schlick approximation
527+ - *Refractive* objects are often *Reflective* too. (eg: glass, both ~1)
528+ - Reduce *diffuse/ambient* on reflective/refractive as less light comes from the surface and more from elsewhere.
529+ - specular=1 shininess=300 pair well with reflective+refractive
Original file line number Diff line number Diff line change @@ -167,12 +167,19 @@ https://0x00sec.org/t/remote-shells-part-i/269/1
167167| MSan | uninitialized memory usage | memory |
168168| TSan | thread concurrency bugs | thread |
169169|-------+----------------------------+-------------|
170+ - https://github.com/google/sanitizers/wiki/MemorySanitizer
171+ - https://github.com/google/sanitizers/wiki/AddressSanitizer
172+ https://clang.llvm.org/docs/AddressSanitizer.html
173+ - https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
174+ - Compile with -g, -fno-sanitize-merge and -fno-omit-frame-pointer to get proper debug information in your binary.
175+ - Run your program with environment variable UBSAN_OPTIONS=print_stacktrace=1.
176+ - Make sure llvm-symbolizer binary is in PATH.
177+
170178- valgrind, fuzzers, libcheck, pvs
171179- https://tek256.com/posts/code-hardening/
172180- Static http://splint.org/
173181- video fuzzers 15 [[https://www.youtube.com/watch?v=qTkYDA0En6U][Beyond Sanitizers...]] by Kostya Serebryany
174182- https://www.youtube.com/watch?v=Q2C2lP8_tNE
175- - https://github.com/google/sanitizers/wiki/AddressSanitizer
176183- https://valgrind.org/docs/manual/quick-start.html
177184- https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
178185* Benchmarks
Original file line number Diff line number Diff line change 22- clang-format
33 - https://emacs.stackexchange.com/questions/55635/how-can-i-set-up-clang-format-in-emacs
44 clang-format -style=llvm -dump-config > .clang-format
5+ - sanitizers
6+ - ASAN compatible with gdb https://github.com/google/sanitizers/wiki/AddressSanitizerAndDebugger
57* Editors
68- emacs
79 - http://blog.lujun9972.win/emacs-document/blog/2018/03/22/emacs-as-a-c++-ide/index.html
Original file line number Diff line number Diff line change @@ -149,20 +149,32 @@ $(ab:.cpp=.o) # string replace
149149| += | appends with a space |
150150| != | exec shell command and assign it |
151151|-----+--------------------------------------------|
152+ *** target specific
153+ #+begin_src makefile
154+ %.o: CFLAGS = -O
155+ #+end_src
156+ *** goal specific
157+ #+begin_src makefile
158+ ifeq (,$(filter debug,$(MAKECMDGOALS))
159+ CFLAGS += -Og
160+ endif
161+ #+end_src
152162*** implicit / predefined / default
153163https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
154164|---------------+-------------------------------------------|
155- | CC | For compiler and compiler flags |
156- | CXX | " |
157- | CFLAGS | " |
158- | CPPFLAGS | |
159- | CXXFLAGS | |
160- | LDFLAGS | for flags passed to compiler when linking |
161- | LDLIBS | For flags about libraries when linking |
162- | SHELL | eg: "bash" |
163- | MAKE_FLAGS | |
164- | MAKEFILE_LIST | |
165- | .SHELLFLAGS | eg: "-eu -o pipefail -c" |
165+ | <c> | |
166+ | CC | For compiler and compiler flags |
167+ | CXX | " |
168+ | CFLAGS | " |
169+ | CPPFLAGS | |
170+ | CXXFLAGS | |
171+ | LDFLAGS | for flags passed to compiler when linking |
172+ | LDLIBS | For flags about libraries when linking |
173+ | MAKEFILE_LIST | list of Makefile's |
174+ | MAKECMDGOALS | the target given |
175+ | MAKEFLAGS | |
176+ | SHELL | eg: "bash" |
177+ | .SHELLFLAGS | eg: "-eu -o pipefail -c" |
166178| .RECIPEPREFIX | use instead of tabs |
167179| .DEFAULT_GOAL | default target |
168180|---------------+-------------------------------------------|
You can’t perform that action at this time.
0 commit comments