Commit Graph

151 Commits

Author SHA1 Message Date
4526c514e9 Reformat 2024-09-15 04:57:28 +01:00
bf3a3ea02b Reformat 2024-09-15 04:57:10 +01:00
669064e4a7 Rename depth shader to shadow shader 2024-09-15 04:55:40 +01:00
2ffd44f1a5 Reformat 2024-09-15 04:55:04 +01:00
11dee52090 Add V2 utilities 2024-09-15 04:53:42 +01:00
53e535774d Update screenshot 2024-09-14 18:48:29 +01:00
2f086fe548 Implement hard shadows 2024-09-14 18:48:07 +01:00
db42dd3d9e Use stored inverted transposed projection model view matrix 2024-09-14 18:33:39 +01:00
b0cebb67f8 Store inverted final matrix in the shader 2024-09-14 18:33:04 +01:00
bca5dafabf Fragment shader for depth returns valid u8 values 2024-09-14 18:32:00 +01:00
0aacccdf67 Add render passes 2024-09-14 18:05:09 +01:00
7a17d129a1 Clean main.c 2024-09-14 17:37:51 +01:00
7f2c4cdd0a Update .gitignore 2024-09-14 17:37:41 +01:00
56fbde696f Remove U8Image and start implementing shadow render pass 2024-09-14 02:58:48 +01:00
88e9d3550a Image type uses V4f and add U8Image type 2024-09-14 02:46:07 +01:00
66ca20ee5b Reformat 2024-09-14 02:45:34 +01:00
ef0c29de02 Update head model 2024-09-14 02:43:56 +01:00
87f6b2b87a Tweak fragment shader to take and return V4f instead of Colour 2024-09-14 01:22:43 +01:00
390ab7c3b4 Reformatting and cleanup 2024-09-14 00:59:49 +01:00
72ab9f6aa2 Reformat main 2024-09-14 00:54:32 +01:00
15a471f911 Reformat main 2024-09-14 00:51:24 +01:00
ab8343e749 More reformatting 2024-09-14 00:22:36 +01:00
09e9f611f8 Reformat 2024-09-14 00:04:31 +01:00
fb1b8457d6 Reformat 2024-09-13 23:58:31 +01:00
ab71bbc438 Add testing depth shader 2024-09-13 23:55:47 +01:00
95895750e8 Split shaders code to separate files 2024-09-13 23:55:11 +01:00
98323da649 Reformat and reorganise before writing shadow code 2024-09-13 23:54:46 +01:00
c739864489 Update variable names 2024-09-13 12:57:15 +01:00
f45e30620f Reorganise resources 2024-09-13 12:56:26 +01:00
dcbda91730 str8_substr returns copy of the string 2024-09-13 02:57:06 +01:00
80f20a06cd Reformat 2024-09-13 02:48:45 +01:00
c12c212843 Update resources 2024-09-13 02:34:18 +01:00
1223e55db1 Pass model as a CLI arg 2024-09-13 02:33:41 +01:00
351b7e9d42 Rename variable 2024-09-06 19:00:17 +01:00
b57ec11598 Ensure intensity is clamped 2024-09-01 23:02:05 +01:00
d750c49f71 Update result screenshot 2024-09-01 22:31:00 +01:00
cf8c681474 Implement tangent normals and switch to using basic diffuse shader 2024-09-01 22:30:04 +01:00
84fbb711e1 Add function to invert 3x3 matrix 2024-09-01 22:28:11 +01:00
8c74706fdc Update head model 2024-09-01 22:26:04 +01:00
d851509321 Update result screenshot 2024-09-01 02:16:18 +01:00
e87f780dae Move vertex and fragment calculations to the shaders 2024-09-01 02:15:32 +01:00
8726c833d4 Add extra vector and matrix types and operations 2024-09-01 02:14:25 +01:00
da495d9e43 Add array access to Triangle struct 2024-09-01 02:13:53 +01:00
18e9964d33 Move TRIANGLE_VERTICES constant to constants.h 2024-09-01 02:13:02 +01:00
95d474c956 Save viewport matrix in a variable 2024-08-31 22:24:04 +01:00
41c30256b7 Remove unused variable 2024-08-31 22:23:46 +01:00
4b178de784 Update vector and matrix types 2024-08-31 22:23:18 +01:00
bb6b0e3e5d Change f32x3 to union 2024-08-31 13:46:12 +01:00
97622d0bf7 Move viewport matrix multiplication out of vertex shader 2024-08-26 22:30:05 +01:00
319bad9659 Fix barycentric coordinates calculation (#2)
Reviewed-on: #2

	* Set up for debugging
	* Replace get_barycentric_coords with different calculation
	* Update commented lines
	* Add V3_ELEM_COUNT macro
	* Change loop in barycentric coordinates calculation function
	* Update debug values
	* Simplify barycentric coordinates function
	* Remove debug lines
Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com>
Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
2024-08-26 17:12:44 +00:00