VHA

0.0(0)
Studied by 5 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/86

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:13 AM on 9/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

87 Terms

1
New cards

computer graphics

describes the use of computers to create and manipulate images.

2
New cards

Modeling

deals with the mathematical specification of shape and appearance properties in a way that can be stored on the computer.

3
New cards

Rendering

deals with the creation of shaded images from 3D computer models

4
New cards

Animation

technique to create an illusion of motion through a sequence of images.

5
New cards

Rendering a scene

produces a raster

6
New cards

raster

  • an array of pixels (picture elements) displayed on a screen, arranged in a grid with two (2) dimensions.

  • specify colors using triples of floating-point numbers between 0 and 1, which represent the amount of red, green, and blue light existing in a color


7
New cards

a value of 0

indicates that no amount of that color exists

8
New cards

a value of 1

represents that color is displayed at full intensity.

9
New cards

quality of an image

depends partly on its resolution and precision.

10
New cards

Resolution

the number of pixels in the raster

11
New cards

precision

the number of bits used for each pixel.

12
New cards

buffer

a part of a computer's memory that serves as temporary storage for data while being moved from one location to another.


13
New cards

framebuffer

  • Pixel data is stored in a region of memory

  • must contain color buffer, depth buffer, stencil buffer


14
New cards

color buffer

contain a depth buffer

15
New cards

depth buffer

stores distances from points on scene objects to the virtual camera.

16
New cards

Depth values

  • determine whether the object’s points are in front of or behind other objects (from the camera’s perspective).

  • can also determine whether the points on each object will be visible when the scene is rendered


17
New cards

stencil buffer

may be used to store values used in generating advanced effects, such as shadows, reflections, or portal rendering.

18
New cards

Animations

consist of a sequence of images quickly displayed.

19
New cards

frame

Each of the images that is displayed

20
New cards

frame rate

  • speed or rate at which these images appear

  • measured in frames per second (FPS).


21
New cards

Graphics Processing Unit (GPU)

features a highly parallel structure that makes it more efficient than CPUs for rendering computer graphics.

22
New cards

shaders

  • Programs run by GPUs

  • are used to perform many different computations required in the rendering process.


23
New cards

application programming interface (API)

  • implemeneted by Shader programming languages

  • which defines a set of commands, functions, and protocols that can be used in interacting with an external system such as the GPU.


24
New cards

DirectX API & High-Level Shading Language (HLSL)

used on Microsoft platforms, including the Xbox game console

25
New cards

Metal API & Metal Shading Language

runs on modern Mac computers, iPhones, and iPads

26
New cards

OpenGL (Open Graphics Library) API & OpenGL Shading Language (GLSL)

a cross-platform library – OpenGL is the most widely adopted graphics API

27
New cards

graphics pipeline

  • is an abstract model used to describe a sequence of steps needed in rendering a three-dimensional scene.

  • enables a computational task to be split into subtasks thus increasing overall efficiency

  • increase the efficiency of the rendering process, enabling images to be displayed at faster rates.


28
New cards

Application

initializing the window where rendered graphics will be displayed; sending data to the GPU

29
New cards

Geometry Processing

determining the position of each vertex of the geometric shapes to be rendered, implemented by a program known as vertex shade

30
New cards

Rasterization

determining which pixels correspond to the geometric shapes to be rendered

31
New cards

Pixel Processing

determining the color of each pixel in the rendered image, involving a program called a fragment shader

32
New cards

Stage 1: Application

  • application stage primarily involves processes that run on the CPU.

  • Processes during this stage:

    • Creating a window where the rendered graphics will be displayed

    • Reading data required for the rendering process

    • Sending data to the GPU


33
New cards

Creating a window where the rendered graphics will be displayed

  • The window must be initialized to read the graphics from the GPU framebuffer.

  • For animated and interactive applications, the main application contains a loop that repeatedly re-renders the scene, usually aiming for a rate of 60 FPS.


34
New cards

Reading data required for the rendering process

  • This data may include vertex attributes, which describe the appearance of the geometric shapes being rendered.

  • The vertex attribute data is stored in GPU memory buffers called vertex buffer objects (VBOs), while images to be used as textures are stored in texture buffers.

  • source code for the vertex shader and fragment shader programs needs to be sent to the GPU, compiled, and loaded


35
New cards

Sending data to the GPU

  • The application needs to specify the associations between attribute data stored in VBOs and attribute variables in the vertex shader program.

  • A single geometric shape may have multiple attributes for each vertex (such as position and color).

  • The corresponding data is streamed from buffers to variables in the shader during rendering.

  • Frequently, it is also necessary to work with many sets of such associations.

  • Multiple geometric shapes may be rendered by the same shader program.

  • Each shape may also be rendered by a different shader program.

  • These sets of associations can be managed using vertex array objects (VAOs). VAOs store this information and can be activated and deactivated as needed during the rendering process.


36
New cards

Stage 2: Geometry Processing

  • Apart from the object’s overall shape, additional information may be required to describe how the object should be rendered.

  • the vertex shader is applied to each of the vertices; each attribute variable in the shader receives data from a buffer according to previously specified associations.


37
New cards

mesh

  • shape of a geometric object is defined by ________

  • a collection of points that are grouped into lines or triangles.


38
New cards

vertex

  • The properties or attributes that are specific to rendering each individual point are grouped together into a data structure _________

  • should contain the three-dimensional position of the corresponding point.

  • additional data contained by this:

    • color

    • texture coordinates

    • normal vector


39
New cards

color

be used when rendering the point

40
New cards

Texture coordinates (or UV coordinates)

which indicate a point in an image that is mapped to the vertex

41
New cards

normal vector

which indicates the direction perpendicular to a surface and is typically used in lighting calculations

42
New cards

primary purpose of vertex shader

