Maximum25Deadline28.04.2014 |
Stage 3Pracovna verzia. Konkretne zadanie stage sa este upresni. Vsetky informacie su zatial informacne Hide invisible faces. Compute flat shading on the model. Upload
Pracovna verzia. Konkretne zadanie stage sa este upresni. Vsetky informacie su zatial informacne 1. Implement back face cullingHide invisible faces based on the angle between their normal vector and the vector towards camera. Remember, the camera is positioned in the z axis and we use orthogonal projection. 2. Add inputs to your applicationYour application will have the following inputs:
3. Render flat-shaded objectCompute diffuse light intensity in the center of every face. Use this light intensity to compute the color of the face: Use the color to draw a filled polygon of the face. You can use API function to draw the filled polygon. Examples:Cylinder, RGB(255,255,0), Light (0,0,10): Sphere.obj , RGB(255,255,255), Light (0,10,0): Kocka.obj , 5x RotateX, 5x RotateY, RGB (255,255,255), Light (0,0,10) |