Thursday, March 21, 2013

Graphics Write-Up #9

This was a pretty interesting assignment on both sections.  The environment map was much easier of the two, especially since pretty much everything to get it working was done inside of the fragment shader.  In the first picture below you can see it clearly reflected in both the spheres on the sides as well as the floor.  I also went and changed my specular lighting to use the correct view position, using the camera's actual position instead of taking it out of the 4x4 matrix.  It was really cool to see this working in the scene.  I imagine that in the case of an outdoor scene, the environment map would be mirroring the sky-box.

Getting the render target working was more challenging.  It's also one of the cooler things we've done so far visually.  I ran into a few issues that were mostly related to my previous code structure as opposed to the current assignment, but once I'd fixed those, everything worked pretty smoothly.  Most of the troubles with this section was just making sure to put all the calls and change the render target in the correct locations.  Oh, one issue I had was trying to get both of the above to work with normal mapping in addition.  It might be working now that I've fixed a few other issues I ran into, but initially it wasn't working for some reason.  I'm going to look into that more once I have time since it shouldn't be messing up.

Here's what it looks like:


Here's PIX:


Link to code:  http://www.eng.utah.edu/~jthummel/graphics/ThummelGraphicsAssignment9.zip

No comments:

Post a Comment