determine the final position of each of the points being rendered.

43
New cards

Model transformation

  • collection of points defining the intrinsic shape of an object may be translated, rotated, and scaled.

  • the object appears to have a particular location, orientation, and size with respect to a virtual three-dimensional world.

  • coordinates expressed from this frame of reference are in world space.


44
New cards

world space

origin is at the center of the scene.

45
New cards

View transformation

Coordinates in this context are said to be in view space.

46
New cards

view space (or camera space, or eye space)

result when world-space coordinates are transformed to coordinates in front of the user's view.

47
New cards

Projection transformation

any points outside the specified region are discarded or clipped from the scene

48
New cards

clip space

coordinates expressed at this stage are in _______

49
New cards

Stage 3: Rasterization

  • Once the vertex shader has specified the final positions of each vertex, the rasterization stage begins.

  • points themselves must first be grouped into the desired type of geometric primitive: points, lines, or triangles, consisting of sets of 1, 2, or 3 points.

  • For lines and triangles, additional information must be specified. For example, an array of points [A, B, C, D, E, F] is to be grouped into lines.

  • They could be grouped in disjoint pairs, such as (A, B), (C, D), (E, F), producing a set of disconnected line segments.

  • They could also be grouped in overlapping pairs, such as (A, B), (B, C), (C, D), (D, E), (E, F), producing a set of connected line segments (called a line strip).

  • The type of geometric primitive and method for grouping points is specified using an OpenGL function parameter when the rendering process begins.


50
New cards

primitive assembly

The process of grouping points into geometric primitives

51
New cards

criterion

must be specified to clarify which pixels are in the interior

52
New cards

fragment

  • created for each pixel corresponding to the interior of a shape.

  • a collection of data used to determine the color of a single pixel in a rendered image


53
New cards

raster position

  • also called pixel coordinates

  • data stored in a fragment always includes the ________


54
New cards

Stage 4: Pixel Processing

  • determine the final color of each pixel

  • storing this data in the color buffer within the framebuffer


55
New cards

fragment shader

  • first part of pixel processing

  • applied to each of the fragments to calculate their final color.

  • may involve a variety of data stored in each fragment,


56
New cards

data available during rendering

  • A base color applied to the entire shape

  • Colors stored in each fragment (interpolated from vertex colors)

  • Textures where colors are sampled from locations specified by texture coordinates

  • Light sources. whose relative position and/or orientation may lighten or darken the color, depending on the direction the surface is facing at a point, specified by normal vectors


57
New cards

window

is a graphical interface element that displays an application’s content

58
New cards

Startup

During this stage, objects are created, values are initialized, and any required external files are loaded.

59
New cards

Main Loop

  • This stage repeats continuously while the application is running

  • three substages:

    • process input

    • update

    • render


60
New cards

Process Input

checks if the user has performed any action that sends data to the computer, such as pressing keys on a keyboard or clicking buttons on a mouse

61
New cards

Update

changes values of variables and objects.

62
New cards

Render

creates graphics that are displayed on the screen

63
New cards

Shutdown

  • typically begins when the user performs an action indicating that the program should stop (for example, by clicking a button to quit the application).

  • may involve tasks such as signaling the application to stop checking for user input and closing any windows created by the application


64
New cards

Pygame

  • set of Python modules designed for creating video games. It is a popular Python game development library.


65
New cards

pygame.display.set_mode()

  • set up a window using Pygame

  • requires two (2) parameters to define the width and height of the window


66
New cards

point

  • location in space. It is the most basic graphical element.

  • render a single point on the screen, use a vertex shader.


67
New cards

main()

Every shader must contain

68
New cards

void

indicates that no values are returned and the main function requires no parameters

69
New cards

purpose of the vertex shader

  • set up the gl_Position variable, a special, global, and built-in GLSL variable

  • used to store the position of the current vertex.


70
New cards

GLSL has vector data types

are often used for storing values that indicate positions, colors, and texture coordinates.

71
New cards

two, three, or four

Vectors may have __________________ indicated by vec2, vec3, and vec4

72
New cards

four (4) float values

represent the vertex's x, y, z, and w positions

73
New cards

fourth parameter (w)

  • used to manipulate the clipping of the vertex position in the 3D space.

  • default value is 1.0.


74
New cards

vertex buffers

  • Every vertex shader that you write will use arrays of data stored


75
New cards

Multiple points

are needed to specify the shapes of two-dimensional or three-dimensional objects

76
New cards

glVertex3f

Each of the triangle’s vertices is specified by a call ________

77
New cards

Vertices

must be specified between calls to glBegin and glEnd.

78
New cards

The parameter to glBegin

tells which type of primitive is being drawn.

79
New cards

Uniform variables

are global variables that can be accessed by the vertex shader or the fragment shader, and whose values are constant while each shape is being drawn (can be changed between draw function calls).

80
New cards

Uniform shader variables, declared with the type qualifier uniform

  • provide a mechanism for directly sending data from variables in a CPU application to variables in a GPU program.

  • must obtain a reference to the location of the uniform variable before data may be sent to it.


81
New cards

glGetUniformLocation(programRef, variableName)

  • returns a value used to reference a uniform variable (indicated by the type qualifier uniform) with the name indicated by the parameter variableName and declared in the program referenced by the parameter programRef.

  • If the variable is not declared or not used in the specified program, -1 is returned


82
New cards

Keydown

events occur the moment a key is initially pressed

83
New cards

keyup events

occur the moment the key is released

84
New cards

discrete

f it happens once at an isolated point in time.

85
New cards

continuous

it continues happening during an interval of time.

86
New cards

keydown and keyup events

  • are discrete

  • but many applications also feature continuous actions (such as moving an object on the screen) that occur for as long as a key is being held down.


87
New cards