Code: beta (alpha).
Discussion: post-GSoC forum thread, GSoC forum thread.

Outline

My project proposal consists of three main areas of development:
1. finish the OpenGL 3+ rendering system
2. create and update sample applications to serve as visual tests for OpenGL 3+ features
3. create and update functional and visual unit tests for the OpenGL 3+ rendering system

1. The completion of the OpenGL 3+ rendering system has a clear path. OGRE developer masterfalcon has compiled a list of extensions from each OpenGL version which remain to be implemented, so it is a matter of coding these features and developing visual tests for them. A great deal of effort will be dedicated to implementing the new shader types (geometry, tessellation, and compute), which will require work to OGRE core, as well as implementing important new features such as atomic counters, transform feedback, and programmable multisampling. The schedule below provides an overview of the pace I plan to proceed through each version of OpenGL as well as the associated features I will be implementing.

2. To both show off the capabilities of OGRE and aid in visually testing features in OpenGL 3+, I intend to create four new sample applications and update several existing ones. These samples will particularly focus on using OpenGL 3+ features to implement advanced graphics techniques. The samples I will work on are:

  • update the Endless World and Volume Terrain samples: fast dynamic level of detail (LOD) using tessellation shaders to allow massive landscapes via the OGRE Terrain and Volume components 1
  • update Ocean and Water samples: realistic and efficient rain, lightning, and other weather effects (using geometry shaders) 2
  • update bump mapping sample: real-time procedural displacement mapping of character and terrain meshes to create detailed features such as scales, spikes, and cobblestone using tessellation shaders 3 4
  • new sample: single pass order-independent transparency (OIT) using image load/store and atomic counters (also useful for deferred lighting) 5
  • new sample: rendering individual strands of hair on character models (using tessellation and compute shaders) 6
  • new sample: fast Bokeh depth of field using atomic counters 7
  • new sample: mesh smoothing and anti-aliasing using a variety of contemporary techniques curved PN-triangles and phong tessellation for improving visual quality by smoothing corners of meshes using tessellation shaders 8 9
  • compact, smooth representation of highly detailed meshes by approximated Catmull-Clark subdivision surfaces using tessellation and geometry shaders 10
  • adaptive multisample anti-aliasing (MSAA) to efficiently reduce aliasing using programmable multisampling (especially useful for deferred lighting)


One of the major goals of the sample applications is to provide well written, thoroughly commented example code utilizing advanced graphics techniques which can be studied and reused by OGRE users. Another goal is to demonstrate to the computer graphics community that OGRE is a cutting edge rendering engine capable of efficiently handling advanced graphics techniques. To this end I will create promotional videos for OGRE using the newly created samples and distribute them to YouTube and other social media outlets after GSoC is over. Of course, these applications will also provide a thorough practical visual test of the newly implemented OpenGL 3+ rendering system so that it can be released at production readiness.

In addition to creating and extending the above sample applications, all existing sample applications will be updated to work with the OpenGL 3+ rendering system. This will mostly consist of creating OpenGL 3+ specific GLSL shaders, though some modification of the sample application scenes may be necessary in some cases. Samples which are currently known to fail and will be repaired are:

  • BSP
  • Compositor
  • Deferred Shading
  • Dual Quaternion Skinning
  • Endless World
  • Facial Animation
  • Geometry Shader Particle System
  • Grass
  • Isosurface
  • SSAO Techniques
  • Shader System samples
  • Shadows
  • Terrain
  • Volume CSG and RTSS triplanar texturing
  • Volume Terrain
  • Water


3. To test the OpenGL 3+ rendering system, functional and visual unit tests will be created and existing visual unit tests will be updated.

It is worth noting that both the visual tests and sample applications could be reused to test similar DirectX 11 features. This could provide a standardized means of visually testing both new rendering systems, DirectX 11 and OpenGL 3+. To this end I will attempt to coordinate my efforts on the visual tests and sample applications with the OGRE developers working on the DirectX 11 rendering system.

Schedule

Note: Checked items have been implementend. Crossed out items either did not require implementation (e.g., GLSL features) or were deemed not to be useful to Ogre at this time.

Bonding period (May 27 - June 16)
Get better acquainted with Ogre core. Discuss details of implementation with mentor and community. Further research literature to identify best methods for implementing techniques used in sample applications. Coordinate efforts on visual tests and sample applications with OGRE developers working on the DirectX 11 rendering system.

First coding cycle (June 17 - July 29)
Implement OpenGL 3.x, 4.0, 4.1, and 4.2.

June 17 - June 23: Geometry and tessellation shaders fully implemented, including all core work.

  • ✔ Geometry shaders (GL_ARB_geometry_shader4)
  • ✔ New tessellation stages and two new corresponding shader types, tessellation control and tessellation evaluation shaders, operating on patches (fixed-sized collections of vertices) (GL_ARB_tessellation_shader)


