Line 1: |
Line 1: |
| This page's goal is to describe parts of Nintendo's OpenGL implementation for the 3DS as we reverse engineer it to better understand how to use the PICA200. | | This page's goal is to describe parts of Nintendo's OpenGL implementation for the 3DS as we reverse engineer it to better understand how to use the PICA200. |
| Some of the information on this page is specific to Steeldiver : Sub Wars. The reason for this is that it's a fairly graphics-heavy game that's available on the eShop for '''free''', so it seems like a good target for a community REing effort. | | Some of the information on this page is specific to Steeldiver : Sub Wars. The reason for this is that it's a fairly graphics-heavy game that's available on the eShop for '''free''', so it seems like a good target for a community REing effort. |
− |
| |
− | == Rendering pipeline ==
| |
− | <!-- [[Image:Renderpipeline.png]] -->
| |
| | | |
| == Description == | | == Description == |
| | | |
− | The PICA200 is an opengl ES 1.1 compliant GPU manufactured by DMP. It comes loaded with a number of extensions that make it similar to an openGL ES 2.0 compliant GPU (ability to run programmable vertex/geometry shaders, for instance). Because of this, Nintendo wrapped GPU access into an openGL ES 2.0 implementation with some limitations. As the fragment stage of the pipeline is non-programmable, Nintendo instead gives developers the ability to configure a number of fragment-related values through glGetUniformLocation and glUniformXX. See below for the full list. | + | The PICA200 is an OpenGL ES 1.1 compliant GPU manufactured by DMP. It comes loaded with a number of extensions that make it similar to an OpenGL ES 2.0 compliant GPU (ability to run programmable vertex/geometry shaders, for instance). Because of this, Nintendo wrapped GPU access into an OpenGL ES 2.0 implementation with some limitations. As the fragment stage of the pipeline is non-programmable, Nintendo instead gives developers the ability to configure a number of fragment-related values through glGetUniformLocation and glUniformXX. See below for the full list. |
| | | |
| == Shader program structure == | | == Shader program structure == |
Line 2,239: |
Line 2,236: |
| | | |
| On steeldiver's uniform handlers : R1 is a pointer to the current shader program object, R12 is a pointer to the data the uniform is being set to. | | On steeldiver's uniform handlers : R1 is a pointer to the current shader program object, R12 is a pointer to the data the uniform is being set to. |
| + | |
| + | == Other Symbols == |
| + | |
| + | The list above is not exhaustive. A number of other strings specific to Nintendo's rendering framework have been found. Below is a table listing those strings including the location they were found in. |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Name |
| + | ! Context |
| + | ! Occurrence |
| + | |- |
| + | | dmp_Point.viewport.xy |
| + | | Name of a shader uniform |
| + | | CTRAging's romfs:/gpu/GasCessna/shader.shbin |
| + | |- |
| + | | dmp_Point.distanceAttenuation |
| + | | Name of a shader uniform |
| + | | CTRAging's romfs:/gpu/GasCessna/shader.shbin |
| + | |- |
| + | | dmp_Point.Position |
| + | | Name of a shader uniform |
| + | | CTRAging's romfs:/gpu/GasCessna/shader.shbin |
| + | |- |
| + | | dmp_Point.PointSize |
| + | | Name of a shader uniform |
| + | | CTRAging's romfs:/gpu/GasCessna/shader.shbin |
| + | |} |