how to make shadows for transparent objects using ray tracing in C++/openGL
- by happy face
I'm trying to make a code that cast shadow from trasnparent objects(such as glass) for rendering in 3D
I do not have a shadow map and photon mapping yet, and I wanted to know if there is a way to make shadows for transparent materials using ray tracing only. Caustics sounds very hard without photon mapping...
I have implemented a simple code in C++ that only makes the shadows black (no matter if the objects are transparent or opaque)
Pseudo code would be great, thnx.
for(size_t i = 0;i < num; ++i) {
if(state_list[i].hit && state_list[i].distance < dist_from_light[i]) {
return[i] = BLACK;
}