Graphics Reference
In-Depth Information
__pixel_localEXT FragLocalData
{ highp uint v0 ; // all of these will use the
highp uint v1 ; // default r32ui layout .
highp uint v2 ;
}
Storage ;
Listing 3.5. All variables will use the default r32ui storage layout.
layout ( r32f ) __pixel_localEXT FragLocalData
{ highp float v0 ; // all of these will inherit the r32f layout
highp float v1 ; // from the local storage declaration.
highp float v2 ;
}
Storage ;
Listing 3.6. All variables will inherit the r32f storage layout.
__pixel_localEXT FragLocalData
{ layout ( r11f_g11f_b10f ) vec3 v0 ;
layout ( r32ui ) uint v1 ;
layout ( rg16 ) vec2 v2 ;
vec2 v3 ; // v3 will inherit from the previously
// defined layout qualifier (rg16).
}
Storage ;
Listing 3.7. Multiple storage layouts used together.
3.3.4 Usage Patterns
There are multiple ways to use this extension.
Pixel local storage. This example uses the Shader Pixel Local Storage to do all
the rendering.
1. Clear framebuffer to 0.
2. Call glEnable(GL_SHADER_PIXEL_LOCAL_STORAGE_EXT) .
3. Do operations on the pixel local storage by rendering geometry, etc.
4. Resolve from pixel local storage to one or more user-defined fragment shader
outputs.
5. Call glDisable(GL_SHADER_PIXEL_LOCAL_STORAGE_EXT) .
6. Call eglSwapbuffer .
Search WWH ::




Custom Search