June 24 - July 7: Computer shaders, atomic counters, priority features.

  • ✔ New compute shader (ARB_compute_shader)
  • ✔ Shader atomic counters (ARB_shader_atomic_counters)
  • Provide the ability for OpenGL shaders to perform random access reads, writes, and atomic memory operations on variables stored in a buffer object (ARB_shader_storage_buffer_object)
  • ✔ Transform feedback (GL_EXT_transform_feedback)
  • Additional transform feedback functionality (GL_ARB_transform_feedback2, GL_ARB_transform_feedback3)


July 8 - July 14: Finish priority features. OpenGL 3.0, 3.1 and 3.2 features completed.

  • Support for “indirect subroutine calls”, where a single shader can include many subroutines and dynamically select through the API which subroutine is called from each call site (GL_ARB_shader_subroutine)
  • Multisampled textures and texture samplers for specific sample locations (GL_ARB_texture_multisample)
  • ✔ OpenGL Shading Language built-in functions allowing loads from and stores to texture images from any shader stage, and application control over the ordering of image load/store operations relative to other OpenGL pipeline operations accessing the same memory (ARB_shader_image_load_store)
  • Support for three-component buffer texture formats RGB32F, RGB32I, and RGB32UI (GL_ARB_texture_buffer_object_rgb32)
  • Sampler objects, which separate sampler state from texture image data (GL_ARB_sampler_objects)
  • Two new vertex in data formats, signed 2.10.10.10 and unsigned 2.10.10.10 (GL_ARB_vertex_type_2_10_10_10_rev)
  • Non-normalized integer color internal formats for textures and renderbuffers (GL_EXT_texture_integer)
  • Per-color-attachment blend enables and colorwrite masks (GL_EXT_draw_buffers2)
  • ClearColor, TexParameter, and GetTexParameter methods for signed and unsigned integer buffers/arrays
  • Floating-point color and depth internal formats for textures and renderbuffers (GL_ARB_depth_buffer_float)
  • Primitive restart (GL_ARB_primitive_restart)


July 15 - July 22: OpenGL 3.3 and OpenGL 4.0 features completed.

  • BGRA vertex component ordering (GL_ARB_vertex_array_bgra)
  • New blending functions whereby a fragment shader may output two colors, one of which is treated as the source color, and the other used as a blending factor for either source or destination colors (GL_ARB_blend_func_extended)
  • A mechanism to swizzle the components of a texture before they are returned to the shader (GL_ARB_texture_swizzle)
  • A query object-based mechanism to determine the amount of time it takes to fully complete a set of GL commands without stalling the rendering pipeline (GL_ARB_timer_query)
  • Ability to set individual blend equations and blend functions for each color output (GL_ARB_draw_buffers_blend)
  • Mechanism for supplying the arguments to a DrawArraysInstanced or DrawElementsInstancedBaseVertex drawing command from buffer object memory (GL_ARB_draw_indirect)
  • Invoke multiple draws from a single procedure call (ARB_multi_draw_indirect)
  • Many new features in OpenGL Shading Language 4.00 and related APIs to support capabilities of current generation GPUs (GL_ARB_gpu_shader5)
  • Ability to explicitly request that an implementation use a minimum number of unique set of fragment computation inputs when multisampling a pixel (GL_ARB_sample_shading)
  • Cube map array textures, 2-dimensional array textures that may contain many cube map layers. Each cube map layer is a unique cube map image set (GL_ARB_texture_cube_map_array)


July 22 - July 29: OpenGL 4.1 and 4.2 features completed.

  • Commands to retrieve and set the binary representation of a program object (GL_ARB_get_program_binary)
  • Expose multiple viewports for use with geometry shader outputs and multiple framebuffer attachments, and floating-point viewport bounds (GL_ARB_viewport_array)
  • Allow pixel storage parameters to affect packing and unpacking of compressed textures (ARB_compressed_texture_pixel_storage)
  • Immutable texture images (ARB_texture_storage)
  • Allow the offset within buffer objects used for instanced rendering to be specified (ARB_base_instance)
  • ✔ Queries for sample counts available for a given internal format and usage (ARB_internalformat_query)
  • More restrictive alignment constraints for mapped buffers (ARB_map_buffer_alignment)


Midterm evaluations (July 29 - August 2)
By now all OpenGL 3.x, 4.0, 4.1 and 4.2 extensions should be implemented and accompanying sample tests should successfully demonstrate their use. This portion of the work will be pushed to OGRE main so that OGRE users can gain immediate benefit.
A slack week will be given to complete any unfinished work from the first coding cycle. This week will also feature debugging and visual testing and the first sample applications.

  • visual tests for all implemented OpenGL 3.x, 4.0, 4.1, and 4.2 features
  • update Ocean and Water samples: realistic and efficient rain, lightning, and other weather effects (using geometry shaders)


