Week 9 Entry - Rasterization Pipeline & WebGL II
Rasterization Refresh & Understanding
The overall process of rasterization was, again, the primary focus of the week's content. Shaders and the GLSL code used within them were covered during the lecture. Fragmentation shader results, providing the final colors for all pixels, were altered using both locally calculated values and varying attributes carried over directly from the vertex shader. Tools had been shown to graphically represent functions that could be utilized in creating desired patterns and effects; such effects could include stripes, fluctuations in size, or applying noise.
This week's instruction followed similar themes to the last in regard to understanding more about how the rasterization pipeline is used and implemented. While similar, this week provided more opportunities to interactively learn the functionality of different parts of the rasterization process, which proved very helpful for me. The previous assignment being mostly rooted within the main HTML file made it difficult to follow the data through the pipeline and understand each step independently. While I still cannot claim to be an expert with shaders yet, manipulating matrices to alter the image displayed on the canvas felt intuitive and predictable. In all, this assignment was very satisfying to complete, much more so than the previous one, and I look forward to continuing the process of making it clearer and perhaps more dynamic.
Walkthrough of the processes occurring at each step of the rasterization pipeline. |
Not Without A Dash Of Challenge
As a small aside, I do feel as if I have room to grow more comfortable within a JavaScript environment. While other languages may also let you get away with compiling despite some faults, JavaScript really has a loose hold on the reins. I am still getting used to how prototypes and object literals are used. Even while seeing how beneficial adding a property to a variable with such ease is helpful in many situations, for example, it adds another layer of code readability concern that often affects me while I am still writing the code, let alone returning to find potential errors. I miss having some types every so often. All of that said, however, this assignment's separation of the code files the organization used amounted to an easier understanding of the same structures used in last week's assignment.
The only other hiccup I ran into involved the camera world matrix manipulation once rotation about the y-axis was introduced for the camera. I overcomplicated the process of retrieving the forward vector by trying to access and compute the three components of the rotated camera world matrix separately; thinking at the time that I needed to compute the forward using the new angles of a now rotated z-basis vector. That said, I stepped away for a moment, thought through the process top-down rather than continue throwing computations and seeing what stuck, and came away with the very simple, computation-less, likely expected result for handling the four keyboard inputs.
Humble beginnings. As usual. |
Two geometry transformed into the space. Forward and backward input responses added. |
Color-changing and rotatable first-person perspective action. |
Comments
Post a Comment