Commit Graph

46 Commits

Author SHA1 Message Date
Nicholas Blaskey
03c814d403 Changed some incorrect comments regarding where the metallic/roughness values come from 2020-10-11 17:25:54 -04:00
Jane Doe
b1e0d26d35 minifcation -> minification 2020-10-04 09:43:29 -07:00
Joey de Vries
37892e5370 Missed a few code files for removing the unnecesasry OS X compile comment. 2020-04-23 11:59:53 +02:00
Joey de Vries
91f53af052 Remove unnecessary 'uncomment' statement from all code samples. 2020-04-22 16:37:07 +02:00
Joey de Vries
a8499a2668 Fix infinite loop error w/ unsigned ints used on decrementing for counters. 2020-04-22 12:58:38 +02:00
Toni Uhlig
dcdf94fce7 fixed compiler warnings reported by gcc/clang
* changed some catch blocks to use exception references instead of value types
 * fixed missing use of SCR_WIDTH/SCR_HEIGHT for glfwCreateWindow
 * fixed implicit numeric type casts regarding signedness
 * removed unused variables

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-03-18 18:34:17 +01:00
Joey de Vries
f4b6763356 Update GLM to latest version (0.9.9.3). This includes GLM's change of matrices no longer default initializing to the identity matrix. This commit thus also includes the update of all of LearnOpenGL's code to reflect this: all matrices are now constructor-initialized to the identity matrix where relevant. 2018-12-30 14:27:14 +01:00
Joey de Vries
d0fc384f29 Merge pull request #104 from d3BugErr/master
Another take on PBR tutorials missing rows and columns
2018-04-10 15:51:48 +02:00
Erik
686797546a Update lighting_textured.cpp
Real fix for missing rows and columns.
2018-04-10 16:47:52 +03:00
Erik
ac1784f29b Update lighting.cpp
Real fix for missing rows and columns.
2018-04-10 16:47:20 +03:00
Joey de Vries
75648e81f6 Merge pull request #103 from d3BugErr/master
Tutorial PBR 1.1 sphere grid construction fix
2018-04-10 12:56:43 +02:00
d3BugErr
3eaf086897 Spheres model matrix generation fix
Fix of integer division resulting in some spheres being rendered at same position.
Removed redundant float cast as all operands are being promoted to double anyways.
2018-04-10 13:07:43 +03:00
Erik
e511ca603d Revert "Spheres model matrix generation fix"
This reverts commit d702e0c6bf.
2018-04-10 12:39:42 +03:00
d3BugErr
d702e0c6bf Spheres model matrix generation fix
Fix of integer division resulting in some spheres being rendered at same position.
Removed redundant float cast as all operands are being promoted to double anyways.
2018-04-10 11:23:09 +03:00
Joey de Vries
56dfb32615 Merge pull request #93 from stfx/patch-4
Fix another graphical error showing a black box
2017-11-26 22:35:32 +01:00
stfx
b4982b4611 Fix another graphical error showing a black box
Is needed in addition to #92 to fix all graphical errors. Happens due to divide by 0 when `roughness = 0.0` and `NdotH = 1.0`.

Also use max to clamp similar fix for specular calculation instead of addition to fix the formula in normal cases
2017-11-26 22:10:59 +01:00
stfx
c217609890 Fix rare graphical error showing a black box
This may happen at certain hard to replicate viewing angles.

Theoretically clamp 0,1 should also be faster since SAT (saturate) is a free operation on output however since saturate only exists on HLSL we are at the mercy of the GLSL compiler to replace clamp 0,1 with SAT. Source: http://www.humus.name/Articles/Persson_LowLevelThinking.pdf#page=22
2017-11-26 20:03:44 +01:00
Joey de Vries
d4b675bbcd Set max specular IBL reflection mip level to 4.0 to match the number of generated mips. 2017-10-21 10:07:19 +02:00
Joey de Vries
3a04c6f9f4 Fix reflection mip level constant on PBR textured scene. 2017-09-26 19:11:01 +02:00
Joey de Vries
2e0035a8d4 fix: use radians instead of degrees for camera zoom. 2017-09-21 08:35:13 +02:00
Shivpratap Chauhan
2d16ef0fe2 GLFW hint GLFW_OPENGL_FORWARD_COMPAT is must on osx to create glfw
window successfully
2017-07-12 17:06:00 +05:30
Matthew Taylor
4a94fbf2bf Add commented out code to allow window creation on OSX 2017-06-18 01:53:16 +01:00
Joey de Vries
8c45cab498 Final PBR adjustments on code/content-rework. 2017-06-02 23:03:46 +02:00
Joey de Vries
18e5fdb443 Code/content re-work: getting started. 2017-05-29 23:47:28 +02:00
Joey de Vries
13ad6528cd Final updates on PBR tutorials w/ updated code. 2017-05-28 08:52:26 +02:00
Joey de Vries
a398a343a4 PBR Shader fix to code standard. 2017-05-26 15:49:29 +02:00
Joey de Vries
ecd23d4de0 All PBR tuts updated. 2017-05-26 15:00:56 +02:00
Joey de Vries
b5ea38f87f Update early PBR chapters to conform to new code standard. 2017-05-26 13:18:50 +02:00
Joey de Vries
cdcc3be029 Code re-work: advanced lighting. 2017-04-22 17:07:31 +02:00
Joey de Vries
fee7580547 Update textured specular src code to new code standards. 2017-04-17 15:32:01 +02:00
Joey de Vries
4b4e0cc839 Code re-format: lighting. 2017-04-10 22:08:47 +02:00
Joey de Vries
f11c65f673 BRDF LUT order fix. 2017-04-03 21:18:57 +02:00
Joey de Vries
d6733b10db few shader updates. 2017-03-31 22:39:50 +02:00
Joey de Vries
d2a4a1e655 PBR IBL Specular tutorial code. 2017-03-31 22:34:26 +02:00
Joey de Vries
6a41899478 IBL irradiance shader source file fix. 2017-02-25 12:00:34 +01:00
Joey de Vries
691215afa3 PBR IBL irradiance tutorials. 2017-02-25 11:19:00 +01:00
Joey de Vries
534b6ec8c9 IBL Diffuse irradiance source code. Note that these projects use stb_image.h directly, but still link with SOIL causing libray conflicts. Run these specific projects by not linking to SOIL. This will get resolved the moment all projects run on stb_image.h instead of SOIL. 2017-02-16 22:42:05 +01:00
Joey de Vries
c5b584deb9 Improved CMakeLists for clearer project setup with added library support for stb_image. 2017-01-18 21:56:31 +01:00
Joey de Vries
96ced3c198 PBR attenuation fix with proper Fresnel adjustments. 2017-01-09 19:57:53 +01:00
Joey de Vries
5042701210 Ambient light to correspond with tutorial's version. 2016-12-18 11:45:35 +01:00
Joey de Vries
0f78bb69ae Prevent double multiplication of Fresnel. 2016-12-18 11:28:01 +01:00
Joey de Vries
70f2ec7c1b Adjust code to more properly reflect tutorial. 2016-12-17 21:53:41 +01:00
Joey de Vries
ec42b25235 Tutorial spacing fix. 2016-12-17 21:34:46 +01:00
Joey de Vries
15e7808d55 Adjustments to PBR lighting code. 2016-12-17 21:29:22 +01:00
Joey de Vries
9e2f12aeaa Updated PBR code samples. 2016-12-17 15:58:17 +01:00
Joey de Vries
0a46f53608 Template PBR lighting tut with folder re-structure to fit PBR tuts. 2016-12-12 21:10:58 +01:00