Second coding cycle (July 29 - September 15)
To begin, OpenGL 4.3 will be implemented, completing the major features of the OpenGL 3+ render system. A grand majority of the time will be dedicated to visual testing and advanced graphics samples to ensure the newly completed render system is bug free and ready for production use. In this coding cycle additional time will be dedicated to visual testing and debugging to ensure that the quality of the sample applications is high, ample documentation and comments are provided, and nasty show stopper bugs are squashed.

August 5 - August 11: OpenGL 4.3 features begun.

  • ✔ Multi-dimensional arrays (ARB_arrays_of_arrays)
  • Initialize the content of a buffer to a known value (ARB_clear_buffer_object)
  • Enable efficient image data transfer between image objects without the need to bind the objects or otherwise configure the rendering pipeline (ARB_copy_image)
  • Pre-assign uniform locations to uniform variables in the default uniform block, including subroutine uniforms (ARB_explicit_uniform_location)
  • Make gl_Layer and gl_ViewportIndex built-in variables available to the fragment shader (ARB_fragment_layer_viewport)
  • Allow use of framebuffers with no attachments (ARB_framebuffer_no_attachments)
  • ✔ Allow the remainder of the texture-style targets to be specified along with any possible internal format (ARB_internalformat_query2)
  • Tell the GL that the previous contents of a subregion of an image or a range of a buffer may be invalidated (ARB_invalidate_subdata)
  • ✔ Provide a single unified set of query commands that can be used by applications to determine properties of various interfaces and resources used by program objects to communicate with application code, fixed-function OpenGL pipeline stages, and other programs (ARB_program_interface_query)
  • Specify the behavior of out-of-bounds buffer and array accesses (ARB_robust_buffer_access_behavior)
  • Allow shaders to query the size of an image (ARB_shader_image_size)

  • Allow texturing of the stencil component of a packed depth stencil texture (ARB_stencil_texturing)
  • Allow a sub-range of the buffer's data store to be attached to a texture (ARB_texture_buffer_range)
  • New set of texture functions that expose the number of accessible mipmap levels in the texture associated with a GLSL sampler variable (ARB_texture_query_levels)
  • Immutable storage for multisampled textures (ARB_texture_storage_multisample)
  • Allow a texture's data store to be "viewed" in multiple ways, either reinterpreting the data format/type as a different format/type with the same element size, or by clamping the mipmap level range or array slice range (ARB_texture_view)

  • Allow the application to change the mapping between attributes and bindings (ARB_vertex_attrib_binding)


August 12 - August 18: OpenGL 4.3 visual tests, OpenGL 3+ samples begun.

  • OpenGL 4.3 visual tests and debugging
  • update the Endless World and Volume Terrain samples: fast dynamic level of detail (LOD) using tessellation shaders to allow massive landscapes via the OGRE Terrain and Volume components


August 19 - August 25: OpenGL 3+ samples continued.

  • update bump mapping sample: real-time procedural displacement mapping of character and terrain meshes to create detailed features such as scales, spikes, and cobblestone using tessellation shaders
  • new sample: single pass order-independent transparency (OIT) using image load/store and atomic counters (also useful for deferred lighting)


August 26 - September 1: OpenGL 3+ samples continued.

  • new sample: rendering individual strands of hair on character models (using tessellation and compute shaders)
  • new sample: fast Bokeh depth of field using atomic counters


September 2 - September 8: OpenGL 3+ samples completed.

  • new sample: mesh smoothing and anti-aliasing using a variety of contemporary techniques


September 9 - September 15: Fixing samples and unit tests for OpenGL 3+ begun.

  • ✘ BSP
  • Compositor
  • Deferred Shading
  • Dual Quaternion Skinning
  • Endless World
  • Facial Animation
  • ✔ Geometry Shader Particle System
  • ✔ Grass
  • ✔ Isosurface
  • SSAO Techniques
  • Shader System samples
  • Shadows
  • Terrain
  • Volume CSG and RTSS triplanar texturing
  • Volume Terrain
  • Water



Suggested pencils down (September 16) and firm pencils down (September 23)
By now all major OpenGL 3.x and 4.x features have been implemented and debugged, using visual tests as a benchmark for success. These changes will be pushed to OGRE main (perhaps version 1.9 or 2.0?). Sample applications will be used to create videos on YouTube and social media outlets to promote OGRE.

<HR>
Creative Commons Copyright -- Some rights reserved.


THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

  • "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
  • "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
  • "Licensor" means the individual or entity that offers the Work under the terms of this License.
  • "Original Author" means the individual or entity who created the Work.
  • "Work" means the copyrightable work of authorship offered under the terms of this License.
  • "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
  • "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.

2. Fair Use Rights

Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant

Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

  • to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
  • to create and reproduce Derivative Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
  • For the avoidance of doubt, where the work is a musical composition:
    • Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
    • Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
    • Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).


The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions

The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

  • You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested.
  • You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.
  • If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability.

EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

  • This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
  • Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

  • Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
  • Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
  • If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
  • No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
  • This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.