hi
@omershapira
Like 4*
Apex of technology
Like 8GB*
Entire program at once
Like 400*
Pretty much a microbe
Like 1GB*
One element (pixel, vertex etc) at once
Cores
Complexity
RAM
Program
* For computers in 2014
Small program that processes each vertex in the model geometry.
Can do:
//Bad vertex shader
//set vertex color to magenta
gl_FrontColor = vec4(1,0,1,1);
//set the UV coordinate
gl_TexCoord[0] = gl_MultiTexCoord0;
//set the XYZ coordinate
gl_Position = modelViewProjectionMatrix * gl_Vertex;
Example: Normal Extrusion
gl_Position.xyz += normal * ExtrusionAmount;
Images (c) Unity Technologies
Paints pixel components (fragments) in screen space.
Can do:
//read the UV coords from a texture
vec4 img = texture2D(texture, uv);
//premultiply alpha
img.rgb *= img.a;
//assign to the output fragment
gl_FragCoord = img
Example: Discarding Pixels
Example: Normals To Colors
gl_FragColor *= abs(normal);
Images (c) Unity Technologies
float value= frac((pos.y + pos.z*.1) * 5);
if(value < 0.5) {
discard;
}
The tesselator determines where tesselation needs to occur and:
Diffuse Pass
Depth Pass
Normal Pass
Final Composite
Calculate all of the color information from a list of lights, one after another, directly on the material.
Baked lighting can get raytracer-quality textures for elements that don't change.
Gears of War
Pretend each light source is a camera, and paint that "camera"'s screenspace with light.
The remaining dark pixels are the shadows.
Expensive because it requires multiple geo->screen renders.
Create a "Dark light" from a directional source with a small footprint, and add tags to specific materials affected.
Images (c) Unity Technologies
Raytrace the whole thing.
Far Cry 2
Spritesheets are still good. Sometimes videos are too.
Braid
Game animation should be:
Tools:
If it:
Maybe it's easier to do in code.
Boids
Unreal Engine 4
Unreal Engine 3
Volumetric effects can be faked with use of the depth buffer
Inigo Quilez
Splinter Cell