Commit Graph
93 Commits
Author SHA1 Message Date
jonah 75c56c0032 move packages 2024-08-12 10:34:58 +02:00
jonah 903ab1409b add @Contract annotations to vector-like objects 2024-08-12 10:33:15 +02:00
jonah 791ee606c4 fixup color framework 2024-08-12 10:26:59 +02:00
jonah 00fbf4e4f1 adjust rendering pipeline for spectral rendering 2024-08-11 16:32:40 +02:00
jonah ddc861138a align operators in Vec3, Color, ColorXYZ and SampledSpectrum 2024-08-11 00:37:04 +02:00
jonah c9db3bf94b add color framework to prepare for spectral rendering 2024-08-11 00:36:22 +02:00
jonah 23c7a550ec minor performance improvements 2024-08-08 22:46:31 +02:00
jonah 6599c41b14 add a check to Vec3#unit to avoid unnecessary sqrt and division 2024-08-08 21:58:51 +02:00
jonah 9e79333e1e add documentation 2024-08-08 21:58:06 +02:00
jonah dbd3d5fc4b minor performance improvements 2024-08-08 21:16:11 +02:00
jonah e2c9609e0e add Vec3#fma to improve performance 2024-08-08 21:10:38 +02:00
jonah 89c4340821 make Vec3#random generate unit vectors by default 2024-08-08 21:06:49 +02:00
jonah c0dccbbd0c add overloaded constructor to Box 2024-08-08 20:19:22 +02:00
jonah ed9e50b8f2 allow multiple sampling targets in a scene 2024-08-08 20:10:05 +02:00
jonah 6e35453932 improve documentation 2024-08-08 19:46:33 +02:00
jonah 77c1a87e4f fix a possible cause of NaNs 2024-08-08 19:46:33 +02:00
jonah cb4dcc53f1 fix a bug in PdfUtil#getSolidAngle 2024-08-08 19:46:33 +02:00
jonah 940e8ebc37 improve debuggability 2024-08-08 19:46:33 +02:00
jonah 2a2cf7b642 make renders (almost) deterministic 2024-08-08 19:29:43 +02:00
jonah c4ee560dc9 add targeting probability density function 2024-08-08 18:23:18 +02:00
jonah 6b47f44ad2 add probability density function based materials 2024-08-08 16:54:17 +02:00
jonah 5f1e816edd add stratification to pixel sampling 2024-08-08 11:02:01 +02:00
jonah a31488bc78 improve color averaging 2024-08-08 10:25:32 +02:00
jonah 67bfafc5b8 fix corner bias in Vec3#random(random, true) 2024-08-08 10:22:26 +02:00
jonah f7d9153ad8 add a material that looks different on both sides 2024-08-07 22:52:10 +02:00
jonah a22b1cb238 allow boxes to have different materials on each side 2024-08-07 22:05:48 +02:00
jonah c91baf9e0c add final scene to readme 2024-08-07 21:41:34 +02:00
jonah a90a0db6d5 improve AABB hit test by adding a range check 2024-08-07 16:26:30 +02:00
jonah 1b02f8a96d skip unnecessary UV calculations 2024-08-07 15:53:36 +02:00
jonah 18c179f8e3 improve performance of boxes 2024-08-07 15:53:36 +02:00
jonah 1d48a49987 refactor AABB intersection 2024-08-07 15:53:36 +02:00
jonah 9b617a82a8 remove HittableOctree 2024-08-07 15:53:36 +02:00
jonah dfe80011c9 add "final" scene 2024-08-07 15:53:36 +02:00
jonah 37539a1906 add minor improvements to perlin noise performance 2024-08-07 15:53:36 +02:00
jonah 70f2f38e96 add perlin noise texture 2024-08-07 15:53:36 +02:00
jonah e6447fe684 add image texture 2024-08-07 15:53:36 +02:00
jonah 7c0bc68ab2 add texture support 2024-08-07 15:53:36 +02:00
jonah 2c28b10a6e small performance improvements 2024-08-07 07:40:28 +02:00
jonah d5173c2d5a add spheres to readme 2024-08-06 18:20:56 +02:00
jonah 48a591de7e fix length of IDAT chunk 2024-08-06 18:07:52 +02:00
jonah 9ebf8bd1c4 use a more performant RandomGenerator 2024-08-06 18:07:52 +02:00
jonah 9106ccf8b0 switch from octree to binary tree 2024-08-06 18:07:51 +02:00
jonah 3a3949f518 disallow unbounded Hittables and refactor Octree 2024-08-06 18:07:51 +02:00
jonah 414af5860b add color to DielectricMaterial 2024-08-06 18:07:51 +02:00
jonah 9175377ac4 move examples to their own file 2024-08-06 18:07:51 +02:00
jonah 96909002d7 fix checksum of IEND chunk 2024-08-06 18:07:51 +02:00
jonah ac5a42e7bc add README.md 2024-08-06 18:07:51 +02:00
jonah e4e241a314 add command line argument parser 2024-08-06 00:10:43 +02:00
jonah 360fb2c990 add constant density mediums 2024-08-05 18:35:10 +02:00
jonah c002b8215a prevent StackOverflowError in SimpleRenderer 2024-08-05 17:54:04 +02:00
jonah 580d8eca12 add transforms 2024-08-05 16:42:21 +02:00
jonah 27e3fc0990 fix tests 2024-08-05 16:42:21 +02:00
jonah ebbf711403 add cornell box 2024-08-05 16:42:21 +02:00
jonah 3be855cffd add light sources 2024-08-05 15:13:28 +02:00
jonah 36de714f46 refactor Scene 2024-08-05 15:13:28 +02:00
jonah 8ea894cd3e fix live canvas clipping 2024-08-05 14:15:50 +02:00
jonah b5acbd1b6c add 2d primitives 2024-08-05 14:15:50 +02:00
jonah 86b6f1891c move material package 2024-08-05 13:01:03 +02:00
jonah 7a5526f987 configure java version and main class in gradle 2024-08-05 12:59:41 +02:00
jonah 137c0b2190 add octree to improve rendering performance by reducing the number of ray-sphere-intersection calculations 2024-08-05 12:35:31 +02:00
jonah a84ed5c050 add bounding box to sphere 2024-08-04 23:54:35 +02:00
jonah 8b7b99b184 add simple scene 2024-08-04 23:54:18 +02:00
jonah 828c332e76 make scene deterministic 2024-08-04 23:53:46 +02:00
jonah 07cdc0c213 remove Double#isFinite checks in Vec3 constructor
A performance analysis showed, that the Double#isFinite checks in the Vec3 constructor add significant overhead without providing much value to the application.
2024-08-04 19:54:21 +02:00
jonah b47ded6c56 add iterative rendering mode for faster results
In normal mode, the image is rendered one pixel at a time, taking multiple samples per pixel and averaging them before continuing with the next pixel.

