





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various aspects of textures, formats, and deferred shading in computer graphics, including types, formats, samplers, access functions, depth textures, and stencil buffer applications. It also discusses the use of stencil buffer for deferred shading light volumes and optimizations.
Typology: Study notes
1 / 29
This page cannot be seen from the preview
Don't miss anything!






















๎
๎ (^) Byte ๎ (^) Int ๎ (^) Short Int
๎
๎ (^) And many more...
๎ (^) A perceptually uniform colorspace ๎ (^) Perceived intensity is proportional to sRGB values
๎ (^) Monitor doesn't output linear intensities ๎ (^) I: Intensity ๎ (^) C: contrast ๎ (^) V: pixel value ๎ (^) epsilon: black level (brightness)
๎น ๎๎ป
๎
c
1 ๎น V (^) c =
12.92 V for V <= 0. 1.055 V 1
โ0.055 for V > 0.
๎
๎ (^) Depth textures with comparison
๎
๎ (^) Bind to GL_TEXTURE_RECTANGLE_ARB ๎ (^) Use unnormalized texture coordinates
๎
๎ (^) Arguments (sampler, coord, lod) ๎ (^) Only in vertex shader ๎ (^) Why? Normally LOD (mipmap level) is determined at the fragment processing stage.
๎
๎ (^) return 0.0 or 1.0 as comparison results ๎ (^) R = coord.p
๎ (^) return 0.0 or 1.0 as comparison results ๎ (^) R = coord.p/coord.q ๎
๎
Deering, Michael; Stephanie Winner, Bic Schediwy, Chris Duffy, Neil Hunt. "The triangle processor and normal vector shader: a VLSI system for high performance graphics". ACM SIGGRAPH Computer Graphics 22 (4): 21โ30, 1988. Also see โ6800 Leagues Under the Seaโ Nvidia deferred shading presentation ๎
๎
๎ (^) use multiple render targets: ๎ (^) Position (or depth) ๎ (^) Normal ๎ (^) Base (diffuse color) ๎ (^) Material properties
๎
๎ (^) Normals : Normal mapping, diffuse and specular lighting ๎ (^) Diffuse color ๎ (^) Shininess : specular lighting
๎
3 Shininess Diffuse.r Diffuse.g Diffuse.b Amb. Occ. Position.x Position.y Position.z Emissive Normal.x Normal.y Normal.z
๎
๎
gl_FragData[0] = vec4( position, 0.0); gl_FragData[1] = vec4( bumpNormal * 0.5 + 0.5, base.a); gl_FragData[2] = vec4( base.rgb, 0.0);
๎
๎ (^) glBlendFunc( GL_ONE, GL_ONE);
๎ (^) Look up normal, diffuse color, etc. from textures ๎ (^) Render lit colors ๎
๎