Unformatted text preview:

1mjb – December 22, 2006Cool New Features in GLSLMike BaileyOregon State Universitymjb – December 22, 2006The Geometry Shader:Fixed FunctionVertex ProcessingVertex ShaderTransformed positionPrimitive Assembly Geometry ShaderPrimitive AssemblyColor ClampingFlat ShadingClippingHomogeneous DivideViewport TransformFacing DeterminationRasterizationFragment ShaderFixed FunctionFragment ProcessingNote: a shader program can have any combination of vertex, geometry, and fragment shaders in it. All three are not required concurrently.2mjb – December 22, 2006New GLSL Operations• Integer bitwise operations: << >> % & | ^ ~• T truncate( T x ); -- integer closest to x whose abs is not larger than abs(x)• T round( T x ); -- integer closest to x• Integer versions of: abs, clamp, min, max, signmjb – December 22, 2006New Texture Routinesvec4 rgba = texture2DArray( sampler2DArray sa, vec3 stp ) ;ivec4 irgba = texture2D( isampler2D is, float st ) ;vec4 rgba = texelFetch2D( sampler2D s, ivec2 ist, int lod ) ;ivec2 sizexy = textureSize2D( sampler2D s, int lod ) ;Texture arrays:Textures that return integer values:Textures whose indices are integers (=“texture fetching”):Querying texture size (useful for texture fetching):3mjb – December 22, 2006New Keywords• #ifdef GL_EXT_gpu_shader4• noperspective -- causes interpolation to be in screen space, not perspectively correct• flat – causes no interpolation to take place• centroidNew application #ifdef:New shader variable


View Full Document

OSU CS 519 - Cool New Features in GLSL

Download Cool New Features in GLSL
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Cool New Features in GLSL and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Cool New Features in GLSL 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?