In iterative mode, the image is rendered one sample at a time, taking one sample per pixel, then taking another sample and averaging it with the one before, and so on.
2024-08-04 19:15:44 +02:00
jonah 0c6db707e0 separate camera from rendering 2024-08-04 19:04:25 +02:00
jonah c17b9aedf5 add "final" scene 2024-08-04 18:54:31 +02:00
jonah bb326e82a6 abstract Image and add support for watching the image as its being rendered 2024-08-04 17:43:54 +02:00
jonah 1080711229 add depth of field 2024-08-04 00:18:54 +02:00
jonah d89d15f1a4 add Camera.Builder 2024-08-04 00:18:54 +02:00
jonah 94231f6a5b play with camera settings and fix handedness of camera 2024-08-03 22:37:00 +02:00
jonah 82b38d4501 add total internal reflection 2024-08-03 22:16:53 +02:00
jonah 088263b344 add dielectric material 2024-08-03 22:05:02 +02:00
jonah ca769c56b2 add metal fuzz 2024-08-03 21:42:18 +02:00
jonah a41b14da48 add metal 2024-08-03 21:30:22 +02:00
jonah 2e5659a04a add custom Materials 2024-08-03 21:19:01 +02:00
jonah 927f63adf0 add support for png images 2024-08-03 17:02:19 +02:00
jonah cf0ed6f13f apply gamma correction 2024-08-03 03:00:11 +02:00
jonah 0f122e2062 use Lambertian reflection 2024-08-03 02:56:24 +02:00
jonah 8e77662b33 fix "shadow acne" 2024-08-03 02:54:15 +02:00
jonah d2ca6922ef add diffuse material 2024-08-03 02:52:07 +02:00
jonah 9d204f6aa4 add antialiasing 2024-08-03 02:42:15 +02:00
jonah af3dc8dac7 refactor Camera 2024-08-03 02:36:21 +02:00
jonah 672dc6af8b refactor Shape 2024-08-03 02:15:03 +02:00
jonah 1113b91077 move render method to Camera 2024-08-03 02:15:03 +02:00
jonah 7757b3d573 add Range to optimize Shape#hit 2024-08-03 02:15:02 +02:00
jonah 5e52db65d4 add another sphere 2024-08-03 01:53:48 +02:00
jonah e3a8b08381 simplify Sphere#hit 2024-08-03 01:47:22 +02:00
jonah 14fd1d73fc add shading according to normal vector 2024-08-03 01:46:27 +02:00
jonah 590054a046 add sphere 2024-08-03 01:37:56 +02:00
jonah 7875befa94 add camera, scene and skybox 2024-08-03 01:37:56 +02:00
jonah 028d19b118 add math and image 2024-08-03 01:26:08 +02:00
jonah 2d2f5090ea initial commit 2024-08-02 22:04:04 +02:00