Hello,
I've been programming in C++ for about 2 years.
I am currently coding my biggest programming project : a ray tracer from scratch only using the standard C++ library.
My latest change was to add support for .mtl files.
Note that my code worked perfectly before making this change.
If you don't know, .mtl files go with .obj files.
They basically serve as "material" files and notably allow support for multiple texture files.
Unfortunately, this change broke my rendering system.
Now, depending on the model I'm using, I'm either getting black artifacts or a completely green render.
Obviously I spent some time debugging to find where this could be coming from but I just couldn't find it.
The green render image means that my code detects collisions for every ray but doesn't see any texture file associated to the triangle's material.
The fact that these artifacts are random ( they change each time you run the code ) makes me think that this must be a memory initialization issue.
So if you know a little about ray tracing, please take a look at my code and tell me if you find anything !
https://github.com/Swann7777777/pathTracer
I know I should add comments to my code and I swear I'll do it at some point.