I'm looking at the rendering equation and the source code for a classical ray tracer (so no Monte Carlo or anything yet included), included below in short pseudo code for clarity. I have trouble understanding why the cosine from the rendering equatio
I am in a computer graphics course and have just passed the lecture on Phong and Gouraud shading. I didn't really understand what was being said, so I turned to the textbook for clarification and found a workable example that might help me out. I'd l
I just tried implementing specular highlights. The issue is that when moving far away from the surface, the highlight becomes stronger and stronger and the edge of the highlight becomes very harsh. When moving too near to the surface, the highlight c
I'm having trouble getting phong shading to look right. I'm pretty sure there's something wrong with either my OpenGL calls, or the way I'm loading my normals, but I guess it could be something else since 3D graphics and Assimp are both still very ne
UPDATE: I answered my own question about what illumination model to use, but now I need to know how to calculate the Fresnel terms for reflected and transmitted rays. I have a partially-implemented C++ ray tracer. Right now Phong lighting with shadow
In OpenGL 2.1, I'm passing a position and normal vector to my vertex shader. The vertex shader then sets a varying to the normal vector, so in theory it's linearly interpolating the normals across each triangle. (Which I understand to be the foundati
I'm currently trying to make specular lighting on an sphere using glsl and using Phong-model. This is how my fragment shader looks like: #version 120 uniform vec4 color; uniform vec3 sunPosition; uniform mat4 normalMatrix; uniform mat4 modelViewMatri
I'm trying to do a simple ray tracing assignment, in c# (ported from python). I've managed to make the sample code show the correct picture, but when I try and adapt it to my assignment something goes wrong. If I knew what was going wrong I would pos